1 #ifndef ALIFMDPARAMETERS_H
2 #define ALIFMDPARAMETERS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
8 * See cxx source for full Copyright notice
11 //____________________________________________________________________
13 // Singleton class to handle various parameters (not geometry) of the
15 // Should get ata fromm Conditions DB.
23 #ifndef ALIFMDUSHORTMAP_H
24 # include <AliFMDUShortMap.h>
26 #ifndef ALIFMDBOOLMAP_H
27 # include <AliFMDBoolMap.h>
29 typedef AliFMDUShortMap AliFMDCalibZeroSuppression;
30 typedef AliFMDBoolMap AliFMDCalibDeadMap;
31 class AliFMDCalibPedestal;
32 class AliFMDCalibGain;
33 class AliFMDCalibSampleRate;
35 class AliFMDParameters : public TNamed
38 static AliFMDParameters* Instance();
40 // Set various `Fixed' parameters
41 void SetVA1MipRange(UShort_t r=20) { fVA1MipRange = r; }
42 void SetAltroChannelSize(UShort_t s=1024) { fAltroChannelSize = s;}
43 void SetChannelsPerAltro(UShort_t size=128) { fChannelsPerAltro = size; }
44 void SetPedestalFactor(Float_t f=3) { fPedestalFactor = f; }
46 // Set various variable parameter defaults
47 void SetZeroSuppression(UShort_t s=0) { fFixedZeroSuppression = s; }
48 void SetSampleRate(UShort_t r=1) { fFixedSampleRate = (r>2?2:r);}
49 void SetPedestal(Float_t p=10) { fFixedPedestal = p; }
50 void SetPedestalWidth(Float_t w=1) { fFixedPedestalWidth = w; }
51 void SetThreshold(Float_t t=0) { fFixedThreshold = t; }
53 // Get `Fixed' various parameters
54 UShort_t GetVA1MipRange() const { return fVA1MipRange; }
55 UShort_t GetAltroChannelSize() const { return fAltroChannelSize; }
56 UShort_t GetChannelsPerAltro() const { return fChannelsPerAltro; }
57 Float_t GetEdepMip() const;
58 Float_t GetPedestalFactor() const { return fPedestalFactor; }
60 // Get variable parameters
61 Bool_t IsDead(UShort_t detector,
64 UShort_t strip) const;
65 Float_t GetThreshold() const;
66 Float_t GetPulseGain(UShort_t detector,
69 UShort_t strip) const;
70 Float_t GetPedestal(UShort_t detector,
73 UShort_t strip) const;
74 Float_t GetPedestalWidth(UShort_t detector,
77 UShort_t strip) const;
78 UShort_t GetZeroSuppression(UShort_t detector,
81 UShort_t strip) const;
82 UShort_t GetSampleRate(UShort_t ddl) const;
85 kBaseDDL = 0x1000 // DDL offset for the FMD
89 virtual ~AliFMDParameters() {}
90 static AliFMDParameters* fgInstance; // Static singleton instance
92 const Float_t fSiDeDxMip; // MIP dE/dx in Silicon
93 UShort_t fVA1MipRange; // # MIPs the pre-amp can do
94 UShort_t fAltroChannelSize; // Largest # to store in 1 ADC ch.
95 UShort_t fChannelsPerAltro; // Number of pre-amp. chan/adc chan.
96 Float_t fPedestalFactor; // Number of pedestal widths
98 Float_t fFixedPedestal; // Pedestal to subtract
99 Float_t fFixedPedestalWidth; // Width of pedestal
100 UShort_t fFixedZeroSuppression; // Threshold for zero-suppression
101 UShort_t fFixedSampleRate; // Times the ALTRO samples pre-amp.
102 Float_t fFixedThreshold; //
103 mutable Float_t fFixedPulseGain; //! Gain (cached)
104 mutable Float_t fEdepMip; //! Cache of energy loss for a MIP
106 AliFMDCalibZeroSuppression* fZeroSuppression; // Zero suppression from CDB
107 AliFMDCalibSampleRate* fSampleRate; // Sample rate from CDB
108 AliFMDCalibPedestal* fPedestal; // Pedestals
109 AliFMDCalibGain* fPulseGain; // Pulser gain
110 AliFMDCalibDeadMap* fDeadMap; // Pulser gain
113 ClassDef(AliFMDParameters,2)
117 //____________________________________________________________________