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>
39 ClassImp(AliMUONRecoParam)
42 //_____________________________________________________________________________
43 AliMUONRecoParam::AliMUONRecoParam()
44 : AliDetectorRecoParam(),
45 fClusteringMode("MLEM"),
46 fTrackingMode("KALMAN"),
47 fMinBendingMomentum(0.),
48 fMaxBendingMomentum(0.),
49 fMaxNonBendingSlope(0.),
51 fNonBendingVertexDispersion(0.),
52 fBendingVertexDispersion(0.),
53 fMaxNonBendingDistanceToTrack(0.),
54 fMaxBendingDistanceToTrack(0.),
55 fSigmaCutForTracking(0.),
56 fSigmaCutForImprovement(0.),
57 fSigmaCutForTrigger(0.),
58 fStripCutForTrigger(0.),
59 fMaxStripAreaForTrigger(0.),
60 fMaxNormChi2MatchTrigger(0.),
61 fPercentOfFullClusterInESD(10.),
62 fCombinedClusterTrackReco(kFALSE),
63 fTrackAllTracks(kFALSE),
64 fRecoverTracks(kFALSE),
65 fMakeTrackCandidatesFast(kFALSE),
66 fMakeMoreTrackCandidates(kFALSE),
67 fComplementTracks(kFALSE),
68 fImproveTracks(kFALSE),
70 fSaveFullClusterInESD(kTRUE),
71 fCalibrationMode("NOGAIN"),
75 fRemoveConnectedTracksInSt12(kFALSE),
77 fMaxTrackCandidates(0),
78 fSelectTrackOnSlope(kFALSE),
79 fMissingPadFractionLimit(-1),
80 fFractionOfBuspatchOutsideOccupancyLimit(0),
81 fAverageNoisePadCharge(0.22875),
82 fClusterChargeCut(2.0),
83 fEventSizeSoftLimit(35.0),
84 fEventSizeHardLimit(45.0),
90 SetNameTitle("Dummy","Dummy");
91 for (Int_t iCh = 0; iCh < 10; iCh++) {
92 fUseChamber[iCh] = kTRUE;
93 fDefaultNonBendingReso[iCh] = 0.;
94 fDefaultBendingReso[iCh] = 0.;
96 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
100 //_____________________________________________________________________________
101 AliMUONRecoParam::~AliMUONRecoParam()
106 //_____________________________________________________________________________
108 AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5)
110 /// Set the bypass status
112 if ( st4 && st5 ) fBypassSt45 = 45;
113 else if ( st4 ) fBypassSt45 = 4;
114 else if ( st5 ) fBypassSt45 = 5;
115 else fBypassSt45 = 0;
118 //_____________________________________________________________________________
120 AliMUONRecoParam::GetCalibrationMode() const
122 /// Return the calibration mode. Can be :
123 /// NOGAIN : only do pedestal subtraction
124 /// GAIN : do pedestal subtraction, and apply gain correction, but with a
125 /// single capacitance value for all channels
126 /// INJECTIONGAIN : as GAIN, but with gain values taken as EMELEC factory values
127 /// GAINCONSTANTCAPA : as GAIN, but with a channel-dependent capacitance value
129 return fCalibrationMode.Data();
132 //_____________________________________________________________________________
133 AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam()
135 /// Return default reconstruction parameters for low flux environment
137 AliMUONRecoParam *param = new AliMUONRecoParam();
138 param->SetLowFluxParam();
143 //_____________________________________________________________________________
144 AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam()
146 /// Return default reconstruction parameters for high flux environment
148 AliMUONRecoParam *param = new AliMUONRecoParam();
149 param->SetHighFluxParam();
154 //_____________________________________________________________________________
155 AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam()
157 /// Return default reconstruction parameters for high flux environment
159 AliMUONRecoParam *param = new AliMUONRecoParam();
160 param->SetCosmicParam();
165 //_____________________________________________________________________________
166 AliMUONRecoParam *AliMUONRecoParam::GetCalibrationParam()
168 /// Return default (dummy) reconstruction parameters for calibration environment
170 AliMUONRecoParam *param = new AliMUONRecoParam();
171 param->SetCalibrationParam();
177 //_____________________________________________________________________________
178 void AliMUONRecoParam::SetLowFluxParam()
180 /// Set reconstruction parameters for low flux environment
182 SetNameTitle("Low Flux","Low Flux");
183 SetEventSpecie(AliRecoParam::kLowMult);
184 fMinBendingMomentum = 0.8;
185 fMaxBendingMomentum = 1.e10;
186 fMaxNonBendingSlope = 0.3;
187 fMaxBendingSlope = 0.4;
188 fSelectTrackOnSlope = kFALSE;
189 fNonBendingVertexDispersion = 70.;
190 fBendingVertexDispersion = 70.;
191 fMaxNonBendingDistanceToTrack = 1.;
192 fMaxBendingDistanceToTrack = 1.;
193 fSigmaCutForTracking = 6.;
194 fSigmaCutForImprovement = 5.;
195 fSigmaCutForTrigger = 4.;
196 fStripCutForTrigger = 1.;
197 fMaxStripAreaForTrigger = 3.;
198 fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
199 fCombinedClusterTrackReco = kFALSE;
200 fTrackAllTracks = kTRUE;
201 fRecoverTracks = kTRUE;
202 fMakeTrackCandidatesFast = kFALSE;
203 fMakeMoreTrackCandidates = kFALSE;
204 fComplementTracks = kTRUE;
205 fImproveTracks = kTRUE;
206 fRemoveConnectedTracksInSt12 = kFALSE;
207 fUseSmoother = kTRUE;
208 for (Int_t iCh = 0; iCh < 10; iCh++) {
209 fUseChamber[iCh] = kTRUE;
210 fDefaultNonBendingReso[iCh] = 0.144;
211 fDefaultBendingReso[iCh] = 0.01;
213 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
215 fMaxTriggerTracks = 100;
216 fMaxTrackCandidates = 10000;
219 //_____________________________________________________________________________
220 void AliMUONRecoParam::SetHighFluxParam()
222 /// Set reconstruction parameters for high flux environment
224 SetNameTitle("High Flux","High Flux");
225 SetEventSpecie(AliRecoParam::kHighMult);
226 fMinBendingMomentum = 0.8;
227 fMaxBendingMomentum = 1.e10;
228 fMaxNonBendingSlope = 0.3;
229 fMaxBendingSlope = 0.4;
230 fSelectTrackOnSlope = kFALSE;
231 fNonBendingVertexDispersion = 70.;
232 fBendingVertexDispersion = 70.;
233 fMaxNonBendingDistanceToTrack = 1.;
234 fMaxBendingDistanceToTrack = 1.;
235 fSigmaCutForTracking = 6.;
236 fSigmaCutForImprovement = 5.;
237 fSigmaCutForTrigger = 4.;
238 fStripCutForTrigger = 1.;
239 fMaxStripAreaForTrigger = 3.;
240 fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
241 fCombinedClusterTrackReco = kFALSE;
242 fTrackAllTracks = kTRUE;
243 fRecoverTracks = kTRUE;
244 fMakeTrackCandidatesFast = kFALSE;
245 fMakeMoreTrackCandidates = kFALSE;
246 fComplementTracks = kTRUE;
247 fImproveTracks = kTRUE;
248 fRemoveConnectedTracksInSt12 = kFALSE;
249 fUseSmoother = kTRUE;
250 for (Int_t iCh = 0; iCh < 10; iCh++) {
251 fUseChamber[iCh] = kTRUE;
252 fDefaultNonBendingReso[iCh] = 0.144;
253 fDefaultBendingReso[iCh] = 0.01;
255 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
257 fMaxTriggerTracks = 100;
258 fMaxTrackCandidates = 10000;
261 //_____________________________________________________________________________
262 void AliMUONRecoParam::SetCosmicParam()
264 /// Set reconstruction parameters for high flux environment
266 SetNameTitle("Cosmic","Cosmic");
267 SetEventSpecie(AliRecoParam::kCosmic);
268 fMinBendingMomentum = 0.8;
269 fMaxBendingMomentum = 1.e10;
270 fMaxNonBendingSlope = 0.3;
271 fMaxBendingSlope = 0.4;
272 fSelectTrackOnSlope = kTRUE;
273 fNonBendingVertexDispersion = 170.;
274 fBendingVertexDispersion = 170.;
275 fMaxNonBendingDistanceToTrack = 1.;
276 fMaxBendingDistanceToTrack = 1.;
277 fSigmaCutForTracking = 7.;
278 fSigmaCutForImprovement = 6.;
279 fSigmaCutForTrigger = 4.;
280 fStripCutForTrigger = 1.5;
281 fMaxStripAreaForTrigger = 3.;
282 fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
283 fPercentOfFullClusterInESD = 100.;
284 fCombinedClusterTrackReco = kFALSE;
285 fTrackAllTracks = kTRUE;
286 fRecoverTracks = kTRUE;
287 fMakeTrackCandidatesFast = kFALSE;
288 fMakeMoreTrackCandidates = kFALSE;
289 fComplementTracks = kTRUE;
290 fImproveTracks = kTRUE;
291 fRemoveConnectedTracksInSt12 = kTRUE;
292 fUseSmoother = kTRUE;
293 fSaveFullClusterInESD = kTRUE;
294 for (Int_t iCh = 0; iCh < 10; iCh++) {
295 fUseChamber[iCh] = kTRUE;
296 fDefaultNonBendingReso[iCh] = 0.4;
297 fDefaultBendingReso[iCh] = 0.4;
299 fRequestStation[0] = kTRUE;
300 fRequestStation[1] = kTRUE;
301 fRequestStation[2] = kTRUE;
302 fRequestStation[3] = kTRUE;
303 fRequestStation[4] = kTRUE;
305 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
306 fMaxTriggerTracks = 100;
307 fMaxTrackCandidates = 10000;
309 SetPedMeanLimits(20, 700);
310 SetManuOccupancyLimits(-1.,0.01); // reject manu above occ=1%
312 SetBuspatchOccupancyLimits(-1,0.05);
313 SetFractionOfBuspatchOutsideOccupancyLimit(0.10); // 10 %
317 //_____________________________________________________________________________
318 void AliMUONRecoParam::SetCalibrationParam()
320 /// Set (dummy) reconstruction parameters for calibration environment
322 SetNameTitle("Calibration","Calibration");
323 SetEventSpecie(AliRecoParam::kCalib);
325 fPedMeanLimits[0] = 5000;
326 fPedMeanLimits[1] = 0;
328 fPadGoodnessMask = 0x8C00; // Pedestal is missing | is too low | too high
332 //_____________________________________________________________________________
334 AliMUONRecoParam::RequestedStationMask() const
336 /// Get the mask of the requested station, i.e. an integer where
337 /// bit n is set to one if the station n was requested
341 for ( Int_t i = 0; i < 5; ++i )
343 if ( RequestStation(i) ) m |= ( 1 << i );
348 //_____________________________________________________________________________
349 void AliMUONRecoParam::Print(Option_t *option) const
351 /// print reconstruction parameters
352 /// if option = FULL then print also unused parameters
354 cout<<endl<<"\t------MUON Reconstruction parameters ("<<GetName()<<")------"<<endl;
356 if (IsDefault()) cout<<"\t\t*** Parameters used by default ***"<<endl;
358 cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
359 cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
360 cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
366 bypass = "stations 4 and 5";
368 else if ( BypassSt4() )
370 bypass = "station 4";
372 else if ( BypassSt5() )
374 bypass = "station 5";
377 if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
379 if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
380 else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
382 if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
383 else cout<<"Save partial cluster info in ESD"<<endl;
385 cout<<"Selection of track candidates:"<<endl;
386 if (fSelectTrackOnSlope) cout<<Form("\t- Non-bending slope < %5.2f",fMaxNonBendingSlope)<<endl;
387 else cout<<"\t- Impact parameter < 3 * vertex dispersion in the non-bending direction"<<endl;
388 cout<<Form("\t- if B!=0: Bending momentum > %5.2f",fMinBendingMomentum)<<endl;
389 if (fSelectTrackOnSlope) cout<<Form("\t if B==0: Bending slope < %5.2f",fMaxBendingSlope)<<endl;
390 else cout<<"\t if B==0: Impact parameter < 3 * vertex dispersion in the bending direction"<<endl;
392 cout<<Form("Vertex dispersion (used to estimate initial bending momentum resolution) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
394 cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
396 cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
398 cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
400 cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl;
402 cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl;
404 if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
405 else cout<<"Track only the best candidates"<<endl;
407 if (strstr(option,"FULL")) {
408 cout<<"Make track candidates assuming linear propagation between stations 4 and 5: ";
409 if (fMakeTrackCandidatesFast) cout<<"ON"<<endl;
410 else cout<<"OFF"<<endl;
411 } else if (fMakeTrackCandidatesFast)
412 cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl;
414 if (strstr(option,"FULL")) {
415 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: ";
416 if (fMakeMoreTrackCandidates) cout<<"ON"<<endl;
417 else cout<<"OFF"<<endl;
418 } else if (fMakeMoreTrackCandidates)
419 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl;
421 if (strstr(option,"FULL")) {
422 cout<<"Try to recover tracks getting lost during tracking: ";
423 if (fRecoverTracks) cout<<"ON"<<endl;
424 else cout<<"OFF"<<endl;
425 } else if (fRecoverTracks)
426 cout<<"Try to recover tracks getting lost during tracking"<<endl;
428 if (strstr(option,"FULL")) {
429 cout<<"Try to complete the reconstructed tracks by adding missing clusters: ";
430 if (fComplementTracks) cout<<"ON"<<endl;
431 else cout<<"OFF"<<endl;
432 } else if (fComplementTracks)
433 cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl;
435 if (strstr(option,"FULL")) {
436 cout<<"Try to improve the reconstructed tracks by removing bad clusters: ";
437 if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
438 else cout<<"OFF"<<endl;
439 } else if (fImproveTracks)
440 cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
442 if (fRemoveConnectedTracksInSt12) cout<<"Remove tracks sharing one cluster or more in any station"<<endl;
443 else cout<<"Remove tracks sharing one cluster or more in stations 3, 4 and 5"<<endl;
445 if (strstr(option,"FULL")) {
446 cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
447 if (fUseSmoother) cout<<"ON"<<endl;
448 else cout<<"OFF"<<endl;
449 } else if (fUseSmoother)
450 cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl;
452 cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
454 Bool_t discardedCh = kFALSE;
457 if (!UseChamber(ch)) {
459 cout<<"Discarded chambers(1..): "<<ch+1;
462 else cout<<" "<<ch+1;
465 if (discardedCh) cout<<endl;
467 Bool_t discardedSt = kFALSE;
470 if (!RequestStation(st)) {
472 cout<<"Not requested stations(1..): "<<st+1;
475 else cout<<" "<<st+1;
478 if (discardedSt) cout<<endl;
480 cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl;
481 cout << "Which means we reject pads having the condition = " <<
482 AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl;
484 cout << "The pad limits we are using are :" << endl;
486 for ( int ichamber = 0; ichamber < 10; ++ichamber )
488 cout << Form("HV Ch %d must be >= %5.2f",ichamber,HVLimit(ichamber)) << endl;
491 cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl;
492 cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl;
493 cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl;
494 cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl;
495 cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl;
497 cout << Form("And we cut on charge >= %7.2f x ( pedestal sigma ) ",ChargeSigmaCut()) << endl;
499 cout << "Occupancy limits are :" << endl;
501 cout << Form("%e <= Manu occupancy < %7.2f",ManuOccupancyLowLimit(),ManuOccupancyHighLimit()) << endl;
502 cout << Form("%e <= Buspatch occupancy < %7.2f",BuspatchOccupancyLowLimit(),BuspatchOccupancyHighLimit()) << endl;
503 cout << Form("%e <= DE occupancy < %7.2f",DEOccupancyLowLimit(),DEOccupancyHighLimit()) << endl;
505 cout << "'QAChecker' limits" << endl;
506 cout << Form("FractionOfBuspatchOutsideOccupancyLimit = %5.2f %%",FractionOfBuspatchOutsideOccupancyLimit()*100.0) << endl;
507 cout << Form("Event size limit = %5.2f KB/event (soft) and %5.2f KB/event (hard)",fEventSizeSoftLimit,fEventSizeHardLimit) << endl;
508 if ( fTokenLostLimit > 0 )
510 cout << Form("We tolerate up to %5.2f %% token lost errors per event",fTokenLostLimit) << endl;
514 cout << "We dot not tolerate any token lost error !" << endl;
517 cout << "chamber non bending resolution = |";
518 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultNonBendingReso[iCh]);
520 cout << "chamber bending resolution = |";
521 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultBendingReso[iCh]);
523 cout<<Form("maximum number of trigger tracks above which the tracking is cancelled = %d",fMaxTriggerTracks)<<endl;
524 cout<<Form("maximum number of track candidates above which the tracking is abandonned = %d",fMaxTrackCandidates)<<endl;
526 cout << Form("The average noise pad charge is assumed to be %7.2f fC",AverageNoisePadCharge()) << endl;
527 cout << Form("and clusters below %5.2f times this noise charge (i.e. %7.2f fC) are discarded",
528 ClusterChargeCut(),ClusterChargeCut()*AverageNoisePadCharge()) << endl;
529 cout << Form("Note that LowestPadCharge is then %7.2f fC",LowestPadCharge()) << endl;
533 cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
534 cout << "!!! WILL TRY TO RECOVER CORRUPTED RAW DATA !!!" << endl;
535 cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
537 cout<<"\t-----------------------------------------------------"<<endl<<endl;
541 //_____________________________________________________________________________
543 AliMUONRecoParam::SetHVLimit(Int_t chamberId, Double_t value)
545 /// Set the HV limit for a given chamber (or all chambers
548 if ( chamberId == -1 )
550 for ( Int_t i = 0; i < 10; ++i )
555 else if ( chamberId >= 0 && chamberId < 10 )
557 fHVLimit[chamberId]=value;
561 AliError(Form("chamberId = %d is not a valid chamberId",chamberId));
565 //_____________________________________________________________________________
566 Double_t AliMUONRecoParam::HVLimit(Int_t chamberId) const
568 /// Get the HV limit for a given chamber
569 if ( chamberId >= 0 && chamberId < 10 )
571 return fHVLimit[chamberId];
573 AliError(Form("chamberId = %d is not a valid chamberId",chamberId));
578 //_____________________________________________________________________________
580 AliMUONRecoParam::SetDefaultLimits()
582 /// Set the default limits and pad goodness policy
584 fHVSt12Limits[0]=1500; // kept for backward compatibility only
585 fHVSt12Limits[1]=2000; // kept for backward compatibility only
586 fHVSt345Limits[0]=1500; // kept for backward compatibility only
587 fHVSt345Limits[1]=2000; // kept for backward compatibility only
589 SetHVLimit(-1,1600); // this one is the real HV limit used now
591 fPedMeanLimits[0] = 20;
592 fPedMeanLimits[1] = 1024;
594 fPedSigmaLimits[0] = 0.6;
595 fPedSigmaLimits[1] = 100;
597 fGainA1Limits[0] = 0.1;
598 fGainA1Limits[1] = 10;
600 fGainA2Limits[0] = -1E30;
601 fGainA2Limits[1] = 1E30;
603 fGainThresLimits[0] = 0;
604 fGainThresLimits[1] = 4095;
606 fPadGoodnessMask = 0x8080; // Ped is missing | HV is missing
608 fManuOccupancyLimits[0] = -1.0;
609 fManuOccupancyLimits[1] = 1.0;
611 fBuspatchOccupancyLimits[0] = 1E-6;
612 fBuspatchOccupancyLimits[1] = 1.0;
614 fDEOccupancyLimits[0] = -1.0;
615 fDEOccupancyLimits[1] = 1.0;
617 fMissingPadFractionLimit = -1; // DEPRECATED
618 fFractionOfBuspatchOutsideOccupancyLimit = 0.05; // 5 %
620 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)
622 AverageNoisePadCharge(0.22875); // 0.22875 coulombs ~ 1.5 ADC channels
624 ClusterChargeCut(2.0); // will cut cluster below 2.0 x LowestPadCharge()
626 SetEventSizeLimits(35.0,45.0);
628 SetTokenLostLimit(0.0);
630 fTryRecover = kFALSE;
634 //-----------------------------------------------------------------------
636 AliMUONRecoParam::Create(const char* settings)
638 /// Create pre-defined recoparam array, according to settings.
639 /// settings is case-insensitive.
641 /// Currently defined are :
647 /// LowFlux (default)
650 /// LowFlux (modified to reconstruct real p-p data)
653 /// LowFlux (modified to reconstruct realistic p-p simulation)
656 AliMUONRecoParam* param(0x0);
658 AliRecoParam::EventSpecie_t defaultParam = AliRecoParam::kLowMult;
660 TString stype(settings);
663 if ( stype == "cosmics" )
665 // set parameters for cosmic runs
666 param = AliMUONRecoParam::GetCosmicParam();
667 defaultParam = AliRecoParam::kCosmic;
669 else if ( stype == "ppideal" )
671 // set default lowFlux parameters
672 param = AliMUONRecoParam::GetLowFluxParam();
674 else if ( stype == "ppreal" || stype == "pprealsim" || stype == "pprealnofield" )
676 // common parameters for p-p data and realistic p-p simu
677 param = AliMUONRecoParam::GetLowFluxParam();
678 param->SaveFullClusterInESD(kTRUE, 100.);
679 for (Int_t iCh=0; iCh<10; iCh++)
681 param->SetDefaultNonBendingReso(iCh,0.4);
682 param->SetDefaultBendingReso(iCh,0.4);
684 param->SetSigmaCutForTracking(7.);
685 param->SetStripCutForTrigger(1.5);
686 param->SetSigmaCutForTrigger(6.);
687 param->ImproveTracks(kTRUE, 6.);
688 param->SetPedMeanLimits(20, 700);
689 param->SetManuOccupancyLimits(-1.,0.01);
690 param->SetBuspatchOccupancyLimits(-1.,0.01);
691 param->SetFractionOfBuspatchOutsideOccupancyLimit(0.05); // 5 %
692 param->SetEventSizeLimits(45., 65.);
694 // specific parameters for p-p data or realistic p-p simu
695 if ( stype == "ppreal" || stype == "pprealnofield" )
697 param->SetPadGoodnessMask(0x400BE9B);
701 param->SetPadGoodnessMask(0x8080);
704 if ( stype == "pprealnofield" )
706 param->TryRecover(kTRUE);
709 else if ( stype == "pbpbreal" || stype == "pbpbrealsim" )
711 // common parameters for Pb-Pb data and realistic Pb-Pb simu
712 param = AliMUONRecoParam::GetHighFluxParam();
713 defaultParam = AliRecoParam::kHighMult;
714 param->SaveFullClusterInESD(kTRUE, 100.);
715 for (Int_t iCh=0; iCh<10; iCh++)
717 param->SetDefaultNonBendingReso(iCh,0.2);
718 param->SetDefaultBendingReso(iCh,0.2);
720 param->SetSigmaCutForTracking(5.);
721 param->SetStripCutForTrigger(1.5);
722 param->SetSigmaCutForTrigger(4.);
723 param->ImproveTracks(kTRUE, 4.);
724 param->SetPedMeanLimits(20, 700);
725 param->SetManuOccupancyLimits(-1.,0.01);
726 param->SetBuspatchOccupancyLimits(-1.,0.01);
727 param->SetFractionOfBuspatchOutsideOccupancyLimit(0.05); // 5 %
728 param->SetEventSizeLimits(100., 150.);
730 // specific parameters for Pb-Pb data or realistic Pb-Pb simu
731 if ( stype == "pbpbreal" )
733 param->SetPadGoodnessMask(0x400BE9B);
737 param->SetPadGoodnessMask(0x8080);
742 AliErrorClass("Unknown settings !");
746 TObjArray* recoParams = new TObjArray;
748 recoParams->AddLast(param);
750 // set (dummy) parameters for calibration runs
751 param = AliMUONRecoParam::GetCalibrationParam();
752 recoParams->AddLast(param);
754 // set parameters for Pb-Pb runs
755 // param = AliMUONRecoParam::GetHighFluxParam();
756 // recoParams.AddLast(param);
758 // identify default parameters (exit if identification failed)
759 Bool_t defaultIsSet = kFALSE;
760 TIter next(recoParams);
761 while ( (param = static_cast<AliMUONRecoParam*>(next())) )
763 if (param->GetEventSpecie() == defaultParam)
765 param->SetAsDefault();
766 defaultIsSet = kTRUE;
768 param->Print("FULL");
773 AliErrorClass("The default reconstruction parameters are not set! Exiting...");
780 //______________________________________________________________________________
782 AliMUONRecoParam::Show(Int_t runNumber, const char* ocdb)
784 /// Show what we have in the designated OCDB for that run, as far as RecoParams are concerned
786 AliCDBManager::Instance()->SetDefaultStorage(ocdb);
787 AliCDBManager::Instance()->SetRun(runNumber);
789 AliCDBEntry* entry = AliCDBManager::Instance()->Get("MUON/Calib/RecoParam");
793 TObject* o = entry->GetObject();
795 if ( o->IsA() == TObjArray::Class() )
797 TObjArray* array = static_cast<TObjArray*>(o);
798 for ( Int_t i = 0; i <= array->GetLast(); ++i )
800 AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
801 cout << Form("array[%d]=%s %s %s",i,
802 p ? p->ClassName() : "",
803 p ? AliRecoParam::GetEventSpecieName(AliRecoParam::Convert(p->GetEventSpecie())) :"",
804 p ? ( p->IsDefault() ? "default" : "") : "" ) << endl;
806 cout << "=========== dumps below ====== " << endl;
808 for ( Int_t i = 0; i <= array->GetLast(); ++i )
810 AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
811 if ( p ) p->Print("");