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