]>
Commit | Line | Data |
---|---|---|
3304fa09 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2007, 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 | ||
bf4d93eb | 16 | // $Id$ |
3304fa09 | 17 | |
18 | //----------------------------------------------------------------------------- | |
19 | /// \class AliMUONRecoParam | |
20 | /// | |
21 | /// Class with MUON reconstruction parameters | |
22 | /// | |
23 | /// \author Philippe Pillot | |
24 | //----------------------------------------------------------------------------- | |
25 | ||
26 | ||
27 | ||
28 | #include "AliMUONRecoParam.h" | |
29 | ||
30 | #include "AliLog.h" | |
004a9ccd | 31 | #include "AliMUONPadStatusMaker.h" |
3304fa09 | 32 | |
33 | #include <Riostream.h> | |
34 | ||
35 | ClassImp(AliMUONRecoParam) | |
36 | ||
37 | ||
38 | //_____________________________________________________________________________ | |
39 | AliMUONRecoParam::AliMUONRecoParam() | |
15d30ed4 | 40 | : AliDetectorRecoParam(), |
3304fa09 | 41 | fClusteringMode("MLEM"), |
42 | fTrackingMode("KALMAN"), | |
43 | fMinBendingMomentum(0.), | |
44 | fMaxBendingMomentum(0.), | |
9bf6860b | 45 | fMaxNonBendingSlope(0.), |
9f093251 | 46 | fMaxBendingSlope(0.), |
3304fa09 | 47 | fNonBendingVertexDispersion(0.), |
48 | fBendingVertexDispersion(0.), | |
49 | fMaxNonBendingDistanceToTrack(0.), | |
50 | fMaxBendingDistanceToTrack(0.), | |
51 | fSigmaCutForTracking(0.), | |
52 | fSigmaCutForImprovement(0.), | |
fda59e58 | 53 | fSigmaCutForTrigger(0.), |
b5270f21 | 54 | fStripCutForTrigger(0.), |
55 | fMaxStripAreaForTrigger(0.), | |
3304fa09 | 56 | fMaxNormChi2MatchTrigger(0.), |
0a18ba02 | 57 | fPercentOfFullClusterInESD(10.), |
38bcf0ef | 58 | fCombinedClusterTrackReco(kFALSE), |
3304fa09 | 59 | fTrackAllTracks(kFALSE), |
60 | fRecoverTracks(kFALSE), | |
61 | fMakeTrackCandidatesFast(kFALSE), | |
9bf6860b | 62 | fMakeMoreTrackCandidates(kFALSE), |
3304fa09 | 63 | fComplementTracks(kFALSE), |
64 | fImproveTracks(kFALSE), | |
0a18ba02 | 65 | fUseSmoother(kFALSE), |
de98fdc9 | 66 | fSaveFullClusterInESD(kTRUE), |
9bf6860b | 67 | fCalibrationMode("NOGAIN"), |
004a9ccd | 68 | fBypassSt45(0), |
170f4046 | 69 | fPadGoodnessMask(0), |
70 | fChargeSigmaCut(4.0) | |
3304fa09 | 71 | { |
72 | /// Constructor | |
15d30ed4 | 73 | SetNameTitle("MUON","MUON"); |
3304fa09 | 74 | |
004a9ccd | 75 | SetDefaultLimits(); |
76 | ||
3304fa09 | 77 | // use the default parameters for low flux environment |
78 | SetLowFluxParam(); | |
79 | } | |
80 | ||
81 | //_____________________________________________________________________________ | |
82 | AliMUONRecoParam::~AliMUONRecoParam() | |
83 | { | |
84 | /// Destructor | |
85 | } | |
86 | ||
004a9ccd | 87 | //_____________________________________________________________________________ |
88 | void | |
89 | AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5) | |
90 | { | |
91 | /// Set the bypass status | |
92 | ||
93 | if ( st4 && st5 ) fBypassSt45 = 45; | |
94 | else if ( st4 ) fBypassSt45 = 4; | |
95 | else if ( st5 ) fBypassSt45 = 5; | |
96 | else fBypassSt45 = 0; | |
97 | } | |
98 | ||
9bf6860b | 99 | //_____________________________________________________________________________ |
100 | Option_t* | |
101 | AliMUONRecoParam::GetCalibrationMode() const | |
102 | { | |
103 | /// Return the calibration mode. Can be : | |
104 | /// NOGAIN : only do pedestal subtraction | |
105 | /// GAIN : do pedestal subtraction, and apply gain correction, but with a | |
106 | /// single capacitance value for all channels | |
107 | /// GAINCONSTANTCAPA : as GAIN, but with a channel-dependent capacitance value | |
108 | ||
109 | return fCalibrationMode.Data(); | |
110 | } | |
111 | ||
3304fa09 | 112 | //_____________________________________________________________________________ |
113 | AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam() | |
114 | { | |
115 | /// Return default reconstruction parameters for low flux environment | |
116 | ||
117 | AliMUONRecoParam *param = new AliMUONRecoParam(); | |
118 | param->SetLowFluxParam(); | |
119 | ||
120 | return param; | |
121 | } | |
122 | ||
123 | //_____________________________________________________________________________ | |
124 | AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam() | |
125 | { | |
126 | /// Return default reconstruction parameters for high flux environment | |
127 | ||
128 | AliMUONRecoParam *param = new AliMUONRecoParam(); | |
129 | param->SetHighFluxParam(); | |
130 | ||
131 | return param; | |
132 | } | |
133 | ||
0e894e58 | 134 | //_____________________________________________________________________________ |
135 | AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam() | |
136 | { | |
137 | /// Return default reconstruction parameters for high flux environment | |
138 | ||
139 | AliMUONRecoParam *param = new AliMUONRecoParam(); | |
140 | param->SetCosmicParam(); | |
141 | ||
142 | return param; | |
143 | } | |
144 | ||
3304fa09 | 145 | //_____________________________________________________________________________ |
146 | void AliMUONRecoParam::SetLowFluxParam() | |
147 | { | |
148 | /// Set reconstruction parameters for low flux environment | |
149 | ||
9bf6860b | 150 | fMinBendingMomentum = 1.; |
3304fa09 | 151 | fMaxBendingMomentum = 3000.; |
9bf6860b | 152 | fMaxNonBendingSlope = 0.3; |
9f093251 | 153 | fMaxBendingSlope = 0.4; |
3304fa09 | 154 | fNonBendingVertexDispersion = 10.; |
155 | fBendingVertexDispersion = 10.; | |
9bf6860b | 156 | fMaxNonBendingDistanceToTrack = 1.; |
157 | fMaxBendingDistanceToTrack = 1.; | |
3304fa09 | 158 | fSigmaCutForTracking = 6.; |
159 | fSigmaCutForImprovement = 5.; | |
fda59e58 | 160 | fSigmaCutForTrigger = 8.; |
b5270f21 | 161 | fStripCutForTrigger = 1.; |
162 | fMaxStripAreaForTrigger = 3.; | |
3304fa09 | 163 | fMaxNormChi2MatchTrigger = 16.; |
6cac085d | 164 | fCombinedClusterTrackReco = kFALSE; |
3304fa09 | 165 | fTrackAllTracks = kTRUE; |
166 | fRecoverTracks = kTRUE; | |
167 | fMakeTrackCandidatesFast = kFALSE; | |
9bf6860b | 168 | fMakeMoreTrackCandidates = kFALSE; |
3304fa09 | 169 | fComplementTracks = kTRUE; |
170 | fImproveTracks = kTRUE; | |
171 | fUseSmoother = kTRUE; | |
9bf6860b | 172 | for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE; |
173 | for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE; | |
004a9ccd | 174 | fBypassSt45 = 0; |
3304fa09 | 175 | |
176 | } | |
177 | ||
178 | //_____________________________________________________________________________ | |
179 | void AliMUONRecoParam::SetHighFluxParam() | |
180 | { | |
181 | /// Set reconstruction parameters for high flux environment | |
182 | ||
9bf6860b | 183 | fMinBendingMomentum = 1.; |
3304fa09 | 184 | fMaxBendingMomentum = 3000.; |
9bf6860b | 185 | fMaxNonBendingSlope = 0.3; |
9f093251 | 186 | fMaxBendingSlope = 0.4; |
3304fa09 | 187 | fNonBendingVertexDispersion = 10.; |
188 | fBendingVertexDispersion = 10.; | |
9bf6860b | 189 | fMaxNonBendingDistanceToTrack = 1.; |
190 | fMaxBendingDistanceToTrack = 1.; | |
3304fa09 | 191 | fSigmaCutForTracking = 6.; |
192 | fSigmaCutForImprovement = 5.; | |
fda59e58 | 193 | fSigmaCutForTrigger = 8.; |
b5270f21 | 194 | fStripCutForTrigger = 1.; |
195 | fMaxStripAreaForTrigger = 3.; | |
3304fa09 | 196 | fMaxNormChi2MatchTrigger = 16.; |
6cac085d | 197 | fCombinedClusterTrackReco = kFALSE; |
3304fa09 | 198 | fTrackAllTracks = kTRUE; |
199 | fRecoverTracks = kTRUE; | |
200 | fMakeTrackCandidatesFast = kFALSE; | |
9bf6860b | 201 | fMakeMoreTrackCandidates = kFALSE; |
3304fa09 | 202 | fComplementTracks = kTRUE; |
203 | fImproveTracks = kTRUE; | |
204 | fUseSmoother = kTRUE; | |
9bf6860b | 205 | for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE; |
206 | for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE; | |
004a9ccd | 207 | fBypassSt45 = 0; |
3304fa09 | 208 | |
209 | } | |
210 | ||
9bdbee64 | 211 | //_____________________________________________________________________________ |
212 | UInt_t | |
213 | AliMUONRecoParam::RequestedStationMask() const | |
214 | { | |
215 | /// Get the mask of the requested station, i.e. an integer where | |
216 | /// bit n is set to one if the station n was requested | |
217 | ||
218 | UInt_t m(0); | |
219 | ||
220 | for ( Int_t i = 0; i < 5; ++i ) | |
221 | { | |
222 | if ( RequestStation(i) ) m |= ( 1 << i ); | |
223 | } | |
224 | return m; | |
225 | } | |
226 | ||
0e894e58 | 227 | //_____________________________________________________________________________ |
228 | void AliMUONRecoParam::SetCosmicParam() | |
229 | { | |
230 | /// Set reconstruction parameters for high flux environment | |
231 | ||
0e894e58 | 232 | fMinBendingMomentum = 1.; |
233 | fMaxBendingMomentum = 10000000.; | |
234 | fMaxNonBendingSlope = 0.3; | |
9f093251 | 235 | fMaxBendingSlope = 0.4; |
0e894e58 | 236 | fNonBendingVertexDispersion = 10.; |
237 | fBendingVertexDispersion = 10.; | |
238 | fMaxNonBendingDistanceToTrack = 10.; | |
239 | fMaxBendingDistanceToTrack = 10.; | |
240 | fSigmaCutForTracking = 20.; | |
241 | fSigmaCutForImprovement = 20.; | |
242 | fSigmaCutForTrigger = 8.; | |
243 | fMaxNormChi2MatchTrigger = 16.; | |
244 | fPercentOfFullClusterInESD = 100.; | |
245 | fCombinedClusterTrackReco = kFALSE; | |
246 | fTrackAllTracks = kTRUE; | |
247 | fRecoverTracks = kTRUE; | |
248 | fMakeTrackCandidatesFast = kFALSE; | |
249 | fMakeMoreTrackCandidates = kFALSE; | |
250 | fComplementTracks = kTRUE; | |
251 | fImproveTracks = kTRUE; | |
252 | fUseSmoother = kTRUE; | |
253 | fSaveFullClusterInESD = kTRUE; | |
254 | for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE; | |
255 | for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE; | |
004a9ccd | 256 | fBypassSt45 = 0; |
0e894e58 | 257 | |
258 | } | |
259 | ||
3304fa09 | 260 | //_____________________________________________________________________________ |
261 | void AliMUONRecoParam::Print(Option_t *option) const | |
262 | { | |
263 | /// print reconstruction parameters | |
264 | /// if option = FULL then print also unused parameters | |
265 | ||
266 | cout<<endl<<"\t------Reconstruction parameters------"<<endl; | |
267 | ||
de98fdc9 | 268 | cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl; |
3304fa09 | 269 | cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl; |
3304fa09 | 270 | cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl; |
9bf6860b | 271 | |
004a9ccd | 272 | TString bypass; |
273 | ||
274 | if ( BypassSt45() ) | |
275 | { | |
276 | bypass = "stations 4 and 5"; | |
277 | } | |
278 | else if ( BypassSt4() ) | |
279 | { | |
280 | bypass = "station 4"; | |
281 | } | |
282 | else if ( BypassSt5() ) | |
283 | { | |
284 | bypass = "station 5"; | |
285 | } | |
286 | ||
287 | if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl; | |
3304fa09 | 288 | |
15d30ed4 | 289 | if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl; |
290 | else cout<<"Combined cluster/track reconstruction: OFF"<<endl; | |
38bcf0ef | 291 | |
0a18ba02 | 292 | if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl; |
293 | else cout<<"Save partial cluster info in ESD"<<endl; | |
9bdbee64 | 294 | |
3304fa09 | 295 | cout<<Form("Bending momentum range = [%5.2f,%5.2f]",fMinBendingMomentum,fMaxBendingMomentum)<<endl; |
296 | ||
9bf6860b | 297 | cout<<Form("Maximum non bending slope = %5.2f",fMaxNonBendingSlope)<<endl; |
298 | ||
9f093251 | 299 | cout<<Form("Maximum bending slope (used only if B=0) = %5.2f",fMaxBendingSlope)<<endl; |
300 | ||
3304fa09 | 301 | if (strstr(fTrackingMode,"ORIGINAL")) |
302 | cout<<Form("Vertex dispertion = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl; | |
303 | else if (strstr(option,"FULL")) | |
304 | cout<<Form("Vertex dispertion (used for original tracking only) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl; | |
305 | ||
306 | cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl; | |
307 | ||
308 | cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl; | |
fda59e58 | 309 | |
310 | cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl; | |
b5270f21 | 311 | |
312 | cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl; | |
313 | ||
314 | cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl; | |
315 | ||
3304fa09 | 316 | if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl; |
317 | else cout<<"Track only the best candidates"<<endl; | |
318 | ||
319 | if (strstr(option,"FULL")) { | |
320 | cout<<"Make track candidates assuming linear propagation between stations 4 and 5: "; | |
321 | if (fMakeTrackCandidatesFast) cout<<"ON"<<endl; | |
322 | else cout<<"OFF"<<endl; | |
323 | } else if (fMakeTrackCandidatesFast) | |
324 | cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl; | |
325 | ||
9bf6860b | 326 | if (strstr(option,"FULL")) { |
327 | cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: "; | |
328 | if (fMakeMoreTrackCandidates) cout<<"ON"<<endl; | |
329 | else cout<<"OFF"<<endl; | |
330 | } else if (fMakeMoreTrackCandidates) | |
331 | cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl; | |
332 | ||
3304fa09 | 333 | if (strstr(option,"FULL")) { |
334 | cout<<"Try to recover tracks getting lost during tracking: "; | |
335 | if (fRecoverTracks) cout<<"ON"<<endl; | |
336 | else cout<<"OFF"<<endl; | |
337 | } else if (fRecoverTracks) | |
338 | cout<<"Try to recover tracks getting lost during tracking"<<endl; | |
339 | ||
340 | if (strstr(option,"FULL")) { | |
341 | cout<<"Try to complete the reconstructed tracks by adding missing clusters: "; | |
342 | if (fComplementTracks) cout<<"ON"<<endl; | |
343 | else cout<<"OFF"<<endl; | |
344 | } else if (fComplementTracks) | |
345 | cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl; | |
346 | ||
347 | if (strstr(option,"FULL")) { | |
348 | cout<<"Try to improve the reconstructed tracks by removing bad clusters: "; | |
349 | if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl; | |
350 | else cout<<"OFF"<<endl; | |
351 | } else if (fImproveTracks) | |
352 | cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl; | |
353 | ||
354 | if (strstr(option,"FULL")) { | |
355 | cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): "; | |
356 | if (fUseSmoother) cout<<"ON"<<endl; | |
357 | else cout<<"OFF"<<endl; | |
358 | } else if (fUseSmoother) | |
359 | cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl; | |
360 | ||
361 | cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl; | |
362 | ||
9bf6860b | 363 | Bool_t discardedCh = kFALSE; |
364 | Int_t ch = 0; | |
365 | do { | |
366 | if (!UseChamber(ch)) { | |
367 | if (!discardedCh) { | |
368 | cout<<"Discarded chambers(1..): "<<ch+1; | |
369 | discardedCh = kTRUE; | |
370 | } | |
371 | else cout<<" "<<ch+1; | |
372 | } | |
373 | } while (++ch < 10); | |
374 | if (discardedCh) cout<<endl; | |
375 | ||
376 | Bool_t discardedSt = kFALSE; | |
377 | Int_t st = 0; | |
378 | do { | |
379 | if (!RequestStation(st)) { | |
380 | if (!discardedSt) { | |
381 | cout<<"Not requested stations(1..): "<<st+1; | |
382 | discardedSt = kTRUE; | |
383 | } | |
384 | else cout<<" "<<st+1; | |
385 | } | |
386 | } while (++st < 5); | |
387 | if (discardedSt) cout<<endl; | |
388 | ||
004a9ccd | 389 | cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl; |
390 | cout << "Which means we reject pads having the condition = " << | |
391 | AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl; | |
392 | ||
393 | cout << "The pad limits we are using are :" << endl; | |
394 | ||
395 | cout << Form("%5.0f <= HVSt12 <= %5.0f Volts",HVSt12LowLimit(),HVSt12HighLimit()) << endl; | |
396 | cout << Form("%5.0f <= HVSt345 <= %5.0f Volts",HVSt345LowLimit(),HVSt345HighLimit()) << endl; | |
397 | cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl; | |
398 | cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl; | |
399 | cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl; | |
400 | cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl; | |
401 | cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl; | |
170f4046 | 402 | |
403 | cout << Form("And we cut on charge >= %7.2f x ( pedestal sigma ) ",ChargeSigmaCut()) << endl; | |
404 | ||
3304fa09 | 405 | cout<<"\t-------------------------------------"<<endl<<endl; |
406 | ||
407 | } | |
408 | ||
004a9ccd | 409 | //_____________________________________________________________________________ |
410 | void | |
411 | AliMUONRecoParam::SetDefaultLimits() | |
412 | { | |
413 | /// Set the default limits and pad goodness policy | |
414 | ||
415 | fHVSt12Limits[0]=1500; | |
416 | fHVSt12Limits[1]=2000; | |
417 | ||
418 | fHVSt345Limits[0]=1500; | |
419 | fHVSt345Limits[1]=2000; | |
420 | ||
421 | fPedMeanLimits[0] = 50; | |
422 | fPedMeanLimits[1] = 1024; | |
423 | ||
424 | fPedSigmaLimits[0] = 0.1; | |
425 | fPedSigmaLimits[1] = 100; | |
426 | ||
427 | fGainA1Limits[0] = 0.1; | |
428 | fGainA1Limits[1] = 10; | |
429 | ||
430 | fGainA2Limits[0] = -1E30; | |
431 | fGainA2Limits[1] = 1E30; | |
432 | ||
433 | fGainThresLimits[0] = 0; | |
434 | fGainThresLimits[1] = 4095; | |
435 | ||
436 | fPadGoodnessMask = 0x8080; | |
170f4046 | 437 | |
438 | fChargeSigmaCut = 4.0; | |
004a9ccd | 439 | } |
440 |