]>
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 | ||
18 | Int_t Read(AliHBTRun* particles, AliHBTRun *tracks); | |
19 | ||
20 | AliHBTEvent* GetParticleEvent(Int_t n); | |
21 | AliHBTEvent* GetTrackEvent(Int_t n){return (fReader)?fReader->GetTrackEvent(n):0x0;} | |
22 | Int_t GetNumberOfPartEvents(){return (fReader)?fReader->GetNumberOfPartEvents():0;} | |
23 | Int_t GetNumberOfTrackEvents(){return (fReader)?fReader->GetNumberOfTrackEvents():0;} | |
24 | ||
25 | void Randomize(AliHBTEvent* event); | |
26 | void Randomize(AliHBTRun* run); | |
27 | void SetEventVertex(Double_t x, Double_t y,Double_t z); | |
28 | ||
29 | void SetGaussianBall(Double_t r); | |
30 | void SetGaussianBall(Double_t rx, Double_t ry, Double_t rz); | |
31 | void SetCyllinderSurface(Double_t r, Double_t l); | |
32 | ||
33 | protected: | |
34 | void Randomize(Double_t& x,Double_t& y,Double_t&z, AliHBTParticle*p); | |
35 | private: | |
36 | AliHBTReader* fReader; | |
37 | AliHBTRndm* fRandomizer; | |
38 | ||
39 | Int_t fModel; | |
40 | ||
41 | Bool_t fAddToExistingPos; | |
42 | Bool_t fOnlyParticlesFromVertex; | |
43 | ||
44 | Double_t fVX; //vertex position | |
45 | Double_t fVY; //vertex position | |
46 | Double_t fVZ; //vertex position | |
47 | ||
48 | ClassDef(AliHBTPositionRandomizer,1) | |
49 | }; | |
50 | ||
51 | class AliHBTRndm: public TObject | |
52 | { | |
53 | public: | |
54 | AliHBTRndm(){} | |
55 | ~AliHBTRndm(){} | |
56 | virtual void Randomize(Double_t& x,Double_t& y,Double_t&z, AliHBTParticle*p) = 0; | |
57 | ClassDef(AliHBTRndm,1) | |
58 | }; | |
59 | ||
60 | class AliHBTRndmGaussBall: public AliHBTRndm | |
61 | { | |
62 | public: | |
63 | AliHBTRndmGaussBall(); | |
64 | AliHBTRndmGaussBall(Float_t r); | |
65 | AliHBTRndmGaussBall(Float_t rx, Float_t ry, Float_t rz); | |
66 | ~AliHBTRndmGaussBall(){} | |
bed069a4 | 67 | void Randomize(Double_t& x,Double_t& y,Double_t&z, AliHBTParticle*/*particle*/); |
88cb7938 | 68 | private: |
69 | Float_t fRx; | |
70 | Float_t fRy; | |
71 | Float_t fRz; | |
72 | ClassDef(AliHBTRndmGaussBall,1) | |
73 | }; | |
74 | ||
75 | class AliHBTRndmCyllSurf: public AliHBTRndm | |
76 | { | |
77 | public: | |
78 | AliHBTRndmCyllSurf():fR(0.0){} | |
79 | AliHBTRndmCyllSurf(Float_t r, Float_t l):fR(r),fL(l){} | |
80 | ~AliHBTRndmCyllSurf(){} | |
81 | ||
bed069a4 | 82 | void Randomize(Double_t& x,Double_t& y,Double_t&z, AliHBTParticle* particle); |
88cb7938 | 83 | private: |
84 | Float_t fR; | |
85 | Float_t fL; | |
86 | ||
87 | ClassDef(AliHBTRndmCyllSurf,1) | |
88 | }; | |
89 | ||
90 | #endif | |
91 |