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