EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmStack Class Reference

#include <EicRoot/blob/master/cbmdata/CbmStack.h>

+ Inheritance diagram for CbmStack:
+ Collaboration diagram for CbmStack:

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 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 ()
 
 CbmStack (const CbmStack &)
 
CbmStackoperator= (const CbmStack &)
 

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
FairLoggerfLogger
 
Int_t fVerbose
 

Detailed Description

Definition at line 42 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 42 of file CbmStack.h

Constructor & Destructor Documentation

CbmStack::CbmStack ( Int_t  size = 100)

Default constructor *param size Estimated track number

Definition at line 23 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 23 of file CbmStack.cxx

CbmStack::~CbmStack ( )
virtual

Destructor

Definition at line 51 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 51 of file CbmStack.cxx

References fParticles, and fTracks.

CbmStack::CbmStack ( const CbmStack )
private

Member Function Documentation

void CbmStack::AddParticle ( TParticle *  part)
virtual

Add a TParticle to the fParticles array

Definition at line 192 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 192 of file CbmStack.cxx

References fIndex, and fParticles.

void CbmStack::AddPoint ( DetectorId  iDet)

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

Parameters
iDetDetector unique identifier

Definition at line 352 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 352 of file CbmStack.cxx

References fCurrentTrack, and fPointsMap.

Referenced by CbmRich::ProcessHits().

+ Here is the caller graph for this function:

void CbmStack::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 364 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 364 of file CbmStack.cxx

References fPointsMap.

void CbmStack::FillTrackArray ( )
virtual

Fill the MCTrack output array, applying filter criteria

Reimplemented from FairGenericStack.

Definition at line 205 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 205 of file CbmStack.cxx

References FairLogger::endl(), FATAL, fIndexMap, fNParticles, fNTracks, fPointsMap, fStoreIter, fStoreMap, GetParticle(), INFO, kPSD, kREF, Print(), SelectTracks(), and CbmMCTrack::SetNPoints().

+ Here is the call graph for this function:

Int_t CbmStack::GetCurrentParentTrackNumber ( ) const
virtual

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

Reimplemented from FairGenericStack.

Definition at line 378 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 378 of file CbmStack.cxx

References GetCurrentTrack().

+ Here is the call graph for this function:

TParticle * CbmStack::GetCurrentTrack ( ) const
virtual

Get the current track's particle Declared in TVirtualMCStack

Reimplemented from FairGenericStack.

Definition at line 179 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 179 of file CbmStack.cxx

References FairLogger::endl(), fCurrentTrack, GetParticle(), and WARNING.

Referenced by GetCurrentParentTrackNumber().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual Int_t CbmStack::GetCurrentTrackNumber ( ) const
inlinevirtual

Get the number of the current track Declared in TVirtualMCStack

Reimplemented from FairGenericStack.

Definition at line 129 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 129 of file CbmStack.h

References fCurrentTrack.

TClonesArray* CbmStack::GetListOfParticles ( )
inline

Definition at line 186 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 186 of file CbmStack.h

References fParticles.

virtual Int_t CbmStack::GetNprimary ( ) const
inlinevirtual

Get number of primary tracks Declared in TVirtualMCStack

Reimplemented from FairGenericStack.

Definition at line 117 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 117 of file CbmStack.h

References fNPrimaries.

virtual Int_t CbmStack::GetNtrack ( ) const
inlinevirtual

Get total number of tracks Declared in TVirtualMCStack

Reimplemented from FairGenericStack.

Definition at line 111 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 111 of file CbmStack.h

References fNParticles.

TParticle * CbmStack::GetParticle ( Int_t  trackId) const
virtual

Accessors

Reimplemented from FairGenericStack.

Definition at line 389 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 389 of file CbmStack.cxx

References FairLogger::endl(), FATAL, fNParticles, and fParticles.

Referenced by FillTrackArray(), GetCurrentTrack(), and SelectTracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CbmStack& CbmStack::operator= ( const CbmStack )
private
TParticle * CbmStack::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

Reimplemented from FairGenericStack.

Definition at line 124 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 124 of file CbmStack.cxx

References fCurrentTrack, and fStack.

TParticle * CbmStack::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

Reimplemented from FairGenericStack.

Definition at line 153 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 153 of file CbmStack.cxx

References FairLogger::endl(), FATAL, fNPrimaries, fParticles, and part.

+ Here is the call graph for this function:

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

Output to screen

Parameters
iVerbose,:0=events summary, 1=track info

Reimplemented from FairGenericStack.

Definition at line 335 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 335 of file CbmStack.cxx

References FairLogger::endl(), fNParticles, fNPrimaries, fNTracks, fTracks, and INFO.

Referenced by FillTrackArray().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Virtual method PushTrack. Add a TParticle to the stack.

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)

Reimplemented from FairGenericStack.

Definition at line 64 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 64 of file CbmStack.cxx

void CbmStack::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)

Reimplemented from FairGenericStack.

Definition at line 82 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 82 of file CbmStack.cxx

References fNParticles, fNPrimaries, fParticles, fStack, and particle.

void CbmStack::Register ( )
virtual

Register the MCTrack array to the Root Manager

Reimplemented from FairGenericStack.

Definition at line 326 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 326 of file CbmStack.cxx

References fTracks, FairRootManager::Instance(), and FairRootManager::Register().

+ Here is the call graph for this function:

void CbmStack::Reset ( )
virtual

Resets arrays and stack and deletes particles and tracks

Reimplemented from FairGenericStack.

Definition at line 311 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 311 of file CbmStack.cxx

References fCurrentTrack, fIndex, fNParticles, fNPrimaries, fNTracks, fParticles, fPointsMap, fStack, and fTracks.

void CbmStack::SelectTracks ( )
private

Mark tracks for output using selection criteria

Definition at line 402 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 402 of file CbmStack.cxx

References fEnergyCut, fMinPoints, fNParticles, fPointsMap, fStoreMap, fStoreMothers, fStoreSecondaries, GetParticle(), kMVD, kPSD, mass, and p.

Referenced by FillTrackArray().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void CbmStack::SetCurrentTrack ( Int_t  iTrack)
inlinevirtual

Set the current track number Declared in TVirtualMCStack

Parameters
iTracktrack number

Reimplemented from FairGenericStack.

Definition at line 105 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 105 of file CbmStack.h

References fCurrentTrack.

void CbmStack::SetEnergyCut ( Double_t  eMin)
inline

Definition at line 167 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 167 of file CbmStack.h

References fEnergyCut.

void CbmStack::SetMinPoints ( Int_t  min)
inline

Definition at line 166 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 166 of file CbmStack.h

References fMinPoints, and min.

void CbmStack::StoreMothers ( Bool_t  choice = kTRUE)
inline

Definition at line 168 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 168 of file CbmStack.h

References fStoreMothers.

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

Modifiers

Definition at line 165 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 165 of file CbmStack.h

References fStoreSecondaries.

void CbmStack::UpdateTrackIndex ( TRefArray *  detArray)
virtual

Update the track index in the MCTracks and MCPoints

Reimplemented from FairGenericStack.

Definition at line 253 of file CbmStack.cxx.

View newest version in sPHENIX GitHub at line 253 of file CbmStack.cxx

References FairLogger::endl(), FATAL, fIndexIter, fIndexMap, fNTracks, fTracks, FairDetector::GetCollection(), CbmMCTrack::GetMotherId(), FairMCPoint::GetTrackID(), hitArray, INFO, FairMultiLinkedData::SetLink(), CbmMCTrack::SetMotherId(), and FairMCPoint::SetTrackID().

+ Here is the call graph for this function:

Member Data Documentation

Int_t CbmStack::fCurrentTrack
private

Some indizes and counters

Definition at line 222 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 222 of file CbmStack.h

Referenced by AddPoint(), GetCurrentTrack(), GetCurrentTrackNumber(), PopNextTrack(), Reset(), and SetCurrentTrack().

Double32_t CbmStack::fEnergyCut
private

Definition at line 232 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 232 of file CbmStack.h

Referenced by SelectTracks(), and SetEnergyCut().

Int_t CbmStack::fIndex
private

Number of entries in fTracks.

Definition at line 226 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 226 of file CbmStack.h

Referenced by AddParticle(), and Reset().

std::map<Int_t, Int_t>::iterator CbmStack::fIndexIter
private

Definition at line 214 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 214 of file CbmStack.h

Referenced by UpdateTrackIndex().

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

STL map from particle index to track index

Definition at line 213 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 213 of file CbmStack.h

Referenced by FillTrackArray(), and UpdateTrackIndex().

Int_t CbmStack::fMinPoints
private

Definition at line 231 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 231 of file CbmStack.h

Referenced by SelectTracks(), and SetMinPoints().

Int_t CbmStack::fNParticles
private

Number of primary particles.

Definition at line 224 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 224 of file CbmStack.h

Referenced by FillTrackArray(), GetNtrack(), GetParticle(), Print(), PushTrack(), Reset(), and SelectTracks().

Int_t CbmStack::fNPrimaries
private

Index of current track.

Definition at line 223 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 223 of file CbmStack.h

Referenced by GetNprimary(), PopPrimaryForTracking(), Print(), PushTrack(), and Reset().

Int_t CbmStack::fNTracks
private

Number of entries in fParticles.

Definition at line 225 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 225 of file CbmStack.h

Referenced by FillTrackArray(), Print(), Reset(), and UpdateTrackIndex().

TClonesArray* CbmStack::fParticles
private

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

Definition at line 200 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 200 of file CbmStack.h

Referenced by AddParticle(), GetListOfParticles(), GetParticle(), PopPrimaryForTracking(), PushTrack(), Reset(), and ~CbmStack().

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

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

Definition at line 218 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 218 of file CbmStack.h

Referenced by AddPoint(), FillTrackArray(), Reset(), and SelectTracks().

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

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

Definition at line 194 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 194 of file CbmStack.h

Referenced by PopNextTrack(), PushTrack(), and Reset().

std::map<Int_t, Bool_t>::iterator CbmStack::fStoreIter
private

Definition at line 209 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 209 of file CbmStack.h

Referenced by FillTrackArray().

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

STL map from particle index to storage flag

Definition at line 208 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 208 of file CbmStack.h

Referenced by FillTrackArray(), and SelectTracks().

Bool_t CbmStack::fStoreMothers
private

Definition at line 233 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 233 of file CbmStack.h

Referenced by SelectTracks(), and StoreMothers().

Bool_t CbmStack::fStoreSecondaries
private

Used for merging.

Variables defining the criteria for output selection

Definition at line 230 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 230 of file CbmStack.h

Referenced by SelectTracks(), and StoreSecondaries().

TClonesArray* CbmStack::fTracks
private

Array of CbmMCTracks containg the tracks written to the output

Definition at line 204 of file CbmStack.h.

View newest version in sPHENIX GitHub at line 204 of file CbmStack.h

Referenced by Print(), Register(), Reset(), UpdateTrackIndex(), and ~CbmStack().


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