]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONRecoParam.h
Coding conventions
[u/mrichter/AliRoot.git] / MUON / AliMUONRecoParam.h
1 #ifndef ALIMUONRECOPARAM_H
2 #define ALIMUONRECOPARAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice                               */
5
6 // $Id$
7
8 /// \ingroup rec
9 /// \class AliMUONRecoParam
10 /// \brief Class with MUON reconstruction parameters
11 ///
12 //  Author: Philippe Pillot
13
14 #include "AliDetectorRecoParam.h"
15 #include "TString.h"
16 #include <TMath.h>
17
18 class AliMUONRecoParam : public AliDetectorRecoParam
19 {
20  public: 
21   AliMUONRecoParam();
22   virtual ~AliMUONRecoParam();
23   
24   static AliMUONRecoParam *GetLowFluxParam();
25   static AliMUONRecoParam *GetHighFluxParam();
26   static AliMUONRecoParam *GetCosmicParam();
27   
28   /// set the calibration mode (see GetCalibrationMode() for possible modes)
29   void SetCalibrationMode(Option_t* mode) { fCalibrationMode = mode; fCalibrationMode.ToUpper();}
30   
31   Option_t* GetCalibrationMode() const;
32   
33   /// set the clustering (pre-clustering) mode
34   void      SetClusteringMode(Option_t* mode) {fClusteringMode = mode; fClusteringMode.ToUpper();}
35   /// get the clustering (pre-clustering) mode
36   Option_t* GetClusteringMode() const {return fClusteringMode.Data();}
37   
38   /// set the tracking mode
39   void      SetTrackingMode(Option_t* mode) {fTrackingMode = mode; fTrackingMode.ToUpper();}
40   /// get the tracking mode
41   Option_t* GetTrackingMode() const {return fTrackingMode.Data();}
42   
43   /// switch on/off the combined cluster/track reconstruction
44   void      CombineClusterTrackReco(Bool_t flag) {fCombinedClusterTrackReco = flag;}
45   /// return kTRUE/kFALSE if the combined cluster/track reconstruction is on/off
46   Bool_t    CombineClusterTrackReco() const {return fCombinedClusterTrackReco;}
47   
48   /// save all cluster info (including pads) in ESD, for the given percentage of events
49   void      SaveFullClusterInESD(Bool_t flag, Double_t percentOfEvent = 100.) {fSaveFullClusterInESD = flag;
50                                  fPercentOfFullClusterInESD = (fSaveFullClusterInESD) ? percentOfEvent : 0.;}
51   /// return kTRUE/kFALSE depending on whether we save all cluster info in ESD or not
52   Bool_t    SaveFullClusterInESD() const {return fSaveFullClusterInESD;}
53   /// return the percentage of events for which all cluster info are stored in ESD
54   Double_t  GetPercentOfFullClusterInESD() const {return fPercentOfFullClusterInESD;}
55   
56   /// set the minimum value (GeV/c) of momentum in bending plane
57   void     SetMinBendingMomentum(Double_t val) {fMinBendingMomentum = val;}
58   /// return the minimum value (GeV/c) of momentum in bending plane
59   Double_t GetMinBendingMomentum() const {return fMinBendingMomentum;}
60   /// set the maximum value (GeV/c) of momentum in bending plane
61   void     SetMaxBendingMomentum(Double_t val) {fMaxBendingMomentum = val;}
62   /// return the maximum value (GeV/c) of momentum in bending plane
63   Double_t GetMaxBendingMomentum() const {return fMaxBendingMomentum;}
64   /// set the maximum value of the non bending slope
65   void     SetMaxNonBendingSlope(Double_t val) {fMaxNonBendingSlope = val;}
66   /// return the maximum value of the non bending slope
67   Double_t GetMaxNonBendingSlope() const {return fMaxNonBendingSlope;}
68   /// set the maximum value of the bending slope
69   void     SetMaxBendingSlope(Double_t val) {fMaxBendingSlope = val;}
70   /// return the maximum value of the bending slope
71   Double_t GetMaxBendingSlope() const {return fMaxBendingSlope;}
72   
73   /// set the vertex dispersion (cm) in non bending plane (used for original tracking only)
74   void     SetNonBendingVertexDispersion(Double_t val) {fNonBendingVertexDispersion = val;} 
75   /// return the vertex dispersion (cm) in non bending plane (used for original tracking only)
76   Double_t GetNonBendingVertexDispersion() const {return fNonBendingVertexDispersion;}
77   /// set the vertex dispersion (cm) in bending plane (used for original tracking only)
78   void     SetBendingVertexDispersion(Double_t val) {fBendingVertexDispersion = val;} 
79   /// return the vertex dispersion (cm) in bending plane (used for original tracking only)
80   Double_t GetBendingVertexDispersion() const {return fBendingVertexDispersion;}
81   
82   /// set the maximum distance to the track to search for compatible cluster(s) in non bending direction
83   void     SetMaxNonBendingDistanceToTrack(Double_t val) {fMaxNonBendingDistanceToTrack = val;} 
84   /// return the maximum distance to the track to search for compatible cluster(s) in non bending direction
85   Double_t GetMaxNonBendingDistanceToTrack() const {return fMaxNonBendingDistanceToTrack;}
86   /// set the maximum distance to the track to search for compatible cluster(s) in bending direction
87   void     SetMaxBendingDistanceToTrack(Double_t val) {fMaxBendingDistanceToTrack = val;} 
88   /// return the maximum distance to the track to search for compatible cluster(s) in bending direction
89   Double_t GetMaxBendingDistanceToTrack() const {return fMaxBendingDistanceToTrack;}
90   
91   /// set the cut in sigma to apply on cluster (local chi2) and track (global chi2) during tracking
92   void     SetSigmaCutForTracking(Double_t val) {fSigmaCutForTracking = val;} 
93   /// return the cut in sigma to apply on cluster (local chi2) and track (global chi2) during tracking
94   Double_t GetSigmaCutForTracking() const {return fSigmaCutForTracking;}
95   
96   /// switch on/off the track improvement and keep the default cut in sigma to apply on cluster (local chi2)
97   void     ImproveTracks(Bool_t flag) {fImproveTracks = flag;} 
98   /// switch on/off the track improvement and set the cut in sigma to apply on cluster (local chi2)
99   void     ImproveTracks(Bool_t flag, Double_t sigmaCut) {fImproveTracks = flag; fSigmaCutForImprovement = sigmaCut;} 
100   /// return kTRUE/kFALSE if the track improvement is switch on/off
101   Bool_t   ImproveTracks() const {return fImproveTracks;}
102   /// return the cut in sigma to apply on cluster (local chi2) during track improvement
103   Double_t GetSigmaCutForImprovement() const {return fSigmaCutForImprovement;}
104   
105   /// set the cut in sigma to apply on track during trigger hit pattern search
106   void     SetSigmaCutForTrigger(Double_t val) {fSigmaCutForTrigger = val;} 
107   /// return the cut in sigma to apply on track during trigger hit pattern search
108   Double_t GetSigmaCutForTrigger() const {return fSigmaCutForTrigger;}
109   /// set the cut in strips to apply on trigger track during trigger chamber efficiency
110   void     SetStripCutForTrigger(Double_t val) {fStripCutForTrigger = val;} 
111   /// return the cut in strips to apply on trigger track during trigger chamber efficiency
112   Double_t GetStripCutForTrigger() const {return fStripCutForTrigger;}
113   /// set the maximum search area in strips to apply on trigger track during trigger chamber efficiency
114   void     SetMaxStripAreaForTrigger(Double_t val) {fMaxStripAreaForTrigger = val;} 
115   /// return the maximum search area in strips to apply on trigger track during trigger chamber efficiency
116   Double_t GetMaxStripAreaForTrigger() const {return fMaxStripAreaForTrigger;}
117   
118   /// set the maximum normalized chi2 of tracking/trigger track matching
119   void     SetMaxNormChi2MatchTrigger(Double_t val) {fMaxNormChi2MatchTrigger = val;} 
120   /// return the maximum normalized chi2 of tracking/trigger track matching
121   Double_t GetMaxNormChi2MatchTrigger() const {return fMaxNormChi2MatchTrigger;}
122   
123   /// switch on/off the tracking of all the possible candidates (track only the best one if switched off)
124   void     TrackAllTracks(Bool_t flag) {fTrackAllTracks = flag;} 
125   /// return kTRUE/kFALSE if the tracking of all the possible candidates is switched on/off
126   Bool_t   TrackAllTracks() const {return fTrackAllTracks;}
127   
128   /// switch on/off the recovering of tracks being lost during reconstruction
129   void     RecoverTracks(Bool_t flag) {fRecoverTracks = flag;} 
130   /// return kTRUE/kFALSE if the recovering of tracks being lost during reconstruction is switched on/off
131   Bool_t   RecoverTracks() const {return fRecoverTracks;}
132   
133   /// switch on/off the fast building of track candidates (assuming linear propagation between stations 4 and 5)
134   void     MakeTrackCandidatesFast(Bool_t flag) {fMakeTrackCandidatesFast = flag;} 
135   /// return kTRUE/kFALSE if the fast building of track candidates is switched on/off
136   Bool_t   MakeTrackCandidatesFast() const {return fMakeTrackCandidatesFast;}
137   
138   /// switch on/off the building of track candidates starting from 1 cluster in each of the stations 4 and 5
139   void     MakeMoreTrackCandidates(Bool_t flag) {fMakeMoreTrackCandidates = flag;} 
140   /// return kTRUE/kFALSE if the building of extra track candidates is switched on/off
141   Bool_t   MakeMoreTrackCandidates() const {return fMakeMoreTrackCandidates;}
142   
143   /// switch on/off the completion of reconstructed track
144   void     ComplementTracks(Bool_t flag) {fComplementTracks = flag;} 
145   /// return kTRUE/kFALSE if completion of the reconstructed track is switched on/off
146   Bool_t   ComplementTracks() const {return fComplementTracks;}
147   
148   /// remove tracks sharing cluster in stations 1 or 2
149   void     RemoveConnectedTracksInSt12(Bool_t flag) {fRemoveConnectedTracksInSt12 = flag;} 
150   /// return kTRUE/kFALSE whether tracks sharing cluster in station 1 and 2 must be removed or not
151   Bool_t   RemoveConnectedTracksInSt12() const {return fRemoveConnectedTracksInSt12;}
152   
153   /// switch on/off the use of the smoother
154   void     UseSmoother(Bool_t flag) {fUseSmoother = flag;} 
155   /// return kTRUE/kFALSE if the use of the smoother is switched on/off
156   Bool_t   UseSmoother() const {return fUseSmoother;}
157   
158   /// switch on/off a chamber in the reconstruction
159   void     UseChamber(Int_t iCh, Bool_t flag) {if (iCh >= 0 && iCh < 10) fUseChamber[iCh] = flag;}
160   /// return kTRUE/kFALSE whether the chamber must be used or not
161   Bool_t   UseChamber(Int_t iCh) const {return (iCh >= 0 && iCh < 10) ? fUseChamber[iCh] : kFALSE;}
162   
163   /// request or not at least one cluster in the station to validate the track
164   void     RequestStation(Int_t iSt, Bool_t flag) {if (iSt >= 0 && iSt < 5) fRequestStation[iSt] = flag;}
165   /// return kTRUE/kFALSE whether at least one cluster is requested in the station to validate the track
166   Bool_t   RequestStation(Int_t iSt) const {return (iSt >= 0 && iSt < 5) ? fRequestStation[iSt] : kFALSE;}
167   /// return an integer where first 5 bits are set to 1 if the corresponding station is requested
168   UInt_t   RequestedStationMask() const;
169   
170   /// set the bypassSt45 value
171   void   BypassSt45(Bool_t st4, Bool_t st5);
172   
173   /// return kTRUE if we should replace clusters in St 4 and 5 by generated clusters from trigger tracks
174   Bool_t BypassSt45() const { return fBypassSt45==45; }
175   
176   /// return kTRUE if we should replace clusters in St 4 by generated clusters from trigger tracks
177   Bool_t BypassSt4() const { return BypassSt45() || fBypassSt45==4 ; }
178   
179   /// return kTRUE if we should replace clusters in St 5 by generated clusters from trigger tracks
180   Bool_t BypassSt5() const { return BypassSt45() || fBypassSt45==5 ; }
181   
182   /// Set Low and High threshold for St12 HV
183   void    SetHVSt12Limits(float low, float high) { fHVSt12Limits[0]=low; fHVSt12Limits[1]=high; }
184   /// Retrieve low limit for St12's HV
185   Float_t HVSt12LowLimit() const { return fHVSt12Limits[0]; }
186   /// Retrieve high limit for St12's HV
187   Float_t HVSt12HighLimit() const { return fHVSt12Limits[1]; }
188   
189   /// Set Low and High threshold for St345 HV
190   void    SetHVSt345Limits(float low, float high) { fHVSt345Limits[0]=low; fHVSt345Limits[1]=high; } 
191   /// Retrieve low limit for St345's HV
192   Float_t HVSt345LowLimit() const { return fHVSt345Limits[0]; }
193   /// Retrieve high limit for St345's HV
194   Float_t HVSt345HighLimit() const { return fHVSt345Limits[1]; }
195   
196   /// Set Low and High threshold for pedestal mean
197   void    SetPedMeanLimits(float low, float high) { fPedMeanLimits[0]=low; fPedMeanLimits[1]=high; }
198   /// Retrieve low limit of ped mean
199   Float_t PedMeanLowLimit() const { return fPedMeanLimits[0]; }
200   /// Retrieve high limit of ped mean
201   Float_t PedMeanHighLimit() const { return fPedMeanLimits[1]; }
202   
203   /// Set Low and High threshold for pedestal sigma 
204   void    SetPedSigmaLimits(float low, float high) { fPedSigmaLimits[0]=low; fPedSigmaLimits[1]=high; }
205   /// Retrieve low limit of ped sigma
206   Float_t PedSigmaLowLimit() const { return fPedSigmaLimits[0]; }
207   /// Retrieve high limit of ped sigma
208   Float_t PedSigmaHighLimit() const { return fPedSigmaLimits[1]; }
209   
210   /// Set Low and High threshold for gain a0 term
211   void    SetGainA1Limits(float low, float high) { fGainA1Limits[0]=low; fGainA1Limits[1]=high; }
212   /// Retrieve low limit of a1 (linear term) gain parameter
213   Float_t GainA1LowLimit() const { return fGainA1Limits[0]; }
214   /// Retrieve high limit of a1 (linear term) gain parameter
215   Float_t GainA1HighLimit() const { return fGainA1Limits[1]; }
216   
217   /// Set Low and High threshold for gain a1 term
218   void    SetGainA2Limits(float low, float high) { fGainA2Limits[0]=low; fGainA2Limits[1]=high; }
219   /// Retrieve low limit of a2 (quadratic term) gain parameter
220   Float_t GainA2LowLimit() const { return fGainA2Limits[0]; }
221   /// Retrieve high limit of a2 (quadratic term) gain parameter
222   Float_t GainA2HighLimit() const { return fGainA2Limits[1]; }
223   
224   /// Set Low and High threshold for gain threshold term
225   void    SetGainThresLimits(float low, float high) { fGainThresLimits[0]=low; fGainThresLimits[1]=high; }
226   /// Retrieve low limit on threshold gain parameter
227   Float_t GainThresLowLimit() const { return fGainThresLimits[0]; }
228   /// Retrieve high limit on threshold gain parameter
229   Float_t GainThresHighLimit() const { return fGainThresLimits[1]; }
230   
231   /// Set the goodness mask (see AliMUONPadStatusMapMaker)
232   void   SetPadGoodnessMask(UInt_t mask) { fPadGoodnessMask=mask; }
233   /// Get the goodness mask
234   UInt_t PadGoodnessMask() const { return fPadGoodnessMask; }
235   
236   /// Number of sigma cut we must apply when cutting on adc-ped
237   Double_t ChargeSigmaCut() const { return fChargeSigmaCut; }
238   
239   /// Number of sigma cut we must apply when cutting on adc-ped
240   void ChargeSigmaCut(Double_t value) { fChargeSigmaCut=value; }
241   
242   /// Set the default non bending resolution of chamber iCh
243   void     SetDefaultNonBendingReso(Int_t iCh, Double_t val) {if (iCh >= 0 && iCh < 10) fDefaultNonBendingReso[iCh] = val;}
244   /// Get the default non bending resolution of chamber iCh
245   Double_t GetDefaultNonBendingReso(Int_t iCh) const {return (iCh >= 0 && iCh < 10) ? fDefaultNonBendingReso[iCh] : FLT_MAX;}
246   /// Set the default bending resolution of chamber iCh
247   void     SetDefaultBendingReso(Int_t iCh, Double_t val) {if (iCh >= 0 && iCh < 10) fDefaultBendingReso[iCh] = val;}
248   /// Get the default bending resolution of chamber iCh
249   Double_t GetDefaultBendingReso(Int_t iCh) const {return (iCh >= 0 && iCh < 10) ? fDefaultBendingReso[iCh] : FLT_MAX;}
250   
251   virtual void Print(Option_t *option = "") const;
252   
253   
254  private:
255   
256   void SetDefaultLimits();
257   
258         
259  private:
260   
261   /// clustering mode:  NOCLUSTERING, PRECLUSTER, PRECLUSTERV2, PRECLUSTERV3, COG, <pre>
262   ///                   SIMPLEFIT, SIMPLEFITV3, MLEM:DRAW, MLEM, MLEMV2, MLEMV3   </pre>
263   TString fClusteringMode; ///< \brief name of the clustering (+ pre-clustering) mode
264   
265   /// tracking mode: ORIGINAL, KALMAN
266   TString fTrackingMode; ///< \brief name of the tracking mode
267   
268   Double32_t fMinBendingMomentum; ///< minimum value (GeV/c) of momentum in bending plane
269   Double32_t fMaxBendingMomentum; ///< maximum value (GeV/c) of momentum in bending plane
270   Double32_t fMaxNonBendingSlope; ///< maximum value of the non bending slope
271   Double32_t fMaxBendingSlope;    ///< maximum value of the bending slope (used only if B = 0)
272   
273   Double32_t fNonBendingVertexDispersion; ///< vertex dispersion (cm) in non bending plane (used for original tracking only)
274   Double32_t fBendingVertexDispersion;    ///< vertex dispersion (cm) in bending plane (used for original tracking only)
275   
276   Double32_t fMaxNonBendingDistanceToTrack; ///< maximum distance to the track to search for compatible cluster(s) in non bending direction
277   Double32_t fMaxBendingDistanceToTrack;    ///< maximum distance to the track to search for compatible cluster(s) in bending direction
278   
279   Double32_t fSigmaCutForTracking; ///< cut in sigma to apply on cluster (local chi2) and track (global chi2) during tracking
280
281   Double32_t fSigmaCutForImprovement; ///< cut in sigma to apply on cluster (local chi2) during track improvement
282   
283   Double32_t fSigmaCutForTrigger; ///< cut in sigma to apply on track during trigger hit pattern search
284
285   Double32_t fStripCutForTrigger; ///< cut in strips to apply on trigger track during trigger chamber efficiency
286
287   Double32_t fMaxStripAreaForTrigger; ///< max. search area in strips to apply on trigger track during trigger chamber efficiency
288   
289   Double32_t fMaxNormChi2MatchTrigger; ///< maximum normalized chi2 of tracking/trigger track matching
290   
291   Double32_t fPercentOfFullClusterInESD; ///< percentage of events for which all cluster info are stored in ESD
292   
293   Bool_t     fCombinedClusterTrackReco; ///< switch on/off the combined cluster/track reconstruction
294   
295   Bool_t     fTrackAllTracks; ///< kTRUE to track all the possible candidates; kFALSE to track only the best ones
296   
297   Bool_t     fRecoverTracks; ///< kTRUE to try to recover the tracks getting lost during reconstruction
298   
299   Bool_t     fMakeTrackCandidatesFast; ///< kTRUE to make candidate tracks assuming linear propagation between stations 4 and 5
300   
301   Bool_t     fMakeMoreTrackCandidates; ///< kTRUE to make candidate tracks starting from 1 cluster in each of the stations 4 and 5
302   
303   Bool_t     fComplementTracks; ///< kTRUE to try to complete the reconstructed tracks by adding missing clusters
304   
305   Bool_t     fImproveTracks; ///< kTRUE to try to improve the reconstructed tracks by removing bad clusters
306   
307   Bool_t     fUseSmoother; ///< kTRUE to use the smoother to compute track parameters/covariances and local chi2 at each cluster (used for Kalman tracking only)
308   
309   Bool_t     fSaveFullClusterInESD; ///< kTRUE to save all cluster info (including pads) in ESD
310   
311   /// calibration mode:  GAIN, NOGAIN, GAINCONSTANTCAPA
312   TString    fCalibrationMode; ///<\brief calibration mode
313   
314   Int_t      fBypassSt45; ///< non-zero to use trigger tracks to generate "fake" clusters in St 4 and 5. Can be 0, 4, 5 or 45 only
315   
316   Bool_t     fUseChamber[10]; ///< kTRUE to use the chamber i in the tracking algorithm
317   
318   Bool_t     fRequestStation[5]; ///< kTRUE to request at least one cluster in station i to validate the track
319   
320   Double32_t fGainA1Limits[2]; ///< Low and High threshold for gain a0 parameter
321   Double32_t fGainA2Limits[2]; ///< Low and High threshold for gain a1 parameter
322   Double32_t fGainThresLimits[2]; ///< Low and High threshold for gain threshold parameter
323   Double32_t fHVSt12Limits[2]; ///< Low and High threshold for St12 HV
324   Double32_t fHVSt345Limits[2]; ///< Low and High threshold for St345 HV
325   Double32_t fPedMeanLimits[2]; ///< Low and High threshold for pedestal mean
326   Double32_t fPedSigmaLimits[2]; ///< Low and High threshold for pedestal sigma
327   
328   UInt_t     fPadGoodnessMask; ///< goodness mask (see AliMUONPadStatusMaker)
329   
330   Double32_t fChargeSigmaCut; ///< number of sigma to cut on adc-ped 
331   
332   Double32_t fDefaultNonBendingReso[10]; ///< default chamber resolution in the non-bending direction
333   Double32_t fDefaultBendingReso[10]; ///< default chamber resolution in the bending direction
334   
335   Bool_t     fRemoveConnectedTracksInSt12; ///< kTRUE to remove tracks sharing cluster in station 1 and 2
336   
337   // functions
338   void SetLowFluxParam();
339   void SetHighFluxParam();
340   void SetCosmicParam();
341   
342   
343   ClassDef(AliMUONRecoParam,11) // MUON reco parameters
344 };
345
346 #endif
347