]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRecoParam.cxx
Trigger related changes :
[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"
ad3c6eda 29#include "AliMUONPadStatusMaker.h"
3304fa09 30
ad3c6eda 31#include "AliRecoParam.h"
3304fa09 32#include "AliLog.h"
33
34#include <Riostream.h>
35
36ClassImp(AliMUONRecoParam)
37
38
39//_____________________________________________________________________________
40AliMUONRecoParam::AliMUONRecoParam()
15d30ed4 41: AliDetectorRecoParam(),
3304fa09 42 fClusteringMode("MLEM"),
43 fTrackingMode("KALMAN"),
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),
170f4046 70 fPadGoodnessMask(0),
c59f70b9 71 fChargeSigmaCut(4.0),
72 fRemoveConnectedTracksInSt12(kFALSE)
3304fa09 73{
74 /// Constructor
75
ad3c6eda 76 SetNameTitle("Dummy","Dummy");
77 SetDefaultLimits();
3304fa09 78}
79
80//_____________________________________________________________________________
81AliMUONRecoParam::~AliMUONRecoParam()
82{
83 /// Destructor
84}
85
004a9ccd 86//_____________________________________________________________________________
87void
88AliMUONRecoParam::BypassSt45(Bool_t st4, Bool_t st5)
89{
90 /// Set the bypass status
91
92 if ( st4 && st5 ) fBypassSt45 = 45;
93 else if ( st4 ) fBypassSt45 = 4;
94 else if ( st5 ) fBypassSt45 = 5;
95 else fBypassSt45 = 0;
96}
97
9bf6860b 98//_____________________________________________________________________________
99Option_t*
100AliMUONRecoParam::GetCalibrationMode() const
101{
102 /// Return the calibration mode. Can be :
103 /// NOGAIN : only do pedestal subtraction
104 /// GAIN : do pedestal subtraction, and apply gain correction, but with a
105 /// single capacitance value for all channels
106 /// GAINCONSTANTCAPA : as GAIN, but with a channel-dependent capacitance value
107
108 return fCalibrationMode.Data();
109}
110
3304fa09 111//_____________________________________________________________________________
112AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam()
113{
114 /// Return default reconstruction parameters for low flux environment
115
116 AliMUONRecoParam *param = new AliMUONRecoParam();
117 param->SetLowFluxParam();
118
119 return param;
120}
121
122//_____________________________________________________________________________
123AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam()
124{
125 /// Return default reconstruction parameters for high flux environment
126
127 AliMUONRecoParam *param = new AliMUONRecoParam();
128 param->SetHighFluxParam();
129
130 return param;
131}
132
0e894e58 133//_____________________________________________________________________________
134AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam()
135{
136 /// Return default reconstruction parameters for high flux environment
137
138 AliMUONRecoParam *param = new AliMUONRecoParam();
139 param->SetCosmicParam();
140
141 return param;
142}
143
3304fa09 144//_____________________________________________________________________________
145void AliMUONRecoParam::SetLowFluxParam()
146{
147 /// Set reconstruction parameters for low flux environment
148
ad3c6eda 149 SetNameTitle("Low Flux","Low Flux");
150 SetEventSpecie(AliRecoParam::kLowMult);
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;
c59f70b9 172 fRemoveConnectedTracksInSt12 = kTRUE;
3304fa09 173 fUseSmoother = kTRUE;
35be7ed7 174 for (Int_t iCh = 0; iCh < 10; iCh++) {
175 fUseChamber[iCh] = kTRUE;
176 fDefaultNonBendingReso[iCh] = 0.144;
177 fDefaultBendingReso[iCh] = 0.01;
178 }
9bf6860b 179 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
004a9ccd 180 fBypassSt45 = 0;
3304fa09 181
182}
183
184//_____________________________________________________________________________
185void AliMUONRecoParam::SetHighFluxParam()
186{
187 /// Set reconstruction parameters for high flux environment
188
ad3c6eda 189 SetNameTitle("High Flux","High Flux");
190 SetEventSpecie(AliRecoParam::kHighMult);
9bf6860b 191 fMinBendingMomentum = 1.;
3304fa09 192 fMaxBendingMomentum = 3000.;
9bf6860b 193 fMaxNonBendingSlope = 0.3;
9f093251 194 fMaxBendingSlope = 0.4;
3304fa09 195 fNonBendingVertexDispersion = 10.;
196 fBendingVertexDispersion = 10.;
9bf6860b 197 fMaxNonBendingDistanceToTrack = 1.;
198 fMaxBendingDistanceToTrack = 1.;
3304fa09 199 fSigmaCutForTracking = 6.;
200 fSigmaCutForImprovement = 5.;
fda59e58 201 fSigmaCutForTrigger = 8.;
b5270f21 202 fStripCutForTrigger = 1.;
203 fMaxStripAreaForTrigger = 3.;
3304fa09 204 fMaxNormChi2MatchTrigger = 16.;
6cac085d 205 fCombinedClusterTrackReco = kFALSE;
3304fa09 206 fTrackAllTracks = kTRUE;
207 fRecoverTracks = kTRUE;
208 fMakeTrackCandidatesFast = kFALSE;
9bf6860b 209 fMakeMoreTrackCandidates = kFALSE;
3304fa09 210 fComplementTracks = kTRUE;
211 fImproveTracks = kTRUE;
c59f70b9 212 fRemoveConnectedTracksInSt12 = kFALSE;
3304fa09 213 fUseSmoother = kTRUE;
35be7ed7 214 for (Int_t iCh = 0; iCh < 10; iCh++) {
215 fUseChamber[iCh] = kTRUE;
216 fDefaultNonBendingReso[iCh] = 0.144;
217 fDefaultBendingReso[iCh] = 0.01;
218 }
9bf6860b 219 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
004a9ccd 220 fBypassSt45 = 0;
3304fa09 221
222}
223
0e894e58 224//_____________________________________________________________________________
225void AliMUONRecoParam::SetCosmicParam()
226{
227 /// Set reconstruction parameters for high flux environment
228
ad3c6eda 229 SetNameTitle("Cosmic","Cosmic");
230 SetEventSpecie(AliRecoParam::kCosmic);
0e894e58 231 fMinBendingMomentum = 1.;
232 fMaxBendingMomentum = 10000000.;
233 fMaxNonBendingSlope = 0.3;
9f093251 234 fMaxBendingSlope = 0.4;
0e894e58 235 fNonBendingVertexDispersion = 10.;
236 fBendingVertexDispersion = 10.;
237 fMaxNonBendingDistanceToTrack = 10.;
238 fMaxBendingDistanceToTrack = 10.;
239 fSigmaCutForTracking = 20.;
240 fSigmaCutForImprovement = 20.;
241 fSigmaCutForTrigger = 8.;
54355f2c 242 fStripCutForTrigger = 1.5;
243 fMaxStripAreaForTrigger = 3.;
0e894e58 244 fMaxNormChi2MatchTrigger = 16.;
245 fPercentOfFullClusterInESD = 100.;
246 fCombinedClusterTrackReco = kFALSE;
247 fTrackAllTracks = kTRUE;
248 fRecoverTracks = kTRUE;
249 fMakeTrackCandidatesFast = kFALSE;
250 fMakeMoreTrackCandidates = kFALSE;
251 fComplementTracks = kTRUE;
252 fImproveTracks = kTRUE;
c59f70b9 253 fRemoveConnectedTracksInSt12 = kTRUE;
0e894e58 254 fUseSmoother = kTRUE;
255 fSaveFullClusterInESD = kTRUE;
35be7ed7 256 for (Int_t iCh = 0; iCh < 10; iCh++) {
257 fUseChamber[iCh] = kTRUE;
258 fDefaultNonBendingReso[iCh] = 0.144;
259 fDefaultBendingReso[iCh] = 0.01;
260 }
0e894e58 261 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
004a9ccd 262 fBypassSt45 = 0;
0e894e58 263
264}
265
c59f70b9 266//_____________________________________________________________________________
267UInt_t
268AliMUONRecoParam::RequestedStationMask() const
269{
270 /// Get the mask of the requested station, i.e. an integer where
271 /// bit n is set to one if the station n was requested
272
273 UInt_t m(0);
274
275 for ( Int_t i = 0; i < 5; ++i )
276 {
277 if ( RequestStation(i) ) m |= ( 1 << i );
278 }
279 return m;
280}
281
3304fa09 282//_____________________________________________________________________________
283void AliMUONRecoParam::Print(Option_t *option) const
284{
285 /// print reconstruction parameters
286 /// if option = FULL then print also unused parameters
287
4348af6f 288 cout<<endl<<"\t------MUON Reconstruction parameters ("<<GetName()<<")------"<<endl;
ad3c6eda 289
290 if (IsDefault()) cout<<"\t\t*** Parameters used by default ***"<<endl;
3304fa09 291
de98fdc9 292 cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
3304fa09 293 cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
3304fa09 294 cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
9bf6860b 295
004a9ccd 296 TString bypass;
297
298 if ( BypassSt45() )
299 {
300 bypass = "stations 4 and 5";
301 }
302 else if ( BypassSt4() )
303 {
304 bypass = "station 4";
305 }
306 else if ( BypassSt5() )
307 {
308 bypass = "station 5";
309 }
310
311 if (bypass.Length()) cout << "Will bypass " << bypass.Data() << " (replacing real clusters by generated ones from trigger tracks)" << endl;
3304fa09 312
15d30ed4 313 if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
314 else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
38bcf0ef 315
0a18ba02 316 if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
317 else cout<<"Save partial cluster info in ESD"<<endl;
9bdbee64 318
3304fa09 319 cout<<Form("Bending momentum range = [%5.2f,%5.2f]",fMinBendingMomentum,fMaxBendingMomentum)<<endl;
320
9bf6860b 321 cout<<Form("Maximum non bending slope = %5.2f",fMaxNonBendingSlope)<<endl;
322
9f093251 323 cout<<Form("Maximum bending slope (used only if B=0) = %5.2f",fMaxBendingSlope)<<endl;
324
3304fa09 325 if (strstr(fTrackingMode,"ORIGINAL"))
326 cout<<Form("Vertex dispertion = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
327 else if (strstr(option,"FULL"))
328 cout<<Form("Vertex dispertion (used for original tracking only) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
329
330 cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
331
332 cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
fda59e58 333
334 cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
b5270f21 335
336 cout<<Form("Cut in strips for trigger chamber efficiency = %5.2f",fStripCutForTrigger)<<endl;
337
338 cout<<Form("Max search area in strips for trigger chamber efficiency = %5.2f",fMaxStripAreaForTrigger)<<endl;
339
3304fa09 340 if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
341 else cout<<"Track only the best candidates"<<endl;
342
343 if (strstr(option,"FULL")) {
344 cout<<"Make track candidates assuming linear propagation between stations 4 and 5: ";
345 if (fMakeTrackCandidatesFast) cout<<"ON"<<endl;
346 else cout<<"OFF"<<endl;
347 } else if (fMakeTrackCandidatesFast)
348 cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl;
349
9bf6860b 350 if (strstr(option,"FULL")) {
351 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: ";
352 if (fMakeMoreTrackCandidates) cout<<"ON"<<endl;
353 else cout<<"OFF"<<endl;
354 } else if (fMakeMoreTrackCandidates)
355 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl;
356
3304fa09 357 if (strstr(option,"FULL")) {
358 cout<<"Try to recover tracks getting lost during tracking: ";
359 if (fRecoverTracks) cout<<"ON"<<endl;
360 else cout<<"OFF"<<endl;
361 } else if (fRecoverTracks)
362 cout<<"Try to recover tracks getting lost during tracking"<<endl;
363
364 if (strstr(option,"FULL")) {
365 cout<<"Try to complete the reconstructed tracks by adding missing clusters: ";
366 if (fComplementTracks) cout<<"ON"<<endl;
367 else cout<<"OFF"<<endl;
368 } else if (fComplementTracks)
369 cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl;
370
371 if (strstr(option,"FULL")) {
372 cout<<"Try to improve the reconstructed tracks by removing bad clusters: ";
373 if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
374 else cout<<"OFF"<<endl;
375 } else if (fImproveTracks)
376 cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
377
c59f70b9 378 if (fRemoveConnectedTracksInSt12) cout<<"Remove tracks sharing one cluster or more in any station"<<endl;
379 else cout<<"Remove tracks sharing one cluster or more in stations 3, 4 and 5"<<endl;
380
3304fa09 381 if (strstr(option,"FULL")) {
382 cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
383 if (fUseSmoother) cout<<"ON"<<endl;
384 else cout<<"OFF"<<endl;
385 } else if (fUseSmoother)
386 cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl;
387
388 cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
389
9bf6860b 390 Bool_t discardedCh = kFALSE;
391 Int_t ch = 0;
392 do {
393 if (!UseChamber(ch)) {
394 if (!discardedCh) {
395 cout<<"Discarded chambers(1..): "<<ch+1;
396 discardedCh = kTRUE;
397 }
398 else cout<<" "<<ch+1;
399 }
400 } while (++ch < 10);
401 if (discardedCh) cout<<endl;
402
403 Bool_t discardedSt = kFALSE;
404 Int_t st = 0;
405 do {
406 if (!RequestStation(st)) {
407 if (!discardedSt) {
408 cout<<"Not requested stations(1..): "<<st+1;
409 discardedSt = kTRUE;
410 }
411 else cout<<" "<<st+1;
412 }
413 } while (++st < 5);
414 if (discardedSt) cout<<endl;
415
35be7ed7 416 cout << Form("Pad goodness policy mask is 0x%x",PadGoodnessMask()) << endl;
417 cout << "Which means we reject pads having the condition = " <<
418 AliMUONPadStatusMaker::AsCondition(PadGoodnessMask()).Data() << endl;
419
420 cout << "The pad limits we are using are :" << endl;
421
422 cout << Form("%5.0f <= HVSt12 <= %5.0f Volts",HVSt12LowLimit(),HVSt12HighLimit()) << endl;
423 cout << Form("%5.0f <= HVSt345 <= %5.0f Volts",HVSt345LowLimit(),HVSt345HighLimit()) << endl;
424 cout << Form("%7.2f <= Pedestal mean <= %7.2f",PedMeanLowLimit(),PedMeanHighLimit()) << endl;
425 cout << Form("%7.2f <= Pedestal sigma <= %7.2f",PedSigmaLowLimit(),PedSigmaHighLimit()) << endl;
426 cout << Form("%e <= Gain linear term <= %e",GainA1LowLimit(),GainA1HighLimit()) << endl;
427 cout << Form("%e <= Gain quadratic term <= %e",GainA2LowLimit(),GainA2HighLimit()) << endl;
428 cout << Form("%5.0f <= Gain threshold term <= %5.0f",GainThresLowLimit(),GainThresHighLimit()) << endl;
170f4046 429
430 cout << Form("And we cut on charge >= %7.2f x ( pedestal sigma ) ",ChargeSigmaCut()) << endl;
431
35be7ed7 432 cout << "chamber non bending resolution = |";
433 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultNonBendingReso[iCh]);
434 cout << endl;
435 cout << "chamber bending resolution = |";
436 for (Int_t iCh = 0; iCh < 10; iCh++) cout << Form(" %6.3f |",fDefaultBendingReso[iCh]);
437 cout << endl;
438
4348af6f 439 cout<<"\t-----------------------------------------------------"<<endl<<endl;
3304fa09 440
441}
442
004a9ccd 443//_____________________________________________________________________________
444void
445AliMUONRecoParam::SetDefaultLimits()
446{
447 /// Set the default limits and pad goodness policy
448
449 fHVSt12Limits[0]=1500;
450 fHVSt12Limits[1]=2000;
451
452 fHVSt345Limits[0]=1500;
453 fHVSt345Limits[1]=2000;
454
455 fPedMeanLimits[0] = 50;
456 fPedMeanLimits[1] = 1024;
457
458 fPedSigmaLimits[0] = 0.1;
459 fPedSigmaLimits[1] = 100;
460
461 fGainA1Limits[0] = 0.1;
462 fGainA1Limits[1] = 10;
463
464 fGainA2Limits[0] = -1E30;
465 fGainA2Limits[1] = 1E30;
466
467 fGainThresLimits[0] = 0;
468 fGainThresLimits[1] = 4095;
469
470 fPadGoodnessMask = 0x8080;
170f4046 471
472 fChargeSigmaCut = 4.0;
004a9ccd 473}
474