1 /**************************************************************************
2 * Copyright(c) 1998-2007, 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 //-----------------------------------------------------------------------------
19 /// \class AliMUONRecoParam
21 /// Class with MUON reconstruction parameters
23 /// \author Philippe Pillot
24 //-----------------------------------------------------------------------------
28 #include "AliMUONRecoParam.h"
29 #include "AliMUONPadStatusMaker.h"
31 #include "AliRecoParam.h"
34 #include "AliCDBManager.h"
35 #include "AliCDBEntry.h"
37 #include <Riostream.h>
41 ClassImp(AliMUONRecoParam)
44 //_____________________________________________________________________________
45 AliMUONRecoParam::AliMUONRecoParam()
46 : AliDetectorRecoParam(),
47 fClusteringMode("MLEM"),
48 fTrackingMode("KALMAN"),
49 fMinBendingMomentum(0.),
50 fMaxBendingMomentum(0.),
51 fMaxNonBendingSlope(0.),
53 fNonBendingVertexDispersion(0.),
54 fBendingVertexDispersion(0.),
55 fMaxNonBendingDistanceToTrack(0.),
56 fMaxBendingDistanceToTrack(0.),
57 fSigmaCutForTracking(0.),
58 fSigmaCutForImprovement(0.),
59 fSigmaCutForTrigger(0.),
60 fStripCutForTrigger(0.),
61 fMaxStripAreaForTrigger(0.),
62 fMaxNormChi2MatchTrigger(0.),
63 fPercentOfFullClusterInESD(10.),
64 fCombinedClusterTrackReco(kFALSE),
65 fTrackAllTracks(kFALSE),
66 fRecoverTracks(kFALSE),
67 fMakeTrackCandidatesFast(kFALSE),
68 fMakeMoreTrackCandidates(kFALSE),
69 fComplementTracks(kFALSE),
70 fImproveTracks(kFALSE),
72 fSaveFullClusterInESD(kTRUE),
73 fCalibrationMode("NOGAIN"),
77 fRemoveConnectedTracksInSt12(kFALSE),
79 fMaxTrackCandidates(0),
80 fSelectTrackOnSlope(kFALSE),
81 fMissingPadFractionLimit(-1),
82 fFractionOfBuspatchOutsideOccupancyLimit(0),
83 fAverageNoisePadCharge(0.22875),
84 fClusterChargeCut(2.0),
85 fEventSizeSoftLimit(35.0),
86 fEventSizeHardLimit(45.0),
92 SetNameTitle("Dummy","Dummy");
93 for (Int_t iCh = 0; iCh < 10; iCh++) {
94 fUseChamber[iCh] = kTRUE;
95 fDefaultNonBendingReso[iCh] = 0.;
96 fDefaultBendingReso[iCh] = 0.;
98 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
102 //_____________________________________________________________________________
103 AliMUONRecoParam::~AliMUONRecoParam()
108 //_____________________________________________________________________________
110 AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5)
112 /// Set the bypass status
114 if ( st4 && st5 ) fBypassSt45 = 45;
115 else if ( st4 ) fBypassSt45 = 4;
116 else if ( st5 ) fBypassSt45 = 5;
117 else fBypassSt45 = 0;
120 //_____________________________________________________________________________
122 AliMUONRecoParam::GetCalibrationMode() const
124 /// Return the calibration mode. Can be :
125 /// NOGAIN : only do pedestal subtraction
126 /// GAIN : do pedestal subtraction, and apply gain correction, but with a
127 /// single capacitance value for all channels
128 /// INJECTIONGAIN : as GAIN, but with gain values taken as EMELEC factory values
129 /// GAINCONSTANTCAPA : as GAIN, but with a channel-dependent capacitance value
131 return fCalibrationMode.Data();
134 //_____________________________________________________________________________
135 AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam()
137 /// Return default reconstruction parameters for low flux environment
139 AliMUONRecoParam *param = new AliMUONRecoParam();
140 param->SetLowFluxParam();
145 //_____________________________________________________________________________
146 AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam()
148 /// Return default reconstruction parameters for high flux environment
150 AliMUONRecoParam *param = new AliMUONRecoParam();
151 param->SetHighFluxParam();
156 //_____________________________________________________________________________
157 AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam()
159 /// Return default reconstruction parameters for high flux environment
161 AliMUONRecoParam *param = new AliMUONRecoParam();
162 param->SetCosmicParam();
167 //_____________________________________________________________________________
168 AliMUONRecoParam *AliMUONRecoParam::GetCalibrationParam()
170 /// Return default (dummy) reconstruction parameters for calibration environment
172 AliMUONRecoParam *param = new AliMUONRecoParam();
173 param->SetCalibrationParam();
179 //_____________________________________________________________________________
180 void AliMUONRecoParam::SetLowFluxParam()
182 /// Set reconstruction parameters for low flux environment
184 SetNameTitle("Low Flux","Low Flux");
185 SetEventSpecie(AliRecoParam::kLowMult);
186 fMinBendingMomentum = 0.8;
187 fMaxBendingMomentum = 1.e10;
188 fMaxNonBendingSlope = 0.3;
189 fMaxBendingSlope = 0.4;
190 fSelectTrackOnSlope = kFALSE;
191 fNonBendingVertexDispersion = 70.;
192 fBendingVertexDispersion = 70.;
193 fMaxNonBendingDistanceToTrack = 1.;
194 fMaxBendingDistanceToTrack = 1.;
195 fSigmaCutForTracking = 6.;
196 fSigmaCutForImprovement = 5.;
197 fSigmaCutForTrigger = 4.;
198 fStripCutForTrigger = 1.;
199 fMaxStripAreaForTrigger = 3.;
200 fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
201 fCombinedClusterTrackReco = kFALSE;
202 fTrackAllTracks = kTRUE;
203 fRecoverTracks = kTRUE;
204 fMakeTrackCandidatesFast = kFALSE;
205 fMakeMoreTrackCandidates = kFALSE;
206 fComplementTracks = kTRUE;
207 fImproveTracks = kTRUE;
208 fRemoveConnectedTracksInSt12 = kFALSE;
209 fUseSmoother = kTRUE;
210 for (Int_t iCh = 0; iCh < 10; iCh++) {
211 fUseChamber[iCh] = kTRUE;
212 fDefaultNonBendingReso[iCh] = 0.144;
213 fDefaultBendingReso[iCh] = 0.01;
215 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
217 fMaxTriggerTracks = 100;
218 fMaxTrackCandidates = 10000;
221 //_____________________________________________________________________________
222 void AliMUONRecoParam::SetHighFluxParam()
224 /// Set reconstruction parameters for high flux environment
226 SetNameTitle("High Flux","High Flux");
227 SetEventSpecie(AliRecoParam::kHighMult);
228 fMinBendingMomentum = 0.8;
229 fMaxBendingMomentum = 1.e10;
230 fMaxNonBendingSlope = 0.3;
231 fMaxBendingSlope = 0.4;
232 fSelectTrackOnSlope = kFALSE;
233 fNonBendingVertexDispersion = 70.;
234 fBendingVertexDispersion = 70.;
235 fMaxNonBendingDistanceToTrack = 1.;
236 fMaxBendingDistanceToTrack = 1.;
237 fSigmaCutForTracking = 6.;
238 fSigmaCutForImprovement = 5.;
239 fSigmaCutForTrigger = 4.;
240 fStripCutForTrigger = 1.;
241 fMaxStripAreaForTrigger = 3.;
242 fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
243 fCombinedClusterTrackReco = kFALSE;
244 fTrackAllTracks = kTRUE;
245 fRecoverTracks = kTRUE;
246 fMakeTrackCandidatesFast = kFALSE;
247 fMakeMoreTrackCandidates = kFALSE;
248 fComplementTracks = kTRUE;
249 fImproveTracks = kTRUE;
250 fRemoveConnectedTracksInSt12 = kFALSE;
251 fUseSmoother = kTRUE;
252 for (Int_t iCh = 0; iCh < 10; iCh++) {
253 fUseChamber[iCh] = kTRUE;
254 fDefaultNonBendingReso[iCh] = 0.144;
255 fDefaultBendingReso[iCh] = 0.01;
257 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
259 fMaxTriggerTracks = 100;
260 fMaxTrackCandidates = 10000;
263 //_____________________________________________________________________________
264 void AliMUONRecoParam::SetCosmicParam()
266 /// Set reconstruction parameters for high flux environment
268 SetNameTitle("Cosmic","Cosmic");
269 SetEventSpecie(AliRecoParam::kCosmic);
270 fMinBendingMomentum = 0.8;
271 fMaxBendingMomentum = 1.e10;
272 fMaxNonBendingSlope = 0.3;
273 fMaxBendingSlope = 0.4;
274 fSelectTrackOnSlope = kTRUE;
275 fNonBendingVertexDispersion = 170.;
276 fBendingVertexDispersion = 170.;
277 fMaxNonBendingDistanceToTrack = 1.;
278 fMaxBendingDistanceToTrack = 1.;
279 fSigmaCutForTracking = 7.;
280 fSigmaCutForImprovement = 6.;
281 fSigmaCutForTrigger = 4.;
282 fStripCutForTrigger = 1.5;
283 fMaxStripAreaForTrigger = 3.;
284 fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
285 fPercentOfFullClusterInESD = 100.;
286 fCombinedClusterTrackReco = kFALSE;
287 fTrackAllTracks = kTRUE;
288 fRecoverTracks = kTRUE;
289 fMakeTrackCandidatesFast = kFALSE;
290 fMakeMoreTrackCandidates = kFALSE;
291 fComplementTracks = kTRUE;
292 fImproveTracks = kTRUE;
293 fRemoveConnectedTracksInSt12 = kTRUE;
294 fUseSmoother = kTRUE;
295 fSaveFullClusterInESD = kTRUE;
296 for (Int_t iCh = 0; iCh < 10; iCh++) {
297 fUseChamber[iCh] = kTRUE;
298 fDefaultNonBendingReso[iCh] = 0.4;
299 fDefaultBendingReso[iCh] = 0.4;
301 fRequestStation[0] = kTRUE;
302 fRequestStation[1] = kTRUE;
303 fRequestStation[2] = kTRUE;
304 fRequestStation[3] = kTRUE;
305 fRequestStation[4] = kTRUE;
307 fPadGoodnessMask = 0x400BE80; // Ped Mean is Zero | Ped Mean Too Low | Ped Mean Too High | Ped Sigma Too Low | Ped Sigma Too High | Ped is missing | HV is missing | manu occupancy too high
308 fMaxTriggerTracks = 100;
309 fMaxTrackCandidates = 10000;
311 SetPedMeanLimits(20, 700);
312 SetManuOccupancyLimits(-1.,0.01); // reject manu above occ=1%
314 SetBuspatchOccupancyLimits(-1,0.05);
315 SetFractionOfBuspatchOutsideOccupancyLimit(0.10); // 10 %
319 //_____________________________________________________________________________
320 void AliMUONRecoParam::SetCalibrationParam()
322 /// Set (dummy) reconstruction parameters for calibration environment
324 SetNameTitle("Calibration","Calibration");
325 SetEventSpecie(AliRecoParam::kCalib);
327 fPedMeanLimits[0] = 5000;
328 fPedMeanLimits[1] = 0;
330 fPadGoodnessMask = 0x8C00; // Pedestal is missing | is too low | too high
334 //_____________________________________________________________________________
336 AliMUONRecoParam::RequestedStationMask() const
338 /// Get the mask of the requested station, i.e. an integer where
339 /// bit n is set to one if the station n was requested
343 for ( Int_t i = 0; i < 5; ++i )
345 if ( RequestStation(i) ) m |= ( 1 << i );
350 //_____________________________________________________________________________
351 void AliMUONRecoParam::Print(Option_t *option) const
353 /// print reconstruction parameters
354 /// if option = FULL then print also unused parameters
356 cout<<endl<<"\t------MUON Reconstruction parameters ("<<GetName()<<")------"<<endl;
358 if (IsDefault()) cout<<"\t\t*** Parameters used by default ***"<<endl;
360 cout << "Event Specie=" << GetEventSpecie() << endl;
362 cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
363 cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
364 cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
370 bypass = "stations 4 and 5";
372 else if ( BypassSt4() )
374 bypass = "station 4";
376 else if ( BypassSt5() )
378 bypass = "station 5";
381 if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
383 if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
384 else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
386 if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
387 else cout<<"Save partial cluster info in ESD"<<endl;
389 cout<<"Selection of track candidates:"<<endl;
390 if (fSelectTrackOnSlope) cout<<Form("\t- Non-bending slope < %5.2f",fMaxNonBendingSlope)<<endl;
391 else cout<<"\t- Impact parameter < 3 * vertex dispersion in the non-bending direction"<<endl;
392 cout<<Form("\t- if B!=0: Bending momentum > %5.2f",fMinBendingMomentum)<<endl;
393 if (fSelectTrackOnSlope) cout<<Form("\t if B==0: Bending slope < %5.2f",fMaxBendingSlope)<<endl;
394 else cout<<"\t if B==0: Impact parameter < 3 * vertex dispersion in the bending direction"<<endl;
396 cout<<Form("Vertex dispersion (used to estimate initial bending momentum resolution) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
398 cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
400 cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
402 cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
404 cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl;
406 cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl;
408 if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
409 else cout<<"Track only the best candidates"<<endl;
411 if (strstr(option,"FULL")) {
412 cout<<"Make track candidates assuming linear propagation between stations 4 and 5: ";
413 if (fMakeTrackCandidatesFast) cout<<"ON"<<endl;
414 else cout<<"OFF"<<endl;
415 } else if (fMakeTrackCandidatesFast)
416 cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl;
418 if (strstr(option,"FULL")) {
419 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: ";
420 if (fMakeMoreTrackCandidates) cout<<"ON"<<endl;
421 else cout<<"OFF"<<endl;
422 } else if (fMakeMoreTrackCandidates)
423 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl;
425 if (strstr(option,"FULL")) {
426 cout<<"Try to recover tracks getting lost during tracking: ";
427 if (fRecoverTracks) cout<<"ON"<<endl;
428 else cout<<"OFF"<<endl;
429 } else if (fRecoverTracks)
430 cout<<"Try to recover tracks getting lost during tracking"<<endl;
432 if (strstr(option,"FULL")) {
433 cout<<"Try to complete the reconstructed tracks by adding missing clusters: ";
434 if (fComplementTracks) cout<<"ON"<<endl;
435 else cout<<"OFF"<<endl;
436 } else if (fComplementTracks)
437 cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl;
439 if (strstr(option,"FULL")) {
440 cout<<"Try to improve the reconstructed tracks by removing bad clusters: ";
441 if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
442 else cout<<"OFF"<<endl;
443 } else if (fImproveTracks)
444 cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
446 if (fRemoveConnectedTracksInSt12) cout<<"Remove tracks sharing one cluster or more in any station"<<endl;
447 else cout<<"Remove tracks sharing one cluster or more in stations 3, 4 and 5"<<endl;
449 if (strstr(option,"FULL")) {
450 cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
451 if (fUseSmoother) cout<<"ON"<<endl;
452 else cout<<"OFF"<<endl;
453 } else if (fUseSmoother)
454 cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl;
456 cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
458 Bool_t discardedCh = kFALSE;
461 if (!UseChamber(ch)) {
463 cout<<"Discarded chambers(1..): "<<ch+1;
466 else cout<<" "<<ch+1;
469 if (discardedCh) cout<<endl;
471 Bool_t discardedSt = kFALSE;
474 if (!RequestStation(st)) {
476 cout<<"Not requested stations(1..): "<<st+1;
479 else cout<<" "<<st+1;
482 if (discardedSt) cout<<endl;
484 cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl;
485 cout << "Which means we reject pads having the condition = " <<
486 AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl;
488 cout << "The pad limits we are using are :" << endl;
490 for ( int ichamber = 0; ichamber < 10; ++ichamber )
492 cout << Form("HV Ch %d must be >= %5.2f",ichamber,HVLimit(ichamber)) << endl;
495 cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl;
496 cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl;
497 cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl;
498 cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl;
499 cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl;
501 cout << Form("And we cut on charge >= %7.2f x ( pedestal sigma ) ",ChargeSigmaCut()) << endl;
503 cout << "Occupancy limits are :" << endl;
505 cout << Form("%e <= Manu occupancy < %7.3f",ManuOccupancyLowLimit(),ManuOccupancyHighLimit()) << endl;
506 cout << Form("%e <= Buspatch occupancy < %7.3f",BuspatchOccupancyLowLimit(),BuspatchOccupancyHighLimit()) << endl;
507 cout << Form("%e <= DE occupancy < %7.3f",DEOccupancyLowLimit(),DEOccupancyHighLimit()) << endl;
509 cout << "'QAChecker' limits" << endl;
510 cout << Form("FractionOfBuspatchOutsideOccupancyLimit = %5.2f %%",FractionOfBuspatchOutsideOccupancyLimit()*100.0) << endl;
511 cout << Form("Event size limit = %5.2f KB/event (soft) and %5.2f KB/event (hard)",fEventSizeSoftLimit,fEventSizeHardLimit) << endl;
512 if ( fTokenLostLimit > 0 )
514 cout << Form("We tolerate up to %5.2f %% token lost errors per event",fTokenLostLimit) << endl;
518 cout << "We dot not tolerate any token lost error !" << endl;
521 cout << "chamber non bending resolution = |";
522 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultNonBendingReso[iCh]);
524 cout << "chamber bending resolution = |";
525 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultBendingReso[iCh]);
527 cout<<Form("maximum number of trigger tracks above which the tracking is cancelled = %d",fMaxTriggerTracks)<<endl;
528 cout<<Form("maximum number of track candidates above which the tracking is abandonned = %d",fMaxTrackCandidates)<<endl;
530 cout << Form("The average noise pad charge is assumed to be %7.2f fC",AverageNoisePadCharge()) << endl;
531 cout << Form("and clusters below %5.2f times this noise charge (i.e. %7.2f fC) are discarded",
532 ClusterChargeCut(),ClusterChargeCut()*AverageNoisePadCharge()) << endl;
533 cout << Form("Note that LowestPadCharge is then %7.2f fC",LowestPadCharge()) << endl;
537 cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
538 cout << "!!! WILL TRY TO RECOVER CORRUPTED RAW DATA !!!" << endl;
539 cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
541 cout<<"\t-----------------------------------------------------"<<endl<<endl;
545 //_____________________________________________________________________________
547 AliMUONRecoParam::SetHVLimit(Int_t chamberId, Double_t value)
549 /// Set the HV limit for a given chamber (or all chambers
552 if ( chamberId == -1 )
554 for ( Int_t i = 0; i < 10; ++i )
559 else if ( chamberId >= 0 && chamberId < 10 )
561 fHVLimit[chamberId]=value;
565 AliError(Form("chamberId = %d is not a valid chamberId",chamberId));
569 //_____________________________________________________________________________
570 Double_t AliMUONRecoParam::HVLimit(Int_t chamberId) const
572 /// Get the HV limit for a given chamber
573 if ( chamberId >= 0 && chamberId < 10 )
575 return fHVLimit[chamberId];
577 AliError(Form("chamberId = %d is not a valid chamberId",chamberId));
582 //_____________________________________________________________________________
584 AliMUONRecoParam::SetDefaultLimits()
586 /// Set the default limits and pad goodness policy
588 fHVSt12Limits[0]=1500; // kept for backward compatibility only
589 fHVSt12Limits[1]=2000; // kept for backward compatibility only
590 fHVSt345Limits[0]=1500; // kept for backward compatibility only
591 fHVSt345Limits[1]=2000; // kept for backward compatibility only
593 SetHVLimit(-1,1590); // this one is the real HV limit used now
595 fPedMeanLimits[0] = 20;
596 fPedMeanLimits[1] = 1024;
598 fPedSigmaLimits[0] = 0.6;
599 fPedSigmaLimits[1] = 100;
601 fGainA1Limits[0] = 0.1;
602 fGainA1Limits[1] = 10;
604 fGainA2Limits[0] = -1E30;
605 fGainA2Limits[1] = 1E30;
607 fGainThresLimits[0] = 0;
608 fGainThresLimits[1] = 4095;
610 fPadGoodnessMask = 0x8080; // Ped is missing | HV is missing
612 fManuOccupancyLimits[0] = -1.0;
613 fManuOccupancyLimits[1] = 1.0;
615 fBuspatchOccupancyLimits[0] = 1E-6;
616 fBuspatchOccupancyLimits[1] = 1.0;
618 fDEOccupancyLimits[0] = -1.0;
619 fDEOccupancyLimits[1] = 1.0;
621 fMissingPadFractionLimit = -1; // DEPRECATED
622 fFractionOfBuspatchOutsideOccupancyLimit = 0.05; // 5 %
624 ChargeSigmaCut(4.0); // pad with charge < 4.0 x sigma will be removed (where sigma is the actual noise of that very pad, i.e. not the average)
626 AverageNoisePadCharge(0.22875); // 0.22875 coulombs ~ 1.5 ADC channels
628 ClusterChargeCut(2.0); // will cut cluster below 2.0 x LowestPadCharge()
630 SetEventSizeLimits(35.0,45.0);
632 SetTokenLostLimit(0.0);
634 fTryRecover = kFALSE;
638 //-----------------------------------------------------------------------
640 AliMUONRecoParam::Create(const char* settings)
642 /// Create pre-defined recoparam array, according to settings.
643 /// settings is case-insensitive.
645 /// Currently defined are :
651 /// LowFlux (default)
654 /// LowFlux (modified to reconstruct real p-p data)
657 /// LowFlux (modified to reconstruct realistic p-p simulation)
660 /// HighFlux (modified to reconstruct real Pb-Pb data)
663 AliMUONRecoParam* param(0x0);
665 AliRecoParam::EventSpecie_t defaultParam = AliRecoParam::kLowMult;
667 TString stype(settings);
670 if ( stype == "cosmics" )
672 // set parameters for cosmic runs
673 param = AliMUONRecoParam::GetCosmicParam();
674 defaultParam = AliRecoParam::kCosmic;
676 else if ( stype == "ppideal" )
678 // set default lowFlux parameters
679 param = AliMUONRecoParam::GetLowFluxParam();
681 else if ( stype == "ppreal" || stype == "pprealsim" || stype == "pprealnofield" )
683 // common parameters for p-p data and realistic p-p simu
684 param = AliMUONRecoParam::GetLowFluxParam();
685 param->SaveFullClusterInESD(kTRUE, 100.);
686 for (Int_t iCh=0; iCh<10; iCh++)
688 param->SetDefaultNonBendingReso(iCh,0.4);
689 param->SetDefaultBendingReso(iCh,0.4);
691 param->SetSigmaCutForTracking(7.);
692 param->SetStripCutForTrigger(1.5);
693 param->SetSigmaCutForTrigger(6.);
694 param->ImproveTracks(kTRUE, 6.);
695 param->SetPedMeanLimits(20, 700);
696 param->SetManuOccupancyLimits(-1.,0.015);
697 param->SetBuspatchOccupancyLimits(-1.,0.05);
698 param->SetFractionOfBuspatchOutsideOccupancyLimit(0.05); // 5 %
699 param->SetEventSizeLimits(45., 65.);
700 param->SetHVLimit(0,1550);
701 param->SetHVLimit(1,1550);
702 param->SetHVLimit(2,1550);
703 param->SetHVLimit(3,1550);
705 // specific parameters for p-p data or realistic p-p simu
706 if ( stype == "ppreal" || stype == "pprealnofield" )
708 param->SetPadGoodnessMask(0x400BE9B);
712 param->SetPadGoodnessMask(0x8080);
715 if ( stype == "pprealnofield" )
717 param->TryRecover(kTRUE);
720 else if ( stype == "pbpbreal" || stype == "pbpbrealsim" )
722 // common parameters for Pb-Pb data and realistic Pb-Pb simu
723 param = AliMUONRecoParam::GetHighFluxParam();
724 defaultParam = AliRecoParam::kHighMult;
725 param->SaveFullClusterInESD(kTRUE, 100.);
726 for (Int_t iCh=0; iCh<10; iCh++)
728 param->SetDefaultNonBendingReso(iCh,0.2);
729 param->SetDefaultBendingReso(iCh,0.2);
731 param->SetSigmaCutForTracking(5.);
732 param->SetStripCutForTrigger(1.5);
733 param->SetSigmaCutForTrigger(4.);
734 param->ImproveTracks(kTRUE, 4.);
735 param->SetPedMeanLimits(20, 700);
736 param->SetManuOccupancyLimits(-1.,0.03);
737 param->SetBuspatchOccupancyLimits(-1.,0.1); // 10 % (this cut not used for the reco anyway)
738 param->SetFractionOfBuspatchOutsideOccupancyLimit(0.05); // 5 %
739 param->SetEventSizeLimits(100., 150.);
741 // specific parameters for Pb-Pb data or realistic Pb-Pb simu
742 if ( stype == "pbpbreal" )
744 param->SetPadGoodnessMask(0x400BE9B);
748 param->SetPadGoodnessMask(0x8080);
753 AliErrorClass("Unknown settings !");
757 TObjArray* recoParams = new TObjArray;
759 recoParams->AddLast(param);
761 // set (dummy) parameters for calibration runs
762 param = AliMUONRecoParam::GetCalibrationParam();
763 recoParams->AddLast(param);
765 // set parameters for Pb-Pb runs
766 // param = AliMUONRecoParam::GetHighFluxParam();
767 // recoParams.AddLast(param);
769 // identify default parameters (exit if identification failed)
770 Bool_t defaultIsSet = kFALSE;
771 TIter next(recoParams);
772 while ( (param = static_cast<AliMUONRecoParam*>(next())) )
774 if (param->GetEventSpecie() == defaultParam)
776 param->SetAsDefault();
777 defaultIsSet = kTRUE;
779 param->Print("FULL");
784 AliErrorClass("The default reconstruction parameters are not set! Exiting...");
791 //______________________________________________________________________________
793 AliMUONRecoParam::Show(Int_t runNumber, const char* ocdb)
795 /// Show what we have in the designated OCDB for that run, as far as RecoParams are concerned
797 AliCDBManager::Instance()->SetDefaultStorage(ocdb);
798 AliCDBManager::Instance()->SetRun(runNumber);
800 AliCDBEntry* entry = AliCDBManager::Instance()->Get("MUON/Calib/RecoParam");
804 TObject* o = entry->GetObject();
806 if ( o->IsA() == TObjArray::Class() )
808 TObjArray* array = static_cast<TObjArray*>(o);
809 for ( Int_t i = 0; i <= array->GetLast(); ++i )
811 AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
812 cout << Form("array[%d]=%s %s %s",i,
813 p ? p->ClassName() : "",
814 p ? AliRecoParam::GetEventSpecieName(AliRecoParam::Convert(p->GetEventSpecie())) :"",
815 p ? ( p->IsDefault() ? "default" : "") : "" ) << endl;
817 cout << "=========== dumps below ====== " << endl;
819 for ( Int_t i = 0; i <= array->GetLast(); ++i )
821 AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
822 if ( p ) p->Print("");