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"
31 #include "AliMUONPadStatusMaker.h"
33 #include <Riostream.h>
35 ClassImp(AliMUONRecoParam)
38 //_____________________________________________________________________________
39 AliMUONRecoParam::AliMUONRecoParam()
40 : AliDetectorRecoParam(),
41 fClusteringMode("MLEM"),
42 fTrackingMode("KALMAN"),
43 fMinBendingMomentum(0.),
44 fMaxBendingMomentum(0.),
45 fMaxNonBendingSlope(0.),
47 fNonBendingVertexDispersion(0.),
48 fBendingVertexDispersion(0.),
49 fMaxNonBendingDistanceToTrack(0.),
50 fMaxBendingDistanceToTrack(0.),
51 fSigmaCutForTracking(0.),
52 fSigmaCutForImprovement(0.),
53 fSigmaCutForTrigger(0.),
54 fStripCutForTrigger(0.),
55 fMaxStripAreaForTrigger(0.),
56 fMaxNormChi2MatchTrigger(0.),
57 fPercentOfFullClusterInESD(10.),
58 fCombinedClusterTrackReco(kFALSE),
59 fTrackAllTracks(kFALSE),
60 fRecoverTracks(kFALSE),
61 fMakeTrackCandidatesFast(kFALSE),
62 fMakeMoreTrackCandidates(kFALSE),
63 fComplementTracks(kFALSE),
64 fImproveTracks(kFALSE),
66 fSaveFullClusterInESD(kTRUE),
67 fCalibrationMode("NOGAIN"),
73 SetNameTitle("MUON","MUON");
77 // use the default parameters for low flux environment
81 //_____________________________________________________________________________
82 AliMUONRecoParam::~AliMUONRecoParam()
87 //_____________________________________________________________________________
89 AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5)
91 /// Set the bypass status
93 if ( st4 && st5 ) fBypassSt45 = 45;
94 else if ( st4 ) fBypassSt45 = 4;
95 else if ( st5 ) fBypassSt45 = 5;
99 //_____________________________________________________________________________
101 AliMUONRecoParam::GetCalibrationMode() const
103 /// Return the calibration mode. Can be :
104 /// NOGAIN : only do pedestal subtraction
105 /// GAIN : do pedestal subtraction, and apply gain correction, but with a
106 /// single capacitance value for all channels
107 /// GAINCONSTANTCAPA : as GAIN, but with a channel-dependent capacitance value
109 return fCalibrationMode.Data();
112 //_____________________________________________________________________________
113 AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam()
115 /// Return default reconstruction parameters for low flux environment
117 AliMUONRecoParam *param = new AliMUONRecoParam();
118 param->SetLowFluxParam();
123 //_____________________________________________________________________________
124 AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam()
126 /// Return default reconstruction parameters for high flux environment
128 AliMUONRecoParam *param = new AliMUONRecoParam();
129 param->SetHighFluxParam();
134 //_____________________________________________________________________________
135 AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam()
137 /// Return default reconstruction parameters for high flux environment
139 AliMUONRecoParam *param = new AliMUONRecoParam();
140 param->SetCosmicParam();
145 //_____________________________________________________________________________
146 void AliMUONRecoParam::SetLowFluxParam()
148 /// Set reconstruction parameters for low flux environment
150 fMinBendingMomentum = 1.;
151 fMaxBendingMomentum = 3000.;
152 fMaxNonBendingSlope = 0.3;
153 fMaxBendingSlope = 0.4;
154 fNonBendingVertexDispersion = 10.;
155 fBendingVertexDispersion = 10.;
156 fMaxNonBendingDistanceToTrack = 1.;
157 fMaxBendingDistanceToTrack = 1.;
158 fSigmaCutForTracking = 6.;
159 fSigmaCutForImprovement = 5.;
160 fSigmaCutForTrigger = 8.;
161 fStripCutForTrigger = 1.;
162 fMaxStripAreaForTrigger = 3.;
163 fMaxNormChi2MatchTrigger = 16.;
164 fCombinedClusterTrackReco = kFALSE;
165 fTrackAllTracks = kTRUE;
166 fRecoverTracks = kTRUE;
167 fMakeTrackCandidatesFast = kFALSE;
168 fMakeMoreTrackCandidates = kFALSE;
169 fComplementTracks = kTRUE;
170 fImproveTracks = kTRUE;
171 fUseSmoother = kTRUE;
172 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
173 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
178 //_____________________________________________________________________________
179 void AliMUONRecoParam::SetHighFluxParam()
181 /// Set reconstruction parameters for high flux environment
183 fMinBendingMomentum = 1.;
184 fMaxBendingMomentum = 3000.;
185 fMaxNonBendingSlope = 0.3;
186 fMaxBendingSlope = 0.4;
187 fNonBendingVertexDispersion = 10.;
188 fBendingVertexDispersion = 10.;
189 fMaxNonBendingDistanceToTrack = 1.;
190 fMaxBendingDistanceToTrack = 1.;
191 fSigmaCutForTracking = 6.;
192 fSigmaCutForImprovement = 5.;
193 fSigmaCutForTrigger = 8.;
194 fStripCutForTrigger = 1.;
195 fMaxStripAreaForTrigger = 3.;
196 fMaxNormChi2MatchTrigger = 16.;
197 fCombinedClusterTrackReco = kFALSE;
198 fTrackAllTracks = kTRUE;
199 fRecoverTracks = kTRUE;
200 fMakeTrackCandidatesFast = kFALSE;
201 fMakeMoreTrackCandidates = kFALSE;
202 fComplementTracks = kTRUE;
203 fImproveTracks = kTRUE;
204 fUseSmoother = kTRUE;
205 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
206 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
211 //_____________________________________________________________________________
213 AliMUONRecoParam::RequestedStationMask() const
215 /// Get the mask of the requested station, i.e. an integer where
216 /// bit n is set to one if the station n was requested
220 for ( Int_t i = 0; i < 5; ++i )
222 if ( RequestStation(i) ) m |= ( 1 << i );
227 //_____________________________________________________________________________
228 void AliMUONRecoParam::SetCosmicParam()
230 /// Set reconstruction parameters for high flux environment
232 fMinBendingMomentum = 1.;
233 fMaxBendingMomentum = 10000000.;
234 fMaxNonBendingSlope = 0.3;
235 fMaxBendingSlope = 0.4;
236 fNonBendingVertexDispersion = 10.;
237 fBendingVertexDispersion = 10.;
238 fMaxNonBendingDistanceToTrack = 10.;
239 fMaxBendingDistanceToTrack = 10.;
240 fSigmaCutForTracking = 20.;
241 fSigmaCutForImprovement = 20.;
242 fSigmaCutForTrigger = 8.;
243 fMaxNormChi2MatchTrigger = 16.;
244 fPercentOfFullClusterInESD = 100.;
245 fCombinedClusterTrackReco = kFALSE;
246 fTrackAllTracks = kTRUE;
247 fRecoverTracks = kTRUE;
248 fMakeTrackCandidatesFast = kFALSE;
249 fMakeMoreTrackCandidates = kFALSE;
250 fComplementTracks = kTRUE;
251 fImproveTracks = kTRUE;
252 fUseSmoother = kTRUE;
253 fSaveFullClusterInESD = kTRUE;
254 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
255 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
260 //_____________________________________________________________________________
261 void AliMUONRecoParam::Print(Option_t *option) const
263 /// print reconstruction parameters
264 /// if option = FULL then print also unused parameters
266 cout<<endl<<"\t------Reconstruction parameters------"<<endl;
268 cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
269 cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
270 cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
276 bypass = "stations 4 and 5";
278 else if ( BypassSt4() )
280 bypass = "station 4";
282 else if ( BypassSt5() )
284 bypass = "station 5";
287 if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
289 if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
290 else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
292 if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
293 else cout<<"Save partial cluster info in ESD"<<endl;
295 cout<<Form("Bending momentum range = [%5.2f,%5.2f]",fMinBendingMomentum,fMaxBendingMomentum)<<endl;
297 cout<<Form("Maximum non bending slope = %5.2f",fMaxNonBendingSlope)<<endl;
299 cout<<Form("Maximum bending slope (used only if B=0) = %5.2f",fMaxBendingSlope)<<endl;
301 if (strstr(fTrackingMode,"ORIGINAL"))
302 cout<<Form("Vertex dispertion = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
303 else if (strstr(option,"FULL"))
304 cout<<Form("Vertex dispertion (used for original tracking only) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
306 cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
308 cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
310 cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
312 cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl;
314 cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl;
316 if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
317 else cout<<"Track only the best candidates"<<endl;
319 if (strstr(option,"FULL")) {
320 cout<<"Make track candidates assuming linear propagation between stations 4 and 5: ";
321 if (fMakeTrackCandidatesFast) cout<<"ON"<<endl;
322 else cout<<"OFF"<<endl;
323 } else if (fMakeTrackCandidatesFast)
324 cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl;
326 if (strstr(option,"FULL")) {
327 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: ";
328 if (fMakeMoreTrackCandidates) cout<<"ON"<<endl;
329 else cout<<"OFF"<<endl;
330 } else if (fMakeMoreTrackCandidates)
331 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl;
333 if (strstr(option,"FULL")) {
334 cout<<"Try to recover tracks getting lost during tracking: ";
335 if (fRecoverTracks) cout<<"ON"<<endl;
336 else cout<<"OFF"<<endl;
337 } else if (fRecoverTracks)
338 cout<<"Try to recover tracks getting lost during tracking"<<endl;
340 if (strstr(option,"FULL")) {
341 cout<<"Try to complete the reconstructed tracks by adding missing clusters: ";
342 if (fComplementTracks) cout<<"ON"<<endl;
343 else cout<<"OFF"<<endl;
344 } else if (fComplementTracks)
345 cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl;
347 if (strstr(option,"FULL")) {
348 cout<<"Try to improve the reconstructed tracks by removing bad clusters: ";
349 if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
350 else cout<<"OFF"<<endl;
351 } else if (fImproveTracks)
352 cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
354 if (strstr(option,"FULL")) {
355 cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
356 if (fUseSmoother) cout<<"ON"<<endl;
357 else cout<<"OFF"<<endl;
358 } else if (fUseSmoother)
359 cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl;
361 cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
363 Bool_t discardedCh = kFALSE;
366 if (!UseChamber(ch)) {
368 cout<<"Discarded chambers(1..): "<<ch+1;
371 else cout<<" "<<ch+1;
374 if (discardedCh) cout<<endl;
376 Bool_t discardedSt = kFALSE;
379 if (!RequestStation(st)) {
381 cout<<"Not requested stations(1..): "<<st+1;
384 else cout<<" "<<st+1;
387 if (discardedSt) cout<<endl;
389 cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl;
390 cout << "Which means we reject pads having the condition = " <<
391 AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl;
393 cout << "The pad limits we are using are :" << endl;
395 cout << Form("%5.0f <= HVSt12 <= %5.0f Volts",HVSt12LowLimit(),HVSt12HighLimit()) << endl;
396 cout << Form("%5.0f <= HVSt345 <= %5.0f Volts",HVSt345LowLimit(),HVSt345HighLimit()) << endl;
397 cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl;
398 cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl;
399 cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl;
400 cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl;
401 cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl;
403 cout << Form("And we cut on charge >= %7.2f x ( pedestal sigma ) ",ChargeSigmaCut()) << endl;
405 cout<<"\t-------------------------------------"<<endl<<endl;
409 //_____________________________________________________________________________
411 AliMUONRecoParam::SetDefaultLimits()
413 /// Set the default limits and pad goodness policy
415 fHVSt12Limits[0]=1500;
416 fHVSt12Limits[1]=2000;
418 fHVSt345Limits[0]=1500;
419 fHVSt345Limits[1]=2000;
421 fPedMeanLimits[0] = 50;
422 fPedMeanLimits[1] = 1024;
424 fPedSigmaLimits[0] = 0.1;
425 fPedSigmaLimits[1] = 100;
427 fGainA1Limits[0] = 0.1;
428 fGainA1Limits[1] = 10;
430 fGainA2Limits[0] = -1E30;
431 fGainA2Limits[1] = 1E30;
433 fGainThresLimits[0] = 0;
434 fGainThresLimits[1] = 4095;
436 fPadGoodnessMask = 0x8080;
438 fChargeSigmaCut = 4.0;