]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDrecoParam.h
Major commit related to steering of the reco parameters: AliDAQ and trigger classes...
[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
18 class AliTRDrecoParam : public AliDetectorRecoParam
19 {
20 public:
21   enum AliTRDpidMethod{
22     kLQPID = 0,
23     kNNPID = 1
24   };
25   
26   AliTRDrecoParam();
27   AliTRDrecoParam(const AliTRDrecoParam &rec);
28   ~AliTRDrecoParam() { }
29
30   Int_t    GetADCbaseline() const           { return fADCbaseline;     };
31   Double_t GetChi2Y() const                 { return fkChi2Y;    }
32   Double_t GetChi2Z() const                 { return fkChi2Z;    }
33   Double_t GetFindableClusters() const      { return fkFindable; }
34   Double_t GetMaxTheta() const              { return fkMaxTheta; }
35   Double_t GetMaxPhi() const                { return fkMaxPhi;   }
36   Int_t    GetNdEdxSlices() const           { return fkPIDMethod == kNNPID ? kNNslices : kLQslices;}
37   AliTRDpidMethod    GetPIDMethod() const   { return fkPIDMethod;}
38   Double_t GetPlaneQualityThreshold() const { return fkPlaneQualityThreshold; }
39   Double_t GetRoad0y() const                { return fkRoad0y;   }
40   Double_t GetRoad0z() const                { return fkRoad0z;   }
41   Double_t GetRoad1y() const                { return fkRoad1y;   }
42   Double_t GetRoad1z() const                { return fkRoad1z;   }
43   Double_t GetRoad2y() const                { return fkRoad2y;   }
44   Double_t GetRoad2z() const                { return fkRoad2z;   }
45   Double_t GetTrackLikelihood() const       { return fkTrackLikelihood;       }
46   Int_t    GetStreamLevel() const           { return fkStreamLevel;           }
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   IsSeeding() const                { return TestBit(kSeeding); }
64   Bool_t   IsTailCancelation() const        { return TestBit(kTC);}
65   Bool_t   IsVertexConstrained() const      { return TestBit(kVertexConstrained); }
66   Bool_t   IsTrackletWriteEnabled() const   { return TestBit(kTrackletWriting); };
67
68
69
70   void     SetFindableClusters(Double_t r) {fkFindable = r;}
71   void     SetClusterSharing(Bool_t share = kTRUE)            { SetBit(kClusterSharing, share);  };
72   void     SetPIDMethod(AliTRDpidMethod pid)                  { fkPIDMethod = pid; };
73   void     SetSeeding(Bool_t so = kTRUE)             { SetBit(kSeeding, so); }
74   void     SetVertexConstrained(Bool_t vc = kTRUE) { SetBit(kVertexConstrained, vc); }
75   void     SetStreamLevel(Int_t streamLevel= 1)               { fkStreamLevel = streamLevel; }
76   void     SetLUT(Bool_t lut = kTRUE)                            { SetBit(kLUT, lut);};
77   void     SetMinMaxCutSigma(Float_t minMaxCutSigma)          { fMinMaxCutSigma   = minMaxCutSigma; };
78   void     SetMinLeftRightCutSigma(Float_t minLeftRightCutSigma) { fMinLeftRightCutSigma   = minLeftRightCutSigma; };
79   void     SetClusMaxThresh(Float_t thresh)                   { fClusMaxThresh   = thresh; };
80   void     SetClusSigThresh(Float_t thresh)                   { fClusSigThresh   = thresh; };
81   void     SetTailCancelation(Bool_t tc = kTRUE)                 { SetBit(kTC, tc);  };
82   void     SetNexponential(Int_t nexp)                        { fTCnexp          = nexp;   };
83   void     SetADCbaseline(Int_t base)                         { fADCbaseline     = base;   };
84   inline void SetSysCovMatrix(Double_t *sys);
85   void     SetNumberOfPresamples(Int_t n) {fNumberOfPresamples = n;}
86   void     SetNumberOfPostsamples(Int_t n) {fNumberOfPostsamples = n;}
87   void     SetTrackletWriteEnabled(Bool_t enablewritetracklet = kFALSE) { SetBit(kTrackletWriting, enablewritetracklet); };
88
89
90 private:
91   enum{
92     kNNslices = 8
93    ,kLQslices = 3
94   };
95   
96   enum{
97     kClusterSharing    = 1 // Toggle cluster sharing
98    ,kSeeding           = 2 // Do stand alone tracking in the TRD
99    ,kVertexConstrained = 3 // Perform vertex constrained fit
100    ,kLUT               = 4 // 
101    ,kTC                = 5 // tail cancelation
102    ,kTrackletWriting   = 6
103   };
104
105   AliTRDpidMethod fkPIDMethod;       // PID method selector 0(LQ) 1(NN)
106   Double_t  fkMaxTheta;              // Maximum theta
107   Double_t  fkMaxPhi;                // Maximum phi
108
109   Double_t  fkRoad0y;                // Road for middle cluster
110   Double_t  fkRoad0z;                // Road for middle cluster
111
112   Double_t  fkRoad1y;                // Road in y for seeded cluster
113   Double_t  fkRoad1z;                // Road in z for seeded cluster
114
115   Double_t  fkRoad2y;                // Road in y for extrapolated cluster
116   Double_t  fkRoad2z;                // Road in z for extrapolated cluster
117   
118   Double_t  fkPlaneQualityThreshold; // Quality threshold
119   Double_t  fkFindable;              // Ratio of clusters from a track in one chamber which are at minimum supposed to be found.
120   Double_t  fkChi2Z;                 // Max chi2 on the z direction for seeding clusters fit
121   Double_t  fkChi2Y;                 // Max chi2 on the y direction for seeding clusters Rieman fit
122   Double_t  fkTrackLikelihood;       // Track likelihood for tracklets Rieman fit
123   Int_t     fkStreamLevel;                                       // Streaming Level in TRD Reconstruction
124   
125   Double_t  fSysCovMatrix[5];        // Systematic uncertainty from calibration and alignment for each tracklet
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     fADCbaseline;            // ADC baseline to be subtracted
136   Int_t     fNumberOfPresamples;     // number of presamples 
137   Int_t     fNumberOfPostsamples;     // number of postsamples 
138
139   ClassDef(AliTRDrecoParam, 5)       // Reconstruction parameters for TRD detector
140
141 };
142
143 //___________________________________________________
144 inline void AliTRDrecoParam::GetSysCovMatrix(Double_t *sys) const
145 {
146   if(!sys) return;
147   memcpy(sys, fSysCovMatrix, 5*sizeof(Double_t));
148 }
149
150 //___________________________________________________
151 inline void AliTRDrecoParam::SetSysCovMatrix(Double_t *sys)
152 {
153   if(!sys) return;
154   memcpy(fSysCovMatrix, sys, 5*sizeof(Double_t));
155 }
156
157
158
159 #endif