FairRoot/PandaRoot
|
#include <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 | SetPersistence (Bool_t choice) |
void | AddPoint (DetectorId iDet) |
void | AddPoint (DetectorId iDet, Int_t iTrack) |
TParticle * | GetParticle (Int_t trackId) const |
TClonesArray * | GetListOfParticles () |
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. 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 | fPersistence |
Definition at line 45 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.
References fIndexMap, fParticles, fPointsMap, fStoreMap, and fTracks.
|
virtual |
|
private |
|
virtual |
Add a TParticle to the fParticles array
Definition at line 186 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 408 of file PndStack.cxx.
References a, fCurrentTrack, and fPointsMap.
Referenced by PndRich::ProcessHits(), PndFts2::ProcessHits(), PndFts::ProcessHits(), PndFtof::ProcessHits(), PndEmc::ProcessHits(), PndGemDetector::ProcessHits(), PndSciT::ProcessHits(), PndStt::ProcessHits(), PndDrc::ProcessHits(), PndSdsDetector::ProcessHits(), PndDsk::ProcessHitsCerenkov(), PndDsk::ProcessHitsCerenkov_FLG(), PndMdt::ProcessHitsFast(), PndDsk::ProcessHitsParticle(), and PndMdt::ProcessHitsRoot().
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 419 of file PndStack.cxx.
References a, and fPointsMap.
|
virtual |
Fill the MCTrack output array, applying filter criteria
Definition at line 198 of file PndStack.cxx.
References a, Bool_t, DEBUG, fIndexMap, fNParticles, fNTracks, fPointsMap, fStoreIter, fStoreMap, GetParticle(), kHYP, kRICH, Print(), SelectTracks(), SetGeneratorFlags(), PndMCTrack::SetNPoints(), store(), and track.
|
virtual |
Get the track number of the parent of the current track Declared in TVirtualMCStack
Definition at line 432 of file PndStack.cxx.
References GetCurrentTrack().
|
virtual |
Get the current track's particle Declared in TVirtualMCStack
Definition at line 173 of file PndStack.cxx.
References fCurrentTrack, and GetParticle().
Referenced by GetCurrentParentTrackNumber().
|
inlinevirtual |
Get the number of the current track Declared in TVirtualMCStack
Definition at line 134 of file PndStack.h.
References fCurrentTrack.
|
inline |
|
inlinevirtual |
Get number of primary tracks Declared in TVirtualMCStack
Definition at line 122 of file PndStack.h.
References fNPrimaries.
|
inlinevirtual |
Get total number of tracks Declared in TVirtualMCStack
Definition at line 116 of file PndStack.h.
References fNParticles.
Referenced by PndFastSim::Exec().
TParticle * PndStack::GetParticle | ( | Int_t | trackId | ) | const |
Accessors
Definition at line 442 of file PndStack.cxx.
References fNParticles, and fParticles.
Referenced by PndFastSim::Exec(), FillTrackArray(), GetCurrentTrack(), and SelectTracks().
Definition at line 248 of file PndStack.h.
|
virtual |
Get next particle for tracking from the stack. Declared in TVirtualMCStack
iTrack | index of popped track (return) |
Definition at line 116 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 |
Definition at line 144 of file PndStack.cxx.
References fNPrimaries, fParticles, and kDoneBit.
|
virtual |
Output to screen
iVerbose | 0=events summary, 1=track info |
Definition at line 393 of file PndStack.cxx.
References DEBUG, fNParticles, fNPrimaries, fNTracks, and fTracks.
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) |
Definition at line 57 of file PndStack.cxx.
Referenced by PndFastSim::Exec().
|
virtual |
Definition at line 73 of file PndStack.cxx.
References fNParticles, fNPrimaries, fParticles, fStack, kDoneBit, and particle.
|
virtual |
Register the MCTrack array to the Root Manager
Definition at line 385 of file PndStack.cxx.
References fPersistence, and fTracks.
|
virtual |
Resets arrays and stack and deletes particles and tracks
Definition at line 371 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 454 of file PndStack.cxx.
References a, Bool_t, Double_t, energy, fEnergyCut, fMinPoints, fNParticles, fPointsMap, fStoreMap, fStoreMothers, fStoreSecondaries, GetParticle(), i, kHYP, kRICH, p, and store().
Referenced by FillTrackArray().
|
inlinevirtual |
Set the current track number Declared in TVirtualMCStack
iTrack | track number |
Definition at line 110 of file PndStack.h.
References fCurrentTrack.
|
inline |
|
private |
Definition at line 248 of file PndStack.cxx.
References fIndexMap, fParticles, fTracks, PndMCTrack::GetMotherID(), i, m, n, PndMCTrack::SetGeneratorCreated(), and PndMCTrack::SetGeneratorDecayed().
Referenced by FillTrackArray().
|
inline |
Definition at line 171 of file PndStack.h.
References fMinPoints, and min().
Referenced by Config().
|
inline |
Definition at line 174 of file PndStack.h.
References choice, and fPersistence.
Referenced by Config().
|
inline |
|
inline |
Modifiers
Definition at line 170 of file PndStack.h.
References choice, and fStoreSecondaries.
Referenced by Config().
|
virtual |
Update the track index in the MCTracks and MCPoints
Definition at line 303 of file PndStack.cxx.
References DEBUG, fIndexIter, fIndexMap, fNTracks, fTracks, PndMCTrack::GetMotherID(), PndMCTrack::GetSecondMotherID(), i, point, PndMCTrack::SetMotherID(), PndMCTrack::SetSecondMotherID(), and track.
|
private |
Some indizes and counters
Definition at line 228 of file PndStack.h.
Referenced by AddPoint(), GetCurrentTrack(), GetCurrentTrackNumber(), PopNextTrack(), Reset(), and SetCurrentTrack().
|
private |
Definition at line 238 of file PndStack.h.
Referenced by SelectTracks(), and SetEnergyCut().
|
private |
Number of entries in fTracks.
Definition at line 232 of file PndStack.h.
Referenced by AddParticle(), and Reset().
|
private |
Definition at line 220 of file PndStack.h.
Referenced by UpdateTrackIndex().
|
private |
STL map from particle index to track index
Definition at line 219 of file PndStack.h.
Referenced by FillTrackArray(), PndStack(), SetGeneratorFlags(), and UpdateTrackIndex().
|
private |
Definition at line 237 of file PndStack.h.
Referenced by SelectTracks(), and SetMinPoints().
|
private |
Number of primary particles.
Definition at line 230 of file PndStack.h.
Referenced by FillTrackArray(), GetNtrack(), GetParticle(), Print(), PushTrack(), Reset(), and SelectTracks().
|
private |
Index of current track.
Definition at line 229 of file PndStack.h.
Referenced by GetNprimary(), PopPrimaryForTracking(), Print(), PushTrack(), and Reset().
|
private |
Number of entries in fParticles.
Definition at line 231 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 206 of file PndStack.h.
Referenced by AddParticle(), GetListOfParticles(), GetParticle(), PndStack(), PopPrimaryForTracking(), PushTrack(), Reset(), SetGeneratorFlags(), and ~PndStack().
|
private |
Definition at line 240 of file PndStack.h.
Referenced by Register(), and SetPersistence().
|
private |
STL map from track index and detector ID to number of MCPoints
Definition at line 224 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 200 of file PndStack.h.
Referenced by PopNextTrack(), PushTrack(), and Reset().
Definition at line 215 of file PndStack.h.
Referenced by FillTrackArray().
STL map from particle index to storage flag
Definition at line 214 of file PndStack.h.
Referenced by FillTrackArray(), PndStack(), and SelectTracks().
|
private |
Definition at line 239 of file PndStack.h.
Referenced by SelectTracks(), and StoreMothers().
|
private |
Used for merging.
Variables defining the criteria for output selection
Definition at line 236 of file PndStack.h.
Referenced by SelectTracks(), and StoreSecondaries().
|
private |
Array of PndMCTracks containg the tracks written to the output
Definition at line 210 of file PndStack.h.
Referenced by PndStack(), Print(), Register(), Reset(), SetGeneratorFlags(), UpdateTrackIndex(), and ~PndStack().