]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONRecoParam.cxx
Major update of the way we make QA of the occupancy, and of what we
[u/mrichter/AliRoot.git] / MUON / AliMUONRecoParam.cxx
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
16 // $Id$
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 #include "AliMUONPadStatusMaker.h"
30
31 #include "AliRecoParam.h"
32 #include "AliLog.h"
33
34 #include <Riostream.h>
35
36 ClassImp(AliMUONRecoParam)
37
38
39 //_____________________________________________________________________________
40 AliMUONRecoParam::AliMUONRecoParam()
41 : AliDetectorRecoParam(),
42   fClusteringMode("MLEM"),
43   fTrackingMode("KALMAN"),
44   fMinBendingMomentum(0.),
45   fMaxBendingMomentum(0.),
46   fMaxNonBendingSlope(0.),
47   fMaxBendingSlope(0.),
48   fNonBendingVertexDispersion(0.),
49   fBendingVertexDispersion(0.),
50   fMaxNonBendingDistanceToTrack(0.),
51   fMaxBendingDistanceToTrack(0.),
52   fSigmaCutForTracking(0.),
53   fSigmaCutForImprovement(0.),
54   fSigmaCutForTrigger(0.),
55   fStripCutForTrigger(0.),
56   fMaxStripAreaForTrigger(0.),
57   fMaxNormChi2MatchTrigger(0.),
58   fPercentOfFullClusterInESD(10.),
59   fCombinedClusterTrackReco(kFALSE),
60   fTrackAllTracks(kFALSE),
61   fRecoverTracks(kFALSE),
62   fMakeTrackCandidatesFast(kFALSE),
63   fMakeMoreTrackCandidates(kFALSE),
64   fComplementTracks(kFALSE),
65   fImproveTracks(kFALSE),
66   fUseSmoother(kFALSE),
67   fSaveFullClusterInESD(kTRUE),
68   fCalibrationMode("NOGAIN"),
69   fBypassSt45(0),
70   fPadGoodnessMask(0),
71   fChargeSigmaCut(4.0),
72   fRemoveConnectedTracksInSt12(kFALSE),
73   fMaxTriggerTracks(0),
74   fMaxTrackCandidates(0),
75   fSelectTrackOnSlope(kFALSE),
76   fMissingPadFractionLimit(-1),
77   fFractionOfBuspatchOutsideOccupancyLimit(0),
78   fAverageNoisePadCharge(0.22875),
79   fClusterChargeCut(2.0),
80   fEventSizeSoftLimit(35.0),
81   fEventSizeHardLimit(45.0),
82   fTokenLostLimit(0.0)
83 {  
84   /// Constructor
85   
86   SetNameTitle("Dummy","Dummy");
87   for (Int_t iCh = 0; iCh < 10; iCh++) {
88     fUseChamber[iCh] = kTRUE;
89     fDefaultNonBendingReso[iCh] = 0.;
90     fDefaultBendingReso[iCh] = 0.;
91   }
92   for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
93   SetDefaultLimits();
94 }
95
96 //_____________________________________________________________________________
97 AliMUONRecoParam::~AliMUONRecoParam() 
98 {
99   /// Destructor
100 }
101
102 //_____________________________________________________________________________
103 void
104 AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5)
105 {
106         /// Set the bypass status
107         
108         if ( st4 && st5 ) fBypassSt45 = 45;
109         else if ( st4 ) fBypassSt45 = 4;
110         else if ( st5 ) fBypassSt45 = 5;
111         else fBypassSt45 = 0;
112 }
113
114 //_____________________________________________________________________________
115 Option_t*
116 AliMUONRecoParam::GetCalibrationMode() const
117 {
118   /// Return the calibration mode. Can be : 
119   /// NOGAIN : only do pedestal subtraction
120   /// GAIN : do pedestal subtraction, and apply gain correction, but with a
121   ///        single capacitance value for all channels
122   /// INJECTIONGAIN : as GAIN, but with gain values taken as EMELEC factory values
123   /// GAINCONSTANTCAPA : as GAIN, but with a channel-dependent capacitance value
124   
125   return fCalibrationMode.Data();
126 }
127
128 //_____________________________________________________________________________
129 AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam() 
130 {
131   /// Return default reconstruction parameters for low flux environment
132   
133   AliMUONRecoParam *param = new AliMUONRecoParam();
134   param->SetLowFluxParam();
135   
136   return param;
137 }
138
139 //_____________________________________________________________________________
140 AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam() 
141 {
142   /// Return default reconstruction parameters for high flux environment
143   
144   AliMUONRecoParam *param = new AliMUONRecoParam();
145   param->SetHighFluxParam();
146  
147   return param;
148 }
149
150 //_____________________________________________________________________________
151 AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam() 
152 {
153   /// Return default reconstruction parameters for high flux environment
154   
155   AliMUONRecoParam *param = new AliMUONRecoParam();
156   param->SetCosmicParam();
157   
158   return param;
159 }
160
161 //_____________________________________________________________________________
162 AliMUONRecoParam *AliMUONRecoParam::GetCalibrationParam() 
163 {
164   /// Return default (dummy) reconstruction parameters for calibration environment
165   
166   AliMUONRecoParam *param = new AliMUONRecoParam();
167   param->SetCalibrationParam();
168   
169   return param;
170 }
171
172
173 //_____________________________________________________________________________
174 void AliMUONRecoParam::SetLowFluxParam() 
175 {
176   /// Set reconstruction parameters for low flux environment
177   
178   SetNameTitle("Low Flux","Low Flux");
179   SetEventSpecie(AliRecoParam::kLowMult);
180   fMinBendingMomentum = 0.8;
181   fMaxBendingMomentum = 1.e10;
182   fMaxNonBendingSlope = 0.3;
183   fMaxBendingSlope = 0.4;
184   fSelectTrackOnSlope = kFALSE;
185   fNonBendingVertexDispersion = 70.;
186   fBendingVertexDispersion = 70.;
187   fMaxNonBendingDistanceToTrack = 1.;
188   fMaxBendingDistanceToTrack = 1.;
189   fSigmaCutForTracking = 6.;
190   fSigmaCutForImprovement = 5.;
191   fSigmaCutForTrigger = 4.;
192   fStripCutForTrigger = 1.;
193   fMaxStripAreaForTrigger = 3.;
194   fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
195   fCombinedClusterTrackReco = kFALSE;
196   fTrackAllTracks = kTRUE;
197   fRecoverTracks = kTRUE;
198   fMakeTrackCandidatesFast = kFALSE;
199   fMakeMoreTrackCandidates = kFALSE;
200   fComplementTracks = kTRUE;
201   fImproveTracks = kTRUE;
202   fRemoveConnectedTracksInSt12 = kFALSE;
203   fUseSmoother = kTRUE;
204   for (Int_t iCh = 0; iCh < 10; iCh++) {
205     fUseChamber[iCh] = kTRUE;
206     fDefaultNonBendingReso[iCh] = 0.144;
207     fDefaultBendingReso[iCh] = 0.01;
208   }
209   for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
210   fBypassSt45 = 0;
211   fMaxTriggerTracks = 100;
212   fMaxTrackCandidates = 10000;  
213 }
214
215 //_____________________________________________________________________________
216 void AliMUONRecoParam::SetHighFluxParam() 
217 {
218   /// Set reconstruction parameters for high flux environment
219   
220   SetNameTitle("High Flux","High Flux");
221   SetEventSpecie(AliRecoParam::kHighMult);
222   fMinBendingMomentum = 0.8;
223   fMaxBendingMomentum = 1.e10;
224   fMaxNonBendingSlope = 0.3;
225   fMaxBendingSlope = 0.4;
226   fSelectTrackOnSlope = kFALSE;
227   fNonBendingVertexDispersion = 70.;
228   fBendingVertexDispersion = 70.;
229   fMaxNonBendingDistanceToTrack = 1.;
230   fMaxBendingDistanceToTrack = 1.;
231   fSigmaCutForTracking = 6.;
232   fSigmaCutForImprovement = 5.;
233   fSigmaCutForTrigger = 4.;
234   fStripCutForTrigger = 1.;
235   fMaxStripAreaForTrigger = 3.;
236   fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
237   fCombinedClusterTrackReco = kFALSE;
238   fTrackAllTracks = kTRUE;
239   fRecoverTracks = kTRUE;
240   fMakeTrackCandidatesFast = kFALSE;
241   fMakeMoreTrackCandidates = kFALSE;
242   fComplementTracks = kTRUE;
243   fImproveTracks = kTRUE;
244   fRemoveConnectedTracksInSt12 = kFALSE;
245   fUseSmoother = kTRUE;
246   for (Int_t iCh = 0; iCh < 10; iCh++) {
247     fUseChamber[iCh] = kTRUE;
248     fDefaultNonBendingReso[iCh] = 0.144;
249     fDefaultBendingReso[iCh] = 0.01;
250   }
251   for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
252   fBypassSt45 = 0;
253   fMaxTriggerTracks = 100;
254   fMaxTrackCandidates = 10000;
255 }
256
257 //_____________________________________________________________________________
258 void AliMUONRecoParam::SetCosmicParam() 
259 {
260   /// Set reconstruction parameters for high flux environment
261   
262   SetNameTitle("Cosmic","Cosmic");
263   SetEventSpecie(AliRecoParam::kCosmic);
264   fMinBendingMomentum = 0.8;
265   fMaxBendingMomentum = 1.e10;
266   fMaxNonBendingSlope = 0.3;
267   fMaxBendingSlope = 0.4;
268   fSelectTrackOnSlope = kTRUE;
269   fNonBendingVertexDispersion = 170.;
270   fBendingVertexDispersion = 170.;
271   fMaxNonBendingDistanceToTrack = 1.;
272   fMaxBendingDistanceToTrack = 1.;
273   fSigmaCutForTracking = 7.;
274   fSigmaCutForImprovement = 6.;
275   fSigmaCutForTrigger = 4.;
276   fStripCutForTrigger = 1.5;
277   fMaxStripAreaForTrigger = 3.;
278   fMaxNormChi2MatchTrigger = fSigmaCutForTrigger * fSigmaCutForTrigger;
279   fPercentOfFullClusterInESD = 100.;
280   fCombinedClusterTrackReco = kFALSE;
281   fTrackAllTracks = kTRUE;
282   fRecoverTracks = kTRUE;
283   fMakeTrackCandidatesFast = kFALSE;
284   fMakeMoreTrackCandidates = kFALSE;
285   fComplementTracks = kTRUE;
286   fImproveTracks = kTRUE;
287   fRemoveConnectedTracksInSt12 = kTRUE;
288   fUseSmoother = kTRUE;
289   fSaveFullClusterInESD = kTRUE;
290   for (Int_t iCh = 0; iCh < 10; iCh++) {
291     fUseChamber[iCh] = kTRUE;
292     fDefaultNonBendingReso[iCh] = 0.4;
293     fDefaultBendingReso[iCh] = 0.4;
294   }
295   fRequestStation[0] = kTRUE;
296   fRequestStation[1] = kTRUE;
297   fRequestStation[2] = kTRUE;
298   fRequestStation[3] = kTRUE;
299   fRequestStation[4] = kTRUE;
300   fBypassSt45 = 0;
301   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
302   fMaxTriggerTracks = 100;
303   fMaxTrackCandidates = 10000;
304   
305   SetPedMeanLimits(20, 700);
306   SetManuOccupancyLimits(-1.,0.01); // reject manu above occ=1%
307
308   SetBuspatchOccupancyLimits(-1,0.05);  
309   SetFractionOfBuspatchOutsideOccupancyLimit(0.10); // 10 %
310 }
311
312
313 //_____________________________________________________________________________
314 void AliMUONRecoParam::SetCalibrationParam() 
315 {
316   /// Set (dummy) reconstruction parameters for calibration environment
317   
318   SetNameTitle("Calibration","Calibration");
319   SetEventSpecie(AliRecoParam::kCalib);
320
321   fPedMeanLimits[0] = 5000;
322   fPedMeanLimits[1] = 0;
323
324   fPadGoodnessMask = 0x8C00; // Pedestal is missing | is too low | too high
325
326 }
327
328 //_____________________________________________________________________________
329 UInt_t
330 AliMUONRecoParam::RequestedStationMask() const
331 {
332   /// Get the mask of the requested station, i.e. an integer where 
333   /// bit n is set to one if the station n was requested
334   
335   UInt_t m(0);
336   
337   for ( Int_t i = 0; i < 5; ++i ) 
338   {
339     if ( RequestStation(i) ) m |= ( 1 << i );
340   }
341   return m;
342 }
343
344 //_____________________________________________________________________________
345 void AliMUONRecoParam::Print(Option_t *option) const
346 {
347   /// print reconstruction parameters
348   /// if option = FULL then print also unused parameters
349   
350   cout<<endl<<"\t------MUON Reconstruction parameters ("<<GetName()<<")------"<<endl;
351   
352   if (IsDefault()) cout<<"\t\t*** Parameters used by default ***"<<endl;
353   
354   cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
355   cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
356   cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
357
358         TString bypass;
359         
360         if ( BypassSt45() )
361         {
362                 bypass = "stations 4 and 5";
363         }
364         else if ( BypassSt4() ) 
365         {
366                 bypass = "station 4";
367         }
368         else if ( BypassSt5() ) 
369         {
370                 bypass = "station 5";
371         }
372         
373   if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
374   
375   if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
376   else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
377   
378   if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
379   else cout<<"Save partial cluster info in ESD"<<endl;
380     
381   cout<<"Selection of track candidates:"<<endl;
382   if (fSelectTrackOnSlope) cout<<Form("\t- Non-bending slope < %5.2f",fMaxNonBendingSlope)<<endl;
383   else cout<<"\t- Impact parameter < 3 * vertex dispersion in the non-bending direction"<<endl;
384   cout<<Form("\t- if B!=0: Bending momentum > %5.2f",fMinBendingMomentum)<<endl;
385   if (fSelectTrackOnSlope) cout<<Form("\t  if B==0: Bending slope < %5.2f",fMaxBendingSlope)<<endl;
386   else cout<<"\t  if B==0: Impact parameter < 3 * vertex dispersion in the bending direction"<<endl;
387   
388   cout<<Form("Vertex dispersion (used to estimate initial bending momentum resolution) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
389   
390   cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
391   
392   cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
393
394   cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
395
396   cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl;
397
398   cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl;
399
400   if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
401   else cout<<"Track only the best candidates"<<endl;
402   
403   if (strstr(option,"FULL")) {
404     cout<<"Make track candidates assuming linear propagation between stations 4 and 5: ";
405     if (fMakeTrackCandidatesFast) cout<<"ON"<<endl;
406     else cout<<"OFF"<<endl;
407   } else if (fMakeTrackCandidatesFast)
408     cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl;
409   
410   if (strstr(option,"FULL")) {
411     cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: ";
412     if (fMakeMoreTrackCandidates) cout<<"ON"<<endl;
413     else cout<<"OFF"<<endl;
414   } else if (fMakeMoreTrackCandidates)
415     cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl;
416   
417   if (strstr(option,"FULL")) {
418     cout<<"Try to recover tracks getting lost during tracking: ";
419     if (fRecoverTracks) cout<<"ON"<<endl;
420     else cout<<"OFF"<<endl;
421   } else if (fRecoverTracks)
422     cout<<"Try to recover tracks getting lost during tracking"<<endl;
423   
424   if (strstr(option,"FULL")) {
425     cout<<"Try to complete the reconstructed tracks by adding missing clusters: ";
426     if (fComplementTracks) cout<<"ON"<<endl;
427     else cout<<"OFF"<<endl;
428   } else if (fComplementTracks)
429     cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl;
430   
431   if (strstr(option,"FULL")) {
432     cout<<"Try to improve the reconstructed tracks by removing bad clusters: ";
433     if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
434     else cout<<"OFF"<<endl;
435   } else if (fImproveTracks)
436     cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
437   
438   if (fRemoveConnectedTracksInSt12) cout<<"Remove tracks sharing one cluster or more in any station"<<endl;
439   else cout<<"Remove tracks sharing one cluster or more in stations 3, 4 and 5"<<endl;
440   
441   if (strstr(option,"FULL")) {
442     cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
443     if (fUseSmoother) cout<<"ON"<<endl;
444     else cout<<"OFF"<<endl;
445   } else if (fUseSmoother)
446     cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl;
447   
448   cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
449   
450   Bool_t discardedCh = kFALSE;
451   Int_t ch = 0;
452   do {
453     if (!UseChamber(ch)) {
454       if (!discardedCh) {
455         cout<<"Discarded chambers(1..): "<<ch+1;
456         discardedCh = kTRUE;
457       }
458       else cout<<" "<<ch+1;
459     }
460   } while (++ch < 10);
461   if (discardedCh) cout<<endl;
462   
463   Bool_t discardedSt = kFALSE;
464   Int_t st = 0;
465   do {
466     if (!RequestStation(st)) {
467       if (!discardedSt) {
468         cout<<"Not requested stations(1..): "<<st+1;
469         discardedSt = kTRUE;
470       }
471       else cout<<" "<<st+1;
472     }
473   } while (++st < 5);
474   if (discardedSt) cout<<endl;
475   
476   cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl;
477   cout << "Which means we reject pads having the condition = " <<
478   AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl;
479   
480   cout << "The pad limits we are using are :" << endl;
481   
482   cout << Form("%5.0f <= HVSt12 <= %5.0f Volts",HVSt12LowLimit(),HVSt12HighLimit()) << endl;
483   cout << Form("%5.0f <= HVSt345 <= %5.0f Volts",HVSt345LowLimit(),HVSt345HighLimit()) << endl;
484   cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl;
485   cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl;
486   cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl;
487   cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl;
488   cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl;
489     
490   cout << Form("And we cut on charge >= %7.2f x ( pedestal sigma ) ",ChargeSigmaCut()) << endl;
491   
492   cout << "Occupancy limits are :" << endl;
493   
494   cout << Form("%e <= Manu occupancy < %7.2f",ManuOccupancyLowLimit(),ManuOccupancyHighLimit()) << endl;
495   cout << Form("%e <= Buspatch occupancy < %7.2f",BuspatchOccupancyLowLimit(),BuspatchOccupancyHighLimit()) << endl;
496   cout << Form("%e <= DE occupancy < %7.2f",DEOccupancyLowLimit(),DEOccupancyHighLimit()) << endl;
497   
498   cout << "'QAChecker' limits" << endl;  
499   cout << Form("FractionOfBuspatchOutsideOccupancyLimit = %5.2f %%",FractionOfBuspatchOutsideOccupancyLimit()*100.0) << endl;
500   cout << Form("Event size limit = %5.2f KB/event (soft) and %5.2f KB/event (hard)",fEventSizeSoftLimit,fEventSizeHardLimit) << endl;
501   if ( fTokenLostLimit > 0 )
502   {
503     cout << Form("We tolerate up to %5.2f %% token lost errors per event",fTokenLostLimit) << endl;
504   }
505   else
506   {
507     cout << "We dot not tolerate any token lost error !" << endl;
508   }
509   
510   cout << "chamber non bending resolution = |";
511   for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultNonBendingReso[iCh]);
512   cout << endl;
513   cout << "chamber bending resolution = |";
514   for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultBendingReso[iCh]);
515   cout << endl;
516   cout<<Form("maximum number of trigger tracks above which the tracking is cancelled = %d",fMaxTriggerTracks)<<endl;
517   cout<<Form("maximum number of track candidates above which the tracking is abandonned = %d",fMaxTrackCandidates)<<endl;
518
519   cout << Form("The average noise pad charge is assumed to be %7.2f fC",AverageNoisePadCharge()) << endl;
520   cout << Form("and clusters below %5.2f times this noise charge (i.e. %7.2f fC) are discarded",
521                ClusterChargeCut(),ClusterChargeCut()*AverageNoisePadCharge()) << endl;
522   cout << Form("Note that LowestPadCharge is then %7.2f fC",LowestPadCharge()) << endl;
523   
524   cout<<"\t-----------------------------------------------------"<<endl<<endl;
525   
526 }
527
528 //_____________________________________________________________________________
529 void
530 AliMUONRecoParam::SetDefaultLimits()
531 {
532         /// Set the default limits and pad goodness policy
533
534         fHVSt12Limits[0]=1500;
535         fHVSt12Limits[1]=2000;
536
537         fHVSt345Limits[0]=1500;
538         fHVSt345Limits[1]=2000;
539
540         fPedMeanLimits[0] = 20;
541         fPedMeanLimits[1] = 1024;
542         
543         fPedSigmaLimits[0] = 0.6;
544         fPedSigmaLimits[1] = 100;
545
546         fGainA1Limits[0] = 0.1;
547         fGainA1Limits[1] = 10;
548
549         fGainA2Limits[0] = -1E30;
550         fGainA2Limits[1] = 1E30;
551         
552         fGainThresLimits[0] = 0;
553         fGainThresLimits[1] = 4095;
554         
555         fPadGoodnessMask = 0x8080; // Ped is missing | HV is missing
556
557   fManuOccupancyLimits[0] = -1.0; 
558   fManuOccupancyLimits[1] = 1.0;
559
560   fBuspatchOccupancyLimits[0] = 1E-6; 
561   fBuspatchOccupancyLimits[1] = 1.0;
562
563   fDEOccupancyLimits[0] = -1.0; 
564   fDEOccupancyLimits[1] = 1.0;
565
566   fMissingPadFractionLimit = -1; // DEPRECATED
567   fFractionOfBuspatchOutsideOccupancyLimit = 0.10; // 10 % 
568
569   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)
570   
571   AverageNoisePadCharge(0.22875); // 0.22875 coulombs ~ 1.5 ADC channels
572
573   ClusterChargeCut(2.0); // will cut cluster below 2.0 x LowestPadCharge()
574   
575   SetEventSizeLimits(35.0,45.0);
576   
577   SetTokenLostLimit(0.0);
578 }
579