File indexing completed on 2024-04-06 12:04:04
0001
0002 #ifndef DataFormats_EcalDigi_EcalConstants_h
0003 #define DataFormats_EcalDigi_EcalConstants_h
0004
0005 #include "FWCore/Utilities/interface/HostDeviceConstant.h"
0006
0007
0008
0009 namespace ecalcctiming {
0010 inline constexpr const float clockToNS = 25.0;
0011 inline constexpr const float nonCorrectedSlope = 1.2;
0012 inline constexpr const float encodingOffest = 0.32;
0013 inline constexpr const float encodingValue = 398.4375;
0014 }
0015
0016
0017
0018 namespace ecalph2 {
0019 constexpr unsigned int NGAINS = 2;
0020 HOST_DEVICE_CONSTANT float gains[NGAINS] = {10., 1.};
0021 }
0022
0023 namespace ecalph1 {
0024 constexpr unsigned int NGAINS = 4;
0025
0026 HOST_DEVICE_CONSTANT float gains[NGAINS] = {0., 12., 6., 1.};
0027 }
0028
0029 class ecalPh2 {
0030 public:
0031 static constexpr double Samp_Period = 6.25;
0032 static constexpr unsigned int NGAINS = ecalph2::NGAINS;
0033 static constexpr const float* gains = ecalph2::gains;
0034 static constexpr unsigned int gainId1 = 1;
0035 static constexpr unsigned int gainId10 = 0;
0036 static constexpr unsigned int sampleSize = 16;
0037 static constexpr unsigned int NBITS = 12;
0038 static constexpr unsigned int MAXADC = (1 << NBITS) - 1;
0039 static constexpr unsigned int kEBChannels = 61200;
0040 static constexpr double maxEneEB = 2000.;
0041
0042 static constexpr unsigned int kNOffsets = 2000;
0043
0044 static constexpr unsigned int kAdcMask = 0xFFF;
0045 static constexpr unsigned int kGainIdMask = 0x1;
0046 };
0047
0048 class ecalPh1 {
0049 public:
0050 static constexpr double Samp_Period = 25.;
0051 static constexpr unsigned int NGAINS = ecalph1::NGAINS;
0052 static constexpr const float* gains = ecalph1::gains;
0053 static constexpr unsigned int sampleSize = 10;
0054 static constexpr unsigned int NBITS = 12;
0055 static constexpr unsigned int kNOffsets = 2000;
0056
0057 static constexpr unsigned int kAdcMask = 0xFFF;
0058 static constexpr unsigned int kGainIdMask = 0x3;
0059 };
0060 #endif