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 fMostProbBendingMomentum(0.),
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"),
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 fMostProbBendingMomentum = 2.;
151 fMinBendingMomentum = 1.;
152 fMaxBendingMomentum = 3000.;
153 fMaxNonBendingSlope = 0.3;
154 fMaxBendingSlope = 0.4;
155 fNonBendingVertexDispersion = 10.;
156 fBendingVertexDispersion = 10.;
157 fMaxNonBendingDistanceToTrack = 1.;
158 fMaxBendingDistanceToTrack = 1.;
159 fSigmaCutForTracking = 6.;
160 fSigmaCutForImprovement = 5.;
161 fSigmaCutForTrigger = 8.;
162 fStripCutForTrigger = 1.;
163 fMaxStripAreaForTrigger = 3.;
164 fMaxNormChi2MatchTrigger = 16.;
165 fCombinedClusterTrackReco = kFALSE;
166 fTrackAllTracks = kTRUE;
167 fRecoverTracks = kTRUE;
168 fMakeTrackCandidatesFast = kFALSE;
169 fMakeMoreTrackCandidates = kFALSE;
170 fComplementTracks = kTRUE;
171 fImproveTracks = kTRUE;
172 fUseSmoother = kTRUE;
173 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
174 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
179 //_____________________________________________________________________________
180 void AliMUONRecoParam::SetHighFluxParam()
182 /// Set reconstruction parameters for high flux environment
184 fMostProbBendingMomentum = 2.;
185 fMinBendingMomentum = 1.;
186 fMaxBendingMomentum = 3000.;
187 fMaxNonBendingSlope = 0.3;
188 fMaxBendingSlope = 0.4;
189 fNonBendingVertexDispersion = 10.;
190 fBendingVertexDispersion = 10.;
191 fMaxNonBendingDistanceToTrack = 1.;
192 fMaxBendingDistanceToTrack = 1.;
193 fSigmaCutForTracking = 6.;
194 fSigmaCutForImprovement = 5.;
195 fSigmaCutForTrigger = 8.;
196 fStripCutForTrigger = 1.;
197 fMaxStripAreaForTrigger = 3.;
198 fMaxNormChi2MatchTrigger = 16.;
199 fCombinedClusterTrackReco = kFALSE;
200 fTrackAllTracks = kTRUE;
201 fRecoverTracks = kTRUE;
202 fMakeTrackCandidatesFast = kFALSE;
203 fMakeMoreTrackCandidates = kFALSE;
204 fComplementTracks = kTRUE;
205 fImproveTracks = kTRUE;
206 fUseSmoother = kTRUE;
207 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
208 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
213 //_____________________________________________________________________________
214 void AliMUONRecoParam::SetCosmicParam()
216 /// Set reconstruction parameters for high flux environment
218 fMostProbBendingMomentum = 2.;
219 fMinBendingMomentum = 1.;
220 fMaxBendingMomentum = 10000000.;
221 fMaxNonBendingSlope = 0.3;
222 fMaxBendingSlope = 0.4;
223 fNonBendingVertexDispersion = 10.;
224 fBendingVertexDispersion = 10.;
225 fMaxNonBendingDistanceToTrack = 10.;
226 fMaxBendingDistanceToTrack = 10.;
227 fSigmaCutForTracking = 20.;
228 fSigmaCutForImprovement = 20.;
229 fSigmaCutForTrigger = 8.;
230 fMaxNormChi2MatchTrigger = 16.;
231 fPercentOfFullClusterInESD = 100.;
232 fCombinedClusterTrackReco = kFALSE;
233 fTrackAllTracks = kTRUE;
234 fRecoverTracks = kTRUE;
235 fMakeTrackCandidatesFast = kFALSE;
236 fMakeMoreTrackCandidates = kFALSE;
237 fComplementTracks = kTRUE;
238 fImproveTracks = kTRUE;
239 fUseSmoother = kTRUE;
240 fSaveFullClusterInESD = kTRUE;
241 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
242 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
247 //_____________________________________________________________________________
248 void AliMUONRecoParam::Print(Option_t *option) const
250 /// print reconstruction parameters
251 /// if option = FULL then print also unused parameters
253 cout<<endl<<"\t------Reconstruction parameters------"<<endl;
255 cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
256 cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
257 cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
263 bypass = "stations 4 and 5";
265 else if ( BypassSt4() )
267 bypass = "station 4";
269 else if ( BypassSt5() )
271 bypass = "station 5";
274 if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
276 if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
277 else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
279 if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
280 else cout<<"Save partial cluster info in ESD"<<endl;
282 cout<<Form("Most probable bending momentum (used only if B=0) = %5.2f",fMostProbBendingMomentum)<<endl;
284 cout<<Form("Bending momentum range = [%5.2f,%5.2f]",fMinBendingMomentum,fMaxBendingMomentum)<<endl;
286 cout<<Form("Maximum non bending slope = %5.2f",fMaxNonBendingSlope)<<endl;
288 cout<<Form("Maximum bending slope (used only if B=0) = %5.2f",fMaxBendingSlope)<<endl;
290 if (strstr(fTrackingMode,"ORIGINAL"))
291 cout<<Form("Vertex dispertion = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
292 else if (strstr(option,"FULL"))
293 cout<<Form("Vertex dispertion (used for original tracking only) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
295 cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
297 cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
299 cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
301 cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl;
303 cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl;
305 if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
306 else cout<<"Track only the best candidates"<<endl;
308 if (strstr(option,"FULL")) {
309 cout<<"Make track candidates assuming linear propagation between stations 4 and 5: ";
310 if (fMakeTrackCandidatesFast) cout<<"ON"<<endl;
311 else cout<<"OFF"<<endl;
312 } else if (fMakeTrackCandidatesFast)
313 cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl;
315 if (strstr(option,"FULL")) {
316 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: ";
317 if (fMakeMoreTrackCandidates) cout<<"ON"<<endl;
318 else cout<<"OFF"<<endl;
319 } else if (fMakeMoreTrackCandidates)
320 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl;
322 if (strstr(option,"FULL")) {
323 cout<<"Try to recover tracks getting lost during tracking: ";
324 if (fRecoverTracks) cout<<"ON"<<endl;
325 else cout<<"OFF"<<endl;
326 } else if (fRecoverTracks)
327 cout<<"Try to recover tracks getting lost during tracking"<<endl;
329 if (strstr(option,"FULL")) {
330 cout<<"Try to complete the reconstructed tracks by adding missing clusters: ";
331 if (fComplementTracks) cout<<"ON"<<endl;
332 else cout<<"OFF"<<endl;
333 } else if (fComplementTracks)
334 cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl;
336 if (strstr(option,"FULL")) {
337 cout<<"Try to improve the reconstructed tracks by removing bad clusters: ";
338 if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
339 else cout<<"OFF"<<endl;
340 } else if (fImproveTracks)
341 cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
343 if (strstr(option,"FULL")) {
344 cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
345 if (fUseSmoother) cout<<"ON"<<endl;
346 else cout<<"OFF"<<endl;
347 } else if (fUseSmoother)
348 cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl;
350 cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
352 Bool_t discardedCh = kFALSE;
355 if (!UseChamber(ch)) {
357 cout<<"Discarded chambers(1..): "<<ch+1;
360 else cout<<" "<<ch+1;
363 if (discardedCh) cout<<endl;
365 Bool_t discardedSt = kFALSE;
368 if (!RequestStation(st)) {
370 cout<<"Not requested stations(1..): "<<st+1;
373 else cout<<" "<<st+1;
376 if (discardedSt) cout<<endl;
378 cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl;
379 cout << "Which means we reject pads having the condition = " <<
380 AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl;
382 cout << "The pad limits we are using are :" << endl;
384 cout << Form("%5.0f <= HVSt12 <= %5.0f Volts",HVSt12LowLimit(),HVSt12HighLimit()) << endl;
385 cout << Form("%5.0f <= HVSt345 <= %5.0f Volts",HVSt345LowLimit(),HVSt345HighLimit()) << endl;
386 cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl;
387 cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl;
388 cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl;
389 cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl;
390 cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl;
392 cout<<"\t-------------------------------------"<<endl<<endl;
396 //_____________________________________________________________________________
398 AliMUONRecoParam::SetDefaultLimits()
400 /// Set the default limits and pad goodness policy
402 fHVSt12Limits[0]=1500;
403 fHVSt12Limits[1]=2000;
405 fHVSt345Limits[0]=1500;
406 fHVSt345Limits[1]=2000;
408 fPedMeanLimits[0] = 50;
409 fPedMeanLimits[1] = 1024;
411 fPedSigmaLimits[0] = 0.1;
412 fPedSigmaLimits[1] = 100;
414 fGainA1Limits[0] = 0.1;
415 fGainA1Limits[1] = 10;
417 fGainA2Limits[0] = -1E30;
418 fGainA2Limits[1] = 1E30;
420 fGainThresLimits[0] = 0;
421 fGainThresLimits[1] = 4095;
423 fPadGoodnessMask = 0x8080;