00001 #ifndef ALIFMDPARAMETERS_H
00002 #define ALIFMDPARAMETERS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ROOT_TNamed
00018 # include <TNamed.h>
00019 #endif
00020 #ifndef ROOT_TArrayI
00021 # include <TArrayI.h>
00022 #endif
00023 #ifndef ALIFMDUSHORTMAP_H
00024 # include <AliFMDUShortMap.h>
00025 #endif
00026 #ifndef ALIFMDBOOLMAP_H
00027 # include <AliFMDBoolMap.h>
00028 #endif
00029 typedef AliFMDUShortMap AliFMDCalibZeroSuppression;
00030 typedef AliFMDBoolMap AliFMDCalibDeadMap;
00031 class AliFMDCalibPedestal;
00032 class AliFMDCalibGain;
00033 class AliFMDCalibSampleRate;
00034 class AliFMDAltroMapping;
00035
00063 class AliFMDParameters : public TNamed
00064 {
00065 public:
00068 static AliFMDParameters* Instance();
00069
00073 void Init();
00074
00077 void SetVA1MipRange(UShort_t r=20) { fVA1MipRange = r; }
00078 void SetAltroChannelSize(UShort_t s=1024) { fAltroChannelSize = s;}
00079 void SetChannelsPerAltro(UShort_t size=128) { fChannelsPerAltro = size; }
00080 void SetPedestalFactor(Float_t f=3) { fPedestalFactor = f; }
00085 void SetZeroSuppression(UShort_t s=0) { fFixedZeroSuppression = s; }
00086 void SetSampleRate(UShort_t r=1) { fFixedSampleRate = (r>2?2:r);}
00087 void SetPedestal(Float_t p=10) { fFixedPedestal = p; }
00088 void SetPedestalWidth(Float_t w=1) { fFixedPedestalWidth = w; }
00089 void SetThreshold(Float_t t=0) { fFixedThreshold = t; }
00094 UShort_t GetVA1MipRange() const { return fVA1MipRange; }
00095 UShort_t GetAltroChannelSize() const { return fAltroChannelSize; }
00096 UShort_t GetChannelsPerAltro() const { return fChannelsPerAltro; }
00097 Float_t GetEdepMip() const;
00098 Float_t GetPedestalFactor() const { return fPedestalFactor; }
00103 Bool_t IsDead(UShort_t detector,
00104 Char_t ring,
00105 UShort_t sector,
00106 UShort_t strip) const;
00107 Float_t GetThreshold() const;
00108 Float_t GetPulseGain(UShort_t detector,
00109 Char_t ring,
00110 UShort_t sector,
00111 UShort_t strip) const;
00112 Float_t GetPedestal(UShort_t detector,
00113 Char_t ring,
00114 UShort_t sector,
00115 UShort_t strip) const;
00116 Float_t GetPedestalWidth(UShort_t detector,
00117 Char_t ring,
00118 UShort_t sector,
00119 UShort_t strip) const;
00120 UShort_t GetZeroSuppression(UShort_t detector,
00121 Char_t ring,
00122 UShort_t sector,
00123 UShort_t strip) const;
00124 UShort_t GetSampleRate(UShort_t ddl) const;
00125
00126 Bool_t Hardware2Detector(UInt_t ddl, UInt_t addr, UShort_t& det,
00127 Char_t& ring, UShort_t& sec, UShort_t& str) const;
00128 Bool_t Detector2Hardware(UShort_t det, Char_t ring, UShort_t sec,
00129 UShort_t str, UInt_t& ddl, UInt_t& addr) const;
00130 AliFMDAltroMapping* GetAltroMap() const;
00133 enum {
00134 kBaseDDL = 0x1000
00135 };
00136 static const char* fgkPulseGain;
00137 static const char* fgkPedestal;
00138 static const char* fgkDead;
00139 static const char* fgkSampleRate;
00140 static const char* fgkAltroMap;
00141 static const char* fgkZeroSuppression;
00142 protected:
00144 AliFMDParameters();
00146 virtual ~AliFMDParameters() {}
00148 static AliFMDParameters* fgInstance;
00150 void InitPulseGain();
00152 void InitPedestal();
00154 void InitDeadMap();
00156 void InitSampleRate();
00158 void InitZeroSuppression();
00160 void InitAltroMap();
00161
00162 Bool_t fIsInit;
00163
00164 const Float_t fSiDeDxMip;
00165 UShort_t fVA1MipRange;
00166 UShort_t fAltroChannelSize;
00167 UShort_t fChannelsPerAltro;
00168 Float_t fPedestalFactor;
00169
00170 Float_t fFixedPedestal;
00171 Float_t fFixedPedestalWidth;
00172 UShort_t fFixedZeroSuppression;
00173 UShort_t fFixedSampleRate;
00174 Float_t fFixedThreshold;
00175 mutable Float_t fFixedPulseGain;
00176 mutable Float_t fEdepMip;
00177
00178 AliFMDCalibZeroSuppression* fZeroSuppression;
00179 AliFMDCalibSampleRate* fSampleRate;
00180 AliFMDCalibPedestal* fPedestal;
00181 AliFMDCalibGain* fPulseGain;
00182 AliFMDCalibDeadMap* fDeadMap;
00183 AliFMDAltroMapping* fAltroMap;
00184
00185 ClassDef(AliFMDParameters,3)
00186 };
00187
00188 #endif
00189
00190
00191
00192
00193
00194
00195
00196
00197