]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HBTAN/AliHBTEvent.h
Changes required by Coding Conventions
[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
9//
10// more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
11//
12// Piotr.Skowronski@cern.ch
13//
14///////////////////////////////////////////////////////////////////
1b446896 15
16#include <TObject.h>
17
18class AliHBTParticle;
19class TParticle;
20class AliHBTEvent: public TObject
21 {
22 public:
23 AliHBTEvent();
bed069a4 24 AliHBTEvent(const AliHBTEvent& source);
1b446896 25 virtual ~AliHBTEvent();
bed069a4 26
27 AliHBTEvent& operator=(const AliHBTEvent source);
28
28cf76fa 29 static const UInt_t fgkInitEventSize; //initial number of the array
aa4e0a70 30 //if expanded, this size is used also
1b446896 31 AliHBTParticle* GetParticle(Int_t n); //gets particle
32 AliHBTParticle* GetParticleSafely(Int_t n); //gets particle with index check
33
8089a083 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,
1b446896 37 Double_t vx, Double_t vy, Double_t vz, Double_t time);
38
39 Int_t GetNumberOfParticles() const;
cea431b6 40 void Reset(); //deletes all entries
41 void SetOwner(Bool_t owns = kTRUE){ fOwner = owns; }
8089a083 42 Bool_t IsOwner() {return fOwner;}
88cb7938 43 void SetRandomized(Bool_t rd = kTRUE){fRandomized = rd;}
44 Bool_t IsRandomized()const {return fRandomized;}
fe1a3526 45 void SwapParticles(Int_t i, Int_t j);//swaps particles positions; used by AliHBTEvent::Blend
1b446896 46 protected:
88cb7938 47 Int_t fSize; //!current size of the array
1b446896 48 AliHBTParticle ** fParticles; //!array of pointers to the particles
cea431b6 49 Int_t fNParticles; //!number of particles in Event
cea431b6 50 Bool_t fOwner; //flag if that event owns the
88cb7938 51 Bool_t fRandomized; //!flag indicating if particles positions has been already randomizd
cea431b6 52 void Expand(); //expands the array if necessary
aa4e0a70 53
1b446896 54 private:
1b446896 55 ClassDef(AliHBTEvent,1)
56 };
57/**************************************************************************/
58
59inline
60AliHBTParticle* AliHBTEvent::GetParticle(Int_t n)
61 {
62 //Gets particle without boundary check
63 return fParticles[n];
64 }
65
66/**************************************************************************/
67
68inline
69Int_t AliHBTEvent::GetNumberOfParticles() const
70 {
71 //reurns number of particles in this event
72 return fNParticles;
73 }
74
75#endif