EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairGenericStack.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairGenericStack.h
1 // -------------------------------------------------------------------------
2 // ----- FairStack header file -----
3 // ----- Created 10/08/04 by D. Bertini -----
4 // -------------------------------------------------------------------------
5 
6 
13 #ifndef FAIRGENERICSTACK_H
14 #define FAIRGENERICSTACK_H
15 
16 
17 //#include <map>
18 //#include <stack>
19 //#include <iostream>
20 //#include "TClonesArray.h"
21 #include "TVirtualMCStack.h"
22 #include "FairLogger.h"
23 
24 
25 class TParticle;
26 class TRefArray;
27 
28 
29 class FairGenericStack : public TVirtualMCStack
30 {
31 
32  public:
33 
36 
37 
39  FairGenericStack(Int_t size);
40 
41 
43  virtual ~FairGenericStack();
44 
60  virtual void PushTrack(Int_t toBeDone, Int_t parentID, Int_t pdgCode,
61  Double_t px, Double_t py, Double_t pz,
62  Double_t e, Double_t vx, Double_t vy,
63  Double_t vz, Double_t time, Double_t polx,
64  Double_t poly, Double_t polz, TMCProcess proc,
65  Int_t& ntr, Double_t weight, Int_t is);
66 
67  virtual void PushTrack(Int_t toBeDone, Int_t parentID, Int_t pdgCode,
68  Double_t px, Double_t py, Double_t pz,
69  Double_t e, Double_t vx, Double_t vy,
70  Double_t vz, Double_t time, Double_t polx,
71  Double_t poly, Double_t polz, TMCProcess proc,
72  Int_t& ntr, Double_t weight, Int_t is, Int_t secondparentID);
73 
74 
80  virtual TParticle* PopNextTrack(Int_t& iTrack);
81 
82 
88  virtual TParticle* PopPrimaryForTracking(Int_t iPrim);
89 
90 
92  void AddParticle(TParticle* part);
93 
94 
96  virtual void FillTrackArray();
97 
98 
100  virtual void UpdateTrackIndex(TRefArray* detArray);
101 
102 
104  virtual void Reset();
105 
106 
108  virtual void Register();
109 
110 
114  virtual void Print(Int_t iVerbose=0) const;
115 
116 
118  virtual void SetCurrentTrack(Int_t iTrack);
119  /* void StoreSecondaries(Bool_t choice = kTRUE) { fStoreSecondaries = choice; }
120  void SetMinPoints(Int_t min) { fMinPoints = min; }
121  void SetEnergyCut(Double_t eMin) { fEnergyCut = eMin; }
122  void StoreMothers(Bool_t choice = kTRUE) { fStoreMothers = choice; }
123  */
124 
126  virtual Int_t GetNtrack() const; // Total number of tracks
127  virtual Int_t GetNprimary() const; // Number of primaries
128  virtual TParticle* GetCurrentTrack() const;
129  virtual Int_t GetCurrentTrackNumber() const;
130  virtual Int_t GetCurrentParentTrackNumber() const;
131  virtual TParticle* GetParticle(Int_t trackID) const { return NULL; }
132 
133 
134  protected:
137 
138  Int_t fVerbose;
139 
140  private:
143 
144  ClassDef(FairGenericStack,1)
145 
146 
147 };
148 
149 #endif