CbmRoot
|
#include <CbmStack.h>
Public Member Functions | |
CbmStack (Int_t size=100) | |
virtual | ~CbmStack () |
virtual void | PushTrack (Int_t toBeDone, Int_t parentId, Int_t pdgCode, Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t time, Double_t polx, Double_t poly, Double_t polz, TMCProcess process, Int_t &ntr, Double_t weight, Int_t status) |
Add a track to the stack (TVirtualMCStack) More... | |
virtual void | PushTrack (Int_t toBeDone, Int_t parentId, Int_t pdgCode, Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t time, Double_t polx, Double_t poly, Double_t polz, TMCProcess proc, Int_t &ntr, Double_t weight, Int_t is, Int_t generatorParentID) |
Add a track to the stack (FairGenericStack) More... | |
virtual TParticle * | PopNextTrack (Int_t &iTrack) |
virtual TParticle * | PopPrimaryForTracking (Int_t iPrim) |
virtual void | SetCurrentTrack (Int_t iTrack) |
virtual Int_t | GetNtrack () const |
virtual Int_t | GetNprimary () const |
virtual TParticle * | GetCurrentTrack () const |
virtual Int_t | GetCurrentTrackNumber () const |
virtual Int_t | GetCurrentParentTrackNumber () const |
virtual void | AddParticle (TParticle *part) |
virtual void | FillTrackArray () |
virtual void | UpdateTrackIndex (TRefArray *detArray) |
virtual void | Reset () |
virtual void | Register () |
virtual void | Print (Option_t *="") const |
void | StoreSecondaries (Bool_t choice=kTRUE) |
void | SetMinPoints (Int_t min) |
void | SetEnergyCut (Double_t eMin) |
void | StoreMothers (Bool_t choice=kTRUE) |
void | SetFilter (std::unique_ptr< CbmStackFilter > &filter) |
Set the stack filter class. More... | |
void | AddPoint (ECbmModuleId iDet) |
void | AddPoint (ECbmModuleId iDet, Int_t iTrack) |
TParticle * | GetParticle (Int_t trackId) const |
TClonesArray * | GetListOfParticles () |
void | DoTracking (Bool_t doTracking=kTRUE) |
Private Member Functions | |
CbmStack (const CbmStack &) | |
global switch for geant propagation More... | |
CbmStack & | operator= (const CbmStack &) |
Private Attributes | |
std::stack< TParticle * > | fStack |
std::unique_ptr< CbmStackFilter > | fFilter |
TClonesArray * | fParticles |
Stack filter class. More... | |
TClonesArray * | fTracks |
std::map< Int_t, Int_t > | fIndexMap |
std::map< Int_t, Int_t >::iterator | fIndexIter |
std::map< std::pair< Int_t, ECbmModuleId >, Int_t > | fPointsMap |
Int_t | fCurrentTrack |
Int_t | fNPrimaries |
Index of current track. More... | |
Int_t | fNParticles |
Number of primary particles. More... | |
Int_t | fNTracks |
Number of entries in fParticles. More... | |
Int_t | fIndex |
Number of entries in fTracks. More... | |
Bool_t | fStoreSecondaries |
Used for merging. More... | |
Int_t | fMinPoints |
Double32_t | fEnergyCut |
Bool_t | fStoreMothers |
Bool_t | fdoTracking |
Definition at line 45 of file CbmStack.h.
CbmStack::CbmStack | ( | Int_t | size = 100 | ) |
Default constructor param size Estimated track number
Definition at line 28 of file CbmStack.cxx.
|
virtual |
|
private |
global switch for geant propagation
|
virtual |
Add a TParticle to the fParticles array
Definition at line 230 of file CbmStack.cxx.
References fIndex, and fParticles.
void CbmStack::AddPoint | ( | ECbmModuleId | iDet | ) |
Increment number of points for the current track in a given detector
iDet | Detector unique identifier |
Definition at line 383 of file CbmStack.cxx.
References fCurrentTrack, and fPointsMap.
Referenced by CbmMuch::ProcessHits(), CbmTrd::ProcessHits(), CbmTof::ProcessHits(), CbmMvd::ProcessHits(), CbmRich::ProcessHits(), CbmPsdMC::ProcessHits(), and CbmStsMC::ProcessHits().
void CbmStack::AddPoint | ( | ECbmModuleId | iDet, |
Int_t | iTrack | ||
) |
Increment number of points for an arbitrary track in a given detector
iDet | Detector unique identifier |
iTrack | Track number |
Definition at line 395 of file CbmStack.cxx.
References fPointsMap.
|
inline |
Swich on/off the tracking of a particle
Definition at line 264 of file CbmStack.h.
References fdoTracking.
Referenced by CbmFastDecayer::ReadEvent().
|
virtual |
Fill the MCTrack output array, applying filter criteria
Definition at line 241 of file CbmStack.cxx.
References fFilter, fIndexMap, fNTracks, fParticles, fPointsMap, fTracks, GetParticle(), kPsd, kRef, and CbmMCTrack::SetNPoints().
|
virtual |
Get the track number of the parent of the current track Declared in TVirtualMCStack
Definition at line 408 of file CbmStack.cxx.
References GetCurrentTrack().
|
virtual |
Get the current track's particle Declared in TVirtualMCStack
Definition at line 221 of file CbmStack.cxx.
References fCurrentTrack, and GetParticle().
Referenced by GetCurrentParentTrackNumber().
|
inlinevirtual |
Get the number of the current track Declared in TVirtualMCStack
Definition at line 197 of file CbmStack.h.
References fCurrentTrack.
|
inline |
Definition at line 261 of file CbmStack.h.
References fParticles.
|
inlinevirtual |
Get number of primary tracks Declared in TVirtualMCStack
Definition at line 185 of file CbmStack.h.
References fNPrimaries.
Referenced by CbmFastDecayer::ReadEvent().
|
inlinevirtual |
Get total number of tracks Declared in TVirtualMCStack
Definition at line 179 of file CbmStack.h.
References fNParticles.
Referenced by CbmFastSim::Exec(), and CbmFastDecayer::ReadEvent().
TParticle * CbmStack::GetParticle | ( | Int_t | trackId | ) | const |
Accessors
Definition at line 420 of file CbmStack.cxx.
References fNParticles, and fParticles.
Referenced by CbmFastSim::Exec(), FillTrackArray(), GetCurrentTrack(), and CbmFastDecayer::ReadEvent().
|
virtual |
Get next particle for tracking from the stack. Declared in TVirtualMCStack
iTrack | index of popped track (return) |
This method is called when using TGeant3.
Definition at line 179 of file CbmStack.cxx.
References fCurrentTrack, and fStack.
|
virtual |
Get primary particle by index for tracking from stack Declared in TVirtualMCStack
iPrim | index of primary particle |
This method is called when using TGeant4.
Definition at line 205 of file CbmStack.cxx.
References fNPrimaries, and fParticles.
|
virtual |
Output to screen
iVerbose | 0=events summary, 1=track info |
Definition at line 368 of file CbmStack.cxx.
References fNParticles, fNPrimaries, fNTracks, fTracks, and Cbm::ToString().
|
virtual |
Add a track to the stack (FairGenericStack)
toBeDone | Flag for putting the track on the internal stack | |
parentId | Index of parent track | |
pdgCode | PDG particle code | |
px | Momentum x component [GeV] | |
py | Momentum y component [GeV] | |
pz | Momentum z component [GeV] | |
e | Energy [GeV] | |
vx | Start vertex x coordinate [cm] | |
vy | Start vertex y coordinate [cm] | |
vz | Start vertex z coordinate [cm] | |
polx | Polarisation in x | |
poly | Polarisation in y | |
polz | Polarisation in z | |
process | Generation process | |
weight | Weight factor | |
status | "Generation status code" - no idea what that means | |
generatorParentId | Index of the mother track on generator level | |
[out] | ntr | Track index |
This method is pure virtual in FairGenericStack. It is called by FairPrimaryGenerator::AddTrack for primary tracks.
The meaning of generatorParentId is that a mother-daughter relationship may be present already at generator level - usually, when a particle decay is done in the generator itself. An example is the CbmPlutoGenerator. This parental relationship is preserved for the particles during transport.
Definition at line 112 of file CbmStack.cxx.
References fdoTracking, fNParticles, fNPrimaries, and fStack.
|
virtual |
Add a track to the stack (TVirtualMCStack)
toBeDone | Flag for putting the track on the internal stack | |
parentId | Index of parent track | |
pdgCode | PDG particle code | |
px | Momentum x component [GeV] | |
py | Momentum y component [GeV] | |
pz | Momentum z component [GeV] | |
e | Energy [GeV] | |
vx | Start vertex x coordinate [cm] | |
vy | Start vertex y coordinate [cm] | |
vz | Start vertex z coordinate [cm] | |
polx | Polarisation in x | |
poly | Polarisation in y | |
polz | Polarisation in z | |
process | Generation process | |
weight | Weight factor | |
status | "Generation status code" - no idea what that means | |
[out] | ntr | Track index |
This method is pure virtual in TVirtualMCStack. It is called by the by the transport engine for tracks generated during the transport.
Definition at line 66 of file CbmStack.cxx.
|
virtual |
Register the MCTrack array to the Root Manager
Definition at line 361 of file CbmStack.cxx.
References fTracks.
|
virtual |
Resets arrays and stack and deletes particles and tracks
Definition at line 346 of file CbmStack.cxx.
References fCurrentTrack, fIndex, fNParticles, fNPrimaries, fNTracks, fParticles, fPointsMap, fStack, and fTracks.
|
inlinevirtual |
Set the current track number Declared in TVirtualMCStack
iTrack | track number |
Definition at line 173 of file CbmStack.h.
References fCurrentTrack.
|
inline |
Definition at line 235 of file CbmStack.h.
References fEnergyCut.
|
inline |
|
inline |
Definition at line 234 of file CbmStack.h.
References fMinPoints, and min().
|
inline |
Definition at line 236 of file CbmStack.h.
References fStoreMothers.
|
inline |
|
virtual |
Update the track index in the MCTracks and MCPoints
Definition at line 291 of file CbmStack.cxx.
References fIndexIter, fIndexMap, fNTracks, fTracks, CbmMCTrack::GetMotherId(), i, and CbmMCTrack::SetMotherId().
|
private |
Some indizes and counters
Definition at line 295 of file CbmStack.h.
Referenced by AddPoint(), GetCurrentTrack(), GetCurrentTrackNumber(), PopNextTrack(), Reset(), and SetCurrentTrack().
|
private |
go to tracking
Definition at line 309 of file CbmStack.h.
Referenced by DoTracking(), and PushTrack().
|
private |
Definition at line 305 of file CbmStack.h.
Referenced by SetEnergyCut().
|
private |
Definition at line 272 of file CbmStack.h.
Referenced by FillTrackArray(), and SetFilter().
|
private |
Number of entries in fTracks.
Definition at line 299 of file CbmStack.h.
Referenced by AddParticle(), and Reset().
|
private |
Definition at line 287 of file CbmStack.h.
Referenced by UpdateTrackIndex().
|
private |
STL map from particle index to track index
Definition at line 286 of file CbmStack.h.
Referenced by FillTrackArray(), and UpdateTrackIndex().
|
private |
Definition at line 304 of file CbmStack.h.
Referenced by SetMinPoints().
|
private |
Number of primary particles.
Definition at line 297 of file CbmStack.h.
Referenced by GetNtrack(), GetParticle(), Print(), PushTrack(), and Reset().
|
private |
Index of current track.
Definition at line 296 of file CbmStack.h.
Referenced by GetNprimary(), PopPrimaryForTracking(), Print(), PushTrack(), and Reset().
|
private |
Number of entries in fParticles.
Definition at line 298 of file CbmStack.h.
Referenced by FillTrackArray(), Print(), Reset(), and UpdateTrackIndex().
|
private |
Stack filter class.
Array of TParticles (contains all TParticles put into or created by the transport
Definition at line 278 of file CbmStack.h.
Referenced by AddParticle(), FillTrackArray(), GetListOfParticles(), GetParticle(), PopPrimaryForTracking(), Reset(), and ~CbmStack().
|
private |
STL map from track index and detector ID to number of MCPoints
Definition at line 291 of file CbmStack.h.
Referenced by AddPoint(), FillTrackArray(), and Reset().
|
private |
STL stack (FILO) used to handle the TParticles for tracking
Definition at line 269 of file CbmStack.h.
Referenced by PopNextTrack(), PushTrack(), and Reset().
|
private |
Definition at line 306 of file CbmStack.h.
Referenced by StoreMothers().
|
private |
Used for merging.
Variables defining the criteria for output selection
Definition at line 303 of file CbmStack.h.
Referenced by StoreSecondaries().
|
private |
Array of CbmMCTracks containg the tracks written to the output
Definition at line 282 of file CbmStack.h.
Referenced by FillTrackArray(), Print(), Register(), Reset(), UpdateTrackIndex(), and ~CbmStack().