]>
Commit | Line | Data |
---|---|---|
1a1fdef7 | 1 | #ifndef ALIFMDPARAMETERS_H |
2 | #define ALIFMDPARAMETERS_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights | |
4 | * reserved. | |
5 | * | |
6 | * Latest changes by Christian Holm Christensen <cholm@nbi.dk> | |
7 | * | |
8 | * See cxx source for full Copyright notice | |
9 | */ | |
10 | ||
11 | //____________________________________________________________________ | |
12 | // | |
13 | // Singleton class to handle various parameters (not geometry) of the | |
14 | // FMD | |
088f8e79 | 15 | // Should get ata fromm Conditions DB. |
1a1fdef7 | 16 | // |
17 | #ifndef ROOT_TNamed | |
18 | # include <TNamed.h> | |
19 | #endif | |
8f6ee336 | 20 | #ifndef ROOT_TArrayI |
21 | # include <TArrayI.h> | |
22 | #endif | |
23 | #ifndef ALIFMDUSHORTMAP_H | |
24 | # include <AliFMDUShortMap.h> | |
25 | #endif | |
26 | #ifndef ALIFMDBOOLMAP_H | |
27 | # include <AliFMDBoolMap.h> | |
28 | #endif | |
29 | typedef AliFMDUShortMap AliFMDCalibZeroSuppression; | |
30 | typedef AliFMDBoolMap AliFMDCalibDeadMap; | |
31 | class AliFMDCalibPedestal; | |
32 | class AliFMDCalibGain; | |
33 | class AliFMDCalibSampleRate; | |
1a1fdef7 | 34 | |
35 | class AliFMDParameters : public TNamed | |
36 | { | |
37 | public: | |
38 | static AliFMDParameters* Instance(); | |
39 | ||
8f6ee336 | 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; } | |
45 | ||
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; } | |
1a1fdef7 | 52 | |
8f6ee336 | 53 | // Get `Fixed' various parameters |
1a1fdef7 | 54 | UShort_t GetVA1MipRange() const { return fVA1MipRange; } |
55 | UShort_t GetAltroChannelSize() const { return fAltroChannelSize; } | |
56 | UShort_t GetChannelsPerAltro() const { return fChannelsPerAltro; } | |
1a1fdef7 | 57 | Float_t GetEdepMip() const; |
1a1fdef7 | 58 | Float_t GetPedestalFactor() const { return fPedestalFactor; } |
59 | ||
8f6ee336 | 60 | // Get variable parameters |
61 | Bool_t IsDead(UShort_t detector, | |
62 | Char_t ring, | |
63 | UShort_t sector, | |
64 | UShort_t strip) const; | |
65 | Float_t GetThreshold() const; | |
66 | Float_t GetPulseGain(UShort_t detector, | |
67 | Char_t ring, | |
68 | UShort_t sector, | |
69 | UShort_t strip) const; | |
70 | Float_t GetPedestal(UShort_t detector, | |
71 | Char_t ring, | |
72 | UShort_t sector, | |
73 | UShort_t strip) const; | |
74 | Float_t GetPedestalWidth(UShort_t detector, | |
75 | Char_t ring, | |
76 | UShort_t sector, | |
77 | UShort_t strip) const; | |
78 | UShort_t GetZeroSuppression(UShort_t detector, | |
79 | Char_t ring, | |
80 | UShort_t sector, | |
81 | UShort_t strip) const; | |
82 | UShort_t GetSampleRate(UShort_t ddl) const; | |
83 | ||
1a1fdef7 | 84 | enum { |
85 | kBaseDDL = 0x1000 // DDL offset for the FMD | |
86 | }; | |
87 | protected: | |
88 | AliFMDParameters(); | |
89 | virtual ~AliFMDParameters() {} | |
088f8e79 | 90 | static AliFMDParameters* fgInstance; // Static singleton instance |
1a1fdef7 | 91 | |
8f6ee336 | 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 | |
1a1fdef7 | 97 | |
8f6ee336 | 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 | |
105 | ||
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 | |
111 | ||
1a1fdef7 | 112 | |
8f6ee336 | 113 | ClassDef(AliFMDParameters,2) |
1a1fdef7 | 114 | }; |
115 | ||
116 | #endif | |
117 | //____________________________________________________________________ | |
118 | // | |
119 | // Local Variables: | |
120 | // mode: C++ | |
121 | // End: | |
122 | // | |
123 | // EOF | |
124 | // | |
125 |