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*/)
61 ,fkNMeanTracklets(5.5)
62 ,fkTrackLikelihood(-15.)
65 ,fRawStreamVersion("DEFAULT")
67 ,fMinLeftRightCutSigma(8.)
72 ,fNumberOfPresamples(0)
73 ,fNumberOfPostsamples(0)
76 // Default constructor
78 fSysCovMatrix[0] = 0.; // y direction (1 cm)
79 fSysCovMatrix[1] = 0.; // z direction (1 cm)
80 fSysCovMatrix[2] = 0.; // snp
81 fSysCovMatrix[3] = 0.; // tgl
82 fSysCovMatrix[4] = 0.; // 1/pt
84 // Xe tail cancellation parameters
85 fTCParams[0] = 1.156; // r1
86 fTCParams[1] = 0.130; // r2
87 fTCParams[2] = 0.114; // c1
88 fTCParams[3] = 0.624; // c2
89 // Ar tail cancellation parameters
90 fTCParams[4] = 6.; // r1
91 fTCParams[5] = 0.62; // r2
92 fTCParams[6] = 0.0087;// c1
93 fTCParams[7] = 0.07; // c2
95 memset(fPIDThreshold, 0, AliTRDCalPID::kNMom*sizeof(Double_t));
96 memset(fStreamLevel, 0, kTRDreconstructionTasks * sizeof(Int_t));
98 SetPIDmethod(AliTRDPIDResponse::kLQ1D);
100 SetImproveTracklets();
102 SetTailCancelation();
105 //______________________________________________________________
106 AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
107 :AliDetectorRecoParam(ref)
108 ,fkdNchdy(ref.fkdNchdy)
109 ,fkMaxTheta(ref.fkMaxTheta)
110 ,fkMaxPhi(ref.fkMaxPhi)
111 ,fkRoad0y(ref.fkRoad0y)
112 ,fkRoad0z(ref.fkRoad0z)
113 ,fkRoad1y(ref.fkRoad1y)
114 ,fkRoad1z(ref.fkRoad1z)
115 ,fkRoad2y(ref.fkRoad2y)
116 ,fkRoad2z(ref.fkRoad2z)
117 ,fkPtThreshold(ref.fkPtThreshold)
118 ,fkPlaneQualityThreshold(ref.fkPlaneQualityThreshold)
119 ,fkRoadzMultiplicator(ref.fkRoadzMultiplicator)
120 ,fkFindable(ref.fkFindable)
121 ,fkChi2Z(ref.fkChi2Z)
122 ,fkChi2Y(ref.fkChi2Y)
123 ,fkChi2YSlope(ref.fkChi2YSlope)
124 ,fkChi2ZSlope(ref.fkChi2ZSlope)
125 ,fChi2Cut(ref.fChi2Cut)
126 ,fkChi2YCut(ref.fkChi2YCut)
127 ,fkPhiSlope(ref.fkPhiSlope)
128 ,fkNMeanClusters(ref.fkNMeanClusters)
129 ,fkNSigmaClusters(ref.fkNSigmaClusters)
130 ,fkNClusterNoise(ref.fkNClusterNoise)
131 ,fkNMeanTracklets(ref.fkNMeanTracklets)
132 ,fkTrackLikelihood(ref.fkTrackLikelihood)
133 ,fNumberOfConfigs(ref.fNumberOfConfigs)
135 ,fRawStreamVersion(ref.fRawStreamVersion)
136 ,fMinMaxCutSigma(ref.fMinMaxCutSigma)
137 ,fMinLeftRightCutSigma(ref.fMinLeftRightCutSigma)
138 ,fClusMaxThresh(ref.fClusMaxThresh)
139 ,fClusSigThresh(ref.fClusSigThresh)
140 ,fTCnexp(ref.fTCnexp)
141 ,fRecEveryNTB(ref.fRecEveryNTB)
142 ,fNumberOfPresamples(ref.fNumberOfPresamples)
143 ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
148 memcpy(fSysCovMatrix, ref.fSysCovMatrix, 5*sizeof(Double_t));
149 memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
150 memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
151 memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
154 //______________________________________________________________
155 AliTRDrecoParam& AliTRDrecoParam::operator=(const AliTRDrecoParam &ref)
158 // assignment operator
161 if(this == &ref) return *this;
162 AliDetectorRecoParam::operator=(ref);
163 fkdNchdy = ref.fkdNchdy;
164 fkMaxTheta = ref.fkMaxTheta;
165 fkMaxPhi = ref.fkMaxPhi;
166 fkRoad0y = ref.fkRoad0y;
167 fkRoad0z = ref.fkRoad0z;
168 fkRoad1y = ref.fkRoad1y;
169 fkRoad1z = ref.fkRoad1z;
170 fkRoad2y = ref.fkRoad2y;
171 fkRoad2z = ref.fkRoad2z;
172 fkPtThreshold = ref.fkPtThreshold;
173 fkPlaneQualityThreshold= ref.fkPlaneQualityThreshold;
174 fkRoadzMultiplicator = ref.fkRoadzMultiplicator;
175 fkFindable = ref.fkFindable;
176 fkChi2Z = ref.fkChi2Z;
177 fkChi2Y = ref.fkChi2Y;
178 fkChi2YSlope = ref.fkChi2YSlope;
179 fkChi2ZSlope = ref.fkChi2ZSlope;
180 fChi2Cut = ref.fChi2Cut;
181 fkChi2YCut = ref.fkChi2YCut;
182 fkPhiSlope = ref.fkPhiSlope;
183 fkNMeanClusters = ref.fkNMeanClusters;
184 fkNSigmaClusters = ref.fkNSigmaClusters;
185 fkNClusterNoise = ref.fkNClusterNoise;
186 fkNMeanTracklets = ref.fkNMeanTracklets;
187 fkTrackLikelihood = ref.fkTrackLikelihood;
188 fNumberOfConfigs = ref.fNumberOfConfigs;
190 fRawStreamVersion = ref.fRawStreamVersion;
191 fMinMaxCutSigma = ref.fMinMaxCutSigma;
192 fMinLeftRightCutSigma = ref.fMinLeftRightCutSigma;
193 fClusMaxThresh = ref.fClusMaxThresh;
194 fClusSigThresh = ref.fClusSigThresh;
195 fTCnexp = ref.fTCnexp;
196 fRecEveryNTB = ref.fRecEveryNTB;
197 fNumberOfPresamples = ref.fNumberOfPresamples;
198 fNumberOfPostsamples = ref.fNumberOfPostsamples;
200 memcpy(fSysCovMatrix, ref.fSysCovMatrix, 5*sizeof(Double_t));
201 memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
202 memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
203 memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
207 //______________________________________________________________
208 AliTRDrecoParam *AliTRDrecoParam::GetLowFluxParam()
211 // Parameters for the low flux environment
214 AliTRDrecoParam *rec = new AliTRDrecoParam();
215 rec->fkdNchdy = 12.; // pp in TRD
216 rec->SetVertexConstrained();
217 rec->SetCheckTimeConsistency();
222 //______________________________________________________________
223 AliTRDrecoParam *AliTRDrecoParam::GetLowFluxHLTParam()
226 // Parameters for the high flux environment in HLT
229 AliTRDrecoParam *rec = GetLowFluxParam();
230 rec->fNumberOfConfigs = 2;
235 //______________________________________________________________
236 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
239 // Parameters for the high flux environment
242 AliTRDrecoParam *rec = new AliTRDrecoParam();
243 rec->fkdNchdy = 4000.; // PbPb in TRD
244 rec->SetVertexConstrained();
245 rec->SetCheckTimeConsistency();
250 //______________________________________________________________
251 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxHLTParam()
254 // Parameters for the high flux environment in HLT
257 AliTRDrecoParam *rec = GetHighFluxParam();
258 rec->fNumberOfConfigs = 1;
263 //______________________________________________________________
264 AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
267 // Parameters for the cosmics data
270 AliTRDrecoParam *par = new AliTRDrecoParam();
271 par->fSysCovMatrix[0] = 2.; // y direction (1 cm)
272 par->fSysCovMatrix[1] = 2.; // z direction (1 cm)
273 par->fkChi2YSlope = 0.11853;
274 par->fkChi2ZSlope = 0.04527;
275 par->fkChi2YCut = 25.;
276 par->fkChi2YCut = 1.;
277 par->fkPhiSlope = 10.; //3.17954;
278 par->fkMaxTheta = 2.1445;
279 par->fkMaxPhi = 2.7475;
280 par->fkNMeanClusters = 12.89;
281 par->fkNSigmaClusters = 2.095;
282 par->fkRoadzMultiplicator = 3.;
283 par->fStreamLevel[kTracker] = 1;
284 par->SetCheckTimeConsistency();
290 //______________________________________________________________
291 Float_t AliTRDrecoParam::GetNClusters() const
293 // Estimate the number of clusters in the TRD detector
295 Float_t nclusters = (fkNMeanClusters + 2*fkNSigmaClusters)*fkNMeanTracklets*fkdNchdy;
296 nclusters *= 1.+fkNClusterNoise;
300 //______________________________________________________________
301 void AliTRDrecoParam::SetPIDLQslices(Int_t s)
303 // Setting number of slices used by the PID LQ method s={1, 2}
304 // If PID NN is set this function will change to PID LQ.
306 if(IsPIDNeuralNetwork()){
307 AliWarning("PID set to NN. Changing to LQ.");
308 SetPIDNeuralNetwork(kFALSE);
313 if(TESTBIT(fFlags, kLQ2D)) CLRBIT(fFlags, kLQ2D);
316 SETBIT(fFlags, kLQ2D);
319 AliWarning(Form("N[%d] PID LQ slices not implemented. Using default 2.", s));
320 SETBIT(fFlags, kLQ2D);