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