SuperNEMO-DBD / Falaise

Simulation, Reconstruction and Analysis Software for the SuperNEMO Experiment
http://supernemo.org/Falaise
GNU General Public License v3.0
5 stars 27 forks source link

Simulated true particles from GEANT #176

Closed cherylepatrick closed 1 year ago

cherylepatrick commented 4 years ago

Question/request for @fmauger I think...

We would very much like to be able to identify the true particles produced in simulated events - not just the primary particles, which we can already see, but also those generated by GEANT in the detector simulation. As a couple of examples, Hamzah @wausain would like to be able to see all external background events where an initial gamma produces an e+/e- pair. @pfranchini and Matteo, for their reconstruction studies, would like to be able to identify "true two-track" events.

How hard is it to enable this? What would need doing, and by whom? Thank you!

fmauger commented 4 years ago

Hi Cheryl, Something exists in Bayeux for that and thus in Falaise. I'll have a look and come back to you to explain how it works. frc

cherylepatrick commented 4 years ago

Wonderful, thank you @fmauger !

fmauger commented 4 years ago

There is a template/example profile config file namely:

"resources/snemo/demonstrator/profiles/demonstrator-simulation.profile" which enables to activate full available details about true hits generated along all tracks (or at least charged particle's tracks, I don't remember now).

In section [registry="simulation"] there is the "output_profile" set at "none"? It means that we only get hist from sensitive detectors declared in calo and tracker with the expected emulated physical response of the instruments. If you want to save more informations also from other parts of the detector, it is needed to set "output_profile" to value "all_details".

Looking at config files like " resources/snemo/demonstrator/geant4_control/sensitive/calorimeter.conf", some informations are natively available in the calo hits in addition to standard informations like the time, energy deposit... for example:

From "tracker.conf", one finds similar informations about the volume traversed by the particles and even more (momentum for angular penetration of the track with respect to the cell...).

The file "resources/snemo/demonstrator/geant4_control/hit_processing/step_hit_processors-only_visu_tracks.conf" explains what output profiles activate which "truth hits" processors with a higher level of details. The hit category feed from this output profile is named "visu.tracks". The collection of "visu.tracks" hits contains highly detailed raw G4 hits as explained above. Of course this is very space and time consuming but it can be useful to understand the physical effects you are interested in.

The generation of such detailed hits is only activatable in "all_details" mode for volume like:

More volumes could be added on demand if useful.

To access these informations in the event record, it is needed to target the "__visu.traks" collection of hits and iterate on it.

The hits are implement as instances of the following class: https://github.com/SuperNEMO-DBD/Bayeux/blob/develop/source/bxmctools/include/mctools/base_step_hit.h from which you can extract the informations you want.