er  dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ERStack Class Reference
Inheritance diagram for ERStack:
Inheritance graph
[legend]
Collaboration diagram for ERStack:
Collaboration graph
[legend]

Public Member Functions

 ERStack (Int_t size=100)
 
virtual ~ERStack ()
 
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 ()
 

Private Member Functions

void SelectTracks ()
 
 ERStack (const ERStack &)
 
ERStackoperator= (const ERStack &)
 

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. More...
 
Int_t fMinPoints
 
Double32_t fEnergyCut
 
Bool_t fStoreMothers
 

Detailed Description

Definition at line 41 of file ERStack.h.

Constructor & Destructor Documentation

ERStack::ERStack ( Int_t  size = 100)

Default constructor param size Estimated track number

Definition at line 26 of file ERStack.cxx.

ERStack::~ERStack ( )
virtual

Destructor

Definition at line 54 of file ERStack.cxx.

Member Function Documentation

void ERStack::AddParticle ( TParticle *  part)
virtual

Add a TParticle to the fParticles array

Definition at line 200 of file ERStack.cxx.

void ERStack::AddPoint ( DetectorId  iDet)

Increment number of points for the current track in a given detector

Parameters
iDetDetector unique identifier

Definition at line 360 of file ERStack.cxx.

void ERStack::AddPoint ( DetectorId  iDet,
Int_t  iTrack 
)

Increment number of points for an arbitrary track in a given detector

Parameters
iDetDetector unique identifier
iTrackTrack number

Definition at line 372 of file ERStack.cxx.

void ERStack::FillTrackArray ( )
virtual

Fill the MCTrack output array, applying filter criteria

Definition at line 214 of file ERStack.cxx.

Int_t ERStack::GetCurrentParentTrackNumber ( ) const
virtual

Get the track number of the parent of the current track Declared in TVirtualMCStack

Definition at line 386 of file ERStack.cxx.

TParticle * ERStack::GetCurrentTrack ( ) const
virtual

Get the current track's particle Declared in TVirtualMCStack

Definition at line 185 of file ERStack.cxx.

virtual Int_t ERStack::GetCurrentTrackNumber ( ) const
inlinevirtual

Get the number of the current track Declared in TVirtualMCStack

Definition at line 128 of file ERStack.h.

virtual Int_t ERStack::GetNprimary ( ) const
inlinevirtual

Get number of primary tracks Declared in TVirtualMCStack

Definition at line 116 of file ERStack.h.

virtual Int_t ERStack::GetNtrack ( ) const
inlinevirtual

Get total number of tracks Declared in TVirtualMCStack

Definition at line 110 of file ERStack.h.

TParticle * ERStack::GetParticle ( Int_t  trackId) const

Accessors

Definition at line 398 of file ERStack.cxx.

TParticle * ERStack::PopNextTrack ( Int_t &  iTrack)
virtual

Get next particle for tracking from the stack. Declared in TVirtualMCStack

Parameters
iTrackindex of popped track (return)
Returns
Pointer to the TParticle of the track

Definition at line 130 of file ERStack.cxx.

TParticle * ERStack::PopPrimaryForTracking ( Int_t  iPrim)
virtual

Get primary particle by index for tracking from stack Declared in TVirtualMCStack

Parameters
iPrimindex of primary particle
Returns
Pointer to the TParticle of the track

Definition at line 159 of file ERStack.cxx.

void ERStack::Print ( Int_t  iVerbose = 0) const
virtual

Output to screen

Parameters
iVerbose0=events summary, 1=track info

Definition at line 343 of file ERStack.cxx.

void ERStack::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

Add a TParticle to the stack. Declared in TVirtualMCStack

Parameters
toBeDoneFlag for tracking
parentIDIndex of mother particle
pdgCodeParticle type (PDG encoding)
px,py,pzMomentum components at start vertex [GeV]
eTotal energy at start vertex [GeV]
vx,vy,vzCoordinates of start vertex [cm]
timeStart time of track [s]
polx,poly,polzPolarisation vector
procProduction mechanism (VMC encoding)
ntrTrack number (filled by the stack)
weightParticle weight
isGeneration status code (whatever that means)

Definition at line 85 of file ERStack.cxx.

void ERStack::Register ( )
virtual

Register the MCTrack array to the Root Manager

Definition at line 334 of file ERStack.cxx.

void ERStack::Reset ( )
virtual

Resets arrays and stack and deletes particles and tracks

Definition at line 319 of file ERStack.cxx.

void ERStack::SelectTracks ( )
private

Mark tracks for output using selection criteria

Definition at line 413 of file ERStack.cxx.

virtual void ERStack::SetCurrentTrack ( Int_t  iTrack)
inlinevirtual

Set the current track number Declared in TVirtualMCStack

Parameters
iTracktrack number

Definition at line 104 of file ERStack.h.

void ERStack::StoreSecondaries ( Bool_t  choice = kTRUE)
inline

Modifiers

Definition at line 164 of file ERStack.h.

void ERStack::UpdateTrackIndex ( TRefArray *  detArray)
virtual

Update the track index in the MCTracks and MCPoints

Definition at line 261 of file ERStack.cxx.

Member Data Documentation

Int_t ERStack::fCurrentTrack
private

Some indizes and counters

Definition at line 221 of file ERStack.h.

std::map<Int_t, Int_t> ERStack::fIndexMap
private

STL map from particle index to track index

Definition at line 212 of file ERStack.h.

TClonesArray* ERStack::fParticles
private

Array of TParticles (contains all TParticles put into or created by the transport

Definition at line 199 of file ERStack.h.

std::map<std::pair<Int_t, Int_t>, Int_t> ERStack::fPointsMap
private

STL map from track index and detector ID to number of MCPoints

Definition at line 217 of file ERStack.h.

std::stack<TParticle*> ERStack::fStack
private

STL stack (FILO) used to handle the TParticles for tracking

Definition at line 193 of file ERStack.h.

std::map<Int_t, Bool_t> ERStack::fStoreMap
private

STL map from particle index to storage flag

Definition at line 207 of file ERStack.h.

Bool_t ERStack::fStoreSecondaries
private

Used for merging.

Variables defining the criteria for output selection

Definition at line 229 of file ERStack.h.

TClonesArray* ERStack::fTracks
private

Array of CbmMCTracks containg the tracks written to the output

Definition at line 203 of file ERStack.h.


The documentation for this class was generated from the following files: