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