Need to Stop Sensitive Detector from Detecting Energy Continuously

I have created a physical and logical volume that I want to use to detect optical photons and know their energies and positions when they hit the detector. I created a sensitive detector, told it I wanted to measure energy and position when an optical photon hits it, and connected it to the logical volume, but when I create an event, on my terminal it displays the energy continuously until the simulation overloads my cpu and crashes. Is there a way for the sensitive detector to only take the energy of the particle when it hits the logical volume?