Fixed some coding style violations.
[u/mrichter/AliRoot.git] / FMD / AliFMDParameters.h
CommitLineData
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
20
21class AliFMDParameters : public TNamed
22{
23public:
24 static AliFMDParameters* Instance();
25
26 // Set various parameters
27 void SetVA1MipRange(UShort_t r=20) { fVA1MipRange = r; }
28 void SetAltroChannelSize(UShort_t s=1024) { fAltroChannelSize = s;}
29 void SetChannelsPerAltro(UShort_t size=128) { fChannelsPerAltro = size; }
30 void SetZeroSuppression(UShort_t s=0) { fZeroSuppression = s; }
31 void SetSampleRate(UShort_t r=1) { fSampleRate = (r>2?2:r);}
32 void SetPedestal(Float_t p=10) { fPedestal = p; }
33 void SetPedestalWidth(Float_t w=1) { fPedestalWidth = w; }
34 void SetPedestalFactor(Float_t f=3) { fPedestalFactor = f; }
35
36 // Get various parameters
37 UShort_t GetVA1MipRange() const { return fVA1MipRange; }
38 UShort_t GetAltroChannelSize() const { return fAltroChannelSize; }
39 UShort_t GetChannelsPerAltro() const { return fChannelsPerAltro; }
40 UShort_t GetZeroSuppression() const { return fZeroSuppression; }
41 UShort_t GetSampleRate() const { return fSampleRate; }
42 Float_t GetEdepMip() const;
43 Float_t GetPedestal() const { return fPedestal; }
44 Float_t GetPedestalWidth() const { return fPedestalWidth; }
45 Float_t GetPedestalFactor() const { return fPedestalFactor; }
46
47 enum {
48 kBaseDDL = 0x1000 // DDL offset for the FMD
49 };
50protected:
51 AliFMDParameters();
52 virtual ~AliFMDParameters() {}
088f8e79 53 static AliFMDParameters* fgInstance; // Static singleton instance
1a1fdef7 54
55 const Float_t fSiDeDxMip; // MIP dE/dx in Silicon
56 UShort_t fVA1MipRange; // # MIPs the pre-amp can do
57 UShort_t fAltroChannelSize; // Largest # to store in 1 ADC ch.
58 UShort_t fChannelsPerAltro; // Number of pre-amp. channels/adc chan.
59 UShort_t fZeroSuppression; // Threshold for zero-suppression
60 UShort_t fSampleRate; // Times the ALTRO samples pre-amp.
61 Float_t fPedestal; // Pedestal to subtract
62 Float_t fPedestalWidth; // Width of pedestal
63 Float_t fPedestalFactor; // Number of pedestal widths
64
65
66 ClassDef(AliFMDParameters,1)
67};
68
69#endif
70//____________________________________________________________________
71//
72// Local Variables:
73// mode: C++
74// End:
75//
76// EOF
77//
78