]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDrecoParam.cxx
new version from L.Milano and F.Prino
[u/mrichter/AliRoot.git] / TRD / AliTRDrecoParam.cxx
CommitLineData
e4f2f73d 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/* $Id$ */
17
18///////////////////////////////////////////////////////////////////////////////
19// //
20// Parameter class for the TRD reconstruction //
21// //
22// Authors: //
23// Alex Bercuci <A.Bercuci@gsi.de> //
24// Markus Fasel <M.Fasel@gsi.de> //
25// //
26///////////////////////////////////////////////////////////////////////////////
27
28#include "AliTRDrecoParam.h"
9716329b 29#include "AliTRDrawStreamBase.h"
e4f2f73d 30
31ClassImp(AliTRDrecoParam)
32
a2fbb6ec 33
e4f2f73d 34//______________________________________________________________
35AliTRDrecoParam::AliTRDrecoParam()
36 :AliDetectorRecoParam()
8ae98148 37 ,fkdNchdy(12.)
91834b8d 38 ,fkMaxTheta(1.0)
39 ,fkMaxPhi(2.0)
e4f2f73d 40 ,fkRoad0y(6.0)
41 ,fkRoad0z(8.5)
42 ,fkRoad1y(2.0)
43 ,fkRoad1z(20.0)
44 ,fkRoad2y(3.0)
45 ,fkRoad2z(20.0)
b06a50a5 46 ,fkPtThreshold(2.0)
e4f2f73d 47 ,fkPlaneQualityThreshold(5.0)// 4.2? under Investigation
566bf887 48 ,fkRoadzMultiplicator(1.5)
e4f2f73d 49 ,fkFindable(.333)
eb38ed55 50 ,fkChi2Z(30./*14.*//*12.5*/)
e4f2f73d 51 ,fkChi2Y(.25)
5a2e200c 52 ,fkChi2YSlope(7.73)
53 ,fkChi2ZSlope(0.069)
8c499dbf 54 ,fkChi2YCut(0.5)
5a2e200c 55 ,fkPhiSlope(10.6)
8ae98148 56 ,fkNMeanClusters(20.)
57 ,fkNSigmaClusters(2.)
58 ,fkNClusterNoise(0.)
59 ,fkNMeanTracklets(5.5)
e4f2f73d 60 ,fkTrackLikelihood(-15.)
8c499dbf 61 ,fNumberOfConfigs(3)
a2fbb6ec 62 ,fFlags(0)
63 ,fRawStreamVersion("REAL")
df83a620 64 ,fMinMaxCutSigma(4.)
65 ,fMinLeftRightCutSigma(8.)
fc546d21 66 ,fClusMaxThresh(4.5)
67 ,fClusSigThresh(3.5)
56b32fd7 68 ,fTCnexp(1)
8c499dbf 69 ,fRecEveryNTB(1)
4e459a9d 70 ,fNumberOfPresamples(0)
71 ,fNumberOfPostsamples(0)
e4f2f73d 72{
73 //
74 // Default constructor
75 //
d937ad7a 76 fSysCovMatrix[0] = 0.; // y direction (1 cm)
77 fSysCovMatrix[1] = 0.; // z direction (1 cm)
3afdab72 78 fSysCovMatrix[2] = 0.; // snp
79 fSysCovMatrix[3] = 0.; // tgl
80 fSysCovMatrix[4] = 0.; // 1/pt
22a4ab0c 81
a2fbb6ec 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
92
22a4ab0c 93 memset(fPIDThreshold, 0, AliTRDCalPID::kNMom*sizeof(Double_t));
a2fbb6ec 94 memset(fStreamLevel, 0, kTRDreconstructionTasks * sizeof(Int_t));
95
96 SetPIDNeuralNetwork();
97 SetEightSlices();
98 SetImproveTracklets();
99 SetLUT();
100 SetTailCancelation();
e4f2f73d 101}
102
a7ac01d2 103//______________________________________________________________
104AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
105 :AliDetectorRecoParam(ref)
8ae98148 106 ,fkdNchdy(ref.fkdNchdy)
a7ac01d2 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)
b06a50a5 115 ,fkPtThreshold(ref.fkPtThreshold)
a7ac01d2 116 ,fkPlaneQualityThreshold(ref.fkPlaneQualityThreshold)
566bf887 117 ,fkRoadzMultiplicator(ref.fkRoadzMultiplicator)
a7ac01d2 118 ,fkFindable(ref.fkFindable)
119 ,fkChi2Z(ref.fkChi2Z)
120 ,fkChi2Y(ref.fkChi2Y)
5a2e200c 121 ,fkChi2YSlope(ref.fkChi2YSlope)
122 ,fkChi2ZSlope(ref.fkChi2ZSlope)
8c499dbf 123 ,fkChi2YCut(ref.fkChi2YCut)
5a2e200c 124 ,fkPhiSlope(ref.fkPhiSlope)
8ae98148 125 ,fkNMeanClusters(ref.fkNMeanClusters)
126 ,fkNSigmaClusters(ref.fkNSigmaClusters)
127 ,fkNClusterNoise(ref.fkNClusterNoise)
128 ,fkNMeanTracklets(ref.fkNMeanTracklets)
a7ac01d2 129 ,fkTrackLikelihood(ref.fkTrackLikelihood)
8c499dbf 130 ,fNumberOfConfigs(ref.fNumberOfConfigs)
a2fbb6ec 131 ,fFlags(ref.fFlags)
132 ,fRawStreamVersion(ref.fRawStreamVersion)
a7ac01d2 133 ,fMinMaxCutSigma(ref.fMinMaxCutSigma)
134 ,fMinLeftRightCutSigma(ref.fMinLeftRightCutSigma)
135 ,fClusMaxThresh(ref.fClusMaxThresh)
136 ,fClusSigThresh(ref.fClusSigThresh)
137 ,fTCnexp(ref.fTCnexp)
8c499dbf 138 ,fRecEveryNTB(ref.fRecEveryNTB)
4e459a9d 139 ,fNumberOfPresamples(ref.fNumberOfPresamples)
140 ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
a7ac01d2 141{
142 //
143 // Copy constructor
144 //
a7ac01d2 145 memcpy(fSysCovMatrix, ref.fSysCovMatrix, 5*sizeof(Double_t));
a2fbb6ec 146 memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
22a4ab0c 147 memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
a2fbb6ec 148 memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
a7ac01d2 149}
150
e4f2f73d 151//______________________________________________________________
152AliTRDrecoParam *AliTRDrecoParam::GetLowFluxParam()
153{
154 //
155 // Parameters for the low flux environment
156 //
157
8ae98148 158 AliTRDrecoParam *rec = new AliTRDrecoParam();
159 rec->fkdNchdy = 12.; // pp in TRD
a2fbb6ec 160 rec->SetVertexConstrained();
828c6f80 161 rec->SetCheckTimeConsistency();
8ae98148 162 return rec;
e4f2f73d 163
164}
165
8c499dbf 166//______________________________________________________________
167AliTRDrecoParam *AliTRDrecoParam::GetLowFluxHLTParam()
168{
169 //
170 // Parameters for the high flux environment in HLT
171 //
172
173 AliTRDrecoParam *rec = GetLowFluxParam();
82ddb093 174 rec->fNumberOfConfigs = 2;
8c499dbf 175 return rec;
176
177}
178
e4f2f73d 179//______________________________________________________________
180AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
181{
182 //
183 // Parameters for the high flux environment
184 //
185
fb872574 186 AliTRDrecoParam *rec = new AliTRDrecoParam();
8ae98148 187 rec->fkdNchdy = 4000.; // PbPb in TRD
a2fbb6ec 188 rec->SetVertexConstrained();
828c6f80 189 rec->SetCheckTimeConsistency();
fb872574 190 return rec;
e4f2f73d 191
192}
9716329b 193
8c499dbf 194//______________________________________________________________
195AliTRDrecoParam *AliTRDrecoParam::GetHighFluxHLTParam()
196{
197 //
198 // Parameters for the high flux environment in HLT
199 //
200
201 AliTRDrecoParam *rec = GetHighFluxParam();
202 rec->fNumberOfConfigs = 1;
8c499dbf 203 return rec;
204
205}
206
9716329b 207//______________________________________________________________
208AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
209{
210 //
211 // Parameters for the cosmics data
212 //
213
9716329b 214 AliTRDrecoParam *par = new AliTRDrecoParam();
6e39bde4 215 par->fSysCovMatrix[0] = 2.; // y direction (1 cm)
216 par->fSysCovMatrix[1] = 2.; // z direction (1 cm)
b72f4eaf 217 par->fkChi2YSlope = 0.11853;
218 par->fkChi2ZSlope = 0.04527;
219 par->fkChi2YCut = 1.;
6e39bde4 220 par->fkPhiSlope = 10.; //3.17954;
8ae98148 221 par->fkMaxTheta = 2.1445;
222 par->fkMaxPhi = 2.7475;
5a2e200c 223 par->fkNMeanClusters = 12.89;
224 par->fkNSigmaClusters = 2.095;
566bf887 225 par->fkRoadzMultiplicator = 3.;
a2fbb6ec 226 par->fStreamLevel[kTracker] = 1;
828c6f80 227 par->SetCheckTimeConsistency();
9716329b 228 return par;
229
230}
8ae98148 231
232
233//______________________________________________________________
234Float_t AliTRDrecoParam::GetNClusters() const
235{
236 // Estimate the number of clusters in the TRD detector
237
238 Float_t nclusters = (fkNMeanClusters + 2*fkNSigmaClusters)*fkNMeanTracklets*fkdNchdy;
239 nclusters *= 1.+fkNClusterNoise;
240 return nclusters;
241}
11d80e40 242
243//______________________________________________________________
244void AliTRDrecoParam::SetPIDLQslices(Int_t s)
245{
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.
248
249 if(IsPIDNeuralNetwork()){
250 AliWarning("PID set to NN. Changing to LQ.");
251 SetPIDNeuralNetwork(kFALSE);
252 }
253
254 switch(s){
255 case 1:
256 if(TESTBIT(fFlags, kLQ2D)) CLRBIT(fFlags, kLQ2D);
257 break;
258 case 2:
259 SETBIT(fFlags, kLQ2D);
260 break;
261 default:
262 AliWarning(Form("N[%d] PID LQ slices not implemented. Using default 2.", s));
263 SETBIT(fFlags, kLQ2D);
264 break;
265 }
266}
267