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 ///////////////////////////////////////////////////////////////////////////////
28 #include "AliTRDrecoParam.h"
29 #include "AliTRDrawStreamBase.h"
31 ClassImp(AliTRDrecoParam)
34 //______________________________________________________________
35 AliTRDrecoParam::AliTRDrecoParam()
36 :AliDetectorRecoParam()
47 ,fkPlaneQualityThreshold(5.0)// 4.2? under Investigation
48 ,fkRoadzMultiplicator(1.5)
50 ,fkChi2Z(30./*14.*//*12.5*/)
59 ,fkNMeanTracklets(5.5)
60 ,fkTrackLikelihood(-15.)
63 ,fRawStreamVersion("REAL")
65 ,fMinLeftRightCutSigma(8.)
70 ,fNumberOfPresamples(0)
71 ,fNumberOfPostsamples(0)
74 // Default constructor
76 fSysCovMatrix[0] = 0.; // y direction (1 cm)
77 fSysCovMatrix[1] = 0.; // z direction (1 cm)
78 fSysCovMatrix[2] = 0.; // snp
79 fSysCovMatrix[3] = 0.; // tgl
80 fSysCovMatrix[4] = 0.; // 1/pt
82 // Xe tail cancellation parameters
83 fTCParams[0] = 1.156; // r1
84 fTCParams[1] = 0.130; // r2
85 fTCParams[2] = 0.114; // c1
86 fTCParams[3] = 0.624; // c2
87 // Ar tail cancellation parameters
88 fTCParams[4] = 6.; // r1
89 fTCParams[5] = 0.62; // r2
90 fTCParams[6] = 0.0087;// c1
91 fTCParams[7] = 0.07; // c2
93 memset(fPIDThreshold, 0, AliTRDCalPID::kNMom*sizeof(Double_t));
94 memset(fStreamLevel, 0, kTRDreconstructionTasks * sizeof(Int_t));
96 SetPIDNeuralNetwork();
98 SetImproveTracklets();
100 SetTailCancelation();
103 //______________________________________________________________
104 AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
105 :AliDetectorRecoParam(ref)
106 ,fkdNchdy(ref.fkdNchdy)
107 ,fkMaxTheta(ref.fkMaxTheta)
108 ,fkMaxPhi(ref.fkMaxPhi)
109 ,fkRoad0y(ref.fkRoad0y)
110 ,fkRoad0z(ref.fkRoad0z)
111 ,fkRoad1y(ref.fkRoad1y)
112 ,fkRoad1z(ref.fkRoad1z)
113 ,fkRoad2y(ref.fkRoad2y)
114 ,fkRoad2z(ref.fkRoad2z)
115 ,fkPtThreshold(ref.fkPtThreshold)
116 ,fkPlaneQualityThreshold(ref.fkPlaneQualityThreshold)
117 ,fkRoadzMultiplicator(ref.fkRoadzMultiplicator)
118 ,fkFindable(ref.fkFindable)
119 ,fkChi2Z(ref.fkChi2Z)
120 ,fkChi2Y(ref.fkChi2Y)
121 ,fkChi2YSlope(ref.fkChi2YSlope)
122 ,fkChi2ZSlope(ref.fkChi2ZSlope)
123 ,fkChi2YCut(ref.fkChi2YCut)
124 ,fkPhiSlope(ref.fkPhiSlope)
125 ,fkNMeanClusters(ref.fkNMeanClusters)
126 ,fkNSigmaClusters(ref.fkNSigmaClusters)
127 ,fkNClusterNoise(ref.fkNClusterNoise)
128 ,fkNMeanTracklets(ref.fkNMeanTracklets)
129 ,fkTrackLikelihood(ref.fkTrackLikelihood)
130 ,fNumberOfConfigs(ref.fNumberOfConfigs)
132 ,fRawStreamVersion(ref.fRawStreamVersion)
133 ,fMinMaxCutSigma(ref.fMinMaxCutSigma)
134 ,fMinLeftRightCutSigma(ref.fMinLeftRightCutSigma)
135 ,fClusMaxThresh(ref.fClusMaxThresh)
136 ,fClusSigThresh(ref.fClusSigThresh)
137 ,fTCnexp(ref.fTCnexp)
138 ,fRecEveryNTB(ref.fRecEveryNTB)
139 ,fNumberOfPresamples(ref.fNumberOfPresamples)
140 ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
145 memcpy(fSysCovMatrix, ref.fSysCovMatrix, 5*sizeof(Double_t));
146 memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
147 memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
148 memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
151 //______________________________________________________________
152 AliTRDrecoParam *AliTRDrecoParam::GetLowFluxParam()
155 // Parameters for the low flux environment
158 AliTRDrecoParam *rec = new AliTRDrecoParam();
159 rec->fkdNchdy = 12.; // pp in TRD
160 rec->SetVertexConstrained();
161 rec->SetCheckTimeConsistency();
166 //______________________________________________________________
167 AliTRDrecoParam *AliTRDrecoParam::GetLowFluxHLTParam()
170 // Parameters for the high flux environment in HLT
173 AliTRDrecoParam *rec = GetLowFluxParam();
174 rec->fNumberOfConfigs = 3;
175 rec->fRecEveryNTB = 1;
180 //______________________________________________________________
181 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
184 // Parameters for the high flux environment
187 AliTRDrecoParam *rec = new AliTRDrecoParam();
188 rec->fkdNchdy = 4000.; // PbPb in TRD
189 rec->SetVertexConstrained();
190 rec->SetCheckTimeConsistency();
195 //______________________________________________________________
196 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxHLTParam()
199 // Parameters for the high flux environment in HLT
202 AliTRDrecoParam *rec = GetHighFluxParam();
203 rec->fNumberOfConfigs = 1;
204 rec->fRecEveryNTB = 2;
209 //______________________________________________________________
210 AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
213 // Parameters for the cosmics data
216 AliTRDrecoParam *par = new AliTRDrecoParam();
217 par->fSysCovMatrix[0] = 2.; // y direction (1 cm)
218 par->fSysCovMatrix[1] = 2.; // z direction (1 cm)
219 par->fkChi2YSlope = 0.11853;
220 par->fkChi2ZSlope = 0.04527;
221 par->fkChi2YCut = 1.;
222 par->fkPhiSlope = 10.; //3.17954;
223 par->fkMaxTheta = 2.1445;
224 par->fkMaxPhi = 2.7475;
225 par->fkNMeanClusters = 12.89;
226 par->fkNSigmaClusters = 2.095;
227 par->fkRoadzMultiplicator = 3.;
228 par->fStreamLevel[kTracker] = 1;
229 par->SetCheckTimeConsistency();
235 //______________________________________________________________
236 Float_t AliTRDrecoParam::GetNClusters() const
238 // Estimate the number of clusters in the TRD detector
240 Float_t nclusters = (fkNMeanClusters + 2*fkNSigmaClusters)*fkNMeanTracklets*fkdNchdy;
241 nclusters *= 1.+fkNClusterNoise;
245 //______________________________________________________________
246 void AliTRDrecoParam::SetPIDLQslices(Int_t s)
248 // Setting number of slices used by the PID LQ method s={1, 2}
249 // If PID NN is set this function will change to PID LQ.
251 if(IsPIDNeuralNetwork()){
252 AliWarning("PID set to NN. Changing to LQ.");
253 SetPIDNeuralNetwork(kFALSE);
258 if(TESTBIT(fFlags, kLQ2D)) CLRBIT(fFlags, kLQ2D);
261 SETBIT(fFlags, kLQ2D);
264 AliWarning(Form("N[%d] PID LQ slices not implemented. Using default 2.", s));
265 SETBIT(fFlags, kLQ2D);