1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // Parameter class for the TRD reconstruction //
23 // Alex Bercuci <A.Bercuci@gsi.de> //
24 // Markus Fasel <M.Fasel@gsi.de> //
26 ///////////////////////////////////////////////////////////////////////////////
30 #include "AliTRDrecoParam.h"
32 ClassImp(AliTRDrecoParam)
35 //______________________________________________________________
36 AliTRDrecoParam::AliTRDrecoParam()
37 :AliDetectorRecoParam()
48 ,fkPlaneQualityThreshold(5.0)// 4.2? under Investigation
49 ,fkRoadzMultiplicator(1.5)
51 ,fkChi2Z(30./*14.*//*12.5*/)
60 ,fkNMeanTracklets(5.5)
61 ,fkTrackLikelihood(-15.)
64 ,fRawStreamVersion("DEFAULT")
66 ,fMinLeftRightCutSigma(8.)
71 ,fNumberOfPresamples(0)
72 ,fNumberOfPostsamples(0)
75 // Default constructor
77 fSysCovMatrix[0] = 0.; // y direction (1 cm)
78 fSysCovMatrix[1] = 0.; // z direction (1 cm)
79 fSysCovMatrix[2] = 0.; // snp
80 fSysCovMatrix[3] = 0.; // tgl
81 fSysCovMatrix[4] = 0.; // 1/pt
83 // Xe tail cancellation parameters
84 fTCParams[0] = 1.156; // r1
85 fTCParams[1] = 0.130; // r2
86 fTCParams[2] = 0.114; // c1
87 fTCParams[3] = 0.624; // c2
88 // Ar tail cancellation parameters
89 fTCParams[4] = 6.; // r1
90 fTCParams[5] = 0.62; // r2
91 fTCParams[6] = 0.0087;// c1
92 fTCParams[7] = 0.07; // c2
94 memset(fPIDThreshold, 0, AliTRDCalPID::kNMom*sizeof(Double_t));
95 memset(fStreamLevel, 0, kTRDreconstructionTasks * sizeof(Int_t));
97 SetPIDmethod(AliTRDPIDResponse::kLQ1D);
99 SetImproveTracklets();
101 SetTailCancelation();
104 //______________________________________________________________
105 AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
106 :AliDetectorRecoParam(ref)
107 ,fkdNchdy(ref.fkdNchdy)
108 ,fkMaxTheta(ref.fkMaxTheta)
109 ,fkMaxPhi(ref.fkMaxPhi)
110 ,fkRoad0y(ref.fkRoad0y)
111 ,fkRoad0z(ref.fkRoad0z)
112 ,fkRoad1y(ref.fkRoad1y)
113 ,fkRoad1z(ref.fkRoad1z)
114 ,fkRoad2y(ref.fkRoad2y)
115 ,fkRoad2z(ref.fkRoad2z)
116 ,fkPtThreshold(ref.fkPtThreshold)
117 ,fkPlaneQualityThreshold(ref.fkPlaneQualityThreshold)
118 ,fkRoadzMultiplicator(ref.fkRoadzMultiplicator)
119 ,fkFindable(ref.fkFindable)
120 ,fkChi2Z(ref.fkChi2Z)
121 ,fkChi2Y(ref.fkChi2Y)
122 ,fkChi2YSlope(ref.fkChi2YSlope)
123 ,fkChi2ZSlope(ref.fkChi2ZSlope)
124 ,fkChi2YCut(ref.fkChi2YCut)
125 ,fkPhiSlope(ref.fkPhiSlope)
126 ,fkNMeanClusters(ref.fkNMeanClusters)
127 ,fkNSigmaClusters(ref.fkNSigmaClusters)
128 ,fkNClusterNoise(ref.fkNClusterNoise)
129 ,fkNMeanTracklets(ref.fkNMeanTracklets)
130 ,fkTrackLikelihood(ref.fkTrackLikelihood)
131 ,fNumberOfConfigs(ref.fNumberOfConfigs)
133 ,fRawStreamVersion(ref.fRawStreamVersion)
134 ,fMinMaxCutSigma(ref.fMinMaxCutSigma)
135 ,fMinLeftRightCutSigma(ref.fMinLeftRightCutSigma)
136 ,fClusMaxThresh(ref.fClusMaxThresh)
137 ,fClusSigThresh(ref.fClusSigThresh)
138 ,fTCnexp(ref.fTCnexp)
139 ,fRecEveryNTB(ref.fRecEveryNTB)
140 ,fNumberOfPresamples(ref.fNumberOfPresamples)
141 ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
146 memcpy(fSysCovMatrix, ref.fSysCovMatrix, 5*sizeof(Double_t));
147 memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
148 memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
149 memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
152 //______________________________________________________________
153 AliTRDrecoParam& AliTRDrecoParam::operator=(const AliTRDrecoParam &ref)
156 // assignment operator
159 if(this == &ref) return *this;
160 AliDetectorRecoParam::operator=(ref);
161 fkdNchdy = ref.fkdNchdy;
162 fkMaxTheta = ref.fkMaxTheta;
163 fkMaxPhi = ref.fkMaxPhi;
164 fkRoad0y = ref.fkRoad0y;
165 fkRoad0z = ref.fkRoad0z;
166 fkRoad1y = ref.fkRoad1y;
167 fkRoad1z = ref.fkRoad1z;
168 fkRoad2y = ref.fkRoad2y;
169 fkRoad2z = ref.fkRoad2z;
170 fkPtThreshold = ref.fkPtThreshold;
171 fkPlaneQualityThreshold= ref.fkPlaneQualityThreshold;
172 fkRoadzMultiplicator = ref.fkRoadzMultiplicator;
173 fkFindable = ref.fkFindable;
174 fkChi2Z = ref.fkChi2Z;
175 fkChi2Y = ref.fkChi2Y;
176 fkChi2YSlope = ref.fkChi2YSlope;
177 fkChi2ZSlope = ref.fkChi2ZSlope;
178 fkChi2YCut = ref.fkChi2YCut;
179 fkPhiSlope = ref.fkPhiSlope;
180 fkNMeanClusters = ref.fkNMeanClusters;
181 fkNSigmaClusters = ref.fkNSigmaClusters;
182 fkNClusterNoise = ref.fkNClusterNoise;
183 fkNMeanTracklets = ref.fkNMeanTracklets;
184 fkTrackLikelihood = ref.fkTrackLikelihood;
185 fNumberOfConfigs = ref.fNumberOfConfigs;
187 fRawStreamVersion = ref.fRawStreamVersion;
188 fMinMaxCutSigma = ref.fMinMaxCutSigma;
189 fMinLeftRightCutSigma = ref.fMinLeftRightCutSigma;
190 fClusMaxThresh = ref.fClusMaxThresh;
191 fClusSigThresh = ref.fClusSigThresh;
192 fTCnexp = ref.fTCnexp;
193 fRecEveryNTB = ref.fRecEveryNTB;
194 fNumberOfPresamples = ref.fNumberOfPresamples;
195 fNumberOfPostsamples = ref.fNumberOfPostsamples;
197 memcpy(fSysCovMatrix, ref.fSysCovMatrix, 5*sizeof(Double_t));
198 memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
199 memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
200 memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
204 //______________________________________________________________
205 AliTRDrecoParam *AliTRDrecoParam::GetLowFluxParam()
208 // Parameters for the low flux environment
211 AliTRDrecoParam *rec = new AliTRDrecoParam();
212 rec->fkdNchdy = 12.; // pp in TRD
213 rec->SetVertexConstrained();
214 rec->SetCheckTimeConsistency();
219 //______________________________________________________________
220 AliTRDrecoParam *AliTRDrecoParam::GetLowFluxHLTParam()
223 // Parameters for the high flux environment in HLT
226 AliTRDrecoParam *rec = GetLowFluxParam();
227 rec->fNumberOfConfigs = 2;
232 //______________________________________________________________
233 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
236 // Parameters for the high flux environment
239 AliTRDrecoParam *rec = new AliTRDrecoParam();
240 rec->fkdNchdy = 4000.; // PbPb in TRD
241 rec->SetVertexConstrained();
242 rec->SetCheckTimeConsistency();
247 //______________________________________________________________
248 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxHLTParam()
251 // Parameters for the high flux environment in HLT
254 AliTRDrecoParam *rec = GetHighFluxParam();
255 rec->fNumberOfConfigs = 1;
260 //______________________________________________________________
261 AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
264 // Parameters for the cosmics data
267 AliTRDrecoParam *par = new AliTRDrecoParam();
268 par->fSysCovMatrix[0] = 2.; // y direction (1 cm)
269 par->fSysCovMatrix[1] = 2.; // z direction (1 cm)
270 par->fkChi2YSlope = 0.11853;
271 par->fkChi2ZSlope = 0.04527;
272 par->fkChi2YCut = 1.;
273 par->fkPhiSlope = 10.; //3.17954;
274 par->fkMaxTheta = 2.1445;
275 par->fkMaxPhi = 2.7475;
276 par->fkNMeanClusters = 12.89;
277 par->fkNSigmaClusters = 2.095;
278 par->fkRoadzMultiplicator = 3.;
279 par->fStreamLevel[kTracker] = 1;
280 par->SetCheckTimeConsistency();
286 //______________________________________________________________
287 Float_t AliTRDrecoParam::GetNClusters() const
289 // Estimate the number of clusters in the TRD detector
291 Float_t nclusters = (fkNMeanClusters + 2*fkNSigmaClusters)*fkNMeanTracklets*fkdNchdy;
292 nclusters *= 1.+fkNClusterNoise;
296 //______________________________________________________________
297 void AliTRDrecoParam::SetPIDLQslices(Int_t s)
299 // Setting number of slices used by the PID LQ method s={1, 2}
300 // If PID NN is set this function will change to PID LQ.
302 if(IsPIDNeuralNetwork()){
303 AliWarning("PID set to NN. Changing to LQ.");
304 SetPIDNeuralNetwork(kFALSE);
309 if(TESTBIT(fFlags, kLQ2D)) CLRBIT(fFlags, kLQ2D);
312 SETBIT(fFlags, kLQ2D);
315 AliWarning(Form("N[%d] PID LQ slices not implemented. Using default 2.", s));
316 SETBIT(fFlags, kLQ2D);