|Message: Relation between physical particles and G4Tracks||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
I have a question concerning the relation between physical particles (and their trajectory, respectively) and the G4Track objects created for them. As far as I understood it until last week, particles and G4Tracks should be equivalent, i.e. each track belongs to exactly one particle and each particle owns exactly one G4Track.
Acting on the assumption, I tried to determine the energy deposit of the primary particles in my simulation by checking each G4Track's parentID in my SteppingAction (which inherits from G4UserSteppingAction) and for parentID = 0 adding up the result of aStep->GetTotalEnergyDeposit() in my UserTrackInformation (which inherits from G4VUserTrackInformation and is created for each G4Track). Doing this, I get the total energy deposit (I am not quite sure, if GetTotalEnergyDeposit() is the right function, or if I should use GetNonIonizingEnergyDeposit() or the sum of both) of each G4Track belonging to a primary particle.
Now my problem is: Against my expectations, that did not give me the total energy deposit of my primary particles. After adding several "cout"s, I found out that there were several G4Track belonging to the same particle. All G4Tracks belonging to the same particle have the same trackID, parentID,..., but contain different G4Steps of the particle's trajectory (e.g. G4Track 1: G4Step 1-3; G4Track 2: G4Step 4-5; G4Track 3: G4Step 6;...). An new G4Track (belonging to a particle that already has G4Tracks) seems always to emerge when the particle creates new particles i.e. G4Tracks (e.g. a muon creating photons by scintillation).
So my question is: Is it correct, that a particle also creates a new G4Track for itself when creating new particles (e.g. a muon creating photons by scintillation seems to create the photons' G4Tracks as well as a new muon G4Track, having the same trackID, parentID,... as the original muon G4Track)? This seems to be very unintuitive to me, why is it like this? And if it is like this (and should be like this), what is an easy possibility to determine the energy deposit by particle and not by event, as shown in the examples?
Best regards, Erik
|Inline Depth:||Outline Depth:||Add message:|