MCParticle creation issue with multiple particles per event
Summary
DepositionGeant4/SensitiveDetectorActionG4 will create only one MCParticle for a primary track, despite there being multiple particles simulated per event.
Steps to reproduce
Set number_of_particles = 2
The default examples/fast_simulation/fast_simulation.conf with following changes:
-number_of_events = 10000
+number_of_events = 1
-number_of_particles = 1
+number_of_particles = 2
+[LCIOWriter]
+file_name = "run000123-converter.slcio"
What is the current bug behavior?
As the GetTrackID() of the G4Track is used to distinguish between tracks in a sensitive volume while stepping through them, only one primary track (the initial) will create an MC particle. Every primary G4Track will have an ID of 1 per default (I'm unsure if this can be changed).
What is the expected correct behavior?
Every particle crossing should be reflected by an MC particle.
Relevant event logs and/or screenshots
The deposited charge is computed correctly, only a single MC particle is created though!
|16:30:19.361| (INFO) [R:DepositionGeant4] Deposited 102938 charges in sensor of detector telescope0
|16:30:19.417| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (4.69968mm,7.03568mm,-150um) to (6.05663mm,7.23021mm,150um) (local coordinates)
|16:30:19.417| (INFO) [R:DepositionGeant4] Deposited 96078 charges in sensor of detector telescope1
|16:30:19.417| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (4.75517mm,6.89757mm,-150um) to (6.10143mm,7.14707mm,150um) (local coordinates)
|16:30:19.417| (DEBUG) [R:DepositionGeant4] Found MC particle 11 crossing detector from (4.7432mm,6.90759mm,-87.27um) to (4.7342mm,6.87355mm,-144.808um) (local coordinates)
|16:30:19.417| (INFO) [R:DepositionGeant4] Deposited 170374 charges in sensor of detector telescope2
|16:30:19.418| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (4.78851mm,6.81396mm,-150um) to (6.13915mm,7.01893mm,150um) (local coordinates)
|16:30:19.418| (INFO) [R:DepositionGeant4] Deposited 119058 charges in sensor of detector telescope3
|16:30:19.418| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (4.74114mm,6.97014mm,-150um) to (6.09046mm,7.17615mm,150um) (local coordinates)
|16:30:19.418| (INFO) [R:DepositionGeant4] Deposited 129852 charges in sensor of detector telescope4
|16:30:19.418| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (4.72999mm,6.90587mm,-150um) to (6.07437mm,7.13145mm,150um) (local coordinates)
|16:30:19.418| (INFO) [R:DepositionGeant4] Deposited 128140 charges in sensor of detector telescope5
Compared with a simuation of an event with only a single particle:
|16:33:40.951| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (5.48534mm,7.52682mm,-150um) to (5.44074mm,7.57512mm,150um) (local coordinates)
|16:33:40.961| (INFO) [R:DepositionGeant4] Deposited 67084 charges in sensor of detector telescope0
|16:33:41.012| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (5.48961mm,7.68269mm,-150um) to (5.44764mm,7.73386mm,150um) (local coordinates)
|16:33:41.012| (INFO) [R:DepositionGeant4] Deposited 55514 charges in sensor of detector telescope1
|16:33:41.012| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (5.48032mm,7.48007mm,-150um) to (5.43918mm,7.52315mm,150um) (local coordinates)
|16:33:41.013| (INFO) [R:DepositionGeant4] Deposited 55696 charges in sensor of detector telescope2
|16:33:41.013| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (5.48475mm,7.62162mm,-150um) to (5.43557mm,7.57854mm,150um) (local coordinates)
|16:33:41.013| (DEBUG) [R:DepositionGeant4] Found MC particle 11 crossing detector from (5.47255mm,7.61094mm,-75.639um) to (5.47207mm,7.61693mm,-73.491um) (local coordinates)
|16:33:41.013| (INFO) [R:DepositionGeant4] Deposited 104682 charges in sensor of detector telescope3
|16:33:41.013| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (5.48936mm,7.51705mm,-150um) to (5.43699mm,7.46805mm,150um) (local coordinates)
|16:33:41.013| (INFO) [R:DepositionGeant4] Deposited 69894 charges in sensor of detector telescope4
|16:33:41.013| (DEBUG) [R:DepositionGeant4] Found MC particle 211 crossing detector from (5.46267mm,7.61137mm,-150um) to (5.41726mm,7.57612mm,150um) (local coordinates)
|16:33:41.013| (INFO) [R:DepositionGeant4] Deposited 53594 charges in sensor of detector telescope5