EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <EicRoot/blob/master/pnddata/PndStack.h>
Public Member Functions | |
PndStack (Int_t size=100) | |
virtual | ~PndStack () |
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) |
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 secondParentId) |
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 (Int_t iVerbose=0) const |
void | StoreSecondaries (Bool_t choice=kTRUE) |
void | SetMinPoints (Int_t min) |
void | SetEnergyCut (Double_t eMin) |
void | StoreMothers (Bool_t choice=kTRUE) |
void | AddPoint (DetectorId iDet) |
void | AddPoint (DetectorId iDet, Int_t iTrack) |
TParticle * | GetParticle (Int_t trackId) const |
TClonesArray * | GetListOfParticles () |
Public Member Functions inherited from FairGenericStack | |
FairGenericStack () | |
FairGenericStack (Int_t size) | |
virtual | ~FairGenericStack () |
void | AddParticle (TParticle *part) |
Private Member Functions | |
void | SelectTracks () |
void | SetGeneratorFlags (Int_t myid) |
PndStack (const PndStack &L) | |
PndStack & | operator= (const PndStack &) |
Private Attributes | |
std::stack< TParticle * > | fStack |
TClonesArray * | fParticles |
TClonesArray * | fTracks |
std::map< Int_t, Bool_t > | fStoreMap |
std::map< Int_t, Bool_t >::iterator | fStoreIter |
std::map< Int_t, Int_t > | fIndexMap |
std::map< Int_t, Int_t >::iterator | fIndexIter |
std::map< std::pair< Int_t, Int_t >, Int_t > | fPointsMap |
Int_t | fCurrentTrack |
Int_t | fNPrimaries |
Index of current track. | |
Int_t | fNParticles |
Number of primary particles. | |
Int_t | fNTracks |
Number of entries in fParticles. | |
Int_t | fIndex |
Number of entries in fTracks. | |
Bool_t | fStoreSecondaries |
Used for merging. | |
Int_t | fMinPoints |
Double32_t | fEnergyCut |
Bool_t | fStoreMothers |
Additional Inherited Members | |
Protected Attributes inherited from FairGenericStack | |
FairLogger * | fLogger |
Int_t | fVerbose |
Version 14/06/07 by V. Friese
This class handles the particle stack for the transport simulation. For the stack FILO functunality, it uses the STL stack. To store the tracks during transport, a TParticle arry is used. At the end of the event, tracks satisfying the filter criteria are copied to a PndMCTrack array, which is stored in the output.
The filtering criteria for the output tracks are:
The storage of secondaries can be switched off. The storage of all mothers can be switched off. By default, the minimal number of points is 1 and the energy cut is 0.
Definition at line 43 of file PndStack.h.
View newest version in sPHENIX GitHub at line 43 of file PndStack.h
PndStack::PndStack | ( | Int_t | size = 100 | ) |
Default constructor *param size Estimated track number
Definition at line 27 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 27 of file PndStack.cxx
References fIndexMap, fParticles, fPointsMap, fStoreMap, and fTracks.
|
virtual |
Destructor
Definition at line 42 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 42 of file PndStack.cxx
References fParticles, and fTracks.
|
private |
|
virtual |
Add a TParticle to the fParticles array
Definition at line 181 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 181 of file PndStack.cxx
References fIndex, and fParticles.
void PndStack::AddPoint | ( | DetectorId | iDet | ) |
Increment number of points for the current track in a given detector
iDet | Detector unique identifier |
Definition at line 405 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 405 of file PndStack.cxx
References fCurrentTrack, and fPointsMap.
void PndStack::AddPoint | ( | DetectorId | 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 416 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 416 of file PndStack.cxx
References fPointsMap.
|
virtual |
Fill the MCTrack output array, applying filter criteria
Reimplemented from FairGenericStack.
Definition at line 193 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 193 of file PndStack.cxx
References FairLogger::Debug(), FairLogger::Error(), fIndexMap, fNParticles, fNTracks, fPointsMap, fStoreIter, fStoreMap, GetParticle(), gLogger, kHYP, kRICH, MESSAGE_ORIGIN, Print(), SelectTracks(), SetGeneratorFlags(), and PndMCTrack::SetNPoints().
|
virtual |
Get the track number of the parent of the current track Declared in TVirtualMCStack
Reimplemented from FairGenericStack.
Definition at line 429 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 429 of file PndStack.cxx
References GetCurrentTrack().
|
virtual |
Get the current track's particle Declared in TVirtualMCStack
Reimplemented from FairGenericStack.
Definition at line 168 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 168 of file PndStack.cxx
References fCurrentTrack, GetParticle(), gLogger, MESSAGE_ORIGIN, and FairLogger::Warning().
Referenced by GetCurrentParentTrackNumber().
|
inlinevirtual |
Get the number of the current track Declared in TVirtualMCStack
Reimplemented from FairGenericStack.
Definition at line 132 of file PndStack.h.
View newest version in sPHENIX GitHub at line 132 of file PndStack.h
References fCurrentTrack.
|
inline |
Definition at line 189 of file PndStack.h.
View newest version in sPHENIX GitHub at line 189 of file PndStack.h
References fParticles.
|
inlinevirtual |
Get number of primary tracks Declared in TVirtualMCStack
Reimplemented from FairGenericStack.
Definition at line 120 of file PndStack.h.
View newest version in sPHENIX GitHub at line 120 of file PndStack.h
References fNPrimaries.
|
inlinevirtual |
Get total number of tracks Declared in TVirtualMCStack
Reimplemented from FairGenericStack.
Definition at line 114 of file PndStack.h.
View newest version in sPHENIX GitHub at line 114 of file PndStack.h
References fNParticles.
|
virtual |
Accessors
Reimplemented from FairGenericStack.
Definition at line 439 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 439 of file PndStack.cxx
References FairLogger::Error(), fNParticles, fParticles, gLogger, and MESSAGE_ORIGIN.
Referenced by FillTrackArray(), GetCurrentTrack(), and SelectTracks().
Definition at line 244 of file PndStack.h.
View newest version in sPHENIX GitHub at line 244 of file PndStack.h
|
virtual |
Get next particle for tracking from the stack. Declared in TVirtualMCStack
iTrack | index of popped track (return) |
Reimplemented from FairGenericStack.
Definition at line 113 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 113 of file PndStack.cxx
References fCurrentTrack, and fStack.
|
virtual |
Get primary particle by index for tracking from stack Declared in TVirtualMCStack
iPrim | index of primary particle |
Reimplemented from FairGenericStack.
Definition at line 141 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 141 of file PndStack.cxx
References FairLogger::Error(), fNPrimaries, fParticles, gLogger, MESSAGE_ORIGIN, and part.
|
virtual |
Output to screen
iVerbose,: | 0=events summary, 1=track info |
Reimplemented from FairGenericStack.
Definition at line 390 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 390 of file PndStack.cxx
References FairLogger::Debug(), fNParticles, fNPrimaries, fNTracks, fTracks, gLogger, and MESSAGE_ORIGIN.
Referenced by FillTrackArray().
|
virtual |
Add a TParticle to the stack. Declared in TVirtualMCStack
toBeDone | Flag for tracking |
parentID | Index of mother particle |
pdgCode | Particle type (PDG encoding) |
px,py,pz | Momentum components at start vertex [GeV] |
e | Total energy at start vertex [GeV] |
vx,vy,vz | Coordinates of start vertex [cm] |
time | Start time of track [s] |
polx,poly,polz | Polarisation vector |
proc | Production mechanism (VMC encoding) |
ntr | Track number (filled by the stack) |
weight | Particle weight |
is | Generation status code (whatever that means) |
Reimplemented from FairGenericStack.
Definition at line 57 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 57 of file PndStack.cxx
|
virtual |
Reimplemented from FairGenericStack.
Definition at line 73 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 73 of file PndStack.cxx
References fNParticles, fNPrimaries, fParticles, fStack, and particle.
|
virtual |
Register the MCTrack array to the Root Manager
Reimplemented from FairGenericStack.
Definition at line 382 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 382 of file PndStack.cxx
References fTracks, FairRootManager::Instance(), and FairRootManager::Register().
|
virtual |
Resets arrays and stack and deletes particles and tracks
Reimplemented from FairGenericStack.
Definition at line 368 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 368 of file PndStack.cxx
References fCurrentTrack, fIndex, fNParticles, fNPrimaries, fNTracks, fParticles, fPointsMap, fStack, and fTracks.
|
private |
Mark tracks for output using selection criteria
Definition at line 451 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 451 of file PndStack.cxx
References fEnergyCut, fMinPoints, fNParticles, fPointsMap, fStoreMap, fStoreMothers, fStoreSecondaries, GetParticle(), kHYP, kRICH, mass, and p.
Referenced by FillTrackArray().
|
inlinevirtual |
Set the current track number Declared in TVirtualMCStack
iTrack | track number |
Reimplemented from FairGenericStack.
Definition at line 108 of file PndStack.h.
View newest version in sPHENIX GitHub at line 108 of file PndStack.h
References fCurrentTrack.
|
inline |
Definition at line 170 of file PndStack.h.
View newest version in sPHENIX GitHub at line 170 of file PndStack.h
References fEnergyCut.
|
private |
Definition at line 243 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 243 of file PndStack.cxx
References FairLogger::Error(), fIndexMap, fParticles, fTracks, PndMCTrack::GetMotherID(), gLogger, Acts::UnitConstants::m, MESSAGE_ORIGIN, n, part, PndMCTrack::SetGeneratorCreated(), and PndMCTrack::SetGeneratorDecayed().
Referenced by FillTrackArray().
|
inline |
Definition at line 169 of file PndStack.h.
View newest version in sPHENIX GitHub at line 169 of file PndStack.h
References fMinPoints, and min.
Referenced by Config().
|
inline |
Definition at line 171 of file PndStack.h.
View newest version in sPHENIX GitHub at line 171 of file PndStack.h
References fStoreMothers.
|
inline |
Modifiers
Definition at line 168 of file PndStack.h.
View newest version in sPHENIX GitHub at line 168 of file PndStack.h
References fStoreSecondaries.
Referenced by Config().
|
virtual |
Update the track index in the MCTracks and MCPoints
Reimplemented from FairGenericStack.
Definition at line 298 of file PndStack.cxx.
View newest version in sPHENIX GitHub at line 298 of file PndStack.cxx
References FairLogger::Debug(), FairLogger::Error(), fIndexIter, fIndexMap, fNTracks, fTracks, FairDetector::GetCollection(), FairMCEventHeader::GetEventID(), PndMCTrack::GetMotherID(), FairRootManager::GetObject(), PndMCTrack::GetSecondMotherID(), FairMCPoint::GetTrackID(), gLogger, hitArray, FairRootManager::Instance(), MESSAGE_ORIGIN, FairMultiLinkedData::SetLink(), PndMCTrack::SetMotherID(), PndMCTrack::SetSecondMotherID(), and FairMCPoint::SetTrackID().
|
private |
Some indizes and counters
Definition at line 225 of file PndStack.h.
View newest version in sPHENIX GitHub at line 225 of file PndStack.h
Referenced by AddPoint(), GetCurrentTrack(), GetCurrentTrackNumber(), PopNextTrack(), Reset(), and SetCurrentTrack().
|
private |
Definition at line 235 of file PndStack.h.
View newest version in sPHENIX GitHub at line 235 of file PndStack.h
Referenced by SelectTracks(), and SetEnergyCut().
|
private |
Number of entries in fTracks.
Definition at line 229 of file PndStack.h.
View newest version in sPHENIX GitHub at line 229 of file PndStack.h
Referenced by AddParticle(), and Reset().
|
private |
Definition at line 217 of file PndStack.h.
View newest version in sPHENIX GitHub at line 217 of file PndStack.h
Referenced by UpdateTrackIndex().
|
private |
STL map from particle index to track index
Definition at line 216 of file PndStack.h.
View newest version in sPHENIX GitHub at line 216 of file PndStack.h
Referenced by FillTrackArray(), PndStack(), SetGeneratorFlags(), and UpdateTrackIndex().
|
private |
Definition at line 234 of file PndStack.h.
View newest version in sPHENIX GitHub at line 234 of file PndStack.h
Referenced by SelectTracks(), and SetMinPoints().
|
private |
Number of primary particles.
Definition at line 227 of file PndStack.h.
View newest version in sPHENIX GitHub at line 227 of file PndStack.h
Referenced by FillTrackArray(), GetNtrack(), GetParticle(), Print(), PushTrack(), Reset(), and SelectTracks().
|
private |
Index of current track.
Definition at line 226 of file PndStack.h.
View newest version in sPHENIX GitHub at line 226 of file PndStack.h
Referenced by GetNprimary(), PopPrimaryForTracking(), Print(), PushTrack(), and Reset().
|
private |
Number of entries in fParticles.
Definition at line 228 of file PndStack.h.
View newest version in sPHENIX GitHub at line 228 of file PndStack.h
Referenced by FillTrackArray(), Print(), Reset(), and UpdateTrackIndex().
|
private |
Array of TParticles (contains all TParticles put into or created by the transport
Definition at line 203 of file PndStack.h.
View newest version in sPHENIX GitHub at line 203 of file PndStack.h
Referenced by AddParticle(), GetListOfParticles(), GetParticle(), PndStack(), PopPrimaryForTracking(), PushTrack(), Reset(), SetGeneratorFlags(), and ~PndStack().
|
private |
STL map from track index and detector ID to number of MCPoints
Definition at line 221 of file PndStack.h.
View newest version in sPHENIX GitHub at line 221 of file PndStack.h
Referenced by AddPoint(), FillTrackArray(), PndStack(), Reset(), and SelectTracks().
|
private |
STL stack (FILO) used to handle the TParticles for tracking
Definition at line 197 of file PndStack.h.
View newest version in sPHENIX GitHub at line 197 of file PndStack.h
Referenced by PopNextTrack(), PushTrack(), and Reset().
|
private |
Definition at line 212 of file PndStack.h.
View newest version in sPHENIX GitHub at line 212 of file PndStack.h
Referenced by FillTrackArray().
|
private |
STL map from particle index to storage flag
Definition at line 211 of file PndStack.h.
View newest version in sPHENIX GitHub at line 211 of file PndStack.h
Referenced by FillTrackArray(), PndStack(), and SelectTracks().
|
private |
Definition at line 236 of file PndStack.h.
View newest version in sPHENIX GitHub at line 236 of file PndStack.h
Referenced by SelectTracks(), and StoreMothers().
|
private |
Used for merging.
Variables defining the criteria for output selection
Definition at line 233 of file PndStack.h.
View newest version in sPHENIX GitHub at line 233 of file PndStack.h
Referenced by SelectTracks(), and StoreSecondaries().
|
private |
Array of PndMCTracks containg the tracks written to the output
Definition at line 207 of file PndStack.h.
View newest version in sPHENIX GitHub at line 207 of file PndStack.h
Referenced by PndStack(), Print(), Register(), Reset(), SetGeneratorFlags(), UpdateTrackIndex(), and ~PndStack().