i am a very new user of Geant4 and i would like to apologise if my question is very naive.
Is there an example available which is using a loader of a GDML file and perform a detailed study of the material budget ? [ x/x0 and l/Lint?] Basically from official simulations i got GDMLs files and i want to understand what geant4 is seeing when using those files.
I’ve not done this myself, but it should be quite straightforward, I would have thought, to read in a GDML file (see examples/extended/persistency/gdml/G01) and use the particle gun or a General Particle source to fire a geantino (a non-interaction imaginary particle) in a series of directions. In your SteppingAction you could query the material and, knowing the step length, accumulate radiation lengths and hadronic (what particle?) interaction lengths. (To be honest, not sure how to get the radiation length and hadronic interaction length for a given material, so maybe someone else can help there.)
I far as I can understand, G01 read and write gdml geometry, and shoot geantinos in it.
If you want to compute and plot the number of interactionLength that these geantinos ‘see’ along their trajectory, you need, at least, a SteppingAction and a TrackingAction classes.