System : Linux
REST version : v2.3.12
I am trying to do a very simple simulation of cosmics on a single scintillator plate. The geometry has only one physical volume, the plate itself. I would like to store only those events that leave any energy in the scintillator, and for that, I have defined the storage section as follows:
[...]
<parameter name="saveAllEvents" value="false"/>
[...]
<storage sensitiveVolume="scintillator">
<parameter name="energyRange" value="(0,10)" units="GeV"/>
<activeVolume name="scintillator" chance="1" maxStepSize="100" units="um"/>
</storage>
[...]
But in the end, the simulation stores all the events, even though they did not cross the scintillator. For example:
When I inspected this same event, I found out that the simulation is somehow considering the world as the sensitive volume, because all the energy of the event is considered as deposited in the sensitive volume, when clearly, it is not.
*******************************************************
EVENT ID : 4
TIME : Wed, 01 Jun 2022 12:11:25 +0000 (GMT) + 0 nsec
SUB-EVENT ID : 0
Status : OK
*******************************************************
Total energy : 2477 keV
Sensitive volume energy : 2477 keV
Source origin : (28.88,5,-21.23) mm
Source 0 Particle name : mu-
Source 0 direction : (-0.5569,-0.6803,-0.4766)
Source 0 energy : 5.479e+05 keV
Number of active volumes : 1
Active volume 0: has been stored.
Total energy deposit in volume 0: : 2477 keV
------------------------------------------------------------
Total number of tracks : 146
+++++++++++++++++++++++++++++++++++
It also happens when the muon goes through the scintillator, as in this example,
But when inspecting it, there is only one volume, which is not the scintillator, because it contains the total energy of the event, when in reality, only a small part of the event occurs inside the scintillator volume:
*******************************************************
EVENT ID : 0
TIME : Wed, 01 Jun 2022 12:11:25 +0000 (GMT) + 0 nsec
SUB-EVENT ID : 0
Status : OK
*******************************************************
Total energy : 3644 keV
Sensitive volume energy : 3644 keV
Source origin : (6.299,5,25.45) mm
Source 0 Particle name : mu-
Source 0 direction : (-0.7195,-0.6945,-0.004744)
Source 0 energy : 3.128e+06 keV
Number of active volumes : 1
Active volume 0: has been stored.
Total energy deposit in volume 0: : 3644 keV
-----------------------------------------------
Total number of tracks : 225
+++++++++++++++++++++++++++++++++++++++++++
So, any idea of why is this happening? Must the sensitive volume be a gas?