3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 #include <TMCProcess.h>
11 #include <TStopwatch.h>
12 #include <TVirtualMCStack.h>
21 class AliStack : public TVirtualMCStack
24 // creators, destructors
27 AliStack(const AliStack& st);
29 AliStack& operator=(const AliStack& st)
30 {st.Copy(*this); return(*this);}
33 virtual void SetTrack(Int_t done, Int_t parent, Int_t pdg,
34 Float_t *pmom, Float_t *vpos, Float_t *polar,
35 Float_t tof, TMCProcess mech, Int_t &ntr,
36 Float_t weight, Int_t is);
37 virtual void SetTrack(Int_t done, Int_t parent, Int_t pdg,
38 Double_t px, Double_t py, Double_t pz, Double_t e,
39 Double_t vx, Double_t vy, Double_t vz, Double_t tof,
40 Double_t polx, Double_t poly, Double_t polz,
41 TMCProcess mech, Int_t &ntr, Double_t weight,
43 virtual TParticle* GetNextTrack(Int_t& track);
44 virtual TParticle* GetPrimaryForTracking(Int_t i);
46 void MakeTree(Int_t event, const char *file);
47 void BeginEvent(Int_t event);
49 Bool_t GetEvent(Int_t nevent);
52 void FlagTrack(Int_t track);
53 void KeepTrack(Int_t itrack);
54 void Reset(Int_t size = 0);
55 void DumpPart(Int_t i) const;
57 void DumpLoadedStack () const;
60 void SetNtrack(Int_t ntrack);
61 virtual void SetCurrentTrack(Int_t track);
62 void SetHighWaterMark(Int_t hgwmk);
64 virtual Int_t GetNtrack() const;
65 Int_t GetNprimary() const;
66 virtual Int_t CurrentTrack() const;
67 TObjArray* Particles() const;
68 TParticle* Particle(Int_t id);
69 Int_t GetPrimary(Int_t id);
70 TTree* TreeK() const {return fTreeK;}
71 TParticle* ParticleFromTreeK(Int_t id) const;
72 Int_t TreeKEntry(Int_t id) const;
77 void ResetArrays(Int_t size);
78 TParticle* GetNextParticle();
79 Bool_t KeepPhysics(TParticle* part);
82 void Copy(AliStack &st) const;
85 TClonesArray *fParticles; //! Pointer to list of particles
86 TObjArray *fParticleMap; //! Map of particles in the supporting TClonesArray
87 TArrayI fParticleFileMap; // Map for particle ids
88 TParticle *fParticleBuffer; //! Pointer to current particle for writing
89 TTree *fTreeK; //! Particle stack
90 Int_t fNtrack; // Number of tracks
91 Int_t fNprimary; // Number of primaries
92 Int_t fCurrent; //! Last track returned from the stack
93 Int_t fCurrentPrimary; //! Last primary track returned from the stack
94 Int_t fHgwmk; //! Last track purified
95 Int_t fLoadPoint; //! Next free position in the particle buffer
97 ClassDef(AliStack,3) //Particles stack
102 inline void AliStack::SetNtrack(Int_t ntrack)
103 { fNtrack = ntrack; }
105 inline void AliStack::SetCurrentTrack(Int_t track)
106 { fCurrent = track; }
108 inline Int_t AliStack::GetNtrack() const
111 inline Int_t AliStack::GetNprimary() const
112 { return fNprimary; }
114 inline Int_t AliStack::CurrentTrack() const
117 inline TObjArray* AliStack::Particles() const
118 { return fParticleMap; }