4 #include "AliHBTEvent.h"
7 //class describing set of events (the run)
8 //designed for fast acces
9 //Piotr.Skowronski@cern.ch
15 class AliHBTRun: public TObject
21 void AddParticle(Int_t event, AliHBTParticle* part); //inerface to AliHBTEvent::AddParticle(AliHBTParticle*)
22 void AddParticle(Int_t event, TParticle* part);//inerface to AliHBTEvent::AddParticle(TParticle*)
24 //inerface to AliHBTEvent::AddParticle(Int_t.Double_t,Double_t,Double_t,Double_t,Double_t,Double_t,Double_t,Double_t,Double_t)
25 void AddParticle(Int_t event, Int_t pdg,
26 Double_t px, Double_t py, Double_t pz, Double_t etot,
27 Double_t vx, Double_t vy, Double_t vz, Double_t time);
29 AliHBTParticle* GetParticle(Int_t event, Int_t n); //returns nth particle from event
30 AliHBTEvent* GetEvent(Int_t event) const; //returns AliHBTEvent number "event"
32 Int_t GetNumberOfEvents() const; //returns number of events
33 Int_t GetNumberOfParticlesInEvent(Int_t event) const; //returns number of particles in event number "event"
34 void Reset();//clears all events in the array (deletes)
36 TObjArray* fEvents;//!Array containig AliHBTEvents
44 /**************************************************************************/
47 AliHBTEvent* AliHBTRun::GetEvent(Int_t event) const
49 //returns pointer to AliHBTEvent number "event"
51 return (AliHBTEvent*)fEvents->At(event);
53 /**************************************************************************/
55 AliHBTParticle* AliHBTRun::GetParticle(Int_t event, Int_t n)
57 //returns nth particle from event number event
58 return GetEvent(event)->GetParticle(n);
61 /**************************************************************************/
64 Int_t AliHBTRun::GetNumberOfEvents() const
66 //returns number of events in collection
68 return fEvents->GetEntriesFast(); //there may be empty slots but we do not care
69 //Analysis checks it if return is not NULL
71 /**************************************************************************/
74 Int_t AliHBTRun::GetNumberOfParticlesInEvent(Int_t event) const
76 //returns number of Particles in event
77 return GetEvent(event)->GetNumberOfParticles();