BmnRoot
Loading...
Searching...
No Matches
CbmStack Class Reference

#include <CbmStack.h>

Inheritance diagram for CbmStack:
[legend]
Collaboration diagram for CbmStack:
[legend]

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=0)
 
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 SetStartZCut (Double_t zMax)
 
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 ()
 
void SetParticleArray (TClonesArray *partArray)
 
void SetParticleArray (TClonesArray *partArray, Int_t partFrom, Int_t partTo)
 
virtual FairGenericStack * CloneStack () const
 
 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=0)
 
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 SetStartZCut (Double_t zMax)
 
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 ()
 
void SetParticleArray (TClonesArray *partArray)
 
void SetParticleArray (TClonesArray *partArray, Int_t partFrom, Int_t partTo)
 
virtual FairGenericStack * CloneStack () const
 

Detailed Description

CbmStack.h

Author
D.Bertini d.ber.nosp@m.tini.nosp@m.@gsi..nosp@m.de
V.Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e

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 CbmMCTrack array, which is stored in the output.

The filtering criteria for the output tracks are:

  • primary tracks are stored in any case.
  • secondary tracks are stored if they have a minimal number of points (sum of all detectors) and a minimal energy, or are the

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 CbmStack.h.

Constructor & Destructor Documentation

◆ CbmStack() [1/2]

CbmStack::CbmStack ( Int_t  size = 100)

Default constructor param size Estimated track number

Definition at line 22 of file CbmStack.cxx.

◆ ~CbmStack() [1/2]

CbmStack::~CbmStack ( )
virtual

Destructor

Definition at line 45 of file CbmStack.cxx.

◆ CbmStack() [2/2]

CbmStack::CbmStack ( Int_t  size = 100)

Default constructor param size Estimated track number

◆ ~CbmStack() [2/2]

virtual CbmStack::~CbmStack ( )
virtual

Destructor

Member Function Documentation

◆ AddParticle() [1/2]

void CbmStack::AddParticle ( TParticle *  part)
virtual

Add a TParticle to the fParticles array

Definition at line 188 of file CbmStack.cxx.

Referenced by SetParticleArray(), and SetParticleArray().

◆ AddParticle() [2/2]

virtual void CbmStack::AddParticle ( TParticle *  part)
virtual

Add a TParticle to the fParticles array

◆ AddPoint() [1/4]

void CbmStack::AddPoint ( DetectorId  iDet)

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

Parameters
iDetDetector unique identifier

Definition at line 351 of file CbmStack.cxx.

Referenced by BmnSsdMC::ProcessHits(), and CbmSts::ProcessHits().

◆ AddPoint() [2/4]

void CbmStack::AddPoint ( DetectorId  iDet)

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

Parameters
iDetDetector unique identifier

◆ AddPoint() [3/4]

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.

◆ AddPoint() [4/4]

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

◆ CloneStack() [1/2]

virtual FairGenericStack * CbmStack::CloneStack ( ) const
inlinevirtual

Clone this object (used in MT mode only)

Definition at line 219 of file CbmStack.h.

References SetEnergyCut(), SetMinPoints(), StoreMothers(), and StoreSecondaries().

◆ CloneStack() [2/2]

virtual FairGenericStack * CbmStack::CloneStack ( ) const
inlinevirtual

Clone this object (used in MT mode only)

Definition at line 219 of file CbmStack.h.

References SetEnergyCut(), SetMinPoints(), StoreMothers(), and StoreSecondaries().

◆ FillTrackArray() [1/2]

void CbmStack::FillTrackArray ( )
virtual

Fill the MCTrack output array, applying filter criteria

Definition at line 198 of file CbmStack.cxx.

References GetParticle(), kNOFDETS, kREF, and CbmMCTrack::SetNPoints().

◆ FillTrackArray() [2/2]

virtual void CbmStack::FillTrackArray ( )
virtual

Fill the MCTrack output array, applying filter criteria

◆ GetCurrentParentTrackNumber() [1/2]

Int_t CbmStack::GetCurrentParentTrackNumber ( ) const
virtual

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

Definition at line 380 of file CbmStack.cxx.

References GetCurrentTrack().

◆ GetCurrentParentTrackNumber() [2/2]

virtual Int_t CbmStack::GetCurrentParentTrackNumber ( ) const
virtual

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

◆ GetCurrentTrack() [1/2]

TParticle * CbmStack::GetCurrentTrack ( ) const
virtual

Get the current track's particle Declared in TVirtualMCStack

Definition at line 178 of file CbmStack.cxx.

References GetParticle().

Referenced by GetCurrentParentTrackNumber().

◆ GetCurrentTrack() [2/2]

virtual TParticle * CbmStack::GetCurrentTrack ( ) const
virtual

Get the current track's particle Declared in TVirtualMCStack

◆ GetCurrentTrackNumber() [1/2]

virtual Int_t CbmStack::GetCurrentTrackNumber ( ) const
inlinevirtual

Get the number of the current track Declared in TVirtualMCStack

Definition at line 146 of file CbmStack.h.

◆ GetCurrentTrackNumber() [2/2]

virtual Int_t CbmStack::GetCurrentTrackNumber ( ) const
inlinevirtual

Get the number of the current track Declared in TVirtualMCStack

Definition at line 146 of file CbmStack.h.

◆ GetListOfParticles() [1/2]

TClonesArray * CbmStack::GetListOfParticles ( )
inline

Definition at line 193 of file CbmStack.h.

◆ GetListOfParticles() [2/2]

TClonesArray * CbmStack::GetListOfParticles ( )
inline

Definition at line 193 of file CbmStack.h.

◆ GetNprimary() [1/2]

virtual Int_t CbmStack::GetNprimary ( ) const
inlinevirtual

Get number of primary tracks Declared in TVirtualMCStack

Definition at line 136 of file CbmStack.h.

◆ GetNprimary() [2/2]

virtual Int_t CbmStack::GetNprimary ( ) const
inlinevirtual

Get number of primary tracks Declared in TVirtualMCStack

Definition at line 136 of file CbmStack.h.

◆ GetNtrack() [1/2]

virtual Int_t CbmStack::GetNtrack ( ) const
inlinevirtual

Get total number of tracks Declared in TVirtualMCStack

Definition at line 131 of file CbmStack.h.

◆ GetNtrack() [2/2]

virtual Int_t CbmStack::GetNtrack ( ) const
inlinevirtual

Get total number of tracks Declared in TVirtualMCStack

Definition at line 131 of file CbmStack.h.

◆ GetParticle() [1/2]

TParticle * CbmStack::GetParticle ( Int_t  trackId) const

Accessors

Definition at line 391 of file CbmStack.cxx.

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

◆ GetParticle() [2/2]

TParticle * CbmStack::GetParticle ( Int_t  trackId) const

Accessors

◆ PopNextTrack() [1/2]

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

Definition at line 133 of file CbmStack.cxx.

◆ PopNextTrack() [2/2]

virtual 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

◆ PopPrimaryForTracking() [1/2]

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

Definition at line 157 of file CbmStack.cxx.

◆ PopPrimaryForTracking() [2/2]

virtual 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

◆ Print() [1/2]

void CbmStack::Print ( Option_t *  ) const
virtual

Output to screen

Parameters
iVerbose0=events summary, 1=track info

Definition at line 338 of file CbmStack.cxx.

References Print().

Referenced by Print().

◆ Print() [2/2]

virtual void CbmStack::Print ( Option_t *  ) const
virtual

Output to screen

Parameters
iVerbose0=events summary, 1=track info

◆ PushTrack() [1/4]

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

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 57 of file CbmStack.cxx.

References PushTrack().

Referenced by PushTrack().

◆ PushTrack() [2/4]

virtual 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

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)

◆ PushTrack() [3/4]

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

Definition at line 81 of file CbmStack.cxx.

◆ PushTrack() [4/4]

virtual 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

◆ Register() [1/2]

void CbmStack::Register ( )
virtual

Register the MCTrack array to the Root Manager

Definition at line 328 of file CbmStack.cxx.

◆ Register() [2/2]

virtual void CbmStack::Register ( )
virtual

Register the MCTrack array to the Root Manager

◆ Reset() [1/2]

void CbmStack::Reset ( )
virtual

Resets arrays and stack and deletes particles and tracks

Definition at line 314 of file CbmStack.cxx.

◆ Reset() [2/2]

virtual void CbmStack::Reset ( )
virtual

Resets arrays and stack and deletes particles and tracks

◆ SetCurrentTrack() [1/2]

virtual void CbmStack::SetCurrentTrack ( Int_t  iTrack)
inlinevirtual

Set the current track number Declared in TVirtualMCStack

Parameters
iTracktrack number

Definition at line 126 of file CbmStack.h.

◆ SetCurrentTrack() [2/2]

virtual void CbmStack::SetCurrentTrack ( Int_t  iTrack)
inlinevirtual

Set the current track number Declared in TVirtualMCStack

Parameters
iTracktrack number

Definition at line 126 of file CbmStack.h.

◆ SetEnergyCut() [1/2]

void CbmStack::SetEnergyCut ( Double_t  eMin)
inline

Definition at line 176 of file CbmStack.h.

Referenced by CloneStack().

◆ SetEnergyCut() [2/2]

void CbmStack::SetEnergyCut ( Double_t  eMin)
inline

Definition at line 176 of file CbmStack.h.

◆ SetMinPoints() [1/2]

void CbmStack::SetMinPoints ( Int_t  min)
inline

Definition at line 175 of file CbmStack.h.

References min().

Referenced by CloneStack(), and BmnTrackDrawP::InitGeant3().

◆ SetMinPoints() [2/2]

void CbmStack::SetMinPoints ( Int_t  min)
inline

Definition at line 175 of file CbmStack.h.

References min().

◆ SetParticleArray() [1/4]

void CbmStack::SetParticleArray ( TClonesArray *  partArray)
inline

Definition at line 195 of file CbmStack.h.

References AddParticle().

◆ SetParticleArray() [2/4]

void CbmStack::SetParticleArray ( TClonesArray *  partArray)
inline

Definition at line 195 of file CbmStack.h.

References AddParticle().

◆ SetParticleArray() [3/4]

void CbmStack::SetParticleArray ( TClonesArray *  partArray,
Int_t  partFrom,
Int_t  partTo 
)
inline

Definition at line 206 of file CbmStack.h.

References AddParticle().

◆ SetParticleArray() [4/4]

void CbmStack::SetParticleArray ( TClonesArray *  partArray,
Int_t  partFrom,
Int_t  partTo 
)
inline

Definition at line 206 of file CbmStack.h.

References AddParticle().

◆ SetStartZCut() [1/2]

void CbmStack::SetStartZCut ( Double_t  zMax)
inline

Definition at line 177 of file CbmStack.h.

◆ SetStartZCut() [2/2]

void CbmStack::SetStartZCut ( Double_t  zMax)
inline

Definition at line 177 of file CbmStack.h.

◆ StoreMothers() [1/2]

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

Definition at line 178 of file CbmStack.h.

Referenced by CloneStack().

◆ StoreMothers() [2/2]

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

Definition at line 178 of file CbmStack.h.

◆ StoreSecondaries() [1/2]

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

Modifiers

Definition at line 174 of file CbmStack.h.

Referenced by CloneStack().

◆ StoreSecondaries() [2/2]

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

Modifiers

Definition at line 174 of file CbmStack.h.

◆ UpdateTrackIndex() [1/2]

void CbmStack::UpdateTrackIndex ( TRefArray *  detArray = 0)
virtual

Update the track index in the MCTracks and MCPoints

Definition at line 243 of file CbmStack.cxx.

References CbmMCTrack::GetMotherId(), GetParticle(), i, and CbmMCTrack::SetMotherId().

◆ UpdateTrackIndex() [2/2]

virtual void CbmStack::UpdateTrackIndex ( TRefArray *  detArray = 0)
virtual

Update the track index in the MCTracks and MCPoints


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