3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 #include <TVirtualMCStack.h>
11 #include "AliConfig.h"
21 class AliStack : public TVirtualMCStack
24 // creators, destructors
25 AliStack(Int_t size, const char* evfoldname = AliConfig::fgkDefaultEventFolderName);
27 AliStack(const AliStack& st);
29 AliStack& operator=(const AliStack& st)
30 {st.Copy(*this); return(*this);}
34 virtual void PushTrack(Int_t done, Int_t parent, Int_t pdg,
35 Float_t *pmom, Float_t *vpos, Float_t *polar,
36 Float_t tof, TMCProcess mech, Int_t &ntr,
37 Float_t weight, Int_t is);
39 virtual void PushTrack(Int_t done, Int_t parent, Int_t pdg,
40 Double_t px, Double_t py, Double_t pz, Double_t e,
41 Double_t vx, Double_t vy, Double_t vz, Double_t tof,
42 Double_t polx, Double_t poly, Double_t polz,
43 TMCProcess mech, Int_t &ntr, Double_t weight,
46 virtual TParticle* PopNextTrack(Int_t& track);
47 virtual TParticle* GetCurrentTrack() const {return fCurrentTrack;}
48 virtual TParticle* PopPrimaryForTracking(Int_t i);
56 void FlagTrack(Int_t track);
57 void KeepTrack(Int_t itrack);
58 void Reset(Int_t size = 0);
59 void DumpPart(Int_t i) const;
61 void DumpLoadedStack () const;
64 void SetNtrack(Int_t ntrack);
65 virtual void SetCurrentTrack(Int_t track);
66 void SetHighWaterMark(Int_t hgwmk);
68 virtual Int_t GetNtrack() const;
69 Int_t GetNprimary() const;
70 virtual Int_t GetCurrentTrackNumber() const;
71 virtual Int_t GetCurrentParentTrackNumber() const;
72 TObjArray* Particles() const;
73 TParticle* Particle(Int_t id);
74 Int_t GetPrimary(Int_t id);
76 void SetEventFolderName(const char* foldname);
77 TParticle* ParticleFromTreeK(Int_t id) const;
78 Int_t TreeKEntry(Int_t id) const;
83 void ResetArrays(Int_t size);
84 TParticle* GetNextParticle();
85 Bool_t KeepPhysics(TParticle* part);
88 void Copy(AliStack &st) const;
91 TClonesArray *fParticles; //! Pointer to list of particles
92 TObjArray *fParticleMap; //! Map of particles in the supporting TClonesArray
93 TArrayI fParticleFileMap; // Map for particle ids
94 TParticle *fParticleBuffer; //! Pointer to current particle for writing
95 TParticle *fCurrentTrack; //! Pointer to particle currently transported
96 TTree *fTreeK; //! Particle stack
97 Int_t fNtrack; // Number of tracks
98 Int_t fNprimary; // Number of primaries
99 Int_t fCurrent; //! Last track returned from the stack
100 Int_t fCurrentPrimary; //! Last primary track returned from the stack
101 Int_t fHgwmk; //! Last track purified
102 Int_t fLoadPoint; //! Next free position in the particle buffer
104 TString fEventFolderName; //! Folder name where event is mounted
105 ClassDef(AliStack,4) //Particles stack
110 inline void AliStack::SetNtrack(Int_t ntrack)
111 { fNtrack = ntrack; }
113 inline void AliStack::SetCurrentTrack(Int_t track)
114 { fCurrent = track; }
116 inline Int_t AliStack::GetNtrack() const
119 inline Int_t AliStack::GetNprimary() const
120 { return fNprimary; }
122 inline Int_t AliStack::GetCurrentTrackNumber() const
125 inline TObjArray* AliStack::Particles() const
126 { return fParticleMap; }