]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHRecon.h
Removing obsolete constants.
[u/mrichter/AliRoot.git] / RICH / AliRICHRecon.h
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
7 //////////////////////////////////////////////////////////////////////////
8 //                                                                      //
9 // AliRICHRecon                                                         //
10 //                                                                      //
11 // RICH class to perfom pattern recognition based on Hough transfrom    //
12 //                                                                      //
13 //////////////////////////////////////////////////////////////////////////
14
15
16 #include <TTask.h> //base class
17
18 class AliRICHHelix;
19 class AliRICHParam;
20 class TClonesArray;
21 class AliRICHRecon : public TTask 
22 {
23 public : 
24              AliRICHRecon();
25     virtual ~AliRICHRecon()                                                          {}
26
27   Double_t ThetaCerenkov(AliRICHHelix *pHelix,TClonesArray *pCluLst,Int_t &iMipId);                  // it returns reconstructed Theta Cerenkov
28   void FindThetaPhotonCerenkov();             //
29   void FindAreaAndPortionOfRing();            //
30   void FindPhotonAnglesInDRS();               //
31   void FindPhiPoint();                        //
32   void FindThetaAtQuartz(Float_t ThetaCer);   //
33   Double_t HoughResponse (              );                   //most probable track theta ckov out of all photon candidate thetas 
34   Int_t    FlagPhotons   (Double_t theta);                   //n. of photon candidates which thetas are inside a window around most probable track theta ckov
35   void FindThetaCerenkov(Int_t iNclus);       //
36   void FindIntersectionWithDetector();        //
37   Float_t Cerenkovangle(Float_t n, Float_t b);//
38   Int_t   PhotonInBand();                     //
39   Int_t   CheckDetectorAcceptance() const;    //
40   Int_t   GetFittedHoughPhotons()                   const{ return fFittedHoughPhotons;}             //
41   Int_t   GetPhotonFlag()                           const{ return fPhotonFlag[fPhotonIndex];}       //
42   Int_t   GetPhotonsNumber()                        const{ return fPhotonsNumber;}                  //
43   Int_t   GetPhotonIndex()                          const{ return fPhotonIndex;}                    //
44   Float_t GetPhotonEnergy()                         const{ return fEphot;}                          //
45   Float_t GetEmissionPoint()                        const{ return fLengthEmissionPoint;}            //
46   Float_t GetMassHypotesis()                        const{ return fMassHypotesis;}                  //
47   Float_t GetBetaOfParticle()                       const{ return fTrackBeta;}                      //
48   Float_t GetEntranceX()                            const{ return fXtoentr;}                        //
49   Float_t GetEntranceY()                            const{ return fYtoentr;}                        //
50   Float_t GetThetaCerenkov()                        const{ return fThetaCerenkov;}                  //
51   Float_t GetThetaPhotonCerenkov()                  const{ return fThetaPhotonCerenkov;}            //
52   Float_t GetTrackTheta()                           const{ return fTrackTheta;}                     //
53   Float_t GetTrackPhi()                             const{ return fTrackPhi;}                       //
54   Float_t GetXPointOnCathode()                      const{ return fPhotonLimitX;}                   //
55   Float_t GetYPointOnCathode()                      const{ return fPhotonLimitY;}                   //
56   Float_t GetThetaPhotonInDRS()                     const{ return fThetaPhotonInDRS;}               //
57   Float_t GetPhiPhotonInDRS()                       const{ return fPhiPhotonInDRS;}                 //
58   Float_t GetThetaPhotonInTRS()                     const{ return fThetaPhotonInTRS;}               //
59   Float_t GetPhiPhotonInTRS()                       const{ return fPhiPhotonInTRS;}                 //
60   Float_t GetThetaAtQuartz()                        const{ return fThetaAtQuartz;}                  //
61   Float_t GetPhiPoint()                             const{ return fPhiPoint[fPhotonIndex];}         //
62   Float_t GetXCoordOfEmission()                     const{ return fXEmiss;}                         //
63   Float_t GetYCoordOfEmission()                     const{ return fYEmiss;}                         //
64   Float_t GetXInnerRing()                           const{ return fXInner;}                         //
65   Float_t GetYInnerRing()                           const{ return fYInner;}                         //
66   Float_t GetRadiusInnerRing()                      const{ return fInnerRadius;}                    //
67   Float_t GetXOuterRing()                           const{ return fXOuter;}                         //
68   Float_t GetYOuterRing()                           const{ return fYOuter;}                         //
69   Float_t GetRadiusOuterRing()                      const{ return fOuterRadius;}                    //
70   Float_t GetShiftX()                               const{ return fShiftX;}                         //
71   Float_t GetShiftY()                               const{ return fShiftY;}                         //
72   Float_t GetDetectorWhereX()                       const{ return fXcoord;}                         //
73   Float_t GetDetectorWhereY()                       const{ return fYcoord;}                         //
74   Float_t GetIntersectionX()                        const{ return fIntersectionX;}                  //
75   Float_t GetIntersectionY()                        const{ return fIntersectionY;}                  //
76   Float_t GetThetaOfRing()                          const{ return fThetaOfRing;}                    //
77   Float_t GetAreaOfRing()                           const{ return fAreaOfRing;}                     //
78   Float_t GetPortionOfRing()                        const{ return fPortionOfRing;}                  //
79   Float_t GetHoughArea()                            const{ return fHoughArea;}                      //
80   Float_t GetPhotonEta()                            const{ return fPhotonEta[fPhotonIndex];}        //
81   Float_t GetPhotonWeight()                         const{ return fPhotonWeight[fPhotonIndex];}     //
82   Float_t GetHoughRMS()                             const{ return fHoughRMS;}                       //
83   Double_t GetPhotBKG()                             const{ return fnPhotBKG;}                       //
84   Float_t GetFittedTrackTheta()                     const{ return fFittedTrackTheta;}               //
85   Float_t GetFittedTrackPhi()                       const{ return fFittedTrackPhi;}                 //
86   Float_t GetFittedThetaCerenkov()                  const{ return fFittedThetaCerenkov;}            //
87   Float_t GetRingSigma2()                           const{ return fRingSigma2;}                     //
88   void    SetPhotonEnergy(Float_t e)                     { fEphot = e;}                             //
89   void SetEmissionPoint(Float_t LengthEmissionPoint) { fLengthEmissionPoint = LengthEmissionPoint;} //
90   void SetEntranceX(Float_t Xtoentr) { fXtoentr = Xtoentr;}                                         //
91   void SetEntranceY(Float_t Ytoentr) { fYtoentr = Ytoentr;}                                         //
92   void SetThetaPhotonInTRS(Float_t Theta) {fThetaPhotonInTRS = Theta;}                              //
93   void SetPhiPhotonInTRS(Float_t Phi) {fPhiPhotonInTRS = Phi;}                                      //
94   void SetThetaPhotonInDRS(Float_t Theta) {fThetaPhotonInDRS = Theta;}                              //
95   void SetPhiPhotonInDRS(Float_t Phi) {fPhiPhotonInDRS = Phi;}                                      //
96   void SetThetaAtQuartz(Float_t ThetaAtQuartz) {fThetaAtQuartz = ThetaAtQuartz;}                    //
97   void SetPhiPoint(Float_t PhiPoint){ fPhiPoint[fPhotonIndex] = PhiPoint;}                          //
98   void SetXCoordOfEmission(Float_t XEmiss) {fXEmiss = XEmiss;}                                      //
99   void SetYCoordOfEmission(Float_t YEmiss) {fYEmiss = YEmiss;}                                      //
100   void SetXPointOnCathode(Float_t PhotonLimitX) { fPhotonLimitX = PhotonLimitX;}                    //
101   void SetYPointOnCathode(Float_t PhotonLimitY) { fPhotonLimitY = PhotonLimitY;}                    //
102   void SetXInnerRing(Float_t XInner) {fXInner = XInner;}                                            //
103   void SetYInnerRing(Float_t YInner) {fYInner = YInner;}                                            //
104   void SetRadiusInnerRing(Float_t InnerRadius) {fInnerRadius = InnerRadius;}                        //
105   void SetXOuterRing(Float_t XOuter) {fXOuter = XOuter;}                                            //
106   void SetYOuterRing(Float_t YOuter) {fYOuter = YOuter;}                                            //
107   void SetRadiusOuterRing(Float_t OuterRadius) {fOuterRadius = OuterRadius;}                        //
108   void SetThetaCerenkov(Float_t ThetaCer) {fThetaCerenkov = ThetaCer;}                              //
109   void SetThetaPhotonCerenkov(Float_t ThetaPhotCer) {fThetaPhotonCerenkov = ThetaPhotCer;}          //
110   void SetTrackTheta(Float_t TrackTheta) { fTrackTheta = TrackTheta;}                               //
111   void SetTrackPhi(Float_t TrackPhi) { fTrackPhi = TrackPhi;}                                       //
112   void SetShiftX(Float_t ShiftX) { fShiftX = ShiftX;}                                               //
113   void SetShiftY(Float_t ShiftY) { fShiftY = ShiftY;}                                               //
114   void SetDetectorWhereX(Float_t Xcoord) { fXcoord = Xcoord;}                                       //
115   void SetDetectorWhereY(Float_t Ycoord) { fYcoord = Ycoord;}                                       //
116   void SetIntersectionX(Float_t IntersectionX) { fIntersectionX = IntersectionX;}                   //
117   void SetIntersectionY(Float_t IntersectionY) { fIntersectionY = IntersectionY;}                   //
118   void SetThetaOfRing(Float_t ThetaOfRing) { fThetaOfRing = ThetaOfRing;}                           //
119   void SetAreaOfRing(Float_t AreaOfRing) { fAreaOfRing = AreaOfRing;}                               //
120   void SetPortionOfRing(Float_t PortionOfRing) { fPortionOfRing = PortionOfRing;}                   //
121   void SetHoughArea(Float_t HoughArea) { fHoughArea = HoughArea;}                                   //
122   void SetPhotonsNumber(Int_t PhotonsNumber) { fPhotonsNumber = PhotonsNumber;}                     //
123   void SetPhotonIndex(Int_t PhotonIndex) { fPhotonIndex = PhotonIndex;}                             //
124   void SetPhotonEta(Float_t PhotonEta) { fPhotonEta[fPhotonIndex] = PhotonEta;}                     //
125   void SetPhotonFlag(Int_t PhotonFlag) { fPhotonFlag[fPhotonIndex] = PhotonFlag;}                   //
126   void SetPhotonWeight(Float_t PhotonWeight) { fPhotonWeight[fPhotonIndex] = PhotonWeight;}         //
127   void SetPhotBKG(Double_t nPhotBKG) {fnPhotBKG=nPhotBKG;}                                          //
128   void SetHoughRMS(Float_t HoughRMS) { fHoughRMS = HoughRMS;}                                       //
129   void SetFittedTrackTheta(Float_t FittedTrackTheta)    { fFittedTrackTheta = FittedTrackTheta;}    //
130   void SetFittedTrackPhi(Float_t FittedTrackPhi)    { fFittedTrackPhi = FittedTrackPhi;}            //
131   void SetFittedThetaCerenkov(Float_t FittedThetaCerenkov) { fFittedThetaCerenkov = FittedThetaCerenkov;}//
132   void SetFittedHoughPhotons(Int_t FittedHoughPhotons) { fFittedHoughPhotons = FittedHoughPhotons;} //
133   void SetRingSigma2(Float_t RingSigma2) { fRingSigma2 = RingSigma2;} //
134   Float_t SnellAngle(Float_t n1, Float_t n2, Float_t theta1);                                       //
135   Float_t FromEmissionToCathode();                                                                  //
136
137 protected:
138   Int_t fPhotonsNumber;                       // Number of photons candidate
139   Int_t fPhotonIndex;                         // index of photons
140   Int_t fPhotonFlag[3000];                    // flag for photons
141   Int_t   fFittedHoughPhotons;                // n. photons after Hough and after minimization
142   Int_t fMinNumPhots;                         // minimum number of photons for a given ring
143
144   Float_t fTrackTheta;                        // Theta of track at RICH
145   Float_t fTrackPhi;                          // Phi of track at RICH
146   Float_t fMinDist;                           // min distance between extrapolated track and MIP
147   Float_t fTrackBeta;                         // beta of the track
148   Float_t fXtoentr;                           // X entrance to RICH
149   Float_t fYtoentr;                           // Y entrance to RICH
150   Float_t fThetaPhotonInTRS;                  // Theta of photon in the Track Reference System (TRS)
151   Float_t fPhiPhotonInTRS;                    // Phi of photon in TRS
152   Float_t fThetaPhotonInDRS;                  // Theta of photon in Detector Reference System (DRS)
153   Float_t fPhiPhotonInDRS;                    // Phi of photon in DRS
154   Float_t fThetaAtQuartz;                     // Theta at the quartz entrance
155   Float_t fPhiPoint[3000];                    // array of phi of ring photons
156   Float_t fXEmiss;                            //  x emission
157   Float_t fYEmiss;                            //  y emission
158   Float_t fXInner;                            // X inner ring
159   Float_t fYInner;                            // Y inner ring
160   Float_t fXOuter;                            // X outer ring
161   Float_t fYOuter;                            // Y outer ring
162   Float_t fInnerRadius;                       // inner radius
163   Float_t fOuterRadius;                       // outer radius
164   Float_t fEphot;                             // photon energy
165   Float_t fLengthEmissionPoint;               // lenght of emmission point
166   Float_t fPhotonLimitX;                      // X phys limit for photon
167   Float_t fPhotonLimitY;                      // Y phys limit for photon 
168   Float_t fDistanceFromCluster;               // distance from cluster
169   Float_t fCerenkovAnglePad;                  // cherenkov angle of pad
170   Float_t fThetaPhotonCerenkov;               // theta cerenkov for photon
171   Float_t fShiftX;                            // x shift to entrance in radiator
172   Float_t fShiftY;                            // y shift to entrance in radiator
173   Float_t fXcoord;                            // ..
174   Float_t fYcoord;                            // ..
175   Float_t fIntersectionX;                     // ..
176   Float_t fIntersectionY;                     // ..
177   Float_t fMassHypotesis;                     //
178   Float_t fThetaOfRing;                       // theta of ring
179   Float_t fAreaOfRing;                        // area of the ring
180   Float_t fPortionOfRing;                     // fraction of the accepted ring
181   Float_t fHoughArea;                         // area Hough
182   Float_t fPhotonEta[3000];                   // theta cerenkov of photon candidates
183   Float_t fPhotonWeight[3000];                // weigth
184   Float_t fHoughRMS;                          // rms Hough
185   Float_t fFittedTrackTheta;                  // theta track after minim.
186   Float_t fFittedTrackPhi;                    // phi track after minim.
187   Float_t fFittedThetaCerenkov;               // thetacerenkov after minim.
188   Float_t fThetaMin,fThetaMax;                // min max
189   Bool_t  fIsWEIGHT;                          // flag to consider weight procedure
190   Bool_t  fIsBACKGROUND;                      // flag to simulate bkg
191   Float_t fDTheta;                            // Step for sliding window
192   Float_t fWindowWidth;                       // Hough width of sliding window
193   
194   Int_t   fNumEtaPhotons;                     // Number of photons
195   Int_t   fEtaFlag[3000];                     // flag for good photons
196   Float_t fEtaPhotons[3000];                  // Cerenkov angle each photon
197   Float_t fWeightPhotons[3000];               // weight for each photon
198   Double_t fnPhotBKG;                         // # estimated BKG photons in the ring
199   Float_t fThetaCerenkov;                     // Theta angle for Hough
200   Float_t fWeightThetaCerenkov;               // Theta Cerenkov angle weighted
201   Float_t fThetaPeakPos;                      // Peak position
202   Float_t fRingSigma2;                        // sigma2 of the reconstructed ring
203   ClassDef(AliRICHRecon,0)
204 };
205     
206 #endif // #ifdef AliRICHRecon_cxx
207