update version number (thanks Cvetan)
[u/mrichter/AliRoot.git] / TRD / AliTRDrecoParam.h
1 #ifndef ALITRDRECOPARAM_H
2 #define ALITRDRECOPARAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ////////////////////////////////////////////////////////////////////////////
9 //                                                                        //
10 //  Parameter class for the TRD reconstruction                            //
11 //                                                                        //
12 ////////////////////////////////////////////////////////////////////////////
13
14 #ifndef ALIDETECTORRECOPARAM_H
15 #include "AliDetectorRecoParam.h"
16 #endif
17 #ifndef ALITRDCALPID_H
18 #include "Cal/AliTRDCalPID.h"
19 #endif
20
21 class AliTRDrecoParam : public AliDetectorRecoParam
22 {
23 public:
24   AliTRDrecoParam();
25   AliTRDrecoParam(const AliTRDrecoParam &rec);
26   ~AliTRDrecoParam() { }
27
28   Double_t GetChi2Y() const                 { return fkChi2Y;    }
29   Double_t GetChi2Z() const                 { return fkChi2Z;    }
30   Double_t GetChi2YCut() const              { return fkChi2YCut; }
31   Double_t GetChi2ZCut() const              { return fkChi2ZCut; }
32   Double_t GetPhiCut() const                { return fkPhiCut;   }
33   Double_t GetMeanNclusters() const         { return fkMeanNclusters; }
34   Double_t GetSigmaNclusters() const        { return fkSigmaNclusters; }
35   Double_t GetFindableClusters() const      { return fkFindable; }
36   Double_t GetMaxTheta() const              { return fkMaxTheta; }
37   Double_t GetMaxPhi() const                { return fkMaxPhi;   }
38   Double_t GetPlaneQualityThreshold() const { return fkPlaneQualityThreshold; }
39   Double_t GetPIDThreshold(Float_t /*p*/){ return 0.;}
40   Double_t GetRoad0y() const                { return fkRoad0y;   }
41   Double_t GetRoad0z() const                { return fkRoad0z;   }
42   Double_t GetRoad1y() const                { return fkRoad1y;   }
43   Double_t GetRoad1z() const                { return fkRoad1z;   }
44   Double_t GetRoad2y() const                { return fkRoad2y;   }
45   Double_t GetRoad2z() const                { return fkRoad2z;   }
46   Double_t GetTrackLikelihood() const       { return fkTrackLikelihood;       }
47   inline void GetSysCovMatrix(Double_t *sys) const;  
48   Double_t GetMinMaxCutSigma() const        { return fMinMaxCutSigma;     };
49   Double_t GetMinLeftRightCutSigma() const  { return fMinLeftRightCutSigma;  };
50   Double_t GetClusMaxThresh() const         { return fClusMaxThresh;   };
51   Double_t GetClusSigThresh() const         { return fClusSigThresh;   };
52   Int_t    GetTCnexp() const                { return fTCnexp;          };
53   Int_t     GetNumberOfPresamples()  const {return fNumberOfPresamples;}
54   Int_t    GetNumberOfPostsamples() const {return fNumberOfPostsamples;}
55
56         
57   static   AliTRDrecoParam *GetLowFluxParam();
58   static   AliTRDrecoParam *GetHighFluxParam();
59   static   AliTRDrecoParam *GetCosmicTestParam();
60
61   Bool_t   IsClusterSharing() const         { return TestBit(kClusterSharing);}
62   Bool_t   IsLUT() const                    { return TestBit(kLUT);}
63   Bool_t   IsTailCancelation() const        { return TestBit(kTC);}
64   Bool_t   IsVertexConstrained() const      { return TestBit(kVertexConstrained); }
65   Bool_t   HasImproveTracklets() const       { return TestBit(kImproveTracklet); }
66
67   void     SetMaxTheta(Double_t maxTheta) {fkMaxTheta = maxTheta;}
68   void     SetMaxPhi(Double_t maxPhi) {fkMaxPhi = maxPhi;}
69   void     SetFindableClusters(Double_t r) {fkFindable = r;}
70   void     SetChi2Y(Double_t chi2) {fkChi2Y = chi2;}
71   void     SetChi2Z(Double_t chi2) {fkChi2Z = chi2;}
72   void     SetChi2YCut(Double_t chi2YCut) {fkChi2YCut = chi2YCut;}
73   void     SetChi2ZCut(Double_t chi2ZCut) {fkChi2ZCut = chi2ZCut;}
74   void     SetPhiCut(Double_t phiCut) {fkPhiCut = phiCut;}
75   void     SetMeanNclusters(Double_t meanNclusters) {fkMeanNclusters = meanNclusters;}
76   void     SetSigmaNclusters(Double_t sigmaNclusters) {fkSigmaNclusters = sigmaNclusters;} 
77   void     SetClusterSharing(Bool_t share = kTRUE)            { SetBit(kClusterSharing, share);}
78   void     SetImproveTracklets(Bool_t improve = kTRUE)         { SetBit(kImproveTracklet, improve);}
79   void     SetVertexConstrained(Bool_t vc = kTRUE)            { SetBit(kVertexConstrained, vc); }
80   void     SetLUT(Bool_t lut = kTRUE)                         { SetBit(kLUT, lut);};
81   void     SetMinMaxCutSigma(Float_t minMaxCutSigma)          { fMinMaxCutSigma   = minMaxCutSigma; }
82   void     SetMinLeftRightCutSigma(Float_t minLeftRightCutSigma) { fMinLeftRightCutSigma   = minLeftRightCutSigma; };
83   void     SetClusMaxThresh(Float_t thresh)                   { fClusMaxThresh   = thresh; };
84   void     SetClusSigThresh(Float_t thresh)                   { fClusSigThresh   = thresh; };
85   void     SetTailCancelation(Bool_t tc = kTRUE)              { SetBit(kTC, tc);  };
86   inline void SetPIDThreshold(Double_t *pid);
87   void     SetNexponential(Int_t nexp)                        { fTCnexp          = nexp;   };
88   inline void SetSysCovMatrix(Double_t *sys);
89   void     SetNumberOfPresamples(Int_t n)                     { fNumberOfPresamples = n;}
90   void     SetNumberOfPostsamples(Int_t n)                    { fNumberOfPostsamples = n;}
91
92 private:
93   enum{
94     kTC                = BIT(14) // tail cancelation
95    ,kLUT               = BIT(15) // look up table for cluster position determination 
96    ,kClusterSharing    = BIT(16) // Toggle cluster sharing
97    ,kVertexConstrained = BIT(17) // Perform vertex constrained fit
98    ,kImproveTracklet   = BIT(18) // Improve tracklet in the SA TRD track finder 
99   };
100
101   Double_t  fkMaxTheta;              // Maximum theta
102   Double_t  fkMaxPhi;                // Maximum phi
103
104   Double_t  fkRoad0y;                // Road for middle cluster
105   Double_t  fkRoad0z;                // Road for middle cluster
106
107   Double_t  fkRoad1y;                // Road in y for seeded cluster
108   Double_t  fkRoad1z;                // Road in z for seeded cluster
109
110   Double_t  fkRoad2y;                // Road in y for extrapolated cluster
111   Double_t  fkRoad2z;                // Road in z for extrapolated cluster
112   
113   Double_t  fkPlaneQualityThreshold; // Quality threshold
114   Double_t  fkFindable;              // Ratio of clusters from a track in one chamber which are at minimum supposed to be found.
115   Double_t  fkChi2Z;                 // Max chi2 on the z direction for seeding clusters fit
116   Double_t  fkChi2Y;                 // Max chi2 on the y direction for seeding clusters Rieman fit
117   Double_t  fkChi2YCut;              // Cut on the Chi2 in y-direction in the likelihood filter
118   Double_t  fkChi2ZCut;              // Cut on the Chi2 in z-direction in the likelihood filter
119   Double_t  fkPhiCut;                // Cut on the deviation of the phi angles between tracklet and track fit (lik. filter)
120   Double_t  fkMeanNclusters;         // Mean of the distribution of the number of clusters per tracklet
121   Double_t  fkSigmaNclusters;        // Sigma of the distribution of the number of clusters per tracklet
122   Double_t  fkTrackLikelihood;       // Track likelihood for tracklets Rieman fit
123   
124   Double_t  fSysCovMatrix[5];        // Systematic uncertainty from calibration and alignment for each tracklet
125   Double_t  fPIDThreshold[AliTRDCalPID::kNMom];
126
127   // Clusterization parameter
128   Double_t  fMinMaxCutSigma;         // Threshold sigma noise pad middle
129   Double_t  fMinLeftRightCutSigma;   // Threshold sigma noise sum pad
130   Double_t  fClusMaxThresh;          // Threshold value for cluster maximum
131   Double_t  fClusSigThresh;          // Threshold value for cluster signal
132   Int_t     fTCnexp;                 // Number of exponentials, digital filter
133   
134   // ADC parameter
135   Int_t     fNumberOfPresamples;     // number of presamples 
136   Int_t     fNumberOfPostsamples;     // number of postsamples 
137
138   ClassDef(AliTRDrecoParam, 5)       // Reconstruction parameters for TRD detector
139
140 };
141
142 //___________________________________________________
143 inline void AliTRDrecoParam::GetSysCovMatrix(Double_t *sys) const
144 {
145   if(!sys) return;
146   memcpy(sys, fSysCovMatrix, 5*sizeof(Double_t));
147 }
148
149 //___________________________________________________
150 inline void AliTRDrecoParam::SetSysCovMatrix(Double_t *sys)
151 {
152   if(!sys) return;
153   memcpy(fSysCovMatrix, sys, 5*sizeof(Double_t));
154 }
155
156 //___________________________________________________
157 inline void AliTRDrecoParam::SetPIDThreshold(Double_t *pid)
158 {
159   if(!pid) return;
160   memcpy(fPIDThreshold, pid, AliTRDCalPID::kNMom*sizeof(Double_t));
161 }
162
163
164 #endif