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.)
62 ,fRawStreamVersion("REAL")
64 ,fMinLeftRightCutSigma(8.)
68 ,fNumberOfPresamples(0)
69 ,fNumberOfPostsamples(0)
72 // Default constructor
74 fSysCovMatrix[0] = 0.; // y direction (1 cm)
75 fSysCovMatrix[1] = 0.; // z direction (1 cm)
76 fSysCovMatrix[2] = 0.; // snp
77 fSysCovMatrix[3] = 0.; // tgl
78 fSysCovMatrix[4] = 0.; // 1/pt
80 // Xe tail cancellation parameters
81 fTCParams[0] = 1.156; // r1
82 fTCParams[1] = 0.130; // r2
83 fTCParams[2] = 0.114; // c1
84 fTCParams[3] = 0.624; // c2
85 // Ar tail cancellation parameters
86 fTCParams[4] = 6.; // r1
87 fTCParams[5] = 0.62; // r2
88 fTCParams[6] = 0.0087;// c1
89 fTCParams[7] = 0.07; // c2
91 memset(fPIDThreshold, 0, AliTRDCalPID::kNMom*sizeof(Double_t));
92 memset(fStreamLevel, 0, kTRDreconstructionTasks * sizeof(Int_t));
94 SetPIDNeuralNetwork();
96 SetImproveTracklets();
101 //______________________________________________________________
102 AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
103 :AliDetectorRecoParam(ref)
104 ,fkdNchdy(ref.fkdNchdy)
105 ,fkMaxTheta(ref.fkMaxTheta)
106 ,fkMaxPhi(ref.fkMaxPhi)
107 ,fkRoad0y(ref.fkRoad0y)
108 ,fkRoad0z(ref.fkRoad0z)
109 ,fkRoad1y(ref.fkRoad1y)
110 ,fkRoad1z(ref.fkRoad1z)
111 ,fkRoad2y(ref.fkRoad2y)
112 ,fkRoad2z(ref.fkRoad2z)
113 ,fkPtThreshold(ref.fkPtThreshold)
114 ,fkPlaneQualityThreshold(ref.fkPlaneQualityThreshold)
115 ,fkRoadzMultiplicator(ref.fkRoadzMultiplicator)
116 ,fkFindable(ref.fkFindable)
117 ,fkChi2Z(ref.fkChi2Z)
118 ,fkChi2Y(ref.fkChi2Y)
119 ,fkChi2YSlope(ref.fkChi2YSlope)
120 ,fkChi2ZSlope(ref.fkChi2ZSlope)
121 ,fkChi2YCut(ref.fkChi2YCut)
122 ,fkPhiSlope(ref.fkPhiSlope)
123 ,fkNMeanClusters(ref.fkNMeanClusters)
124 ,fkNSigmaClusters(ref.fkNSigmaClusters)
125 ,fkNClusterNoise(ref.fkNClusterNoise)
126 ,fkNMeanTracklets(ref.fkNMeanTracklets)
127 ,fkTrackLikelihood(ref.fkTrackLikelihood)
129 ,fRawStreamVersion(ref.fRawStreamVersion)
130 ,fMinMaxCutSigma(ref.fMinMaxCutSigma)
131 ,fMinLeftRightCutSigma(ref.fMinLeftRightCutSigma)
132 ,fClusMaxThresh(ref.fClusMaxThresh)
133 ,fClusSigThresh(ref.fClusSigThresh)
134 ,fTCnexp(ref.fTCnexp)
135 ,fNumberOfPresamples(ref.fNumberOfPresamples)
136 ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
141 memcpy(fSysCovMatrix, ref.fSysCovMatrix, 5*sizeof(Double_t));
142 memcpy(fTCParams, ref.fTCParams, 8*sizeof(Double_t));
143 memcpy(fPIDThreshold, ref.fPIDThreshold, AliTRDCalPID::kNMom*sizeof(Double_t));
144 memcpy(fStreamLevel, ref.fStreamLevel, kTRDreconstructionTasks * sizeof(Int_t));
147 //______________________________________________________________
148 AliTRDrecoParam *AliTRDrecoParam::GetLowFluxParam()
151 // Parameters for the low flux environment
154 AliTRDrecoParam *rec = new AliTRDrecoParam();
155 rec->fkdNchdy = 12.; // pp in TRD
156 rec->SetVertexConstrained();
157 rec->SetCheckTimeConsistency();
162 //______________________________________________________________
163 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
166 // Parameters for the high flux environment
169 AliTRDrecoParam *rec = new AliTRDrecoParam();
170 rec->fkdNchdy = 4000.; // PbPb in TRD
171 rec->SetVertexConstrained();
172 rec->SetCheckTimeConsistency();
177 //______________________________________________________________
178 AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
181 // Parameters for the cosmics data
184 AliTRDrecoParam *par = new AliTRDrecoParam();
185 par->fSysCovMatrix[0] = 2.; // y direction (1 cm)
186 par->fSysCovMatrix[1] = 2.; // z direction (1 cm)
187 par->fkChi2YSlope = 0.11853;
188 par->fkChi2ZSlope = 0.04527;
189 par->fkChi2YCut = 1.;
190 par->fkPhiSlope = 10.; //3.17954;
191 par->fkMaxTheta = 2.1445;
192 par->fkMaxPhi = 2.7475;
193 par->fkNMeanClusters = 12.89;
194 par->fkNSigmaClusters = 2.095;
195 par->fkRoadzMultiplicator = 3.;
196 par->fStreamLevel[kTracker] = 1;
197 par->SetCheckTimeConsistency();
203 //______________________________________________________________
204 Float_t AliTRDrecoParam::GetNClusters() const
206 // Estimate the number of clusters in the TRD detector
208 Float_t nclusters = (fkNMeanClusters + 2*fkNSigmaClusters)*fkNMeanTracklets*fkdNchdy;
209 nclusters *= 1.+fkNClusterNoise;
213 //______________________________________________________________
214 void AliTRDrecoParam::SetPIDLQslices(Int_t s)
216 // Setting number of slices used by the PID LQ method s={1, 2}
217 // If PID NN is set this function will change to PID LQ.
219 if(IsPIDNeuralNetwork()){
220 AliWarning("PID set to NN. Changing to LQ.");
221 SetPIDNeuralNetwork(kFALSE);
226 if(TESTBIT(fFlags, kLQ2D)) CLRBIT(fFlags, kLQ2D);
229 SETBIT(fFlags, kLQ2D);
232 AliWarning(Form("N[%d] PID LQ slices not implemented. Using default 2.", s));
233 SETBIT(fFlags, kLQ2D);