3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
10 #include <TStopwatch.h>
11 #include <TVirtualMCStack.h>
12 #include <TMCProcess.h>
23 class AliStack : public TVirtualMCStack
26 // creators, destructors
32 virtual void SetTrack(Int_t done, Int_t parent, Int_t pdg,
33 Float_t *pmom, Float_t *vpos, Float_t *polar,
34 Float_t tof, TMCProcess mech, Int_t &ntr,
35 Float_t weight, Int_t is);
36 virtual void SetTrack(Int_t done, Int_t parent, Int_t pdg,
37 Double_t px, Double_t py, Double_t pz, Double_t e,
38 Double_t vx, Double_t vy, Double_t vz, Double_t tof,
39 Double_t polx, Double_t poly, Double_t polz,
40 TMCProcess mech, Int_t &ntr, Double_t weight,
42 virtual TParticle* GetNextTrack(Int_t& track);
43 virtual TParticle* GetPrimaryForTracking(Int_t i);
45 void MakeTree(Int_t event, const char *file);
46 void BeginEvent(Int_t event);
48 Bool_t GetEvent(Int_t nevent);
51 void FlagTrack(Int_t track);
52 void KeepTrack(Int_t itrack);
53 void Reset(Int_t size = 0);
54 void DumpPart(Int_t i) const;
56 void DumpLoadedStack () const;
59 void SetNtrack(Int_t ntrack);
60 virtual void SetCurrentTrack(Int_t track);
61 void SetHighWaterMark(Int_t hgwmk);
63 virtual Int_t GetNtrack() const;
64 Int_t GetNprimary() const;
65 virtual Int_t CurrentTrack() const;
66 TObjArray* Particles() const;
67 TParticle* Particle(Int_t id);
68 Int_t GetPrimary(Int_t id);
69 TTree* TreeK() const {return fTreeK;}
70 TParticle* ParticleFromTreeK(Int_t id) const;
71 Int_t TreeKEntry(Int_t id) const;
76 void ResetArrays(Int_t size);
77 TParticle* GetNextParticle();
78 Bool_t KeepPhysics(TParticle* part);
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; }