]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HBTAN/AliHBTPositionRandomizer.h
These files were moved to ANALYSIS
[u/mrichter/AliRoot.git] / HBTAN / AliHBTPositionRandomizer.h
CommitLineData
88cb7938 1#ifndef ALIHBTPOSITIONRANDOMIZER_H
2#define ALIHBTPOSITIONRANDOMIZER_H
abe00f6f 3//___________________________________________________
4////////////////////////////////////////////////////////////////////////////////
5//
6// class AliHBTPositionRandomizer
7//
8// These class randomizes particle vertex positions
9// Piotr.Skowronski@cern.ch
10//
11////////////////////////////////////////////////////////////////////////////////
88cb7938 12
415b66b5 13#include "AliReader.h"
88cb7938 14class AliHBTRndm;
6e1592b9 15class TH1I;
88cb7938 16
415b66b5 17class AliHBTPositionRandomizer: public AliReader
88cb7938 18{
19 public:
94a709e1 20 enum EModelTypes{kGausBall,kCylinder,kCylinderSurf,kEllipse};
88cb7938 21 AliHBTPositionRandomizer();
415b66b5 22 AliHBTPositionRandomizer(AliReader* reader);
abe00f6f 23 AliHBTPositionRandomizer(const AliHBTPositionRandomizer& in);
24
25 virtual ~AliHBTPositionRandomizer();
26
34914285 27 AliHBTPositionRandomizer& operator=(const AliHBTPositionRandomizer& in);
88cb7938 28
efaf00f8 29 Int_t Next(){return (fReader)?fReader->Next():1;}
30 void Rewind(){if(fReader) fReader->Rewind();}
31
415b66b5 32 Bool_t ReadsRec() const {return (fReader)?fReader->ReadsRec():kFALSE;}
33 Bool_t ReadsSim() const {return (fReader)?fReader->ReadsSim():kFALSE;}
efaf00f8 34
1c654289 35 AliAOD* GetEventSim() const ;
36 AliAOD* GetEventRec() const ;
88cb7938 37
415b66b5 38 AliAOD* GetEventSim(Int_t n);
39 AliAOD* GetEventRec(Int_t n){return (fReader)?fReader->GetEventRec(n):0x0;}
40
41 Int_t GetNumberOfSimEvents(){return (fReader)?fReader->GetNumberOfSimEvents():0;}
42 Int_t GetNumberOfRecEvents(){return (fReader)?fReader->GetNumberOfRecEvents():0;}
6e1592b9 43 virtual TH1I* GetTrackCounter() const {return (fReader)?fReader->GetTrackCounter():0x0;}
44 virtual void WriteTrackCounter() const {if(fReader) fReader->WriteTrackCounter();}
45
415b66b5 46 void Randomize(AliAOD* event) const;
88cb7938 47 void SetEventVertex(Double_t x, Double_t y,Double_t z);
48
49 void SetGaussianBall(Double_t r);
50 void SetGaussianBall(Double_t rx, Double_t ry, Double_t rz);
51 void SetCyllinderSurface(Double_t r, Double_t l);
94a709e1 52 void SetEllipse(Double_t rmin, Double_t rmax);
88cb7938 53
3a3bc78a 54 void AddToPosition(Bool_t flag){fAddToExistingPos = flag;}
55 void RandomizeTracks(Bool_t flag){fRandomizeTracks = flag;}
56
57
88cb7938 58 protected:
94a709e1 59 void Randomize(Double_t& x,Double_t& y,Double_t&z,AliVAODParticle*p);
efaf00f8 60 Int_t ReadNext(){return (fReader)?fReader->Next():1;}
abe00f6f 61
88cb7938 62 private:
415b66b5 63 AliReader* fReader; // Pointer to reader
abe00f6f 64 AliHBTRndm* fRandomizer; // Pointer to class that performs randomization according to some model
88cb7938 65
abe00f6f 66 Int_t fModel; //Defines what model is used
88cb7938 67
abe00f6f 68 Bool_t fAddToExistingPos; //Determines if randomized position should be added to previous one, or overwrite old one
69 Bool_t fOnlyParticlesFromVertex; //Determines if randomization should be performed for particles from vertex
88cb7938 70
3a3bc78a 71 Bool_t fRandomizeTracks; //Determines if tracks should also be randimized
72
88cb7938 73 Double_t fVX; //vertex position
74 Double_t fVY; //vertex position
75 Double_t fVZ; //vertex position
76
77 ClassDef(AliHBTPositionRandomizer,1)
78};
79
80class AliHBTRndm: public TObject
81{
82 public:
83 AliHBTRndm(){}
abe00f6f 84 virtual ~AliHBTRndm(){}
415b66b5 85 virtual void Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODParticle*p) const = 0;
94a709e1 86 ClassDef(AliHBTRndm,1)
88cb7938 87};
88
89class AliHBTRndmGaussBall: public AliHBTRndm
90{
91 public:
92 AliHBTRndmGaussBall();
93 AliHBTRndmGaussBall(Float_t r);
94 AliHBTRndmGaussBall(Float_t rx, Float_t ry, Float_t rz);
abe00f6f 95 virtual ~AliHBTRndmGaussBall(){}
415b66b5 96 void Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODParticle*/*particle*/) const;
88cb7938 97 private:
abe00f6f 98 Float_t fRx; //Dispertion in x
99 Float_t fRy; //Dispertion in y
100 Float_t fRz; //Dispertion in z
88cb7938 101 ClassDef(AliHBTRndmGaussBall,1)
102};
103
104class AliHBTRndmCyllSurf: public AliHBTRndm
105{
106 public:
107 AliHBTRndmCyllSurf():fR(0.0){}
108 AliHBTRndmCyllSurf(Float_t r, Float_t l):fR(r),fL(l){}
abe00f6f 109 virtual ~AliHBTRndmCyllSurf(){}
88cb7938 110
415b66b5 111 void Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODParticle* particle) const;
88cb7938 112 private:
abe00f6f 113 Float_t fR; //Redius of cylinder
114 Float_t fL; //Length of cylinder
88cb7938 115
116 ClassDef(AliHBTRndmCyllSurf,1)
117};
118
94a709e1 119class AliHBTRndmEllipse: public AliHBTRndm
120{
121 public:
122 AliHBTRndmEllipse():fRmin(0.),fRmax(0.){};
123 AliHBTRndmEllipse(Float_t rmin, Float_t rmax);
124 virtual ~AliHBTRndmEllipse(){}
125
126 void Randomize(Double_t& x,Double_t& y, Double_t& z, AliVAODParticle* particle) const;
127 private:
128 Float_t fRmin; //Radius in x direction
129 Float_t fRmax; //Radius in y direction
130
131 ClassDef(AliHBTRndmEllipse,1)
132};
133
134
135
88cb7938 136#endif
137