StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StarParticleStack.h
1 #ifndef __StarParticleStack_h__
2 #define __StarParticleStack_h__
3 
4 #include "TObjArray.h"
5 #include "StarCallf77.h"
6 #include "TVirtualMCStack.h"
7 #include "TDataSet.h"
8 #include "TMCProcess.h"
9 #include "TParticle.h"
10 #include "TClonesArray.h"
11 #include <vector>
12 #include <list>
13 
14 
22 class StarGenParticle;
23 
24 class StarParticleStack : public TVirtualMCStack
25 {
26  public:
27 
28  StarParticleStack( const Char_t *name = "PrimaryParticleStack" );
30 
46  virtual void PushTrack(Int_t toBeDone, Int_t parent, Int_t pdg,
47  Double_t px, Double_t py, Double_t pz, Double_t e,
48  Double_t vx, Double_t vy, Double_t vz, Double_t tof,
49  Double_t polx, Double_t poly, Double_t polz,
50  TMCProcess mech, Int_t& ntr, Double_t weight,
51  Int_t is);
52 
53 
54 
59  virtual TParticle* PopNextTrack(Int_t& itrack);
60 
65  virtual TParticle* PopPrimaryForTracking(Int_t i);
66 
68  virtual void SetCurrentTrack(Int_t trackNumber);
69 
71  virtual Int_t GetNtrack() const;
72 
74  virtual Int_t GetNprimary() const { return mNumPrimary; }
75 
77  virtual TParticle* GetCurrentTrack() const;
78 
80  virtual Int_t GetCurrentTrackNumber() const;
81 
83  virtual Int_t GetCurrentParentTrackNumber() const;
84 
86  virtual TParticle *GetParticle( const Int_t i ) const;
87 
89  virtual void Clear( const Option_t *opts="" );
90 
91  private:
92  protected:
93 
94  Int_t mNumPrimary;
95  Int_t mCurrent;
96 
97  Int_t mArraySize;
98  TClonesArray *mArray;
99 
100  Int_t mStackSize;
101  std::list <TParticle *> mStack;
102  std::list <Int_t> mStackIdx;
103 
104 
105  ClassDef(StarParticleStack,1);
106 
107 };
108 
109 #endif
virtual void SetCurrentTrack(Int_t trackNumber)
Set the current track number.
Yet another particle class.
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)
Definition: tof.h:15
virtual Int_t GetCurrentTrackNumber() const
Current track number.
virtual TParticle * GetParticle(const Int_t i) const
Retrieve the ith particle in the array.
virtual Int_t GetCurrentParentTrackNumber() const
Number of the parent of the current track.
virtual TParticle * GetCurrentTrack() const
Current track particle.
Implementation of the VMC particle stack for use in STAR.
virtual TParticle * PopPrimaryForTracking(Int_t i)
virtual Int_t GetNprimary() const
Total number of primary tracks.
virtual Int_t GetNtrack() const
Total number of tracks.
virtual TParticle * PopNextTrack(Int_t &itrack)
virtual void Clear(const Option_t *opts="")
Clear the stack.