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