]>
Commit | Line | Data |
---|---|---|
e4f2f73d | 1 | #ifndef ALITRDRECOPARAM_H |
2 | #define ALITRDRECOPARAM_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4ba1d6ae | 4 | * See cxx source for full Copyright notice */ |
e4f2f73d | 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 | |
22a4ab0c | 17 | #ifndef ALITRDCALPID_H |
18 | #include "Cal/AliTRDCalPID.h" | |
19 | #endif | |
e4f2f73d | 20 | |
a2fbb6ec | 21 | class TString; |
22 | ||
e4f2f73d | 23 | class AliTRDrecoParam : public AliDetectorRecoParam |
24 | { | |
3c66288b | 25 | public: |
a2fbb6ec | 26 | enum ETRDReconstructionTask{ |
27 | kClusterizer = 0, | |
28 | kTracker = 1, | |
29 | kPID = 2, | |
30 | kTRDreconstructionTasks = 3 | |
31 | }; | |
32 | enum ETRDflags { | |
33 | kDriftGas, | |
34 | kVertexConstraint, | |
35 | kTailCancelation, | |
36 | kImproveTracklet, | |
37 | kLUT, | |
38 | kGAUS, | |
39 | kClusterSharing, | |
40 | kSteerPID, | |
41 | kEightSlices | |
42 | }; | |
4ba1d6ae | 43 | AliTRDrecoParam(); |
a7ac01d2 | 44 | AliTRDrecoParam(const AliTRDrecoParam &rec); |
4ba1d6ae | 45 | ~AliTRDrecoParam() { } |
46 | ||
47 | Double_t GetChi2Y() const { return fkChi2Y; } | |
48 | Double_t GetChi2Z() const { return fkChi2Z; } | |
5a2e200c | 49 | Double_t GetChi2YSlope() const { return fkChi2YSlope; } |
50 | Double_t GetChi2ZSlope() const { return fkChi2ZSlope; } | |
51 | Double_t GetChi2YCut() const { return fkChi2YCut; } | |
52 | Double_t GetPhiSlope() const { return fkPhiSlope; } | |
8ae98148 | 53 | Float_t GetNClusters() const; |
54 | Double_t GetNMeanClusters() const { return fkNMeanClusters; } | |
55 | Double_t GetNSigmaClusters() const { return fkNSigmaClusters; } | |
4ba1d6ae | 56 | Double_t GetFindableClusters() const { return fkFindable; } |
57 | Double_t GetMaxTheta() const { return fkMaxTheta; } | |
58 | Double_t GetMaxPhi() const { return fkMaxPhi; } | |
3afdab72 | 59 | Double_t GetPlaneQualityThreshold() const { return fkPlaneQualityThreshold; } |
56b32fd7 | 60 | Double_t GetPIDThreshold(Float_t /*p*/) const { return 0.;} |
4ba1d6ae | 61 | Double_t GetRoad0y() const { return fkRoad0y; } |
62 | Double_t GetRoad0z() const { return fkRoad0z; } | |
4ba1d6ae | 63 | Double_t GetRoad1y() const { return fkRoad1y; } |
64 | Double_t GetRoad1z() const { return fkRoad1z; } | |
4ba1d6ae | 65 | Double_t GetRoad2y() const { return fkRoad2y; } |
66 | Double_t GetRoad2z() const { return fkRoad2z; } | |
566bf887 | 67 | Double_t GetRoadzMultiplicator() const { return fkRoadzMultiplicator; } |
4ba1d6ae | 68 | Double_t GetTrackLikelihood() const { return fkTrackLikelihood; } |
7e88424f | 69 | inline void GetSysCovMatrix(Double_t *sys) const; |
a2fbb6ec | 70 | inline void GetTCParams(Double_t *par) const; |
71 | inline Int_t GetStreamLevel(ETRDReconstructionTask task) const; | |
72 | const TString *GetRawStreamVersion() const { return &fRawStreamVersion; }; | |
73 | Int_t GetADCBaseline() const { return fADCBaseline; } | |
4ba1d6ae | 74 | Double_t GetMinMaxCutSigma() const { return fMinMaxCutSigma; }; |
75 | Double_t GetMinLeftRightCutSigma() const { return fMinLeftRightCutSigma; }; | |
76 | Double_t GetClusMaxThresh() const { return fClusMaxThresh; }; | |
77 | Double_t GetClusSigThresh() const { return fClusSigThresh; }; | |
78 | Int_t GetTCnexp() const { return fTCnexp; }; | |
a2fbb6ec | 79 | Int_t GetNumberOfPresamples() const {return fNumberOfPresamples;} |
80 | Int_t GetNumberOfPostsamples() const {return fNumberOfPostsamples;} | |
81 | Bool_t IsArgon() const { return TESTBIT(fFlags, kDriftGas); } | |
82 | Bool_t IsXenon() const { return !TESTBIT(fFlags, kDriftGas); } | |
83 | Bool_t IsPIDNeuralNetwork() const { return TESTBIT(fFlags, kSteerPID);} | |
84 | Bool_t IsVertexConstrained() const { return TESTBIT(fFlags, kVertexConstraint); } | |
85 | Bool_t IsEightSlices() const { return TESTBIT(fFlags, kEightSlices);} | |
86 | Bool_t HasImproveTracklets() const { return TESTBIT(fFlags, kImproveTracklet);} | |
87 | Bool_t UseClusterSharing() const { return TESTBIT(fFlags, kClusterSharing);} | |
88 | Bool_t UseLUT() const { return TESTBIT(fFlags, kLUT);} | |
89 | Bool_t UseGAUS() const { return TESTBIT(fFlags, kGAUS);} | |
90 | Bool_t UseTailCancelation() const { return TESTBIT(fFlags, kTailCancelation); } | |
3c66288b | 91 | |
4ba1d6ae | 92 | static AliTRDrecoParam *GetLowFluxParam(); |
93 | static AliTRDrecoParam *GetHighFluxParam(); | |
94 | static AliTRDrecoParam *GetCosmicTestParam(); | |
95 | ||
a2fbb6ec | 96 | void SetArgon() {SETBIT(fFlags, kDriftGas);} |
97 | void SetClusterSharing() {SETBIT(fFlags, kClusterSharing);} | |
98 | void SetEightSlices() {SETBIT(fFlags, kEightSlices);} | |
99 | void SetImproveTracklets() {SETBIT(fFlags, kImproveTracklet);} | |
8c25d014 | 100 | void SetLUT(Bool_t b=kTRUE) {if(b) SETBIT(fFlags, kLUT); else CLRBIT(fFlags, kLUT);} |
101 | void SetGAUS(Bool_t b=kTRUE) {if(b) SETBIT(fFlags, kGAUS); else CLRBIT(fFlags, kGAUS);} | |
102 | void SetPIDNeuralNetwork(Bool_t b=kTRUE) {if(b) SETBIT(fFlags, kSteerPID); else CLRBIT(fFlags, kSteerPID);} | |
103 | void SetTailCancelation(Bool_t b=kTRUE) {if(b) SETBIT(fFlags, kTailCancelation); else CLRBIT(fFlags, kTailCancelation);} | |
a2fbb6ec | 104 | void SetXenon() {CLRBIT(fFlags, kDriftGas);} |
105 | void SetVertexConstrained() {SETBIT(fFlags, kVertexConstraint);} | |
106 | void SetMaxTheta(Double_t maxTheta) {fkMaxTheta = maxTheta;} | |
107 | void SetMaxPhi(Double_t maxPhi) {fkMaxPhi = maxPhi;} | |
108 | void SetFindableClusters(Double_t r) {fkFindable = r;} | |
109 | void SetChi2Y(Double_t chi2) {fkChi2Y = chi2;} | |
110 | void SetChi2Z(Double_t chi2) {fkChi2Z = chi2;} | |
111 | void SetChi2YSlope(Double_t chi2YSlope) {fkChi2YSlope = chi2YSlope;} | |
112 | void SetChi2ZSlope(Double_t chi2ZSlope) {fkChi2ZSlope = chi2ZSlope;} | |
113 | void SetChi2YCut(Double_t chi2Cut) {fkChi2YCut = chi2Cut; } | |
114 | void SetPhiSlope(Double_t phiSlope) {fkPhiSlope = phiSlope;} | |
115 | void SetNMeanClusters(Double_t meanNclusters) {fkNMeanClusters = meanNclusters;} | |
116 | void SetNSigmaClusters(Double_t sigmaNclusters) {fkNSigmaClusters = sigmaNclusters;} | |
117 | void SetRawStreamVersion(const Char_t *version) { fRawStreamVersion = version; } | |
118 | void SetADCBaseline(Int_t baseline) { fADCBaseline = baseline; } | |
fb872574 | 119 | void SetMinMaxCutSigma(Float_t minMaxCutSigma) { fMinMaxCutSigma = minMaxCutSigma; } |
4ba1d6ae | 120 | void SetMinLeftRightCutSigma(Float_t minLeftRightCutSigma) { fMinLeftRightCutSigma = minLeftRightCutSigma; }; |
121 | void SetClusMaxThresh(Float_t thresh) { fClusMaxThresh = thresh; }; | |
122 | void SetClusSigThresh(Float_t thresh) { fClusSigThresh = thresh; }; | |
22a4ab0c | 123 | inline void SetPIDThreshold(Double_t *pid); |
4ba1d6ae | 124 | void SetNexponential(Int_t nexp) { fTCnexp = nexp; }; |
a2fbb6ec | 125 | inline void SetTCParams(Double_t *par); |
126 | inline void SetStreamLevel(ETRDReconstructionTask task, Int_t level); | |
3afdab72 | 127 | inline void SetSysCovMatrix(Double_t *sys); |
fb872574 | 128 | void SetNumberOfPresamples(Int_t n) { fNumberOfPresamples = n;} |
129 | void SetNumberOfPostsamples(Int_t n) { fNumberOfPostsamples = n;} | |
4ba1d6ae | 130 | |
3c66288b | 131 | private: |
8ae98148 | 132 | // Physics reference values for TRD |
133 | Double_t fkdNchdy; // dNch/dy | |
4ba1d6ae | 134 | Double_t fkMaxTheta; // Maximum theta |
8ae98148 | 135 | Double_t fkMaxPhi; // Maximum phi - momentum cut |
4ba1d6ae | 136 | |
137 | Double_t fkRoad0y; // Road for middle cluster | |
138 | Double_t fkRoad0z; // Road for middle cluster | |
139 | ||
140 | Double_t fkRoad1y; // Road in y for seeded cluster | |
141 | Double_t fkRoad1z; // Road in z for seeded cluster | |
142 | ||
143 | Double_t fkRoad2y; // Road in y for extrapolated cluster | |
144 | Double_t fkRoad2z; // Road in z for extrapolated cluster | |
145 | ||
146 | Double_t fkPlaneQualityThreshold; // Quality threshold | |
566bf887 | 147 | Double_t fkRoadzMultiplicator; // Multiplicator for the Roads in z |
8ae98148 | 148 | Double_t fkFindable; // minimum ratio of clusters per tracklet supposed to be attached. |
4ba1d6ae | 149 | Double_t fkChi2Z; // Max chi2 on the z direction for seeding clusters fit |
150 | Double_t fkChi2Y; // Max chi2 on the y direction for seeding clusters Rieman fit | |
5a2e200c | 151 | Double_t fkChi2YSlope; // Slope of the chi2-distribution in y-direction |
152 | Double_t fkChi2ZSlope; // Slope of the chi2-distribution in z-direction | |
153 | Double_t fkChi2YCut; // Cut on the Chi2 in y-direction in the likelihood filter | |
154 | Double_t fkPhiSlope; // Slope of the distribution of the deviation between track angle and tracklet angle | |
8ae98148 | 155 | Double_t fkNMeanClusters; // Mean number of clusters per tracklet |
156 | Double_t fkNSigmaClusters; // Sigma of the number of clusters per tracklet | |
157 | Double_t fkNClusterNoise; // ratio of noisy clusters to the true one | |
158 | Double_t fkNMeanTracklets; // Mean number of tracklets per track | |
4ba1d6ae | 159 | Double_t fkTrackLikelihood; // Track likelihood for tracklets Rieman fit |
4ba1d6ae | 160 | |
3afdab72 | 161 | Double_t fSysCovMatrix[5]; // Systematic uncertainty from calibration and alignment for each tracklet |
4d6aee34 | 162 | Double_t fPIDThreshold[AliTRDCalPID::kNMom]; // PID Thresholds for Electron candidate decision |
e4f2f73d | 163 | |
a2fbb6ec | 164 | // Reconstruction Options for TRD reconstruction |
165 | Int_t fStreamLevel[kTRDreconstructionTasks]; // Stream Level | |
166 | Long64_t fFlags; // option Flags | |
167 | ||
168 | // Raw Reader Params | |
169 | TString fRawStreamVersion; // Raw Reader version | |
170 | Int_t fADCBaseline; // ADC Baseline | |
171 | ||
a7ac01d2 | 172 | // Clusterization parameter |
4ba1d6ae | 173 | Double_t fMinMaxCutSigma; // Threshold sigma noise pad middle |
174 | Double_t fMinLeftRightCutSigma; // Threshold sigma noise sum pad | |
175 | Double_t fClusMaxThresh; // Threshold value for cluster maximum | |
176 | Double_t fClusSigThresh; // Threshold value for cluster signal | |
4ba1d6ae | 177 | Int_t fTCnexp; // Number of exponentials, digital filter |
a2fbb6ec | 178 | Double_t fTCParams[8]; // Tail Cancellation parameters for drift gases |
fc546d21 | 179 | |
4ba1d6ae | 180 | // ADC parameter |
4e459a9d | 181 | Int_t fNumberOfPresamples; // number of presamples |
182 | Int_t fNumberOfPostsamples; // number of postsamples | |
9716329b | 183 | |
af94582f | 184 | ClassDef(AliTRDrecoParam, 10) // Reconstruction parameters for TRD detector |
e4f2f73d | 185 | |
186 | }; | |
3afdab72 | 187 | |
188 | //___________________________________________________ | |
7e88424f | 189 | inline void AliTRDrecoParam::GetSysCovMatrix(Double_t *sys) const |
3afdab72 | 190 | { |
191 | if(!sys) return; | |
192 | memcpy(sys, fSysCovMatrix, 5*sizeof(Double_t)); | |
193 | } | |
194 | ||
195 | //___________________________________________________ | |
196 | inline void AliTRDrecoParam::SetSysCovMatrix(Double_t *sys) | |
197 | { | |
198 | if(!sys) return; | |
199 | memcpy(fSysCovMatrix, sys, 5*sizeof(Double_t)); | |
200 | } | |
201 | ||
22a4ab0c | 202 | //___________________________________________________ |
203 | inline void AliTRDrecoParam::SetPIDThreshold(Double_t *pid) | |
204 | { | |
205 | if(!pid) return; | |
206 | memcpy(fPIDThreshold, pid, AliTRDCalPID::kNMom*sizeof(Double_t)); | |
207 | } | |
3c66288b | 208 | |
a2fbb6ec | 209 | //___________________________________________________ |
210 | inline void AliTRDrecoParam::SetStreamLevel(ETRDReconstructionTask task, Int_t level){ | |
211 | if(task >= kTRDreconstructionTasks) return; | |
212 | fStreamLevel[static_cast<Int_t>(task)] = level; | |
213 | } | |
214 | ||
215 | //___________________________________________________ | |
216 | inline Int_t AliTRDrecoParam::GetStreamLevel(ETRDReconstructionTask task) const{ | |
217 | if(task >= kTRDreconstructionTasks) return 0; | |
218 | return fStreamLevel[static_cast<Int_t>(task)]; | |
219 | } | |
220 | ||
221 | //___________________________________________________ | |
222 | inline void AliTRDrecoParam::GetTCParams(Double_t *par) const | |
223 | { | |
224 | if(!par) return; | |
225 | if(IsArgon()) memcpy(par, &fTCParams[4], 4*sizeof(Double_t)); | |
226 | else memcpy(par, &fTCParams[0], 4*sizeof(Double_t)); | |
227 | } | |
3c66288b | 228 | |
a2fbb6ec | 229 | //___________________________________________________ |
230 | inline void AliTRDrecoParam::SetTCParams(Double_t *par) | |
231 | { | |
232 | if(!par) return; | |
233 | memcpy(fTCParams, par, 8*sizeof(Double_t)); | |
234 | } | |
e4f2f73d | 235 | #endif |