3 //__________________________________________________________
4 ///////////////////////////////////////////////////////////////////
8 // This class is container for paticles coming from one event
10 // more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
12 // Piotr.Skowronski@cern.ch
14 ///////////////////////////////////////////////////////////////////
20 class AliHBTEvent: public TObject
24 AliHBTEvent(const AliHBTEvent& source);
25 virtual ~AliHBTEvent();
27 AliHBTEvent& operator=(const AliHBTEvent source);
29 static const UInt_t fgkInitEventSize; //initial number of the array
30 //if expanded, this size is used also
31 AliHBTParticle* GetParticle(Int_t n); //gets particle
32 AliHBTParticle* GetParticleSafely(Int_t n); //gets particle with index check
34 void AddParticle(AliHBTParticle*); //adds particle to the event
35 void AddParticle(TParticle*, Int_t idx); //adds particle to the event
36 void AddParticle(Int_t pdg, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot,
37 Double_t vx, Double_t vy, Double_t vz, Double_t time);
39 Int_t GetNumberOfParticles() const;
40 void Reset(); //deletes all entries
41 void SetOwner(Bool_t owns = kTRUE){ fOwner = owns; }
42 Bool_t IsOwner() {return fOwner;}
43 void SetRandomized(Bool_t rd = kTRUE){fRandomized = rd;}
44 Bool_t IsRandomized()const {return fRandomized;}
45 void SwapParticles(Int_t i, Int_t j);//swaps particles positions; used by AliHBTEvent::Blend
47 Int_t fSize; //!current size of the array
48 AliHBTParticle ** fParticles; //!array of pointers to the particles
49 Int_t fNParticles; //!number of particles in Event
50 Bool_t fOwner; //flag if that event owns the
51 Bool_t fRandomized; //!flag indicating if particles positions has been already randomizd
52 void Expand(); //expands the array if necessary
55 ClassDef(AliHBTEvent,1)
57 /**************************************************************************/
60 AliHBTParticle* AliHBTEvent::GetParticle(Int_t n)
62 //Gets particle without boundary check
66 /**************************************************************************/
69 Int_t AliHBTEvent::GetNumberOfParticles() const
71 //reurns number of particles in this event