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 <Riostream.h>
36 ClassImp(AliMUONRecoParam)
39 //_____________________________________________________________________________
40 AliMUONRecoParam::AliMUONRecoParam()
41 : AliDetectorRecoParam(),
42 fClusteringMode("MLEM"),
43 fTrackingMode("KALMAN"),
44 fMinBendingMomentum(0.),
45 fMaxBendingMomentum(0.),
46 fMaxNonBendingSlope(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),
67 fSaveFullClusterInESD(kTRUE),
68 fCalibrationMode("NOGAIN"),
72 fRemoveConnectedTracksInSt12(kFALSE),
74 fMaxTrackCandidates(0)
78 SetNameTitle("Dummy","Dummy");
82 //_____________________________________________________________________________
83 AliMUONRecoParam::~AliMUONRecoParam()
88 //_____________________________________________________________________________
90 AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5)
92 /// Set the bypass status
94 if ( st4 && st5 ) fBypassSt45 = 45;
95 else if ( st4 ) fBypassSt45 = 4;
96 else if ( st5 ) fBypassSt45 = 5;
100 //_____________________________________________________________________________
102 AliMUONRecoParam::GetCalibrationMode() const
104 /// Return the calibration mode. Can be :
105 /// NOGAIN : only do pedestal subtraction
106 /// GAIN : do pedestal subtraction, and apply gain correction, but with a
107 /// single capacitance value for all channels
108 /// GAINCONSTANTCAPA : as GAIN, but with a channel-dependent capacitance value
110 return fCalibrationMode.Data();
113 //_____________________________________________________________________________
114 AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam()
116 /// Return default reconstruction parameters for low flux environment
118 AliMUONRecoParam *param = new AliMUONRecoParam();
119 param->SetLowFluxParam();
124 //_____________________________________________________________________________
125 AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam()
127 /// Return default reconstruction parameters for high flux environment
129 AliMUONRecoParam *param = new AliMUONRecoParam();
130 param->SetHighFluxParam();
135 //_____________________________________________________________________________
136 AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam()
138 /// Return default reconstruction parameters for high flux environment
140 AliMUONRecoParam *param = new AliMUONRecoParam();
141 param->SetCosmicParam();
146 //_____________________________________________________________________________
147 void AliMUONRecoParam::SetLowFluxParam()
149 /// Set reconstruction parameters for low flux environment
151 SetNameTitle("Low Flux","Low Flux");
152 SetEventSpecie(AliRecoParam::kLowMult);
153 fMinBendingMomentum = 1.;
154 fMaxBendingMomentum = 3000.;
155 fMaxNonBendingSlope = 0.3;
156 fMaxBendingSlope = 0.4;
157 fNonBendingVertexDispersion = 10.;
158 fBendingVertexDispersion = 10.;
159 fMaxNonBendingDistanceToTrack = 1.;
160 fMaxBendingDistanceToTrack = 1.;
161 fSigmaCutForTracking = 6.;
162 fSigmaCutForImprovement = 5.;
163 fSigmaCutForTrigger = 8.;
164 fStripCutForTrigger = 1.;
165 fMaxStripAreaForTrigger = 3.;
166 fMaxNormChi2MatchTrigger = 16.;
167 fCombinedClusterTrackReco = kFALSE;
168 fTrackAllTracks = kTRUE;
169 fRecoverTracks = kTRUE;
170 fMakeTrackCandidatesFast = kFALSE;
171 fMakeMoreTrackCandidates = kFALSE;
172 fComplementTracks = kTRUE;
173 fImproveTracks = kTRUE;
174 fRemoveConnectedTracksInSt12 = kTRUE;
175 fUseSmoother = kTRUE;
176 for (Int_t iCh = 0; iCh < 10; iCh++) {
177 fUseChamber[iCh] = kTRUE;
178 fDefaultNonBendingReso[iCh] = 0.144;
179 fDefaultBendingReso[iCh] = 0.01;
181 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
183 fMaxTriggerTracks = 100;
184 fMaxTrackCandidates = 10000;
188 //_____________________________________________________________________________
189 void AliMUONRecoParam::SetHighFluxParam()
191 /// Set reconstruction parameters for high flux environment
193 SetNameTitle("High Flux","High Flux");
194 SetEventSpecie(AliRecoParam::kHighMult);
195 fMinBendingMomentum = 1.;
196 fMaxBendingMomentum = 3000.;
197 fMaxNonBendingSlope = 0.3;
198 fMaxBendingSlope = 0.4;
199 fNonBendingVertexDispersion = 10.;
200 fBendingVertexDispersion = 10.;
201 fMaxNonBendingDistanceToTrack = 1.;
202 fMaxBendingDistanceToTrack = 1.;
203 fSigmaCutForTracking = 6.;
204 fSigmaCutForImprovement = 5.;
205 fSigmaCutForTrigger = 8.;
206 fStripCutForTrigger = 1.;
207 fMaxStripAreaForTrigger = 3.;
208 fMaxNormChi2MatchTrigger = 16.;
209 fCombinedClusterTrackReco = kFALSE;
210 fTrackAllTracks = kTRUE;
211 fRecoverTracks = kTRUE;
212 fMakeTrackCandidatesFast = kFALSE;
213 fMakeMoreTrackCandidates = kFALSE;
214 fComplementTracks = kTRUE;
215 fImproveTracks = kTRUE;
216 fRemoveConnectedTracksInSt12 = kFALSE;
217 fUseSmoother = kTRUE;
218 for (Int_t iCh = 0; iCh < 10; iCh++) {
219 fUseChamber[iCh] = kTRUE;
220 fDefaultNonBendingReso[iCh] = 0.144;
221 fDefaultBendingReso[iCh] = 0.01;
223 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
225 fMaxTriggerTracks = 100;
226 fMaxTrackCandidates = 10000;
230 //_____________________________________________________________________________
231 void AliMUONRecoParam::SetCosmicParam()
233 /// Set reconstruction parameters for high flux environment
235 SetNameTitle("Cosmic","Cosmic");
236 SetEventSpecie(AliRecoParam::kCosmic);
237 fMinBendingMomentum = 1.;
238 fMaxBendingMomentum = 10000000.;
239 fMaxNonBendingSlope = 0.3;
240 fMaxBendingSlope = 0.4;
241 fNonBendingVertexDispersion = 10.;
242 fBendingVertexDispersion = 10.;
243 fMaxNonBendingDistanceToTrack = 10.;
244 fMaxBendingDistanceToTrack = 10.;
245 fSigmaCutForTracking = 7.;
246 fSigmaCutForImprovement = 7.;
247 fSigmaCutForTrigger = 8.;
248 fStripCutForTrigger = 1.5;
249 fMaxStripAreaForTrigger = 3.;
250 fMaxNormChi2MatchTrigger = 16.;
251 fPercentOfFullClusterInESD = 100.;
252 fCombinedClusterTrackReco = kFALSE;
253 fTrackAllTracks = kTRUE;
254 fRecoverTracks = kTRUE;
255 fMakeTrackCandidatesFast = kFALSE;
256 fMakeMoreTrackCandidates = kFALSE;
257 fComplementTracks = kTRUE;
258 fImproveTracks = kTRUE;
259 fRemoveConnectedTracksInSt12 = kTRUE;
260 fUseSmoother = kTRUE;
261 fSaveFullClusterInESD = kTRUE;
262 for (Int_t iCh = 0; iCh < 10; iCh++) {
263 fUseChamber[iCh] = kTRUE;
264 fDefaultNonBendingReso[iCh] = 0.4;
265 fDefaultBendingReso[iCh] = 0.4;
267 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
269 fPadGoodnessMask = 0x400BE80;
270 fMaxTriggerTracks = 100;
271 fMaxTrackCandidates = 10000;
275 //_____________________________________________________________________________
277 AliMUONRecoParam::RequestedStationMask() const
279 /// Get the mask of the requested station, i.e. an integer where
280 /// bit n is set to one if the station n was requested
284 for ( Int_t i = 0; i < 5; ++i )
286 if ( RequestStation(i) ) m |= ( 1 << i );
291 //_____________________________________________________________________________
292 void AliMUONRecoParam::Print(Option_t *option) const
294 /// print reconstruction parameters
295 /// if option = FULL then print also unused parameters
297 cout<<endl<<"\t------MUON Reconstruction parameters ("<<GetName()<<")------"<<endl;
299 if (IsDefault()) cout<<"\t\t*** Parameters used by default ***"<<endl;
301 cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
302 cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
303 cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
309 bypass = "stations 4 and 5";
311 else if ( BypassSt4() )
313 bypass = "station 4";
315 else if ( BypassSt5() )
317 bypass = "station 5";
320 if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
322 if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
323 else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
325 if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
326 else cout<<"Save partial cluster info in ESD"<<endl;
328 cout<<Form("Bending momentum range = [%5.2f,%5.2f]",fMinBendingMomentum,fMaxBendingMomentum)<<endl;
330 cout<<Form("Maximum non bending slope = %5.2f",fMaxNonBendingSlope)<<endl;
332 cout<<Form("Maximum bending slope (used only if B=0) = %5.2f",fMaxBendingSlope)<<endl;
334 if (strstr(fTrackingMode,"ORIGINAL"))
335 cout<<Form("Vertex dispertion = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
336 else if (strstr(option,"FULL"))
337 cout<<Form("Vertex dispertion (used for original tracking only) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
339 cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
341 cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
343 cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
345 cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl;
347 cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl;
349 if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
350 else cout<<"Track only the best candidates"<<endl;
352 if (strstr(option,"FULL")) {
353 cout<<"Make track candidates assuming linear propagation between stations 4 and 5: ";
354 if (fMakeTrackCandidatesFast) cout<<"ON"<<endl;
355 else cout<<"OFF"<<endl;
356 } else if (fMakeTrackCandidatesFast)
357 cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl;
359 if (strstr(option,"FULL")) {
360 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: ";
361 if (fMakeMoreTrackCandidates) cout<<"ON"<<endl;
362 else cout<<"OFF"<<endl;
363 } else if (fMakeMoreTrackCandidates)
364 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl;
366 if (strstr(option,"FULL")) {
367 cout<<"Try to recover tracks getting lost during tracking: ";
368 if (fRecoverTracks) cout<<"ON"<<endl;
369 else cout<<"OFF"<<endl;
370 } else if (fRecoverTracks)
371 cout<<"Try to recover tracks getting lost during tracking"<<endl;
373 if (strstr(option,"FULL")) {
374 cout<<"Try to complete the reconstructed tracks by adding missing clusters: ";
375 if (fComplementTracks) cout<<"ON"<<endl;
376 else cout<<"OFF"<<endl;
377 } else if (fComplementTracks)
378 cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl;
380 if (strstr(option,"FULL")) {
381 cout<<"Try to improve the reconstructed tracks by removing bad clusters: ";
382 if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
383 else cout<<"OFF"<<endl;
384 } else if (fImproveTracks)
385 cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
387 if (fRemoveConnectedTracksInSt12) cout<<"Remove tracks sharing one cluster or more in any station"<<endl;
388 else cout<<"Remove tracks sharing one cluster or more in stations 3, 4 and 5"<<endl;
390 if (strstr(option,"FULL")) {
391 cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
392 if (fUseSmoother) cout<<"ON"<<endl;
393 else cout<<"OFF"<<endl;
394 } else if (fUseSmoother)
395 cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl;
397 cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
399 Bool_t discardedCh = kFALSE;
402 if (!UseChamber(ch)) {
404 cout<<"Discarded chambers(1..): "<<ch+1;
407 else cout<<" "<<ch+1;
410 if (discardedCh) cout<<endl;
412 Bool_t discardedSt = kFALSE;
415 if (!RequestStation(st)) {
417 cout<<"Not requested stations(1..): "<<st+1;
420 else cout<<" "<<st+1;
423 if (discardedSt) cout<<endl;
425 cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl;
426 cout << "Which means we reject pads having the condition = " <<
427 AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl;
429 cout << "The pad limits we are using are :" << endl;
431 cout << Form("%5.0f <= HVSt12 <= %5.0f Volts",HVSt12LowLimit(),HVSt12HighLimit()) << endl;
432 cout << Form("%5.0f <= HVSt345 <= %5.0f Volts",HVSt345LowLimit(),HVSt345HighLimit()) << endl;
433 cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl;
434 cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl;
435 cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl;
436 cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl;
437 cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl;
439 cout << Form("And we cut on charge >= %7.2f x ( pedestal sigma ) ",ChargeSigmaCut()) << endl;
441 cout << "chamber non bending resolution = |";
442 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultNonBendingReso[iCh]);
444 cout << "chamber bending resolution = |";
445 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultBendingReso[iCh]);
447 cout<<Form("maximum number of trigger tracks above which the tracking is cancelled = %d",fMaxTriggerTracks)<<endl;
448 cout<<Form("maximum number of track candidates above which the tracking abort = %d",fMaxTrackCandidates)<<endl;
450 cout<<"\t-----------------------------------------------------"<<endl<<endl;
454 //_____________________________________________________________________________
456 AliMUONRecoParam::SetDefaultLimits()
458 /// Set the default limits and pad goodness policy
460 fHVSt12Limits[0]=1500;
461 fHVSt12Limits[1]=2000;
463 fHVSt345Limits[0]=1500;
464 fHVSt345Limits[1]=2000;
466 fPedMeanLimits[0] = 50;
467 fPedMeanLimits[1] = 1024;
469 fPedSigmaLimits[0] = 0.6;
470 fPedSigmaLimits[1] = 100;
472 fGainA1Limits[0] = 0.1;
473 fGainA1Limits[1] = 10;
475 fGainA2Limits[0] = -1E30;
476 fGainA2Limits[1] = 1E30;
478 fGainThresLimits[0] = 0;
479 fGainThresLimits[1] = 4095;
481 fPadGoodnessMask = 0x8080;
483 fChargeSigmaCut = 4.0;