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()
46 ,fkPlaneQualityThreshold(5.0)// 4.2? under Investigation
47 ,fkRoadzMultiplicator(1.5)
49 ,fkChi2Z(30./*14.*//*12.5*/)
58 ,fkNMeanTracklets(5.5)
59 ,fkTrackLikelihood(-15.)
61 ,fRawStreamVersion("REAL")
63 ,fMinLeftRightCutSigma(8.)
67 ,fNumberOfPresamples(0)
68 ,fNumberOfPostsamples(0)
71 // Default constructor
73 fSysCovMatrix[0] = 0.; // y direction (1 cm)
74 fSysCovMatrix[1] = 0.; // z direction (1 cm)
75 fSysCovMatrix[2] = 0.; // snp
76 fSysCovMatrix[3] = 0.; // tgl
77 fSysCovMatrix[4] = 0.; // 1/pt
79 // Xe tail cancellation parameters
80 fTCParams[0] = 1.156; // r1
81 fTCParams[1] = 0.130; // r2
82 fTCParams[2] = 0.114; // c1
83 fTCParams[3] = 0.624; // c2
84 // Ar tail cancellation parameters
85 fTCParams[4] = 6.; // r1
86 fTCParams[5] = 0.62; // r2
87 fTCParams[6] = 0.0087;// c1
88 fTCParams[7] = 0.07; // c2
90 memset(fPIDThreshold, 0, AliTRDCalPID::kNMom*sizeof(Double_t));
91 memset(fStreamLevel, 0, kTRDreconstructionTasks * sizeof(Int_t));
93 SetPIDNeuralNetwork();
95 SetImproveTracklets();
100 //______________________________________________________________
101 AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
102 :AliDetectorRecoParam(ref)
103 ,fkdNchdy(ref.fkdNchdy)
104 ,fkMaxTheta(ref.fkMaxTheta)
105 ,fkMaxPhi(ref.fkMaxPhi)
106 ,fkRoad0y(ref.fkRoad0y)
107 ,fkRoad0z(ref.fkRoad0z)
108 ,fkRoad1y(ref.fkRoad1y)
109 ,fkRoad1z(ref.fkRoad1z)
110 ,fkRoad2y(ref.fkRoad2y)
111 ,fkRoad2z(ref.fkRoad2z)
112 ,fkPlaneQualityThreshold(ref.fkPlaneQualityThreshold)
113 ,fkRoadzMultiplicator(ref.fkRoadzMultiplicator)
114 ,fkFindable(ref.fkFindable)
115 ,fkChi2Z(ref.fkChi2Z)
116 ,fkChi2Y(ref.fkChi2Y)
117 ,fkChi2YSlope(ref.fkChi2YSlope)
118 ,fkChi2ZSlope(ref.fkChi2ZSlope)
119 ,fkChi2YCut(ref.fkChi2YCut)
120 ,fkPhiSlope(ref.fkPhiSlope)
121 ,fkNMeanClusters(ref.fkNMeanClusters)
122 ,fkNSigmaClusters(ref.fkNSigmaClusters)
123 ,fkNClusterNoise(ref.fkNClusterNoise)
124 ,fkNMeanTracklets(ref.fkNMeanTracklets)
125 ,fkTrackLikelihood(ref.fkTrackLikelihood)
127 ,fRawStreamVersion(ref.fRawStreamVersion)
128 ,fMinMaxCutSigma(ref.fMinMaxCutSigma)
129 ,fMinLeftRightCutSigma(ref.fMinLeftRightCutSigma)
130 ,fClusMaxThresh(ref.fClusMaxThresh)
131 ,fClusSigThresh(ref.fClusSigThresh)
132 ,fTCnexp(ref.fTCnexp)
133 ,fNumberOfPresamples(ref.fNumberOfPresamples)
134 ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
139 memcpy(fSysCovMatrix, ref.fSysCovMatrix, 5*sizeof(Double_t));
140 memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
141 memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
142 memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
145 //______________________________________________________________
146 AliTRDrecoParam *AliTRDrecoParam::GetLowFluxParam()
149 // Parameters for the low flux environment
152 AliTRDrecoParam *rec = new AliTRDrecoParam();
153 rec->fkdNchdy = 12.; // pp in TRD
154 rec->SetVertexConstrained();
155 rec->SetCheckTimeConsistency();
160 //______________________________________________________________
161 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
164 // Parameters for the high flux environment
167 AliTRDrecoParam *rec = new AliTRDrecoParam();
168 rec->fkdNchdy = 4000.; // PbPb in TRD
169 rec->SetVertexConstrained();
170 rec->SetCheckTimeConsistency();
175 //______________________________________________________________
176 AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
179 // Parameters for the cosmics data
182 AliTRDrecoParam *par = new AliTRDrecoParam();
183 par->fSysCovMatrix[0] = 2.; // y direction (1 cm)
184 par->fSysCovMatrix[1] = 2.; // z direction (1 cm)
185 par->fkChi2YSlope = 0.11853;
186 par->fkChi2ZSlope = 0.04527;
187 par->fkChi2YCut = 1.;
188 par->fkPhiSlope = 10.; //3.17954;
189 par->fkMaxTheta = 2.1445;
190 par->fkMaxPhi = 2.7475;
191 par->fkNMeanClusters = 12.89;
192 par->fkNSigmaClusters = 2.095;
193 par->fkRoadzMultiplicator = 3.;
194 par->fStreamLevel[kTracker] = 1;
195 par->SetCheckTimeConsistency();
201 //______________________________________________________________
202 Float_t AliTRDrecoParam::GetNClusters() const
204 // Estimate the number of clusters in the TRD detector
206 Float_t nclusters = (fkNMeanClusters + 2*fkNSigmaClusters)*fkNMeanTracklets*fkdNchdy;
207 nclusters *= 1.+fkNClusterNoise;
211 //______________________________________________________________
212 void AliTRDrecoParam::SetPIDLQslices(Int_t s)
214 // Setting number of slices used by the PID LQ method s={1, 2}
215 // If PID NN is set this function will change to PID LQ.
217 if(IsPIDNeuralNetwork()){
218 AliWarning("PID set to NN. Changing to LQ.");
219 SetPIDNeuralNetwork(kFALSE);
224 if(TESTBIT(fFlags, kLQ2D)) CLRBIT(fFlags, kLQ2D);
227 SETBIT(fFlags, kLQ2D);
230 AliWarning(Form("N[%d] PID LQ slices not implemented. Using default 2.", s));
231 SETBIT(fFlags, kLQ2D);