]>
Commit | Line | Data |
---|---|---|
88cb7938 | 1 | #ifndef ALIHBTPOSITIONRANDOMIZER_H |
2 | #define ALIHBTPOSITIONRANDOMIZER_H | |
3 | ||
4 | #include "AliHBTReader.h" | |
5 | ||
6 | class AliHBTRndm; | |
7 | class AliHBTEvent; | |
8 | class AliHBTRun; | |
9 | class AliHBTParticle; | |
10 | ||
11 | class AliHBTPositionRandomizer: public AliHBTReader | |
12 | { | |
13 | public: | |
14 | enum EModelTypes{kGausBall,kCylinder,kCylinderSurf}; | |
15 | AliHBTPositionRandomizer(); | |
16 | AliHBTPositionRandomizer(AliHBTReader* reader); | |
17 | ||
efaf00f8 | 18 | Int_t Next(){return (fReader)?fReader->Next():1;} |
19 | void Rewind(){if(fReader) fReader->Rewind();} | |
20 | ||
21 | Bool_t ReadsTracks() const {return (fReader)?fReader->ReadsTracks():kFALSE;} | |
22 | Bool_t ReadsParticles() const {return (fReader)?fReader->ReadsParticles():kFALSE;} | |
23 | ||
24 | Int_t Read(AliHBTRun* particles, AliHBTRun *tracks); | |
25 | ||
26 | AliHBTEvent* GetParticleEvent() ; | |
27 | AliHBTEvent* GetTrackEvent() ; | |
88cb7938 | 28 | |
29 | AliHBTEvent* GetParticleEvent(Int_t n); | |
30 | AliHBTEvent* GetTrackEvent(Int_t n){return (fReader)?fReader->GetTrackEvent(n):0x0;} | |
31 | Int_t GetNumberOfPartEvents(){return (fReader)?fReader->GetNumberOfPartEvents():0;} | |
32 | Int_t GetNumberOfTrackEvents(){return (fReader)?fReader->GetNumberOfTrackEvents():0;} | |
33 | ||
34 | void Randomize(AliHBTEvent* event); | |
35 | void Randomize(AliHBTRun* run); | |
36 | void SetEventVertex(Double_t x, Double_t y,Double_t z); | |
37 | ||
38 | void SetGaussianBall(Double_t r); | |
39 | void SetGaussianBall(Double_t rx, Double_t ry, Double_t rz); | |
40 | void SetCyllinderSurface(Double_t r, Double_t l); | |
41 | ||
42 | protected: | |
43 | void Randomize(Double_t& x,Double_t& y,Double_t&z, AliHBTParticle*p); | |
efaf00f8 | 44 | Int_t ReadNext(){return (fReader)?fReader->Next():1;} |
88cb7938 | 45 | private: |
46 | AliHBTReader* fReader; | |
47 | AliHBTRndm* fRandomizer; | |
48 | ||
49 | Int_t fModel; | |
50 | ||
51 | Bool_t fAddToExistingPos; | |
52 | Bool_t fOnlyParticlesFromVertex; | |
53 | ||
54 | Double_t fVX; //vertex position | |
55 | Double_t fVY; //vertex position | |
56 | Double_t fVZ; //vertex position | |
57 | ||
58 | ClassDef(AliHBTPositionRandomizer,1) | |
59 | }; | |
60 | ||
61 | class AliHBTRndm: public TObject | |
62 | { | |
63 | public: | |
64 | AliHBTRndm(){} | |
65 | ~AliHBTRndm(){} | |
66 | virtual void Randomize(Double_t& x,Double_t& y,Double_t&z, AliHBTParticle*p) = 0; | |
67 | ClassDef(AliHBTRndm,1) | |
68 | }; | |
69 | ||
70 | class AliHBTRndmGaussBall: public AliHBTRndm | |
71 | { | |
72 | public: | |
73 | AliHBTRndmGaussBall(); | |
74 | AliHBTRndmGaussBall(Float_t r); | |
75 | AliHBTRndmGaussBall(Float_t rx, Float_t ry, Float_t rz); | |
76 | ~AliHBTRndmGaussBall(){} | |
bed069a4 | 77 | void Randomize(Double_t& x,Double_t& y,Double_t&z, AliHBTParticle*/*particle*/); |
88cb7938 | 78 | private: |
79 | Float_t fRx; | |
80 | Float_t fRy; | |
81 | Float_t fRz; | |
82 | ClassDef(AliHBTRndmGaussBall,1) | |
83 | }; | |
84 | ||
85 | class AliHBTRndmCyllSurf: public AliHBTRndm | |
86 | { | |
87 | public: | |
88 | AliHBTRndmCyllSurf():fR(0.0){} | |
89 | AliHBTRndmCyllSurf(Float_t r, Float_t l):fR(r),fL(l){} | |
90 | ~AliHBTRndmCyllSurf(){} | |
91 | ||
bed069a4 | 92 | void Randomize(Double_t& x,Double_t& y,Double_t&z, AliHBTParticle* particle); |
88cb7938 | 93 | private: |
94 | Float_t fR; | |
95 | Float_t fL; | |
96 | ||
97 | ClassDef(AliHBTRndmCyllSurf,1) | |
98 | }; | |
99 | ||
100 | #endif | |
101 |