CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalConstants.h
Go to the documentation of this file.
1 //Namespaces for Phase1 and Phase2
2 #ifndef DataFormats_EcalDigi_EcalConstants_h
3 #define DataFormats_EcalDigi_EcalConstants_h
4 
5 class ecalPh2 {
6 public:
7  static constexpr double Samp_Period = 6.25; // ADC sampling period in ns
8  static constexpr unsigned int NGAINS = 2; // Number of CATIA gains
9  static constexpr float gains[NGAINS] = {10., 1.}; // CATIA gain values
10  static constexpr unsigned int gainId1 = 1; // Position of gain 1 in gains array
11  static constexpr unsigned int gainId10 = 0; // Position of gain 10 in gains array
12  static constexpr unsigned int sampleSize = 16; // Number of samples per event
13  static constexpr unsigned int NBITS = 12; // Number of available bits
14  static constexpr unsigned int MAXADC = (1 << NBITS) - 1; // 2^NBITS - 1, ADC max range
15  static constexpr unsigned int kEBChannels = 61200; // Number of channels in the barrel
16  static constexpr double maxEneEB = 2000.; // Max attainable energy in the barrel in GeV
17  // ~(MAXADC * 10(gain) * 0.05 GeV(LSB at gain 10))
18  static constexpr unsigned int kNOffsets = 2000; // Number of time offsets generated for APD pulse shape
19  // simulation and reused for every kNOffsets^th channel
20  static constexpr unsigned int kAdcMask = 0xFFF; // ADC sample mask for unpacking
21  static constexpr unsigned int kGainIdMask = 0x1; // Gain id mask for unpacking
22 };
23 
24 class ecalPh1 {
25 public:
26  static constexpr double Samp_Period = 25.; // ADC sampling period in ns
27  static constexpr unsigned int NGAINS = 4; // Number of MGPA gains including a zero gain that
28  // could be encoded in the gain id mask
29  static constexpr float gains[NGAINS] = {0., 12., 6., 1.}; // MGPA gain values including a zero gain
30  static constexpr unsigned int sampleSize = 10; // Number of samples per event
31  static constexpr unsigned int NBITS = 12; // Number of available bits
32  static constexpr unsigned int kNOffsets = 2000; // Number of time offsets generated for APD pulse shape
33  // simulation and reused for every kNOffsets^th channel
34  static constexpr unsigned int kAdcMask = 0xFFF; // ADC sample mask for unpacking
35  static constexpr unsigned int kGainIdMask = 0x3; // Gain id mask for unpacking
36 };
37 #endif
static constexpr unsigned int NGAINS
Definition: EcalConstants.h:8
static constexpr unsigned int kGainIdMask
Definition: EcalConstants.h:21
static constexpr float gains[NGAINS]
Definition: EcalConstants.h:9
static constexpr unsigned int NBITS
Definition: EcalConstants.h:31
static constexpr unsigned int kNOffsets
Definition: EcalConstants.h:18
static constexpr unsigned int sampleSize
Definition: EcalConstants.h:12
static constexpr unsigned int kAdcMask
Definition: EcalConstants.h:20
static constexpr double maxEneEB
Definition: EcalConstants.h:16
static constexpr unsigned int kNOffsets
Definition: EcalConstants.h:32
static constexpr float gains[NGAINS]
Definition: EcalConstants.h:29
static constexpr double Samp_Period
Definition: EcalConstants.h:7
static constexpr double Samp_Period
Definition: EcalConstants.h:26
static constexpr unsigned int kEBChannels
Definition: EcalConstants.h:15
static constexpr unsigned int NBITS
Definition: EcalConstants.h:13
static constexpr unsigned int sampleSize
Definition: EcalConstants.h:30
static constexpr unsigned int NGAINS
Definition: EcalConstants.h:27
static constexpr unsigned int kGainIdMask
Definition: EcalConstants.h:35
static constexpr unsigned int gainId10
Definition: EcalConstants.h:11
static constexpr unsigned int kAdcMask
Definition: EcalConstants.h:34
static constexpr unsigned int MAXADC
Definition: EcalConstants.h:14
static constexpr unsigned int gainId1
Definition: EcalConstants.h:10