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