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),
89 fDiscardMonoCathodClusters(kFALSE),
90 fMonoCathodClNonBendingRes(0.),
91 fMonoCathodClBendingRes(0.)
95 SetNameTitle("Dummy","Dummy");
96 for (Int_t iCh = 0; iCh < 10; iCh++) {
97 fUseChamber[iCh] = kTRUE;
98 fDefaultNonBendingReso[iCh] = 0.;
99 fDefaultBendingReso[iCh] = 0.;
101 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
105 //_____________________________________________________________________________
106 AliMUONRecoParam::~AliMUONRecoParam()
111 //_____________________________________________________________________________
113 AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5)
115 /// Set the bypass status
117 if ( st4 && st5 ) fBypassSt45 = 45;
118 else if ( st4 ) fBypassSt45 = 4;
119 else if ( st5 ) fBypassSt45 = 5;
120 else fBypassSt45 = 0;
123 //_____________________________________________________________________________
125 AliMUONRecoParam::GetCalibrationMode() const
127 /// Return the calibration mode. Can be :
128 /// NOGAIN : only do pedestal subtraction
129 /// GAIN : do pedestal subtraction, and apply gain correction, but with a
130 /// single capacitance value for all channels
131 /// INJECTIONGAIN : as GAIN, but with gain values taken as EMELEC factory values
132 /// GAINCONSTANTCAPA : as GAIN, but with a channel-dependent capacitance value
134 return fCalibrationMode.Data();
137 //_____________________________________________________________________________
138 AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam()
140 /// Return default reconstruction parameters for low flux environment
142 AliMUONRecoParam *param = new AliMUONRecoParam();
143 param->SetLowFluxParam();
148 //_____________________________________________________________________________
149 AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam()
151 /// Return default reconstruction parameters for high flux environment
153 AliMUONRecoParam *param = new AliMUONRecoParam();
154 param->SetHighFluxParam();
159 //_____________________________________________________________________________
160 AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam()
162 /// Return default reconstruction parameters for high flux environment
164 AliMUONRecoParam *param = new AliMUONRecoParam();
165 param->SetCosmicParam();
170 //_____________________________________________________________________________
171 AliMUONRecoParam *AliMUONRecoParam::GetCalibrationParam()
173 /// Return default (dummy) reconstruction parameters for calibration environment
175 AliMUONRecoParam *param = new AliMUONRecoParam();
176 param->SetCalibrationParam();
182 //_____________________________________________________________________________
183 void AliMUONRecoParam::SetLowFluxParam()
185 /// Set reconstruction parameters for low flux environment
187 SetNameTitle("Low Flux","Low Flux");
188 SetEventSpecie(AliRecoParam::kLowMult);
189 fMinBendingMomentum = 0.8;
190 fMaxBendingMomentum = 1.e10;
191 fMaxNonBendingSlope = 0.3;
192 fMaxBendingSlope = 0.4;
193 fSelectTrackOnSlope = kFALSE;
194 fNonBendingVertexDispersion = 70.;
195 fBendingVertexDispersion = 70.;
196 fMaxNonBendingDistanceToTrack = 1.;
197 fMaxBendingDistanceToTrack = 1.;
198 fSigmaCutForTracking = 6.;
199 fSigmaCutForImprovement = 5.;
200 fSigmaCutForTrigger = 4.;
201 fStripCutForTrigger = 1.;
202 fMaxStripAreaForTrigger = 3.;
203 fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
204 fCombinedClusterTrackReco = kFALSE;
205 fTrackAllTracks = kTRUE;
206 fRecoverTracks = kTRUE;
207 fMakeTrackCandidatesFast = kFALSE;
208 fMakeMoreTrackCandidates = kFALSE;
209 fComplementTracks = kTRUE;
210 fImproveTracks = kTRUE;
211 fRemoveConnectedTracksInSt12 = kFALSE;
212 fUseSmoother = kTRUE;
213 for (Int_t iCh = 0; iCh < 10; iCh++) {
214 fUseChamber[iCh] = kTRUE;
215 fDefaultNonBendingReso[iCh] = 0.144;
216 fDefaultBendingReso[iCh] = 0.01;
218 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
220 fMaxTriggerTracks = 100;
221 fMaxTrackCandidates = 10000;
222 fDiscardMonoCathodClusters = kFALSE;
223 fMonoCathodClNonBendingRes = 10.;
224 fMonoCathodClBendingRes = 10.;
227 //_____________________________________________________________________________
228 void AliMUONRecoParam::SetHighFluxParam()
230 /// Set reconstruction parameters for high flux environment
232 SetNameTitle("High Flux","High Flux");
233 SetEventSpecie(AliRecoParam::kHighMult);
234 fMinBendingMomentum = 0.8;
235 fMaxBendingMomentum = 1.e10;
236 fMaxNonBendingSlope = 0.3;
237 fMaxBendingSlope = 0.4;
238 fSelectTrackOnSlope = kFALSE;
239 fNonBendingVertexDispersion = 70.;
240 fBendingVertexDispersion = 70.;
241 fMaxNonBendingDistanceToTrack = 1.;
242 fMaxBendingDistanceToTrack = 1.;
243 fSigmaCutForTracking = 6.;
244 fSigmaCutForImprovement = 5.;
245 fSigmaCutForTrigger = 4.;
246 fStripCutForTrigger = 1.;
247 fMaxStripAreaForTrigger = 3.;
248 fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
249 fCombinedClusterTrackReco = kFALSE;
250 fTrackAllTracks = kTRUE;
251 fRecoverTracks = kTRUE;
252 fMakeTrackCandidatesFast = kFALSE;
253 fMakeMoreTrackCandidates = kFALSE;
254 fComplementTracks = kTRUE;
255 fImproveTracks = kTRUE;
256 fRemoveConnectedTracksInSt12 = kFALSE;
257 fUseSmoother = kTRUE;
258 for (Int_t iCh = 0; iCh < 10; iCh++) {
259 fUseChamber[iCh] = kTRUE;
260 fDefaultNonBendingReso[iCh] = 0.144;
261 fDefaultBendingReso[iCh] = 0.01;
263 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
265 fMaxTriggerTracks = 100;
266 fMaxTrackCandidates = 10000;
267 fDiscardMonoCathodClusters = kFALSE;
268 fMonoCathodClNonBendingRes = 10.;
269 fMonoCathodClBendingRes = 10.;
272 //_____________________________________________________________________________
273 void AliMUONRecoParam::SetCosmicParam()
275 /// Set reconstruction parameters for high flux environment
277 SetNameTitle("Cosmic","Cosmic");
278 SetEventSpecie(AliRecoParam::kCosmic);
279 fMinBendingMomentum = 0.8;
280 fMaxBendingMomentum = 1.e10;
281 fMaxNonBendingSlope = 0.3;
282 fMaxBendingSlope = 0.4;
283 fSelectTrackOnSlope = kTRUE;
284 fNonBendingVertexDispersion = 170.;
285 fBendingVertexDispersion = 170.;
286 fMaxNonBendingDistanceToTrack = 1.;
287 fMaxBendingDistanceToTrack = 1.;
288 fSigmaCutForTracking = 7.;
289 fSigmaCutForImprovement = 6.;
290 fSigmaCutForTrigger = 4.;
291 fStripCutForTrigger = 1.5;
292 fMaxStripAreaForTrigger = 3.;
293 fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
294 fPercentOfFullClusterInESD = 100.;
295 fCombinedClusterTrackReco = kFALSE;
296 fTrackAllTracks = kTRUE;
297 fRecoverTracks = kTRUE;
298 fMakeTrackCandidatesFast = kFALSE;
299 fMakeMoreTrackCandidates = kFALSE;
300 fComplementTracks = kTRUE;
301 fImproveTracks = kTRUE;
302 fRemoveConnectedTracksInSt12 = kTRUE;
303 fUseSmoother = kTRUE;
304 fSaveFullClusterInESD = kTRUE;
305 for (Int_t iCh = 0; iCh < 10; iCh++) {
306 fUseChamber[iCh] = kTRUE;
307 fDefaultNonBendingReso[iCh] = 0.4;
308 fDefaultBendingReso[iCh] = 0.4;
310 fRequestStation[0] = kTRUE;
311 fRequestStation[1] = kTRUE;
312 fRequestStation[2] = kTRUE;
313 fRequestStation[3] = kTRUE;
314 fRequestStation[4] = kTRUE;
316 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
317 fMaxTriggerTracks = 100;
318 fMaxTrackCandidates = 10000;
319 fDiscardMonoCathodClusters = kFALSE;
320 fMonoCathodClNonBendingRes = 10.;
321 fMonoCathodClBendingRes = 10.;
323 SetPedMeanLimits(20, 700);
324 SetManuOccupancyLimits(-1.,0.01); // reject manu above occ=1%
326 SetBuspatchOccupancyLimits(-1,0.05);
327 SetFractionOfBuspatchOutsideOccupancyLimit(0.10); // 10 %
331 //_____________________________________________________________________________
332 void AliMUONRecoParam::SetCalibrationParam()
334 /// Set (dummy) reconstruction parameters for calibration environment
336 SetNameTitle("Calibration","Calibration");
337 SetEventSpecie(AliRecoParam::kCalib);
339 fPedMeanLimits[0] = 5000;
340 fPedMeanLimits[1] = 0;
342 fPadGoodnessMask = 0x8C00; // Pedestal is missing | is too low | too high
346 //_____________________________________________________________________________
348 AliMUONRecoParam::RequestedStationMask() const
350 /// Get the mask of the requested station, i.e. an integer where
351 /// bit n is set to one if the station n was requested
355 for ( Int_t i = 0; i < 5; ++i )
357 if ( RequestStation(i) ) m |= ( 1 << i );
362 //_____________________________________________________________________________
363 void AliMUONRecoParam::Print(Option_t *option) const
365 /// print reconstruction parameters
366 /// if option = FULL then print also unused parameters
368 cout<<endl<<"\t------MUON Reconstruction parameters ("<<GetName()<<")------"<<endl;
370 if (IsDefault()) cout<<"\t\t*** Parameters used by default ***"<<endl;
372 cout << "Event Specie=" << GetEventSpecie() << endl;
374 cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
375 cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
376 cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
382 bypass = "stations 4 and 5";
384 else if ( BypassSt4() )
386 bypass = "station 4";
388 else if ( BypassSt5() )
390 bypass = "station 5";
393 if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
395 if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
396 else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
398 if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
399 else cout<<"Save partial cluster info in ESD"<<endl;
401 cout<<"Selection of track candidates:"<<endl;
402 if (fSelectTrackOnSlope) cout<<Form("\t- Non-bending slope < %5.2f",fMaxNonBendingSlope)<<endl;
403 else cout<<"\t- Impact parameter < 3 * vertex dispersion in the non-bending direction"<<endl;
404 cout<<Form("\t- if B!=0: Bending momentum > %5.2f",fMinBendingMomentum)<<endl;
405 if (fSelectTrackOnSlope) cout<<Form("\t if B==0: Bending slope < %5.2f",fMaxBendingSlope)<<endl;
406 else cout<<"\t if B==0: Impact parameter < 3 * vertex dispersion in the bending direction"<<endl;
408 cout<<Form("Vertex dispersion (used to estimate initial bending momentum resolution) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
410 cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
412 cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
414 cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
416 cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl;
418 cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl;
420 if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
421 else cout<<"Track only the best candidates"<<endl;
423 if (strstr(option,"FULL")) {
424 cout<<"Make track candidates assuming linear propagation between stations 4 and 5: ";
425 if (fMakeTrackCandidatesFast) cout<<"ON"<<endl;
426 else cout<<"OFF"<<endl;
427 } else if (fMakeTrackCandidatesFast)
428 cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl;
430 if (strstr(option,"FULL")) {
431 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: ";
432 if (fMakeMoreTrackCandidates) cout<<"ON"<<endl;
433 else cout<<"OFF"<<endl;
434 } else if (fMakeMoreTrackCandidates)
435 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl;
437 if (strstr(option,"FULL")) {
438 cout<<"Try to recover tracks getting lost during tracking: ";
439 if (fRecoverTracks) cout<<"ON"<<endl;
440 else cout<<"OFF"<<endl;
441 } else if (fRecoverTracks)
442 cout<<"Try to recover tracks getting lost during tracking"<<endl;
444 if (strstr(option,"FULL")) {
445 cout<<"Try to complete the reconstructed tracks by adding missing clusters: ";
446 if (fComplementTracks) cout<<"ON"<<endl;
447 else cout<<"OFF"<<endl;
448 } else if (fComplementTracks)
449 cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl;
451 if (strstr(option,"FULL")) {
452 cout<<"Try to improve the reconstructed tracks by removing bad clusters: ";
453 if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
454 else cout<<"OFF"<<endl;
455 } else if (fImproveTracks)
456 cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
458 if (fRemoveConnectedTracksInSt12) cout<<"Remove tracks sharing one cluster or more in any station"<<endl;
459 else cout<<"Remove tracks sharing one cluster or more in stations 3, 4 and 5"<<endl;
461 if (strstr(option,"FULL")) {
462 cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
463 if (fUseSmoother) cout<<"ON"<<endl;
464 else cout<<"OFF"<<endl;
465 } else if (fUseSmoother)
466 cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl;
468 cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
470 Bool_t discardedCh = kFALSE;
473 if (!UseChamber(ch)) {
475 cout<<"Discarded chambers(1..): "<<ch+1;
478 else cout<<" "<<ch+1;
481 if (discardedCh) cout<<endl;
483 Bool_t discardedSt = kFALSE;
486 if (!RequestStation(st)) {
488 cout<<"Not requested stations(1..): "<<st+1;
491 else cout<<" "<<st+1;
494 if (discardedSt) cout<<endl;
496 cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl;
497 cout << "Which means we reject pads having the condition = " <<
498 AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl;
500 cout << "The pad limits we are using are :" << endl;
502 for ( int ichamber = 0; ichamber < 10; ++ichamber )
504 cout << Form("HV Ch %d must be >= %5.2f",ichamber,HVLimit(ichamber)) << endl;
507 cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl;
508 cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl;
509 cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl;
510 cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl;
511 cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl;
513 cout << Form("And we cut on charge >= %7.2f x ( pedestal sigma ) ",ChargeSigmaCut()) << endl;
515 cout << "Occupancy limits are :" << endl;
517 cout << Form("%e <= Manu occupancy < %7.3f",ManuOccupancyLowLimit(),ManuOccupancyHighLimit()) << endl;
518 cout << Form("%e <= Buspatch occupancy < %7.3f",BuspatchOccupancyLowLimit(),BuspatchOccupancyHighLimit()) << endl;
519 cout << Form("%e <= DE occupancy < %7.3f",DEOccupancyLowLimit(),DEOccupancyHighLimit()) << endl;
521 cout << "'QAChecker' limits" << endl;
522 cout << Form("FractionOfBuspatchOutsideOccupancyLimit = %5.2f %%",FractionOfBuspatchOutsideOccupancyLimit()*100.0) << endl;
523 cout << Form("Event size limit = %5.2f KB/event (soft) and %5.2f KB/event (hard)",fEventSizeSoftLimit,fEventSizeHardLimit) << endl;
524 if ( fTokenLostLimit > 0 )
526 cout << Form("We tolerate up to %5.2f %% token lost errors per event",fTokenLostLimit) << endl;
530 cout << "We dot not tolerate any token lost error !" << endl;
533 cout << "chamber non bending resolution = |";
534 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultNonBendingReso[iCh]);
536 cout << "chamber bending resolution = |";
537 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultBendingReso[iCh]);
539 cout<<Form("maximum number of trigger tracks above which the tracking is cancelled = %d",fMaxTriggerTracks)<<endl;
540 cout<<Form("maximum number of track candidates above which the tracking is abandonned = %d",fMaxTrackCandidates)<<endl;
542 cout << Form("The average noise pad charge is assumed to be %7.2f fC",AverageNoisePadCharge()) << endl;
543 cout << Form("and clusters below %5.2f times this noise charge (i.e. %7.2f fC) are discarded",
544 ClusterChargeCut(),ClusterChargeCut()*AverageNoisePadCharge()) << endl;
545 cout << Form("Note that LowestPadCharge is then %7.2f fC",LowestPadCharge()) << endl;
547 if (strstr(option,"FULL")) {
548 cout<<"Try to improve the reconstructed tracks by changing the resolution of mono-cathod clusters: ";
549 if (fDiscardMonoCathodClusters) cout<<Form("ON (res = %6.3f, %6.3f)",fMonoCathodClNonBendingRes,fMonoCathodClBendingRes)<<endl;
550 else cout<<"OFF"<<endl;
551 } else if (fDiscardMonoCathodClusters)
552 cout<<Form("Try to improve the reconstructed tracks by changing the resolution of mono-cathod clusters (res = %6.3f, %6.3f)",
553 fMonoCathodClNonBendingRes,fMonoCathodClBendingRes)<<endl;
557 cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
558 cout << "!!! WILL TRY TO RECOVER CORRUPTED RAW DATA !!!" << endl;
559 cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
561 cout<<"\t-----------------------------------------------------"<<endl<<endl;
565 //_____________________________________________________________________________
567 AliMUONRecoParam::SetHVLimit(Int_t chamberId, Double_t value)
569 /// Set the HV limit for a given chamber (or all chambers
572 if ( chamberId == -1 )
574 for ( Int_t i = 0; i < 10; ++i )
579 else if ( chamberId >= 0 && chamberId < 10 )
581 fHVLimit[chamberId]=value;
585 AliError(Form("chamberId = %d is not a valid chamberId",chamberId));
589 //_____________________________________________________________________________
590 Double_t AliMUONRecoParam::HVLimit(Int_t chamberId) const
592 /// Get the HV limit for a given chamber
593 if ( chamberId >= 0 && chamberId < 10 )
595 return fHVLimit[chamberId];
597 AliError(Form("chamberId = %d is not a valid chamberId",chamberId));
602 //_____________________________________________________________________________
604 AliMUONRecoParam::SetDefaultLimits()
606 /// Set the default limits and pad goodness policy
608 fHVSt12Limits[0]=1500; // kept for backward compatibility only
609 fHVSt12Limits[1]=2000; // kept for backward compatibility only
610 fHVSt345Limits[0]=1500; // kept for backward compatibility only
611 fHVSt345Limits[1]=2000; // kept for backward compatibility only
613 SetHVLimit(-1,1590); // this one is the real HV limit used now
615 fPedMeanLimits[0] = 20;
616 fPedMeanLimits[1] = 1024;
618 fPedSigmaLimits[0] = 0.6;
619 fPedSigmaLimits[1] = 100;
621 fGainA1Limits[0] = 0.1;
622 fGainA1Limits[1] = 10;
624 fGainA2Limits[0] = -1E30;
625 fGainA2Limits[1] = 1E30;
627 fGainThresLimits[0] = 0;
628 fGainThresLimits[1] = 4095;
630 fPadGoodnessMask = 0x8080; // Ped is missing | HV is missing
632 fManuOccupancyLimits[0] = -1.0;
633 fManuOccupancyLimits[1] = 1.0;
635 fBuspatchOccupancyLimits[0] = 1E-6;
636 fBuspatchOccupancyLimits[1] = 1.0;
638 fDEOccupancyLimits[0] = -1.0;
639 fDEOccupancyLimits[1] = 1.0;
641 fMissingPadFractionLimit = -1; // DEPRECATED
642 fFractionOfBuspatchOutsideOccupancyLimit = 0.05; // 5 %
644 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)
646 AverageNoisePadCharge(0.22875); // 0.22875 coulombs ~ 1.5 ADC channels
648 ClusterChargeCut(2.0); // will cut cluster below 2.0 x LowestPadCharge()
650 SetEventSizeLimits(35.0,45.0);
652 SetTokenLostLimit(0.0);
654 fTryRecover = kFALSE;
658 //-----------------------------------------------------------------------
660 AliMUONRecoParam::Create(const char* settings)
662 /// Create pre-defined recoparam array, according to settings.
663 /// settings is case-insensitive.
665 /// Currently defined are :
671 /// LowFlux (default)
674 /// LowFlux (modified to reconstruct real p-p data)
677 /// LowFlux (modified to reconstruct realistic p-p simulation)
680 /// HighFlux (modified to reconstruct real Pb-Pb data)
683 AliMUONRecoParam* param(0x0);
685 AliRecoParam::EventSpecie_t defaultParam = AliRecoParam::kLowMult;
687 TString stype(settings);
690 if ( stype == "cosmics" )
692 // set parameters for cosmic runs
693 param = AliMUONRecoParam::GetCosmicParam();
694 defaultParam = AliRecoParam::kCosmic;
696 else if ( stype == "ppideal" )
698 // set default lowFlux parameters
699 param = AliMUONRecoParam::GetLowFluxParam();
701 else if ( stype == "ppreal" || stype == "pprealsim" || stype == "pprealnofield" )
703 // common parameters for p-p data and realistic p-p simu
704 param = AliMUONRecoParam::GetLowFluxParam();
705 param->SaveFullClusterInESD(kTRUE, 100.);
706 for (Int_t iCh=0; iCh<10; iCh++)
708 param->SetDefaultNonBendingReso(iCh,0.4);
709 param->SetDefaultBendingReso(iCh,0.4);
711 param->SetSigmaCutForTracking(7.);
712 param->SetStripCutForTrigger(1.5);
713 param->SetSigmaCutForTrigger(6.);
714 param->ImproveTracks(kTRUE, 6.);
715 param->SetPedMeanLimits(20, 700);
716 param->SetManuOccupancyLimits(-1.,0.015);
717 param->SetBuspatchOccupancyLimits(-1.,0.05);
718 param->SetFractionOfBuspatchOutsideOccupancyLimit(0.05); // 5 %
719 param->SetEventSizeLimits(45., 65.);
720 param->SetHVLimit(0,1550);
721 param->SetHVLimit(1,1550);
722 param->SetHVLimit(2,1550);
723 param->SetHVLimit(3,1550);
725 // specific parameters for p-p data or realistic p-p simu
726 if ( stype == "ppreal" || stype == "pprealnofield" )
728 param->SetPadGoodnessMask(0x400BE9B);
732 param->SetPadGoodnessMask(0x8080);
735 if ( stype == "pprealnofield" )
737 param->TryRecover(kTRUE);
740 else if ( stype == "pbpbreal" || stype == "pbpbrealsim" )
742 // common parameters for Pb-Pb data and realistic Pb-Pb simu
743 param = AliMUONRecoParam::GetHighFluxParam();
744 defaultParam = AliRecoParam::kHighMult;
745 param->SaveFullClusterInESD(kTRUE, 100.);
746 for (Int_t iCh=0; iCh<10; iCh++)
748 param->SetDefaultNonBendingReso(iCh,0.2);
749 param->SetDefaultBendingReso(iCh,0.2);
751 param->SetSigmaCutForTracking(5.);
752 param->SetStripCutForTrigger(1.5);
753 param->SetSigmaCutForTrigger(4.);
754 param->ImproveTracks(kTRUE, 4.);
755 param->SetPedMeanLimits(20, 700);
756 param->SetManuOccupancyLimits(-1.,0.03);
757 param->SetBuspatchOccupancyLimits(-1.,0.1); // 10 % (this cut not used for the reco anyway)
758 param->SetFractionOfBuspatchOutsideOccupancyLimit(0.05); // 5 %
759 param->SetEventSizeLimits(100., 150.);
761 // specific parameters for Pb-Pb data or realistic Pb-Pb simu
762 if ( stype == "pbpbreal" )
764 param->SetPadGoodnessMask(0x400BE9B);
768 param->SetPadGoodnessMask(0x8080);
773 AliErrorClass("Unknown settings !");
777 TObjArray* recoParams = new TObjArray;
779 recoParams->AddLast(param);
781 // set (dummy) parameters for calibration runs
782 param = AliMUONRecoParam::GetCalibrationParam();
783 recoParams->AddLast(param);
785 // set parameters for Pb-Pb runs
786 // param = AliMUONRecoParam::GetHighFluxParam();
787 // recoParams.AddLast(param);
789 // identify default parameters (exit if identification failed)
790 Bool_t defaultIsSet = kFALSE;
791 TIter next(recoParams);
792 while ( (param = static_cast<AliMUONRecoParam*>(next())) )
794 if (param->GetEventSpecie() == defaultParam)
796 param->SetAsDefault();
797 defaultIsSet = kTRUE;
799 param->Print("FULL");
804 AliErrorClass("The default reconstruction parameters are not set! Exiting...");
811 //______________________________________________________________________________
813 AliMUONRecoParam::Show(Int_t runNumber, const char* ocdb)
815 /// Show what we have in the designated OCDB for that run, as far as RecoParams are concerned
817 AliCDBManager::Instance()->SetDefaultStorage(ocdb);
818 AliCDBManager::Instance()->SetRun(runNumber);
820 AliCDBEntry* entry = AliCDBManager::Instance()->Get("MUON/Calib/RecoParam");
824 TObject* o = entry->GetObject();
826 if ( o->IsA() == TObjArray::Class() )
828 TObjArray* array = static_cast<TObjArray*>(o);
829 for ( Int_t i = 0; i <= array->GetLast(); ++i )
831 AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
832 cout << Form("array[%d]=%s %s %s",i,
833 p ? p->ClassName() : "",
834 p ? AliRecoParam::GetEventSpecieName(AliRecoParam::Convert(p->GetEventSpecie())) :"",
835 p ? ( p->IsDefault() ? "default" : "") : "" ) << endl;
837 cout << "=========== dumps below ====== " << endl;
839 for ( Int_t i = 0; i <= array->GetLast(); ++i )
841 AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
842 if ( p ) p->Print("");