I am modifying the example B1 in order to study the efficiency of a Ge detector. I basically want to count the number of photons that deposit all of their energy in the detector and compare it to the total number of photons that I generate. In order to count these photons I use a counter variable and an if statement in the B1EventAction.cc.
if(fEdep == energia)
k += 1;
This works fine, the problem comes when I introduce a change in energy for the photons (I mean running the application multiple times changing the energy each time, with a macro file). Some times the counter doesn’t add 1 when it has to. I don know what is causing this.
Could you point me towards an example or a section of the book of application that could help with the problem?
Thank you in advance for your time.