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 = 2;
179 //______________________________________________________________
180 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
183 // Parameters for the high flux environment
186 AliTRDrecoParam *rec = new AliTRDrecoParam();
187 rec->fkdNchdy = 4000.; // PbPb in TRD
188 rec->SetVertexConstrained();
189 rec->SetCheckTimeConsistency();
194 //______________________________________________________________
195 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxHLTParam()
198 // Parameters for the high flux environment in HLT
201 AliTRDrecoParam *rec = GetHighFluxParam();
202 rec->fNumberOfConfigs = 1;
207 //______________________________________________________________
208 AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
211 // Parameters for the cosmics data
214 AliTRDrecoParam *par = new AliTRDrecoParam();
215 par->fSysCovMatrix[0] = 2.; // y direction (1 cm)
216 par->fSysCovMatrix[1] = 2.; // z direction (1 cm)
217 par->fkChi2YSlope = 0.11853;
218 par->fkChi2ZSlope = 0.04527;
219 par->fkChi2YCut = 1.;
220 par->fkPhiSlope = 10.; //3.17954;
221 par->fkMaxTheta = 2.1445;
222 par->fkMaxPhi = 2.7475;
223 par->fkNMeanClusters = 12.89;
224 par->fkNSigmaClusters = 2.095;
225 par->fkRoadzMultiplicator = 3.;
226 par->fStreamLevel[kTracker] = 1;
227 par->SetCheckTimeConsistency();
233 //______________________________________________________________
234 Float_t AliTRDrecoParam::GetNClusters() const
236 // Estimate the number of clusters in the TRD detector
238 Float_t nclusters = (fkNMeanClusters + 2*fkNSigmaClusters)*fkNMeanTracklets*fkdNchdy;
239 nclusters *= 1.+fkNClusterNoise;
243 //______________________________________________________________
244 void AliTRDrecoParam::SetPIDLQslices(Int_t s)
246 // Setting number of slices used by the PID LQ method s={1, 2}
247 // If PID NN is set this function will change to PID LQ.
249 if(IsPIDNeuralNetwork()){
250 AliWarning("PID set to NN. Changing to LQ.");
251 SetPIDNeuralNetwork(kFALSE);
256 if(TESTBIT(fFlags, kLQ2D)) CLRBIT(fFlags, kLQ2D);
259 SETBIT(fFlags, kLQ2D);
262 AliWarning(Form("N[%d] PID LQ slices not implemented. Using default 2.", s));
263 SETBIT(fFlags, kLQ2D);