Closed gonzaponte closed 1 year ago
If two volumes are selected, the particle is killed after it enters the first one. Is this the intended behaviour?
Yes, if the particle interacts with any of the selected volumes, the particle is killed. The use case that motivated this development was to find out the first interaction point of photons with the tracking plane. Without killing the particles, the photons are reflected and propagated further, sometimes ending up with multiple interactions with the selected volumes. This was useless for me and a waste of cpu time.
Ok. I found a typo in the description of the NEW_geantino
macro files, you may fix it in this PR, since it's related: an specific vertex
--> a specific vertex
.
Yes, if the particle interacts with any of the selected volumes, the particle is killed. The use case that motivated this development was to find out the first interaction point of photons with the tracking plane. Without killing the particles, the photons are reflected and propagated further, sometimes ending up with multiple interactions with the selected volumes. This was useless for me and a waste of cpu time.
Maybe you can add a comment in the macro line, explaining that this new parameter is to be used with only one selected volume.
But it's not. It might be any number of volumes, and if the interaction happens with any of them, it's enough to kill it. For example, the macro I use in my studies contains:
/Actions/SaveAllSteppingAction/select_particle opticalphoton
/Actions/SaveAllSteppingAction/select_volume DICE_BOARD
/Actions/SaveAllSteppingAction/select_volume DICE_MASK
/Actions/SaveAllSteppingAction/select_volume SIPMSensl
/Actions/SaveAllSteppingAction/select_volume SUPPORT_PLATE
I'm interested in capturing every photon that hits the TP, regardless of where.
This PRs adds a command to
SaveAllSteppingAction
that allows killing the tracked particle once it has been selected. This is meant to reduce computation time when tracking photons that usually interact several times before absorption.