Cluster Map moved to ANALYSIS
[u/mrichter/AliRoot.git] / HBTAN / AliHBTEvent.h
CommitLineData
88cb7938 1#ifndef ALIHBTEVENT_H
2#define ALIHBTEVENT_H
8089a083 3//__________________________________________________________
4///////////////////////////////////////////////////////////////////
5//
6// class AliHBTEvent
7//
8// This class is container for paticles coming from one event
81877d10 9// -----------------------------------------------------------------
10// -----------------------------------------------------------------
11// more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html
8089a083 12//
13// Piotr.Skowronski@cern.ch
14//
15///////////////////////////////////////////////////////////////////
1b446896 16
17#include <TObject.h>
18
19class AliHBTParticle;
20class TParticle;
21class AliHBTEvent: public TObject
22 {
23 public:
24 AliHBTEvent();
bed069a4 25 AliHBTEvent(const AliHBTEvent& source);
1b446896 26 virtual ~AliHBTEvent();
bed069a4 27
81877d10 28 AliHBTEvent& operator=(const AliHBTEvent& source);
bed069a4 29
28cf76fa 30 static const UInt_t fgkInitEventSize; //initial number of the array
aa4e0a70 31 //if expanded, this size is used also
1b446896 32 AliHBTParticle* GetParticle(Int_t n); //gets particle
33 AliHBTParticle* GetParticleSafely(Int_t n); //gets particle with index check
34
81877d10 35 void AddParticle(AliHBTParticle* hbtpart); //adds particle to the event
36 void AddParticle(TParticle* part, Int_t idx); //adds particle to the event
8089a083 37 void AddParticle(Int_t pdg, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot,
1b446896 38 Double_t vx, Double_t vy, Double_t vz, Double_t time);
39
40 Int_t GetNumberOfParticles() const;
cea431b6 41 void Reset(); //deletes all entries
42 void SetOwner(Bool_t owns = kTRUE){ fOwner = owns; }
81877d10 43 Bool_t IsOwner() const {return fOwner;}
88cb7938 44 void SetRandomized(Bool_t rd = kTRUE){fRandomized = rd;}
45 Bool_t IsRandomized()const {return fRandomized;}
fe1a3526 46 void SwapParticles(Int_t i, Int_t j);//swaps particles positions; used by AliHBTEvent::Blend
81877d10 47
1b446896 48 protected:
81877d10 49 Int_t fSize; //!current size of the array
1b446896 50 AliHBTParticle ** fParticles; //!array of pointers to the particles
81877d10 51 Int_t fNParticles; //!number of particles in Event
52 Bool_t fOwner; //flag if that event owns the
53 Bool_t fRandomized; //!flag indicating if particles positions has been already randomizd
54 void Expand(); //expands the array if necessary
aa4e0a70 55
1b446896 56 private:
1b446896 57 ClassDef(AliHBTEvent,1)
58 };
59/**************************************************************************/
60
61inline
62AliHBTParticle* AliHBTEvent::GetParticle(Int_t n)
63 {
64 //Gets particle without boundary check
65 return fParticles[n];
66 }
67
68/**************************************************************************/
69
70inline
71Int_t AliHBTEvent::GetNumberOfParticles() const
72 {
73 //reurns number of particles in this event
74 return fNParticles;
75 }
76
77#endif