How to store information only about original particle gun and analyse output

Dear experts

I have simulated a setup simil-LHCb using a very simplified geometry description setting materials as i expect to be in a given volume.

I wanted to verify the simulation i make in terms of multiple scattering effect.

Therefore what i was trying to do is to simulate 1000 tracks with a given momentum and pick up the energy deposition in my 2 active layers of pixels before and after the material budget i placed.

I am trying to store therefore ONLY for the beam-particle the information about the (x,y,z, track tx, track ty ) at a given location. How can this been easily stored?
Thanks in advance for any hints.

Cheers
Renato

Hi @rquaglia

the beam particles of your setup are available as MCTrack objects that you can store. If in addition you want more information about them interacting with your sensors, you can in addition store MCParticle objects, which essentially represent “a particle in a sensitive volume” and are therefore independent between the different sensors. It provides you for example entry and exit points of the sensor.

The MCTrack and MCParticle objects are linked together and also have a “parent” property. With this it is possible to reconstruct the full tree of primary and secondary particles.

If you would like to store all tracks that have been produced, and not only the ones that interacted with a sensor (this is the default), you need to set

[DepositionGeant4]
record_all_tracks = true

as described in the DepositionGeant4 module README.

All the best,
Simon

Dear @simonspa , i was indeed going through this direction and pos-processing the TTree produced . I might post here once i am done the script.

Just to be sure: I guess storing the entry-exit position would allow me to define also the slope at the point for a given track.

Just as additional question : where one could find the estimated material budget of the templated “velopix”, “timepix” object? If i get right this is anyway active material but also act as scatter center. I would be interested to see what is the radiation length of them. Is there a simple way to have an estimation of it within all-pix code?
Cheers and thanks again for the hint.
Renato

The objects themselves already have a getPrimary method, so not much filtering needed.

If I understand your goal correctly, then yes, that should work.

We do calculate the total material budget from the Geant4 models we generate. One way of getting them out would be to use the CorryvreckanWriter module which generates a geometry file which lists the material budget for each of the sensors. If this doesn’t work, let me know and we figure out a better way - but the info is there!

Cheers,
Simon

1 Like