]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICHRecon.h
START positions
[u/mrichter/AliRoot.git] / RICH / AliRICHRecon.h
CommitLineData
5cb4dfc3 1#ifndef AliRICHRecon_h
2#define AliRICHRecon_h
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
88dd9ad4 7//////////////////////////////////////////////////////////////////////////
8// //
9// AliRICHRecon //
10// //
11// RICH class to perfom pattern recognition based on Hough transfrom //
12// //
13//////////////////////////////////////////////////////////////////////////
14
15
5cb4dfc3 16#include <TTask.h>
5cb4dfc3 17
998b831f 18class AliRICHHelix;
b068561d 19
20class AliRICHRecon : public TTask
21{
22public :
998b831f 23 AliRICHRecon(AliRICHHelix *pHelix,TClonesArray *pClusters,Int_t iMipId);
24 virtual ~AliRICHRecon(){;}
5cb4dfc3 25
998b831f 26 Double_t ThetaCerenkov(); // it returns reconstructed Theta Cerenkov
88dd9ad4 27 void FindThetaPhotonCerenkov(); //
28 void FindAreaAndPortionOfRing(); //
29 void FindEmissionPoint(); //
30 void FindPhotonAnglesInDRS(); //
31 void FindPhiPoint(); //
32 void FindThetaAtQuartz(Float_t ThetaCer); //
33 void HoughResponse(); //
88dd9ad4 34 void FlagPhotons(); //
101624cd 35 void FindThetaCerenkov(); //
88dd9ad4 36 void FindIntersectionWithDetector(); //
88dd9ad4 37 Float_t Cerenkovangle(Float_t n, Float_t b);//
88dd9ad4 38 Int_t PhotonInBand(); //
88dd9ad4 39 Int_t CheckDetectorAcceptance() const; //
40 Int_t GetFittedHoughPhotons() const{ return fFittedHoughPhotons;} //
41 Int_t GetPhotonFlag() const{ return fPhotonFlag[fPhotonIndex];} //
42 Int_t GetTrackCharge() const{ return fTrackCharge;} //
43 Int_t GetPhotonsNumber() const{ return fPhotonsNumber;} //
44 Int_t GetPhotonIndex() const{ return fPhotonIndex;} //
45 Int_t GetMipIndex() const{ return fMipIndex;} //
46 Int_t GetTrackIndex() const{ return fTrackIndex;} //
47 Int_t GetCandidatePhotonsNumber() const{ return fCandidatePhotonsNumber;} //
48 Int_t GetHoughPhotons() const{ return fHoughPhotons;} //
88dd9ad4 49 Float_t GetPhotonEnergy() const{ return fPhotonEnergy;} //
50 Float_t GetFreonRefractiveIndex() const{ return fFreonRefractiveIndex;} //
51 Float_t GetQuartzRefractiveIndex() const{ return fQuartzRefractiveIndex;} //
52 Float_t GetGasRefractiveIndex() const{ return fGasRefractiveIndex;} //
88dd9ad4 53 Float_t GetEmissionPoint() const{ return fLengthEmissionPoint;} //
54 Float_t GetMassHypotesis() const{ return fMassHypotesis;} //
55 Float_t GetBetaOfParticle() const{ return fTrackBeta;} //
56 Float_t GetEntranceX() const{ return fXtoentr;} //
57 Float_t GetEntranceY() const{ return fYtoentr;} //
58 Float_t GetThetaCerenkov() const{ return fThetaCerenkov;} //
59 Float_t GetThetaPhotonCerenkov() const{ return fThetaPhotonCerenkov;} //
88dd9ad4 60 Float_t GetTrackTheta() const{ return fTrackTheta;} //
61 Float_t GetTrackPhi() const{ return fTrackPhi;} //
88dd9ad4 62 Float_t GetXPointOnCathode() const{ return fPhotonLimitX;} //
63 Float_t GetYPointOnCathode() const{ return fPhotonLimitY;} //
64 Float_t GetThetaPhotonInDRS() const{ return fThetaPhotonInDRS;} //
65 Float_t GetPhiPhotonInDRS() const{ return fPhiPhotonInDRS;} //
66 Float_t GetThetaPhotonInTRS() const{ return fThetaPhotonInTRS;} //
67 Float_t GetPhiPhotonInTRS() const{ return fPhiPhotonInTRS;} //
68 Float_t GetThetaAtQuartz() const{ return fThetaAtQuartz;} //
101624cd 69 Float_t GetPhiPoint() const{ return fPhiPoint[fPhotonIndex];} //
88dd9ad4 70 Float_t GetXCoordOfEmission() const{ return fXEmiss;} //
71 Float_t GetYCoordOfEmission() const{ return fYEmiss;} //
72 Float_t GetXInnerRing() const{ return fXInner;} //
73 Float_t GetYInnerRing() const{ return fYInner;} //
74 Float_t GetRadiusInnerRing() const{ return fInnerRadius;} //
75 Float_t GetXOuterRing() const{ return fXOuter;} //
76 Float_t GetYOuterRing() const{ return fYOuter;} //
77 Float_t GetRadiusOuterRing() const{ return fOuterRadius;} //
78 Float_t GetShiftX() const{ return fShiftX;} //
79 Float_t GetShiftY() const{ return fShiftY;} //
80 Float_t GetDetectorWhereX() const{ return fXcoord;} //
81 Float_t GetDetectorWhereY() const{ return fYcoord;} //
82 Float_t GetIntersectionX() const{ return fIntersectionX;} //
83 Float_t GetIntersectionY() const{ return fIntersectionY;} //
84 Float_t GetThetaOfRing() const{ return fThetaOfRing;} //
85 Float_t GetAreaOfRing() const{ return fAreaOfRing;} //
86 Float_t GetPortionOfRing() const{ return fPortionOfRing;} //
87 Float_t GetHoughArea() const{ return fHoughArea;} //
88 Float_t GetPhotonEta() const{ return fPhotonEta[fPhotonIndex];} //
89 Float_t GetPhotonWeight() const{ return fPhotonWeight[fPhotonIndex];} //
90 Float_t GetHoughRMS() const{ return fHoughRMS;} //
fab9e039 91 Double_t GetPhotBKG() const{ return fnPhotBKG;} //
88dd9ad4 92 Float_t GetFittedTrackTheta() const{ return fFittedTrackTheta;} //
93 Float_t GetFittedTrackPhi() const{ return fFittedTrackPhi;} //
94 Float_t GetFittedThetaCerenkov() const{ return fFittedThetaCerenkov;} //
88dd9ad4 95 void SetPhotonEnergy(Float_t PhotonEnergy) { fPhotonEnergy = PhotonEnergy;} //
96 void SetFreonRefractiveIndex() {fFreonRefractiveIndex = fFreonScaleFactor*(1.177+0.0172*fPhotonEnergy);}//
97 void SetQuartzRefractiveIndex() {fQuartzRefractiveIndex = sqrt(1+(46.411/(113.763556-TMath::Power(fPhotonEnergy,2)))+(228.71/(328.51563-TMath::Power(fPhotonEnergy,2))));}//
98 void SetGasRefractiveIndex() { fGasRefractiveIndex = 1.;} //
99 void SetFreonScaleFactor(Float_t FreonScaleFactor) {fFreonScaleFactor = FreonScaleFactor;} //
100 void SetEmissionPoint(Float_t LengthEmissionPoint) { fLengthEmissionPoint = LengthEmissionPoint;} //
88dd9ad4 101 void SetEntranceX(Float_t Xtoentr) { fXtoentr = Xtoentr;} //
102 void SetEntranceY(Float_t Ytoentr) { fYtoentr = Ytoentr;} //
103 void SetThetaPhotonInTRS(Float_t Theta) {fThetaPhotonInTRS = Theta;} //
104 void SetPhiPhotonInTRS(Float_t Phi) {fPhiPhotonInTRS = Phi;} //
105 void SetThetaPhotonInDRS(Float_t Theta) {fThetaPhotonInDRS = Theta;} //
106 void SetPhiPhotonInDRS(Float_t Phi) {fPhiPhotonInDRS = Phi;} //
107 void SetThetaAtQuartz(Float_t ThetaAtQuartz) {fThetaAtQuartz = ThetaAtQuartz;} //
101624cd 108 void SetPhiPoint(Float_t PhiPoint){ fPhiPoint[fPhotonIndex] = PhiPoint;} //
88dd9ad4 109 void SetXCoordOfEmission(Float_t XEmiss) {fXEmiss = XEmiss;} //
110 void SetYCoordOfEmission(Float_t YEmiss) {fYEmiss = YEmiss;} //
111 void SetXPointOnCathode(Float_t PhotonLimitX) { fPhotonLimitX = PhotonLimitX;} //
112 void SetYPointOnCathode(Float_t PhotonLimitY) { fPhotonLimitY = PhotonLimitY;} //
113 void SetXInnerRing(Float_t XInner) {fXInner = XInner;} //
114 void SetYInnerRing(Float_t YInner) {fYInner = YInner;} //
115 void SetRadiusInnerRing(Float_t InnerRadius) {fInnerRadius = InnerRadius;} //
116 void SetXOuterRing(Float_t XOuter) {fXOuter = XOuter;} //
117 void SetYOuterRing(Float_t YOuter) {fYOuter = YOuter;} //
118 void SetRadiusOuterRing(Float_t OuterRadius) {fOuterRadius = OuterRadius;} //
119 void SetThetaCerenkov(Float_t ThetaCer) {fThetaCerenkov = ThetaCer;} //
120 void SetThetaPhotonCerenkov(Float_t ThetaPhotCer) {fThetaPhotonCerenkov = ThetaPhotCer;} //
88dd9ad4 121 void SetTrackTheta(Float_t TrackTheta) { fTrackTheta = TrackTheta;} //
122 void SetTrackPhi(Float_t TrackPhi) { fTrackPhi = TrackPhi;} //
88dd9ad4 123 void SetTrackCharge(Int_t TrackCharge) { fTrackCharge = TrackCharge;} //
88dd9ad4 124 void SetShiftX(Float_t ShiftX) { fShiftX = ShiftX;} //
125 void SetShiftY(Float_t ShiftY) { fShiftY = ShiftY;} //
126 void SetDetectorWhereX(Float_t Xcoord) { fXcoord = Xcoord;} //
127 void SetDetectorWhereY(Float_t Ycoord) { fYcoord = Ycoord;} //
128 void SetIntersectionX(Float_t IntersectionX) { fIntersectionX = IntersectionX;} //
129 void SetIntersectionY(Float_t IntersectionY) { fIntersectionY = IntersectionY;} //
130 void SetThetaOfRing(Float_t ThetaOfRing) { fThetaOfRing = ThetaOfRing;} //
131 void SetAreaOfRing(Float_t AreaOfRing) { fAreaOfRing = AreaOfRing;} //
132 void SetPortionOfRing(Float_t PortionOfRing) { fPortionOfRing = PortionOfRing;} //
133 void SetHoughArea(Float_t HoughArea) { fHoughArea = HoughArea;} //
134 void SetPhotonsNumber(Int_t PhotonsNumber) { fPhotonsNumber = PhotonsNumber;} //
135 void SetPhotonIndex(Int_t PhotonIndex) { fPhotonIndex = PhotonIndex;} //
136 void SetPhotonEta(Float_t PhotonEta) { fPhotonEta[fPhotonIndex] = PhotonEta;} //
137 void SetPhotonFlag(Int_t PhotonFlag) { fPhotonFlag[fPhotonIndex] = PhotonFlag;} //
138 void SetPhotonWeight(Float_t PhotonWeight) { fPhotonWeight[fPhotonIndex] = PhotonWeight;} //
fab9e039 139 void SetPhotBKG(Double_t nPhotBKG) {fnPhotBKG=nPhotBKG;} //
88dd9ad4 140 void SetHoughRMS(Float_t HoughRMS) { fHoughRMS = HoughRMS;} //
141 void SetMipIndex(Int_t MipIndex) { fMipIndex = MipIndex;} //
142 void SetTrackIndex(Int_t TrackIndex) { fTrackIndex = TrackIndex;} //
88dd9ad4 143 void SetHoughPhotons(Int_t HoughPhotons) { fHoughPhotons = HoughPhotons;} //
144 void SetHoughPhotonsNorm(Float_t HoughPhotonsNorm) { fHoughPhotonsNorm = HoughPhotonsNorm;} //
145 void SetFittedTrackTheta(Float_t FittedTrackTheta) { fFittedTrackTheta = FittedTrackTheta;} //
146 void SetFittedTrackPhi(Float_t FittedTrackPhi) { fFittedTrackPhi = FittedTrackPhi;} //
147 void SetFittedThetaCerenkov(Float_t FittedThetaCerenkov) { fFittedThetaCerenkov = FittedThetaCerenkov;}//
148 void SetFittedHoughPhotons(Int_t FittedHoughPhotons) { fFittedHoughPhotons = FittedHoughPhotons;} //
88dd9ad4 149 void FindBetaFromTheta(Float_t ThetaCerenkov) {fTrackBeta = 1/(fFreonRefractiveIndex*cos(ThetaCerenkov));}//
150 Float_t SnellAngle(Float_t n1, Float_t n2, Float_t theta1); //
151 Float_t FromEmissionToCathode(); //
152
b068561d 153protected:
998b831f 154 TClonesArray *fpClusters; // poiter to clusters
88dd9ad4 155 Int_t fTrackCharge; // charge track
156 Int_t fMipIndex; // index for Mip
157 Int_t fTrackIndex; // index for track
158 Int_t fPhotonsNumber; // Number of photons candidate
159 Int_t fPhotonIndex; // index of photons
160 Int_t fPhotonFlag[3000]; // flag for photons
161 Int_t fCandidatePhotonsNumber; // number of candidate photons
162 Int_t fHoughPhotons; // n. photons after Hough
163 Int_t fFittedHoughPhotons; // n. photons after Hough and after minimization
910735ae 164 Int_t fMinNumPhots; // minimum number of photons for a given ring
998b831f 165
88dd9ad4 166 Float_t fTrackTheta; // Theta of track at RICH
167 Float_t fTrackPhi; // Phi of track at RICH
88dd9ad4 168 Float_t fMinDist; // min distance between extrapolated track and MIP
169 Float_t fTrackBeta; // beta of the track
170 Float_t fXtoentr; // X entrance to RICH
171 Float_t fYtoentr; // Y entrance to RICH
172 Float_t fThetaPhotonInTRS; // Theta of photon in the Track Reference System (TRS)
173 Float_t fPhiPhotonInTRS; // Phi of photon in TRS
174 Float_t fThetaPhotonInDRS; // Theta of photon in Detector Reference System (DRS)
175 Float_t fPhiPhotonInDRS; // Phi of photon in DRS
176 Float_t fThetaAtQuartz; // Theta at the quartz entrance
101624cd 177 Float_t fPhiPoint[3000]; // array of phi of ring photons
88dd9ad4 178 Float_t fXEmiss; // x emission
179 Float_t fYEmiss; // y emission
180 Float_t fXInner; // X inner ring
181 Float_t fYInner; // Y inner ring
182 Float_t fXOuter; // X outer ring
183 Float_t fYOuter; // Y outer ring
184 Float_t fInnerRadius; // inner radius
185 Float_t fOuterRadius; // outer radius
186 Float_t fPhotonEnergy; // photon energy
187 Float_t fFreonRefractiveIndex; // n freon
188 Float_t fQuartzRefractiveIndex; // n quartz
189 Float_t fGasRefractiveIndex; // n gas
190 Float_t fFreonScaleFactor; // scale factor for n freon
191 Float_t fLengthEmissionPoint; // lenght of emmission point
192 Float_t fPhotonLimitX; // X phys limit for photon
193 Float_t fPhotonLimitY; // Y phys limit for photon
194 Float_t fDistanceFromCluster; // distance from cluster
88dd9ad4 195 Float_t fCerenkovAnglePad; // cherenkov angle of pad
196 Float_t fThetaPhotonCerenkov; // theta cerenkov for photon
197 Float_t fShiftX; // x shift to entrance in radiator
198 Float_t fShiftY; // y shift to entrance in radiator
199 Float_t fXcoord; // ..
200 Float_t fYcoord; // ..
201 Float_t fIntersectionX; // ..
202 Float_t fIntersectionY; // ..
998b831f 203 Float_t fMassHypotesis; //
88dd9ad4 204 Float_t fThetaOfRing; // theta of ring
205 Float_t fAreaOfRing; // area of the ring
206 Float_t fPortionOfRing; // fraction of the accepted ring
207 Float_t fHoughArea; // area Hough
208 Float_t fPhotonEta[3000]; // theta cerenkov of photon candidates
209 Float_t fPhotonWeight[3000]; // weigth
210 Float_t fHoughRMS; // rms Hough
211 Float_t* fCandidatePhotonX; // x photon candidates
212 Float_t* fCandidatePhotonY; // y photon candidates
213 Float_t fHoughPhotonsNorm; // n. photons norm.
214 Float_t fFittedTrackTheta; // theta track after minim.
215 Float_t fFittedTrackPhi; // phi track after minim.
216 Float_t fFittedThetaCerenkov; // thetacerenkov after minim.
88dd9ad4 217 Float_t fThetaMin,fThetaMax; // min max
218 Float_t fXmin,fXmax,fYmin,fYmax; // xy min max
88dd9ad4 219 Int_t fNrings; //current number of reconstructed rings
88dd9ad4 220 Bool_t fIsWEIGHT; // flag to consider weight procedure
221 Bool_t fIsBACKGROUND; // flag to simulate bkg
88dd9ad4 222 Float_t fRadiatorWidth; // radiator width
223 Float_t fQuartzWidth; // quartz width
224 Float_t fGapWidth; // gap width
225 Float_t fDTheta; // Step for sliding window
226 Float_t fWindowWidth; // Hough width of sliding window
227
228 Int_t fNumEtaPhotons; // Number of photons
229 Int_t fEtaFlag[3000]; // flag for good photons
230 Float_t fEtaPhotons[3000]; // Cerenkov angle each photon
231 Float_t fWeightPhotons[3000]; // weight for each photon
fab9e039 232 Double_t fnPhotBKG; // # estimated BKG photons in the ring
88dd9ad4 233 Float_t fThetaCerenkov; // Theta angle for Hough
234 Float_t fWeightThetaCerenkov; // Theta Cerenkov angle weighted
235 Float_t fThetaPeakPos; // Peak position
236
237
b068561d 238 ClassDef(AliRICHRecon,0)
5cb4dfc3 239};
240
241#endif // #ifdef AliRICHRecon_cxx
242