]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRecoParam.cxx
Changing fabs into TMath::Abs
[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
16
17//-----------------------------------------------------------------------------
18/// \class AliMUONRecoParam
19///
20/// Class with MUON reconstruction parameters
21///
22/// \author Philippe Pillot
23//-----------------------------------------------------------------------------
24
25
26
27#include "AliMUONRecoParam.h"
28
29#include "AliLog.h"
30
31#include <Riostream.h>
32
33ClassImp(AliMUONRecoParam)
34
35
36//_____________________________________________________________________________
37AliMUONRecoParam::AliMUONRecoParam()
15d30ed4 38: AliDetectorRecoParam(),
3304fa09 39 fClusteringMode("MLEM"),
40 fTrackingMode("KALMAN"),
0e894e58 41 fMostProbBendingMomentum(0.),
3304fa09 42 fMinBendingMomentum(0.),
43 fMaxBendingMomentum(0.),
9bf6860b 44 fMaxNonBendingSlope(0.),
9f093251 45 fMaxBendingSlope(0.),
3304fa09 46 fNonBendingVertexDispersion(0.),
47 fBendingVertexDispersion(0.),
48 fMaxNonBendingDistanceToTrack(0.),
49 fMaxBendingDistanceToTrack(0.),
50 fSigmaCutForTracking(0.),
51 fSigmaCutForImprovement(0.),
fda59e58 52 fSigmaCutForTrigger(0.),
3304fa09 53 fMaxNormChi2MatchTrigger(0.),
0a18ba02 54 fPercentOfFullClusterInESD(10.),
38bcf0ef 55 fCombinedClusterTrackReco(kFALSE),
3304fa09 56 fTrackAllTracks(kFALSE),
57 fRecoverTracks(kFALSE),
58 fMakeTrackCandidatesFast(kFALSE),
9bf6860b 59 fMakeMoreTrackCandidates(kFALSE),
3304fa09 60 fComplementTracks(kFALSE),
61 fImproveTracks(kFALSE),
0a18ba02 62 fUseSmoother(kFALSE),
de98fdc9 63 fSaveFullClusterInESD(kTRUE),
9bf6860b 64 fCalibrationMode("NOGAIN"),
65 fBypassSt45(kFALSE)
3304fa09 66{
67 /// Constructor
15d30ed4 68 SetNameTitle("MUON","MUON");
3304fa09 69
70 // use the default parameters for low flux environment
71 SetLowFluxParam();
72}
73
74//_____________________________________________________________________________
75AliMUONRecoParam::~AliMUONRecoParam()
76{
77 /// Destructor
78}
79
9bf6860b 80//_____________________________________________________________________________
81Option_t*
82AliMUONRecoParam::GetCalibrationMode() const
83{
84 /// Return the calibration mode. Can be :
85 /// NOGAIN : only do pedestal subtraction
86 /// GAIN : do pedestal subtraction, and apply gain correction, but with a
87 /// single capacitance value for all channels
88 /// GAINCONSTANTCAPA : as GAIN, but with a channel-dependent capacitance value
89
90 return fCalibrationMode.Data();
91}
92
3304fa09 93//_____________________________________________________________________________
94AliMUONRecoParam *AliMUONRecoParam::GetLowFluxParam()
95{
96 /// Return default reconstruction parameters for low flux environment
97
98 AliMUONRecoParam *param = new AliMUONRecoParam();
99 param->SetLowFluxParam();
100
101 return param;
102}
103
104//_____________________________________________________________________________
105AliMUONRecoParam *AliMUONRecoParam::GetHighFluxParam()
106{
107 /// Return default reconstruction parameters for high flux environment
108
109 AliMUONRecoParam *param = new AliMUONRecoParam();
110 param->SetHighFluxParam();
111
112 return param;
113}
114
0e894e58 115//_____________________________________________________________________________
116AliMUONRecoParam *AliMUONRecoParam::GetCosmicParam()
117{
118 /// Return default reconstruction parameters for high flux environment
119
120 AliMUONRecoParam *param = new AliMUONRecoParam();
121 param->SetCosmicParam();
122
123 return param;
124}
125
3304fa09 126//_____________________________________________________________________________
127void AliMUONRecoParam::SetLowFluxParam()
128{
129 /// Set reconstruction parameters for low flux environment
130
0e894e58 131 fMostProbBendingMomentum = 2.;
9bf6860b 132 fMinBendingMomentum = 1.;
3304fa09 133 fMaxBendingMomentum = 3000.;
9bf6860b 134 fMaxNonBendingSlope = 0.3;
9f093251 135 fMaxBendingSlope = 0.4;
3304fa09 136 fNonBendingVertexDispersion = 10.;
137 fBendingVertexDispersion = 10.;
9bf6860b 138 fMaxNonBendingDistanceToTrack = 1.;
139 fMaxBendingDistanceToTrack = 1.;
3304fa09 140 fSigmaCutForTracking = 6.;
141 fSigmaCutForImprovement = 5.;
fda59e58 142 fSigmaCutForTrigger = 8.;
3304fa09 143 fMaxNormChi2MatchTrigger = 16.;
6cac085d 144 fCombinedClusterTrackReco = kFALSE;
3304fa09 145 fTrackAllTracks = kTRUE;
146 fRecoverTracks = kTRUE;
147 fMakeTrackCandidatesFast = kFALSE;
9bf6860b 148 fMakeMoreTrackCandidates = kFALSE;
3304fa09 149 fComplementTracks = kTRUE;
150 fImproveTracks = kTRUE;
151 fUseSmoother = kTRUE;
9bf6860b 152 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
153 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
6cac085d 154 fBypassSt45 = kFALSE;
3304fa09 155
156}
157
158//_____________________________________________________________________________
159void AliMUONRecoParam::SetHighFluxParam()
160{
161 /// Set reconstruction parameters for high flux environment
162
0e894e58 163 fMostProbBendingMomentum = 2.;
9bf6860b 164 fMinBendingMomentum = 1.;
3304fa09 165 fMaxBendingMomentum = 3000.;
9bf6860b 166 fMaxNonBendingSlope = 0.3;
9f093251 167 fMaxBendingSlope = 0.4;
3304fa09 168 fNonBendingVertexDispersion = 10.;
169 fBendingVertexDispersion = 10.;
9bf6860b 170 fMaxNonBendingDistanceToTrack = 1.;
171 fMaxBendingDistanceToTrack = 1.;
3304fa09 172 fSigmaCutForTracking = 6.;
173 fSigmaCutForImprovement = 5.;
fda59e58 174 fSigmaCutForTrigger = 8.;
3304fa09 175 fMaxNormChi2MatchTrigger = 16.;
6cac085d 176 fCombinedClusterTrackReco = kFALSE;
3304fa09 177 fTrackAllTracks = kTRUE;
178 fRecoverTracks = kTRUE;
179 fMakeTrackCandidatesFast = kFALSE;
9bf6860b 180 fMakeMoreTrackCandidates = kFALSE;
3304fa09 181 fComplementTracks = kTRUE;
182 fImproveTracks = kTRUE;
183 fUseSmoother = kTRUE;
9bf6860b 184 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
185 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
6cac085d 186 fBypassSt45 = kFALSE;
3304fa09 187
188}
189
0e894e58 190//_____________________________________________________________________________
191void AliMUONRecoParam::SetCosmicParam()
192{
193 /// Set reconstruction parameters for high flux environment
194
195 fMostProbBendingMomentum = 2.;
196 fMinBendingMomentum = 1.;
197 fMaxBendingMomentum = 10000000.;
198 fMaxNonBendingSlope = 0.3;
9f093251 199 fMaxBendingSlope = 0.4;
0e894e58 200 fNonBendingVertexDispersion = 10.;
201 fBendingVertexDispersion = 10.;
202 fMaxNonBendingDistanceToTrack = 10.;
203 fMaxBendingDistanceToTrack = 10.;
204 fSigmaCutForTracking = 20.;
205 fSigmaCutForImprovement = 20.;
206 fSigmaCutForTrigger = 8.;
207 fMaxNormChi2MatchTrigger = 16.;
208 fPercentOfFullClusterInESD = 100.;
209 fCombinedClusterTrackReco = kFALSE;
210 fTrackAllTracks = kTRUE;
211 fRecoverTracks = kTRUE;
212 fMakeTrackCandidatesFast = kFALSE;
213 fMakeMoreTrackCandidates = kFALSE;
214 fComplementTracks = kTRUE;
215 fImproveTracks = kTRUE;
216 fUseSmoother = kTRUE;
217 fSaveFullClusterInESD = kTRUE;
218 for (Int_t iCh = 0; iCh < 10; iCh++) fUseChamber[iCh] = kTRUE;
219 for (Int_t iSt = 0; iSt < 5; iSt++) fRequestStation[iSt] = kTRUE;
220 fBypassSt45 = kFALSE;
221
222}
223
3304fa09 224//_____________________________________________________________________________
225void AliMUONRecoParam::Print(Option_t *option) const
226{
227 /// print reconstruction parameters
228 /// if option = FULL then print also unused parameters
229
230 cout<<endl<<"\t------Reconstruction parameters------"<<endl;
231
de98fdc9 232 cout<<Form("Calibration mode = %s",fCalibrationMode.Data())<<endl;
3304fa09 233 cout<<Form("Clustering mode = %s",fClusteringMode.Data())<<endl;
3304fa09 234 cout<<Form("Tracking mode = %s",fTrackingMode.Data())<<endl;
9bf6860b 235
236 if (BypassSt45()) cout << "Will bypass St45 (replacing their clusters by generated ones from trigger tracks)" << endl;
3304fa09 237
15d30ed4 238 if (fCombinedClusterTrackReco) cout<<"Combined cluster/track reconstruction: ON"<<endl;
239 else cout<<"Combined cluster/track reconstruction: OFF"<<endl;
38bcf0ef 240
0a18ba02 241 if (fSaveFullClusterInESD) cout<<Form("Save all cluster info in ESD for %5.2f %% of events",fPercentOfFullClusterInESD)<<endl;
242 else cout<<"Save partial cluster info in ESD"<<endl;
243
0e894e58 244 cout<<Form("Most probable bending momentum (used only if B=0) = %5.2f",fMostProbBendingMomentum)<<endl;
245
3304fa09 246 cout<<Form("Bending momentum range = [%5.2f,%5.2f]",fMinBendingMomentum,fMaxBendingMomentum)<<endl;
247
9bf6860b 248 cout<<Form("Maximum non bending slope = %5.2f",fMaxNonBendingSlope)<<endl;
249
9f093251 250 cout<<Form("Maximum bending slope (used only if B=0) = %5.2f",fMaxBendingSlope)<<endl;
251
3304fa09 252 if (strstr(fTrackingMode,"ORIGINAL"))
253 cout<<Form("Vertex dispertion = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
254 else if (strstr(option,"FULL"))
255 cout<<Form("Vertex dispertion (used for original tracking only) = (%5.2f,%5.2f)",fNonBendingVertexDispersion,fBendingVertexDispersion)<<endl;
256
257 cout<<Form("Maximum distance to track = (%5.2f,%5.2f)",fMaxNonBendingDistanceToTrack,fMaxBendingDistanceToTrack)<<endl;
258
259 cout<<Form("Sigma cut for tracking = %5.2f",fSigmaCutForTracking)<<endl;
fda59e58 260
261 cout<<Form("Sigma cut for trigger hit pattern = %5.2f",fSigmaCutForTrigger)<<endl;
3304fa09 262
263 if (fTrackAllTracks) cout<<"Track all the possible candidates"<<endl;
264 else cout<<"Track only the best candidates"<<endl;
265
266 if (strstr(option,"FULL")) {
267 cout<<"Make track candidates assuming linear propagation between stations 4 and 5: ";
268 if (fMakeTrackCandidatesFast) cout<<"ON"<<endl;
269 else cout<<"OFF"<<endl;
270 } else if (fMakeTrackCandidatesFast)
271 cout<<"Make track candidates assuming linear propagation between stations 4 and 5"<<endl;
272
9bf6860b 273 if (strstr(option,"FULL")) {
274 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5: ";
275 if (fMakeMoreTrackCandidates) cout<<"ON"<<endl;
276 else cout<<"OFF"<<endl;
277 } else if (fMakeMoreTrackCandidates)
278 cout<<"Make track candidates starting from 1 cluster in each of the stations 4 and 5"<<endl;
279
3304fa09 280 if (strstr(option,"FULL")) {
281 cout<<"Try to recover tracks getting lost during tracking: ";
282 if (fRecoverTracks) cout<<"ON"<<endl;
283 else cout<<"OFF"<<endl;
284 } else if (fRecoverTracks)
285 cout<<"Try to recover tracks getting lost during tracking"<<endl;
286
287 if (strstr(option,"FULL")) {
288 cout<<"Try to complete the reconstructed tracks by adding missing clusters: ";
289 if (fComplementTracks) cout<<"ON"<<endl;
290 else cout<<"OFF"<<endl;
291 } else if (fComplementTracks)
292 cout<<"Try to complete the reconstructed tracks by adding missing clusters"<<endl;
293
294 if (strstr(option,"FULL")) {
295 cout<<"Try to improve the reconstructed tracks by removing bad clusters: ";
296 if (fImproveTracks) cout<<Form("ON (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
297 else cout<<"OFF"<<endl;
298 } else if (fImproveTracks)
299 cout<<Form("Try to improve the reconstructed tracks by removing bad clusters (sigma cut = %5.2f)",fSigmaCutForImprovement)<<endl;
300
301 if (strstr(option,"FULL")) {
302 cout<<"Use smoother to compute final track parameters, etc, at each cluster (used for Kalman tracking only): ";
303 if (fUseSmoother) cout<<"ON"<<endl;
304 else cout<<"OFF"<<endl;
305 } else if (fUseSmoother)
306 cout<<"Use smoother to compute final track parameters, etc, at each cluster"<<endl;
307
308 cout<<Form("Maximum normalized chi2 of tracking/trigger track matching = %5.2f",fMaxNormChi2MatchTrigger)<<endl;
309
9bf6860b 310 Bool_t discardedCh = kFALSE;
311 Int_t ch = 0;
312 do {
313 if (!UseChamber(ch)) {
314 if (!discardedCh) {
315 cout<<"Discarded chambers(1..): "<<ch+1;
316 discardedCh = kTRUE;
317 }
318 else cout<<" "<<ch+1;
319 }
320 } while (++ch < 10);
321 if (discardedCh) cout<<endl;
322
323 Bool_t discardedSt = kFALSE;
324 Int_t st = 0;
325 do {
326 if (!RequestStation(st)) {
327 if (!discardedSt) {
328 cout<<"Not requested stations(1..): "<<st+1;
329 discardedSt = kTRUE;
330 }
331 else cout<<" "<<st+1;
332 }
333 } while (++st < 5);
334 if (discardedSt) cout<<endl;
335
3304fa09 336 cout<<"\t-------------------------------------"<<endl<<endl;
337
338}
339