]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HBTAN/AliHBTEvent.h
SetDisplayInfo added
[u/mrichter/AliRoot.git] / HBTAN / AliHBTEvent.h
CommitLineData
1b446896 1#ifndef ALIHBTEvent_H
2#define ALIHBTEvent_H
3//This class sters HBT perticles for one event
4//more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
5
6#include <TObject.h>
7
8class AliHBTParticle;
9class TParticle;
10class AliHBTEvent: public TObject
11 {
12 public:
13 AliHBTEvent();
14 virtual ~AliHBTEvent();
15 const static UInt_t fgkInitEventSize; //initial number of the array
16 //if expanded, this size is used also
17 AliHBTParticle* GetParticle(Int_t n); //gets particle
18 AliHBTParticle* GetParticleSafely(Int_t n); //gets particle with index check
19
20 void AddParticle(AliHBTParticle*); //adds particle to the event
21 void AddParticle(TParticle*); //adds particle to the event
22 void AddParticle(Int_t pdg, Double_t px, Double_t py, Double_t pz, Double_t etot,
23 Double_t vx, Double_t vy, Double_t vz, Double_t time);
24
25 Int_t GetNumberOfParticles() const;
cea431b6 26 void Reset(); //deletes all entries
27 void SetOwner(Bool_t owns = kTRUE){ fOwner = owns; }
28 Bool_t IsOwner() {return fOwner;}
1b446896 29 protected:
30 AliHBTParticle ** fParticles; //!array of pointers to the particles
cea431b6 31 Int_t fNParticles; //!number of particles in Event
32 Int_t fSize; //!current size of the array
33 Bool_t fOwner; //flag if that event owns the
34 void Expand(); //expands the array if necessary
1b446896 35 private:
36
37 public:
38 ClassDef(AliHBTEvent,1)
39 };
40/**************************************************************************/
41
42inline
43AliHBTParticle* AliHBTEvent::GetParticle(Int_t n)
44 {
45 //Gets particle without boundary check
46 return fParticles[n];
47 }
48
49/**************************************************************************/
50
51inline
52Int_t AliHBTEvent::GetNumberOfParticles() const
53 {
54 //reurns number of particles in this event
55 return fNParticles;
56 }
57
58#endif