]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRecoParam.cxx
Updated serial number for station 345
[u/mrichter/AliRoot.git] / MUON / AliMUONRecoParam.cxx
CommitLineData
3304fa09 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
bf4d93eb 16// $Id$
3304fa09 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
30#include "AliLog.h"
004a9ccd 31#include "AliMUONPadStatusMaker.h"
3304fa09 32
33#include <Riostream.h>
34
35ClassImp(AliMUONRecoParam)
36
37
38//_____________________________________________________________________________
39AliMUONRecoParam::AliMUONRecoParam()
15d30ed4 40: AliDetectorRecoParam(),
3304fa09 41 fClusteringMode("MLEM"),
42 fTrackingMode("KALMAN"),
0e894e58 43 fMostProbBendingMomentum(0.),
3304fa09 44 fMinBendingMomentum(0.),
45 fMaxBendingMomentum(0.),
9bf6860b 46 fMaxNonBendingSlope(0.),
9f093251 47 fMaxBendingSlope(0.),
3304fa09 48 fNonBendingVertexDispersion(0.),
49 fBendingVertexDispersion(0.),
50 fMaxNonBendingDistanceToTrack(0.),
51 fMaxBendingDistanceToTrack(0.),
52 fSigmaCutForTracking(0.),
53 fSigmaCutForImprovement(0.),
fda59e58 54 fSigmaCutForTrigger(0.),
b5270f21 55 fStripCutForTrigger(0.),
56 fMaxStripAreaForTrigger(0.),
3304fa09 57 fMaxNormChi2MatchTrigger(0.),
0a18ba02 58 fPercentOfFullClusterInESD(10.),
38bcf0ef 59 fCombinedClusterTrackReco(kFALSE),
3304fa09 60 fTrackAllTracks(kFALSE),
61 fRecoverTracks(kFALSE),
62 fMakeTrackCandidatesFast(kFALSE),
9bf6860b 63 fMakeMoreTrackCandidates(kFALSE),
3304fa09 64 fComplementTracks(kFALSE),
65 fImproveTracks(kFALSE),
0a18ba02 66 fUseSmoother(kFALSE),
de98fdc9 67 fSaveFullClusterInESD(kTRUE),
9bf6860b 68 fCalibrationMode("NOGAIN"),
004a9ccd 69 fBypassSt45(0),
70 fPadGoodnessMask(0)
3304fa09 71{
72 /// Constructor
15d30ed4 73 SetNameTitle("MUON","MUON");
3304fa09 74
004a9ccd 75 SetDefaultLimits();
76
3304fa09 77 // use the default parameters for low flux environment
78 SetLowFluxParam();
79}
80
81//_____________________________________________________________________________
82AliMUONRecoParam::~AliMUONRecoParam()
83{
84 /// Destructor
85}
86
004a9ccd 87//_____________________________________________________________________________
88void
89AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5)
90{
91 /// Set the bypass status
92
93 if ( st4 && st5 ) fBypassSt45 = 45;
94 else if ( st4 ) fBypassSt45 = 4;
95 else if ( st5 ) fBypassSt45 = 5;
96 else fBypassSt45 = 0;
97}
98
9bf6860b 99//_____________________________________________________________________________
100Option_t*
101AliMUONRecoParam::GetCalibrationMode() const
102{
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
108
109 return fCalibrationMode.Data();
110}
111
3304fa09 112//_____________________________________________________________________________
113AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam()
114{
115 /// Return default reconstruction parameters for low flux environment
116
117 AliMUONRecoParam *param = new AliMUONRecoParam();
118 param->SetLowFluxParam();
119
120 return param;
121}
122
123//_____________________________________________________________________________
124AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam()
125{
126 /// Return default reconstruction parameters for high flux environment
127
128 AliMUONRecoParam *param = new AliMUONRecoParam();
129 param->SetHighFluxParam();
130
131 return param;
132}
133
0e894e58 134//_____________________________________________________________________________
135AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam()
136{
137 /// Return default reconstruction parameters for high flux environment
138
139 AliMUONRecoParam *param = new AliMUONRecoParam();
140 param->SetCosmicParam();
141
142 return param;
143}
144
3304fa09 145//_____________________________________________________________________________
146void AliMUONRecoParam::SetLowFluxParam()
147{
148 /// Set reconstruction parameters for low flux environment
149
0e894e58 150 fMostProbBendingMomentum = 2.;
9bf6860b 151 fMinBendingMomentum = 1.;
3304fa09 152 fMaxBendingMomentum = 3000.;
9bf6860b 153 fMaxNonBendingSlope = 0.3;
9f093251 154 fMaxBendingSlope = 0.4;
3304fa09 155 fNonBendingVertexDispersion = 10.;
156 fBendingVertexDispersion = 10.;
9bf6860b 157 fMaxNonBendingDistanceToTrack = 1.;
158 fMaxBendingDistanceToTrack = 1.;
3304fa09 159 fSigmaCutForTracking = 6.;
160 fSigmaCutForImprovement = 5.;
fda59e58 161 fSigmaCutForTrigger = 8.;
b5270f21 162 fStripCutForTrigger = 1.;
163 fMaxStripAreaForTrigger = 3.;
3304fa09 164 fMaxNormChi2MatchTrigger = 16.;
6cac085d 165 fCombinedClusterTrackReco = kFALSE;
3304fa09 166 fTrackAllTracks = kTRUE;
167 fRecoverTracks = kTRUE;
168 fMakeTrackCandidatesFast = kFALSE;
9bf6860b 169 fMakeMoreTrackCandidates = kFALSE;
3304fa09 170 fComplementTracks = kTRUE;
171 fImproveTracks = kTRUE;
172 fUseSmoother = kTRUE;
9bf6860b 173 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
174 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
004a9ccd 175 fBypassSt45 = 0;
3304fa09 176
177}
178
179//_____________________________________________________________________________
180void AliMUONRecoParam::SetHighFluxParam()
181{
182 /// Set reconstruction parameters for high flux environment
183
0e894e58 184 fMostProbBendingMomentum = 2.;
9bf6860b 185 fMinBendingMomentum = 1.;
3304fa09 186 fMaxBendingMomentum = 3000.;
9bf6860b 187 fMaxNonBendingSlope = 0.3;
9f093251 188 fMaxBendingSlope = 0.4;
3304fa09 189 fNonBendingVertexDispersion = 10.;
190 fBendingVertexDispersion = 10.;
9bf6860b 191 fMaxNonBendingDistanceToTrack = 1.;
192 fMaxBendingDistanceToTrack = 1.;
3304fa09 193 fSigmaCutForTracking = 6.;
194 fSigmaCutForImprovement = 5.;
fda59e58 195 fSigmaCutForTrigger = 8.;
b5270f21 196 fStripCutForTrigger = 1.;
197 fMaxStripAreaForTrigger = 3.;
3304fa09 198 fMaxNormChi2MatchTrigger = 16.;
6cac085d 199 fCombinedClusterTrackReco = kFALSE;
3304fa09 200 fTrackAllTracks = kTRUE;
201 fRecoverTracks = kTRUE;
202 fMakeTrackCandidatesFast = kFALSE;
9bf6860b 203 fMakeMoreTrackCandidates = kFALSE;
3304fa09 204 fComplementTracks = kTRUE;
205 fImproveTracks = kTRUE;
206 fUseSmoother = kTRUE;
9bf6860b 207 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
208 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
004a9ccd 209 fBypassSt45 = 0;
3304fa09 210
211}
212
0e894e58 213//_____________________________________________________________________________
214void AliMUONRecoParam::SetCosmicParam()
215{
216 /// Set reconstruction parameters for high flux environment
217
218 fMostProbBendingMomentum = 2.;
219 fMinBendingMomentum = 1.;
220 fMaxBendingMomentum = 10000000.;
221 fMaxNonBendingSlope = 0.3;
9f093251 222 fMaxBendingSlope = 0.4;
0e894e58 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;
004a9ccd 243 fBypassSt45 = 0;
0e894e58 244
245}
246
3304fa09 247//_____________________________________________________________________________
248void AliMUONRecoParam::Print(Option_t *option) const
249{
250 /// print reconstruction parameters
251 /// if option = FULL then print also unused parameters
252
253 cout<<endl<<"\t------Reconstruction parameters------"<<endl;
254
de98fdc9 255 cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
3304fa09 256 cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
3304fa09 257 cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
9bf6860b 258
004a9ccd 259 TString bypass;
260
261 if ( BypassSt45() )
262 {
263 bypass = "stations 4 and 5";
264 }
265 else if ( BypassSt4() )
266 {
267 bypass = "station 4";
268 }
269 else if ( BypassSt5() )
270 {
271 bypass = "station 5";
272 }
273
274 if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
3304fa09 275
15d30ed4 276 if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
277 else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
38bcf0ef 278
0a18ba02 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;
281
0e894e58 282 cout<<Form("Most probable bending momentum (used only if B=0) = %5.2f",fMostProbBendingMomentum)<<endl;
283
3304fa09 284 cout<<Form("Bending momentum range = [%5.2f,%5.2f]",fMinBendingMomentum,fMaxBendingMomentum)<<endl;
285
9bf6860b 286 cout<<Form("Maximum non bending slope = %5.2f",fMaxNonBendingSlope)<<endl;
287
9f093251 288 cout<<Form("Maximum bending slope (used only if B=0) = %5.2f",fMaxBendingSlope)<<endl;
289
3304fa09 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;
294
295 cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
296
297 cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
fda59e58 298
299 cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
b5270f21 300
301 cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl;
302
303 cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl;
304
3304fa09 305 if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
306 else cout<<"Track only the best candidates"<<endl;
307
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;
314
9bf6860b 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;
321
3304fa09 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;
328
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;
335
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;
342
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;
349
350 cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
351
9bf6860b 352 Bool_t discardedCh = kFALSE;
353 Int_t ch = 0;
354 do {
355 if (!UseChamber(ch)) {
356 if (!discardedCh) {
357 cout<<"Discarded chambers(1..): "<<ch+1;
358 discardedCh = kTRUE;
359 }
360 else cout<<" "<<ch+1;
361 }
362 } while (++ch < 10);
363 if (discardedCh) cout<<endl;
364
365 Bool_t discardedSt = kFALSE;
366 Int_t st = 0;
367 do {
368 if (!RequestStation(st)) {
369 if (!discardedSt) {
370 cout<<"Not requested stations(1..): "<<st+1;
371 discardedSt = kTRUE;
372 }
373 else cout<<" "<<st+1;
374 }
375 } while (++st < 5);
376 if (discardedSt) cout<<endl;
377
004a9ccd 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;
381
382 cout << "The pad limits we are using are :" << endl;
383
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;
391
3304fa09 392 cout<<"\t-------------------------------------"<<endl<<endl;
393
394}
395
004a9ccd 396//_____________________________________________________________________________
397void
398AliMUONRecoParam::SetDefaultLimits()
399{
400 /// Set the default limits and pad goodness policy
401
402 fHVSt12Limits[0]=1500;
403 fHVSt12Limits[1]=2000;
404
405 fHVSt345Limits[0]=1500;
406 fHVSt345Limits[1]=2000;
407
408 fPedMeanLimits[0] = 50;
409 fPedMeanLimits[1] = 1024;
410
411 fPedSigmaLimits[0] = 0.1;
412 fPedSigmaLimits[1] = 100;
413
414 fGainA1Limits[0] = 0.1;
415 fGainA1Limits[1] = 10;
416
417 fGainA2Limits[0] = -1E30;
418 fGainA2Limits[1] = 1E30;
419
420 fGainThresLimits[0] = 0;
421 fGainThresLimits[1] = 4095;
422
423 fPadGoodnessMask = 0x8080;
424}
425