StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
StarParticleStack Class Reference

Implementation of the VMC particle stack for use in STAR. More...

#include <StarParticleStack.h>

Inheritance diagram for StarParticleStack:

Public Member Functions

 StarParticleStack (const Char_t *name="PrimaryParticleStack")
 
virtual void PushTrack (Int_t toBeDone, Int_t parent, Int_t pdg, Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t tof, Double_t polx, Double_t poly, Double_t polz, TMCProcess mech, Int_t &ntr, Double_t weight, Int_t is)
 
virtual TParticle * PopNextTrack (Int_t &itrack)
 
virtual TParticle * PopPrimaryForTracking (Int_t i)
 
virtual void SetCurrentTrack (Int_t trackNumber)
 Set the current track number.
 
virtual Int_t GetNtrack () const
 Total number of tracks.
 
virtual Int_t GetNprimary () const
 Total number of primary tracks.
 
virtual TParticle * GetCurrentTrack () const
 Current track particle.
 
virtual Int_t GetCurrentTrackNumber () const
 Current track number.
 
virtual Int_t GetCurrentParentTrackNumber () const
 Number of the parent of the current track.
 
virtual TParticle * GetParticle (const Int_t i) const
 Retrieve the ith particle in the array.
 
virtual void Clear (const Option_t *opts="")
 Clear the stack.
 

Protected Member Functions

 ClassDef (StarParticleStack, 1)
 

Protected Attributes

Int_t mNumPrimary
 
Int_t mCurrent
 
Int_t mArraySize
 
TClonesArray * mArray
 
Int_t mStackSize
 
std::list< TParticle * > mStack
 
std::list< Int_t > mStackIdx
 

Detailed Description

Implementation of the VMC particle stack for use in STAR.

Author
Jason C. Webb

Definition at line 24 of file StarParticleStack.h.

Member Function Documentation

TParticle * StarParticleStack::PopNextTrack ( Int_t &  itrack)
virtual

The stack has to provide two pop mechanisms: The first pop mechanism required. Pop all particles with toBeDone = 1, both primaries and seconadies.

Parameters
itrackis the index of the track in the array of all particles

Definition at line 91 of file StarParticleStack.cxx.

Referenced by AgStarReader::ReadEvent().

TParticle * StarParticleStack::PopPrimaryForTracking ( Int_t  i)
virtual

The second pop mechanism required. Pop only primary particles with toBeDone = 1, stacking of secondaries is done by MC

Parameters
iis the index of the track to be "popped". Note that "pop" here is a misnomer... no stack is being popped... we are only accessing the track with index i. Nor is there really any distinction between "primary" and "secondary" here... So I'd like to see Alice's actual implementation of this rather than their poorly documented examples. Looks like they use this just to index a track.

Definition at line 114 of file StarParticleStack.cxx.

void StarParticleStack::PushTrack ( Int_t  toBeDone,
Int_t  parent,
Int_t  pdg,
Double_t  px,
Double_t  py,
Double_t  pz,
Double_t  e,
Double_t  vx,
Double_t  vy,
Double_t  vz,
Double_t  tof,
Double_t  polx,
Double_t  poly,
Double_t  polz,
TMCProcess  mech,
Int_t &  ntr,
Double_t  weight,
Int_t  is 
)
virtual

ROOT/VMC method to create a new particle and push into stack

Parameters
toBeDone- 1 if particles should go to tracking, 0 otherwise
parent- number of the parent track, -1 if track is primary
pdg- PDG encoding
px,py,pz- particle momentum [GeV/c]
e- total energy [GeV]
vx,vy,vz- position [cm]
tof- time of flight [s]
polx,poly,polz- polarization
mech- creator process VMC code
ntr- track number (is filled by the stack
weight- particle weight
is- generation status code

Definition at line 47 of file StarParticleStack.cxx.


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