|Message: Re: 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)|
Your understanding of how Geant4 works, as you've explained it, is in general correct. However, in cases where the primary particle, or any particle, generates optical photons, the default behaviour is different. The scintillation photon producing particle is 'put on its own stack' so that the daughters - the optical photons - are tracked first, before the original particle continues to be tracked over its next step. This is done so that the secondary particle stack does not become too large and all of the secondaries are dealt with before the original particle has a chance to produce more. You can change this (default) behaviour of G4Scintillation and G4Cerenkov by setting:
or, if you use G4OpticalPhysics, with:
in C++ or with:
> (I am not quite sure, if GetTotalEnergyDeposit() is the right function,
> 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).
In some inelastic processes, the original (notice I do not use the word primary) particle/track also 'disappears' and a new track emerges. In this case, it is debatable as to what is the 'same particle'. The scattered particle with substantially less energy is considered to be a 'new' particle (G4DynamicParticle) even if it is the same type (G4ParticleDefinition)
> 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)?
I am surprised that you are saying that the trackID has not also changed, or the parentID? That should not be the case. You should be able to trace (if you have saved G4Trajectories) the history of tracks from trackID to parentId, and so on.
> This seems to be very unintuitive to me, why is > it like this?
See my explanation above - stack size - but also the somewhat arbitrary, and not universal, definition of what constitutes an original and what is a new particle.
> 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?
For the optical processes you can suppress the default mechanism. For inelastic and possibly some other processes, you'll have to code a logic that allows you to identify what you call is still 'the primary particle'.
Hope this helps, Peter
|Inline Depth:||Outline Depth:||Add message:|