3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
10 #include <TStopwatch.h>
12 #include "AliMCProcess.h"
23 class AliStack : public TObject
26 // creators, destructors
32 void MakeTree(Int_t event, const char *file);
33 void BeginEvent(Int_t event);
35 Bool_t GetEvent(Int_t nevent);
36 void SetTrack(Int_t done, Int_t parent, Int_t pdg,
37 Float_t *pmom, Float_t *vpos, Float_t *polar,
38 Float_t tof, AliMCProcess mech, Int_t &ntr,
40 void SetTrack(Int_t done, Int_t parent, Int_t pdg,
41 Double_t px, Double_t py, Double_t pz, Double_t e,
42 Double_t vx, Double_t vy, Double_t vz, Double_t tof,
43 Double_t polx, Double_t poly, Double_t polz,
44 AliMCProcess mech, Int_t &ntr, Float_t weight=1);
45 void GetNextTrack(Int_t &mtrack, Int_t &ipart, Float_t *pmom,
46 Float_t &e, Float_t *vpos, Float_t *polar, Float_t &tof);
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 void SetCurrentTrack(Int_t track);
59 void SetHighWaterMark(Int_t hgwmk);
61 Int_t GetNtrack() const;
62 Int_t GetNprimary() const;
63 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;}
72 void ResetArrays(Int_t size);
73 TParticle* GetNextParticle();
77 TClonesArray *fParticles; //! Pointer to list of particles
78 TObjArray *fParticleMap; //! Map of particles in the supporting TClonesArray
79 TArrayI fParticleFileMap; // Map for particle ids
80 TParticle *fParticleBuffer; //! Pointer to current particle for writing
81 TTree *fTreeK; //! Particle stack
82 Int_t fNtrack; // Number of tracks
83 Int_t fNprimary; // Number of primaries
84 Int_t fCurrent; //! Last track returned from the stack
85 Int_t fCurrentPrimary; //! Last primary track returned from the stack
86 Int_t fHgwmk; //! Last track purified
87 Int_t fLoadPoint; //! Next free position in the particle buffer
88 TStopwatch fTimer; //! Timer object
89 ClassDef(AliStack,2) //Particles stack
94 inline void AliStack::SetNtrack(Int_t ntrack)
97 inline void AliStack::SetCurrentTrack(Int_t track)
100 inline Int_t AliStack::GetNtrack() const
103 inline Int_t AliStack::GetNprimary() const
104 { return fNprimary; }
106 inline Int_t AliStack::CurrentTrack() const
109 inline TObjArray* AliStack::Particles() const
110 { return fParticleMap; }