Message: Re: Relation between physical particles and G4Tracks Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Relation between physical particles and G4Tracks 

Forum: Event and Track Management
Re: None Relation between physical particles and G4Tracks (Erik Dietz-Laursonn)
Date: 03 Jul, 2012
From: Gumplinger Peter <Gumplinger Peter>

Dear Erik,

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:

theCerenkovProcess->SetTrackSecondariesFirst(false);

theScintillationProcess->SetTrackSecondariesFirst(false);

or, if you use G4OpticalPhysics, with:

opticalPhysics->SetTrackSecondariesFirst(kCerenkov,false);

opticalPhysics->SetTrackSecondariesFirst(kScintillation,false);

in C++ or with:

/optics_engine/selectOpProcess Scintillation

/optics_engine/setTrackSecondariesFirst false

/optics_engine/selectOpProcess Cerenkov

/optics_engine/setTrackSecondariesFirst false

> (I am not quite sure, if GetTotalEnergyDeposit() is the right function,

yes

> 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:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Relation between physical particles and G4Tracks   (Erik Dietz-Laursonn - 04 Jul, 2012)
(_ None: Re: Relation between physical particles and G4Tracks   (Marc Verderi - 04 Jul, 2012)
(_ Agree: Re: Relation between physical particles and G4Tracks   (Gumplinger Peter - 04 Jul, 2012)
(_ None: Re: Relation between physical particles and G4Tracks   (Erik Dietz-Laursonn - 05 Jul, 2012)
(_ Feedback: Re: Relation between physical particles and G4Tracks   (Gumplinger Peter - 05 Jul, 2012)
 Add Message Add Message
to: "Re: Relation between physical particles and G4Tracks"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]