]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RICH/AliRICHRecon.h
o) Adding time out to the execution of the preprocessors: The Shuttle forks and the...
[u/mrichter/AliRoot.git] / RICH / AliRICHRecon.h
index 03132c51be2acefac2dc42e65521fc3bb73cf01b..98dd42ba6b7e0decbdb9c99f4b45a26d95a348e5 100644 (file)
 //////////////////////////////////////////////////////////////////////////
 
 
-#include <TTask.h>
-
-class AliRICH;
-class TFile;
-class TNtuple;
-class TCanvas;
+#include <TTask.h> //base class
 
+class AliRICHHelix;
+class AliRICHParam;
+class TClonesArray;
 class AliRICHRecon : public TTask 
 {
 public : 
-    AliRICHRecon(const char*, const char*);
-   ~AliRICHRecon(){EndProcessEvent();}
+             AliRICHRecon();
+    virtual ~AliRICHRecon()                                                          {}
 
-  AliRICH* Rich() {return fRich;}             //main pointer to RICH
-  void StartProcessEvent();                   //
-  void EndProcessEvent();                     //
-  //PH  void InitRecon();                           //
-  void PatRec();                              //
-  void Minimization();                        //
-  void FillHistograms();                      //
+  Double_t ThetaCerenkov(AliRICHHelix *pHelix,TClonesArray *pCluLst,Int_t &iMipId);                  // it returns reconstructed Theta Cerenkov
   void FindThetaPhotonCerenkov();             //
   void FindAreaAndPortionOfRing();            //
-  void FindEmissionPoint();                   //
   void FindPhotonAnglesInDRS();               //
   void FindPhiPoint();                        //
   void FindThetaAtQuartz(Float_t ThetaCer);   //
-  void HoughResponse();                       //
-  void HoughFiltering(float HCS[]);           //
-  void FlagPhotons();                         //
-  void FindWeightThetaCerenkov();             //
-  void EstimationOfTheta();                   //
+  Double_t HoughResponse (              );                   //most probable track theta ckov out of all photon candidate thetas 
+  Int_t    FlagPhotons   (Double_t theta);                   //n. of photon candidates which thetas are inside a window around most probable track theta ckov
+  void FindThetaCerenkov(Int_t iNclus);       //
   void FindIntersectionWithDetector();        //
-  void Waiting();                             //
-  Float_t FindMassOfParticle();               //
   Float_t Cerenkovangle(Float_t n, Float_t b);//
-  Float_t PhotonPositionOnCathode();          //
   Int_t   PhotonInBand();                     //
-  void DrawEvent(Int_t flag)  const;          //
   Int_t   CheckDetectorAcceptance() const;    //
   Int_t   GetFittedHoughPhotons()                   const{ return fFittedHoughPhotons;}             //
   Int_t   GetPhotonFlag()                           const{ return fPhotonFlag[fPhotonIndex];}       //
-  Int_t   GetTrackCharge()                          const{ return fTrackCharge;}                    //
   Int_t   GetPhotonsNumber()                        const{ return fPhotonsNumber;}                  //
   Int_t   GetPhotonIndex()                          const{ return fPhotonIndex;}                    //
-  Int_t   GetMipIndex()                             const{ return fMipIndex;}                       //
-  Int_t   GetTrackIndex()                           const{ return fTrackIndex;}                     //
-  Int_t   GetCandidatePhotonsNumber()               const{ return fCandidatePhotonsNumber;}         //
-  Int_t   GetHoughPhotons()                         const{ return fHoughPhotons;}                   //
-  Float_t GetEventVertexZ()                         const{ return fEventVertZ;}                     //
-  Float_t GetEventMultiplicity()                    const{ return fEventMultiplicity;}              //
-  Float_t GetPhotonEnergy()                         const{ return fPhotonEnergy;}                   //
-  Float_t GetFreonRefractiveIndex()                 const{ return fFreonRefractiveIndex;}           //
-  Float_t GetQuartzRefractiveIndex()                const{ return fQuartzRefractiveIndex;}          //
-  Float_t GetGasRefractiveIndex()                   const{ return fGasRefractiveIndex;}             //
-  Float_t GetFreonScaleFactor()                     const{ return fFreonScaleFactor;}               //
+  Float_t GetPhotonEnergy()                         const{ return fEphot;}                          //
   Float_t GetEmissionPoint()                        const{ return fLengthEmissionPoint;}            //
   Float_t GetMassHypotesis()                        const{ return fMassHypotesis;}                  //
   Float_t GetBetaOfParticle()                       const{ return fTrackBeta;}                      //
@@ -75,13 +49,8 @@ public :
   Float_t GetEntranceY()                            const{ return fYtoentr;}                        //
   Float_t GetThetaCerenkov()                        const{ return fThetaCerenkov;}                  //
   Float_t GetThetaPhotonCerenkov()                  const{ return fThetaPhotonCerenkov;}            //
-  Float_t GetTrackMomentum()                        const{ return fTrackMomentum;}                  //
-  Float_t GetTrackEta()                             const{ return fTrackEta;}                       //
   Float_t GetTrackTheta()                           const{ return fTrackTheta;}                     //
   Float_t GetTrackPhi()                             const{ return fTrackPhi;}                       //
-  Float_t GetTrackPt()                              const{ return fTrackPt;}                        //
-  Float_t GetTrackTPCLastZ()                        const{ return fTrackTPCLastZ;}                  //
-  Float_t GetMinDist()                              const{ return fMinDist;}                        //
   Float_t GetXPointOnCathode()                      const{ return fPhotonLimitX;}                   //
   Float_t GetYPointOnCathode()                      const{ return fPhotonLimitY;}                   //
   Float_t GetThetaPhotonInDRS()                     const{ return fThetaPhotonInDRS;}               //
@@ -89,7 +58,7 @@ public :
   Float_t GetThetaPhotonInTRS()                     const{ return fThetaPhotonInTRS;}               //
   Float_t GetPhiPhotonInTRS()                       const{ return fPhiPhotonInTRS;}                 //
   Float_t GetThetaAtQuartz()                        const{ return fThetaAtQuartz;}                  //
-  Float_t GetPhiPoint()                             const{ return fPhiPoint;}                       //
+  Float_t GetPhiPoint()                             const{ return fPhiPoint[fPhotonIndex];}         //
   Float_t GetXCoordOfEmission()                     const{ return fXEmiss;}                         //
   Float_t GetYCoordOfEmission()                     const{ return fYEmiss;}                         //
   Float_t GetXInnerRing()                           const{ return fXInner;}                         //
@@ -111,24 +80,13 @@ public :
   Float_t GetPhotonEta()                            const{ return fPhotonEta[fPhotonIndex];}        //
   Float_t GetPhotonWeight()                         const{ return fPhotonWeight[fPhotonIndex];}     //
   Float_t GetHoughRMS()                             const{ return fHoughRMS;}                       //
-  Float_t* GetCandidatePhotonX()                    const{ return fCandidatePhotonX;}               //
-  Float_t* GetCandidatePhotonY()                    const{ return fCandidatePhotonY;}               //
-  Float_t GetHoughPhotonsNorm()                     const{ return fHoughPhotonsNorm;}               //
+  Double_t GetPhotBKG()                             const{ return fnPhotBKG;}                       //
   Float_t GetFittedTrackTheta()                     const{ return fFittedTrackTheta;}               //
   Float_t GetFittedTrackPhi()                       const{ return fFittedTrackPhi;}                 //
   Float_t GetFittedThetaCerenkov()                  const{ return fFittedThetaCerenkov;}            //
-  Float_t GetEstimationOfTheta()                    const{ return fEstimationOfTheta;}              //
-  Float_t GetEstimationOfThetaRMS()                 const{ return fEstimationOfThetaRMS;}           //
-  void SetEventVertexZ(Float_t EventVertZ) { fEventVertZ = EventVertZ;}                             //
-  void SetEventMultiplicity(Float_t EventMultiplicity) { fEventMultiplicity = EventMultiplicity;}   //
-  void SetPhotonEnergy(Float_t PhotonEnergy) { fPhotonEnergy = PhotonEnergy;}                       //
-  void SetFreonRefractiveIndex() {fFreonRefractiveIndex = fFreonScaleFactor*(1.177+0.0172*fPhotonEnergy);}//
-  void SetQuartzRefractiveIndex() {fQuartzRefractiveIndex = sqrt(1+(46.411/(113.763556-TMath::Power(fPhotonEnergy,2)))+(228.71/(328.51563-TMath::Power(fPhotonEnergy,2))));}//
-  void SetGasRefractiveIndex() { fGasRefractiveIndex = 1.;}                                         //
-  void SetFreonScaleFactor(Float_t FreonScaleFactor) {fFreonScaleFactor = FreonScaleFactor;}        //
+  Float_t GetRingSigma2()                           const{ return fRingSigma2;}                     //
+  void    SetPhotonEnergy(Float_t e)                     { fEphot = e;}                             //
   void SetEmissionPoint(Float_t LengthEmissionPoint) { fLengthEmissionPoint = LengthEmissionPoint;} //
-  void SetMassHypotesis(Float_t mass) {fMassHypotesis = mass;}                                      //
-  void SetBetaOfParticle() { fTrackBeta = fTrackMomentum/sqrt(TMath::Power(fTrackMomentum,2)+TMath::Power(fMassHypotesis,2));}//
   void SetEntranceX(Float_t Xtoentr) { fXtoentr = Xtoentr;}                                         //
   void SetEntranceY(Float_t Ytoentr) { fYtoentr = Ytoentr;}                                         //
   void SetThetaPhotonInTRS(Float_t Theta) {fThetaPhotonInTRS = Theta;}                              //
@@ -136,7 +94,7 @@ public :
   void SetThetaPhotonInDRS(Float_t Theta) {fThetaPhotonInDRS = Theta;}                              //
   void SetPhiPhotonInDRS(Float_t Phi) {fPhiPhotonInDRS = Phi;}                                      //
   void SetThetaAtQuartz(Float_t ThetaAtQuartz) {fThetaAtQuartz = ThetaAtQuartz;}                    //
-  void SetPhiPoint(Float_t PhiPoint){ fPhiPoint = PhiPoint;}                                        //
+  void SetPhiPoint(Float_t PhiPoint){ fPhiPoint[fPhotonIndex] = PhiPoint;}                          //
   void SetXCoordOfEmission(Float_t XEmiss) {fXEmiss = XEmiss;}                                      //
   void SetYCoordOfEmission(Float_t YEmiss) {fYEmiss = YEmiss;}                                      //
   void SetXPointOnCathode(Float_t PhotonLimitX) { fPhotonLimitX = PhotonLimitX;}                    //
@@ -149,14 +107,8 @@ public :
   void SetRadiusOuterRing(Float_t OuterRadius) {fOuterRadius = OuterRadius;}                        //
   void SetThetaCerenkov(Float_t ThetaCer) {fThetaCerenkov = ThetaCer;}                              //
   void SetThetaPhotonCerenkov(Float_t ThetaPhotCer) {fThetaPhotonCerenkov = ThetaPhotCer;}          //
-  void SetTrackMomentum(Float_t TrackMomentum) {fTrackMomentum = TrackMomentum;}                    //
-  void SetTrackEta(Float_t TrackEta) {fTrackEta = TrackEta;}                                        //
   void SetTrackTheta(Float_t TrackTheta) { fTrackTheta = TrackTheta;}                               //
   void SetTrackPhi(Float_t TrackPhi) { fTrackPhi = TrackPhi;}                                       //
-  void SetTrackPt(Float_t TrackPt) { fTrackPt = TrackPt;}                                           //
-  void SetTrackCharge(Int_t TrackCharge) { fTrackCharge = TrackCharge;}                             //
-  void SetTrackTPCLastZ(Float_t TrackTPCLastZ) { fTrackTPCLastZ = TrackTPCLastZ;}                   //
-  void SetMinDist(Float_t MinDist) { fMinDist = MinDist;}                                           //
   void SetShiftX(Float_t ShiftX) { fShiftX = ShiftX;}                                               //
   void SetShiftY(Float_t ShiftY) { fShiftY = ShiftY;}                                               //
   void SetDetectorWhereX(Float_t Xcoord) { fXcoord = Xcoord;}                                       //
@@ -172,43 +124,25 @@ public :
   void SetPhotonEta(Float_t PhotonEta) { fPhotonEta[fPhotonIndex] = PhotonEta;}                     //
   void SetPhotonFlag(Int_t PhotonFlag) { fPhotonFlag[fPhotonIndex] = PhotonFlag;}                   //
   void SetPhotonWeight(Float_t PhotonWeight) { fPhotonWeight[fPhotonIndex] = PhotonWeight;}         //
+  void SetPhotBKG(Double_t nPhotBKG) {fnPhotBKG=nPhotBKG;}                                          //
   void SetHoughRMS(Float_t HoughRMS) { fHoughRMS = HoughRMS;}                                       //
-  void SetMipIndex(Int_t MipIndex) { fMipIndex = MipIndex;}                                         //
-  void SetTrackIndex(Int_t TrackIndex) { fTrackIndex = TrackIndex;}                                 //
-  void SetCandidatePhotonX(Float_t *CandidatePhotonX) { fCandidatePhotonX = CandidatePhotonX;}      //
-  void SetCandidatePhotonY(Float_t *CandidatePhotonY) { fCandidatePhotonY = CandidatePhotonY;}      //
-  void SetCandidatePhotonsNumber(Int_t CandidatePhotonsNumber) { fCandidatePhotonsNumber = CandidatePhotonsNumber;}//
-  void SetHoughPhotons(Int_t HoughPhotons) { fHoughPhotons = HoughPhotons;}                         //
-  void SetHoughPhotonsNorm(Float_t HoughPhotonsNorm) { fHoughPhotonsNorm = HoughPhotonsNorm;}       //
   void SetFittedTrackTheta(Float_t FittedTrackTheta)    { fFittedTrackTheta = FittedTrackTheta;}    //
   void SetFittedTrackPhi(Float_t FittedTrackPhi)    { fFittedTrackPhi = FittedTrackPhi;}            //
   void SetFittedThetaCerenkov(Float_t FittedThetaCerenkov) { fFittedThetaCerenkov = FittedThetaCerenkov;}//
   void SetFittedHoughPhotons(Int_t FittedHoughPhotons) { fFittedHoughPhotons = FittedHoughPhotons;} //
-  void SetEstimationOfTheta(Float_t EstimationOfTheta) { fEstimationOfTheta = EstimationOfTheta;}   //
-  void SetEstimationOfThetaRMS(Float_t EstimationOfThetaRMS) { fEstimationOfThetaRMS = EstimationOfThetaRMS;}//
-  void FindBetaFromTheta(Float_t ThetaCerenkov) {fTrackBeta = 1/(fFreonRefractiveIndex*cos(ThetaCerenkov));}//
+  void SetRingSigma2(Float_t RingSigma2) { fRingSigma2 = RingSigma2;} //
   Float_t SnellAngle(Float_t n1, Float_t n2, Float_t theta1);                                       //
   Float_t FromEmissionToCathode();                                                                  //
 
 protected:
-  AliRICH* fRich;                             // main poiter to RICH
-  Int_t   fTrackCharge;                       // charge track
-  Int_t fMipIndex;                            // index for Mip
-  Int_t fTrackIndex;                          // index for track
   Int_t fPhotonsNumber;                       // Number of photons candidate
   Int_t fPhotonIndex;                         // index of photons
   Int_t fPhotonFlag[3000];                    // flag for photons
-  Int_t fCandidatePhotonsNumber;              // number of candidate photons
-  Int_t fHoughPhotons;                        // n. photons after Hough
   Int_t   fFittedHoughPhotons;                // n. photons after Hough and after minimization
-  Float_t fEventVertZ;                        // z coord. of the primary vertex
-  Float_t fEventMultiplicity;                 // event primary multiplicity
+  Int_t fMinNumPhots;                         // minimum number of photons for a given ring
+
   Float_t fTrackTheta;                        // Theta of track at RICH
   Float_t fTrackPhi;                          // Phi of track at RICH
-  Float_t fTrackMomentum;                     // track momentum
-  Float_t fTrackEta;                          // track pseudorapidity
-  Float_t fTrackPt;                           // pt of track
-  Float_t fTrackTPCLastZ;                     // z last point of the TPC
   Float_t fMinDist;                           // min distance between extrapolated track and MIP
   Float_t fTrackBeta;                         // beta of the track
   Float_t fXtoentr;                           // X entrance to RICH
@@ -218,7 +152,7 @@ protected:
   Float_t fThetaPhotonInDRS;                  // Theta of photon in Detector Reference System (DRS)
   Float_t fPhiPhotonInDRS;                    // Phi of photon in DRS
   Float_t fThetaAtQuartz;                     // Theta at the quartz entrance
-  Float_t fPhiPoint;                          // phi of ring point
+  Float_t fPhiPoint[3000];                    // array of phi of ring photons
   Float_t fXEmiss;                            //  x emission
   Float_t fYEmiss;                            //  y emission
   Float_t fXInner;                            // X inner ring
@@ -227,16 +161,11 @@ protected:
   Float_t fYOuter;                            // Y outer ring
   Float_t fInnerRadius;                       // inner radius
   Float_t fOuterRadius;                       // outer radius
-  Float_t fPhotonEnergy;                      // photon energy
-  Float_t fFreonRefractiveIndex;              // n freon
-  Float_t fQuartzRefractiveIndex;             // n quartz
-  Float_t fGasRefractiveIndex;                // n gas
-  Float_t fFreonScaleFactor;                  // scale factor for n freon
+  Float_t fEphot;                             // photon energy
   Float_t fLengthEmissionPoint;               // lenght of emmission point
   Float_t fPhotonLimitX;                      // X phys limit for photon
   Float_t fPhotonLimitY;                      // Y phys limit for photon 
   Float_t fDistanceFromCluster;               // distance from cluster
-  Float_t fMassHypotesis;                     // reconstructed mass
   Float_t fCerenkovAnglePad;                  // cherenkov angle of pad
   Float_t fThetaPhotonCerenkov;               // theta cerenkov for photon
   Float_t fShiftX;                            // x shift to entrance in radiator
@@ -245,6 +174,7 @@ protected:
   Float_t fYcoord;                            // ..
   Float_t fIntersectionX;                     // ..
   Float_t fIntersectionY;                     // ..
+  Float_t fMassHypotesis;                     //
   Float_t fThetaOfRing;                       // theta of ring
   Float_t fAreaOfRing;                        // area of the ring
   Float_t fPortionOfRing;                     // fraction of the accepted ring
@@ -252,33 +182,12 @@ protected:
   Float_t fPhotonEta[3000];                   // theta cerenkov of photon candidates
   Float_t fPhotonWeight[3000];                // weigth
   Float_t fHoughRMS;                          // rms Hough
-  Float_t* fCandidatePhotonX;                 // x photon candidates
-  Float_t* fCandidatePhotonY;                 // y photon candidates
-  Float_t fHoughPhotonsNorm;                  // n. photons norm.
   Float_t fFittedTrackTheta;                  // theta track after minim.
   Float_t fFittedTrackPhi;                    // phi track after minim.
   Float_t fFittedThetaCerenkov;               // thetacerenkov after minim.
-  Float_t fEstimationOfTheta;                 // theta estimate
-  Float_t fEstimationOfThetaRMS;              // theta RMS
-  Int_t   fThetaBin;                          // bin in theta
   Float_t fThetaMin,fThetaMax;                // min max
-  Float_t fXmin,fXmax,fYmin,fYmax;            // xy min max
-  TFile  *fOutFile;                           // histogram output
-  TNtuple *fNtuple;                           // output ntuple
-  TCanvas *fDisplay;                          // for display
-  Int_t   fNrings;                            //current number of reconstructed rings
-  Bool_t  fDebug;                             // flag for debug
-  Bool_t  fIsDISPLAY;                         // flag for display
   Bool_t  fIsWEIGHT;                          // flag to consider weight procedure
   Bool_t  fIsBACKGROUND;                      // flag to simulate bkg
-  Bool_t  fIsMINIMIZER;                       // flag to start with (theta,phi) minimization
-  Int_t   fNpadX;                             // npadx
-  Int_t   fNpadY;                             // npady
-  Float_t fPadSizeX;                          // sizepad x
-  Float_t fPadSizeY;                          // sizepad y
-  Float_t fRadiatorWidth;                     // radiator width
-  Float_t fQuartzWidth;                       // quartz width
-  Float_t fGapWidth;                          // gap width
   Float_t fDTheta;                            // Step for sliding window
   Float_t fWindowWidth;                       // Hough width of sliding window
   
@@ -286,11 +195,11 @@ protected:
   Int_t   fEtaFlag[3000];                     // flag for good photons
   Float_t fEtaPhotons[3000];                  // Cerenkov angle each photon
   Float_t fWeightPhotons[3000];               // weight for each photon
+  Double_t fnPhotBKG;                         // # estimated BKG photons in the ring
   Float_t fThetaCerenkov;                     // Theta angle for Hough
   Float_t fWeightThetaCerenkov;               // Theta Cerenkov angle weighted
   Float_t fThetaPeakPos;                      // Peak position
-
-
+  Float_t fRingSigma2;                        // sigma2 of the reconstructed ring
   ClassDef(AliRICHRecon,0)
 };