File indexing completed on 2023-10-25 09:37:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #ifndef CondFormatsL1TObjects_L1MuGMTScales_h
0023 #define CondFormatsL1TObjects_L1MuGMTScales_h
0024
0025 #include "CondFormats/Serialization/interface/Serializable.h"
0026
0027 #include <cmath>
0028 #include <iostream>
0029
0030 #include "CondFormats/L1TObjects/interface/L1MuScale.h"
0031
0032 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0033
0034 class L1MuGMTScales {
0035 public:
0036
0037 L1MuGMTScales() {}
0038
0039 L1MuGMTScales(int nbitPackingReducedEta,
0040 int nbinsReducedEta,
0041 const std::vector<double>& scaleReducedEtaDT,
0042 const std::vector<double>& scaleReducedEtaBrlRPC,
0043 const std::vector<double>& scaleReducedEtaCSC,
0044 const std::vector<double>& scaleReducedEtaFwdRPC,
0045
0046 int nbitPackingDeltaEta,
0047 bool signedPackingDeltaEta,
0048 int nbinsDeltaEta,
0049 float minDeltaEta,
0050 float maxDeltaEta,
0051 int offsetDeltaEta,
0052
0053 int nbitPackingDeltaPhi,
0054 bool signedPackingDeltaPhi,
0055 int nbinsDeltaPhi,
0056 float minDeltaPhi,
0057 float maxDeltaPhi,
0058 int offsetDeltaPhi,
0059
0060 int nbitPackingOvlEtaDT,
0061 int nbinsOvlEtaDT,
0062 float minOvlEtaDT,
0063 float maxOvlEtaDT,
0064
0065 int nbitPackingOvlEtaCSC,
0066 int nbinsOvlEtaCSC,
0067 float minOvlEtaCSC,
0068 float maxOvlEtaCSC,
0069
0070 const std::vector<double>& scaleOvlEtaRPC,
0071 int nbitPackingOvlEtaBrlRPC,
0072 int nbinsOvlEtaBrlRPC,
0073 int nbitPackingOvlEtaFwdRPC,
0074 int nbinsOvlEtaFwdRPC
0075
0076 ) {
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090 m_ReducedEtaScale[0] = L1MuSymmetricBinnedScale(nbitPackingReducedEta, nbinsReducedEta, scaleReducedEtaDT);
0091 m_ReducedEtaScale[1] = L1MuSymmetricBinnedScale(nbitPackingReducedEta, nbinsReducedEta, scaleReducedEtaBrlRPC);
0092 m_ReducedEtaScale[2] = L1MuSymmetricBinnedScale(nbitPackingReducedEta, nbinsReducedEta, scaleReducedEtaCSC);
0093 m_ReducedEtaScale[3] = L1MuSymmetricBinnedScale(nbitPackingReducedEta, nbinsReducedEta, scaleReducedEtaFwdRPC);
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108 for (int i = 0; i < 6; ++i)
0109 m_DeltaEtaScale[i] = L1MuBinnedScale(
0110 nbitPackingDeltaEta, signedPackingDeltaEta, nbinsDeltaEta, minDeltaEta, maxDeltaEta, offsetDeltaEta);
0111
0112
0113
0114 m_DeltaPhiScale = L1MuBinnedScale(
0115 nbitPackingDeltaPhi, signedPackingDeltaPhi, nbinsDeltaPhi, minDeltaPhi, maxDeltaPhi, offsetDeltaPhi);
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133 m_OvlEtaScale[0] = L1MuSymmetricBinnedScale(nbitPackingOvlEtaDT, nbinsOvlEtaDT, minOvlEtaDT,
0134 maxOvlEtaDT);
0135
0136
0137
0138 m_OvlEtaScale[1] = L1MuSymmetricBinnedScale(nbitPackingOvlEtaBrlRPC, nbinsOvlEtaBrlRPC,
0139 scaleOvlEtaRPC);
0140 m_OvlEtaScale[2] = L1MuSymmetricBinnedScale(nbitPackingOvlEtaCSC,
0141 nbinsOvlEtaCSC,
0142 minOvlEtaCSC,
0143 maxOvlEtaCSC);
0144 m_OvlEtaScale[3] = L1MuSymmetricBinnedScale(nbitPackingOvlEtaFwdRPC, nbinsOvlEtaFwdRPC,
0145 scaleOvlEtaRPC);
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170 };
0171
0172
0173 virtual ~L1MuGMTScales(){
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184 };
0185
0186
0187 const L1MuScale* getReducedEtaScale(int isys) const {
0188 if (isys < 0 || isys > 3)
0189 edm::LogWarning("GMTScaleRangeViolation") << "Error in L1MuGMTScales:: isys out of range: " << isys;
0190 return &(m_ReducedEtaScale[isys]);
0191 };
0192
0193
0194 const L1MuScale* getDeltaEtaScale(int idx) const {
0195 if (idx < 0 || idx > 5)
0196 edm::LogWarning("GMTScaleRangeViolation") << "Error in L1MuGMTScales:: isys out of range: " << idx;
0197 return &(m_DeltaEtaScale[idx]);
0198 };
0199
0200
0201 const L1MuScale* getDeltaPhiScale() const { return &m_DeltaPhiScale; };
0202
0203
0204 const L1MuScale* getOvlEtaScale(int isys) const {
0205 if (isys < 0 || isys > 3)
0206 edm::LogWarning("GMTScaleRangeViolation") << "Error in L1MuGMTScales:: isys out of range: " << isys;
0207 return &(m_OvlEtaScale[isys]);
0208 };
0209
0210
0211
0212
0213 private:
0214 L1MuSymmetricBinnedScale m_ReducedEtaScale[4];
0215 L1MuBinnedScale m_DeltaEtaScale[6];
0216 L1MuBinnedScale m_DeltaPhiScale;
0217 L1MuSymmetricBinnedScale m_OvlEtaScale[4];
0218
0219
0220 COND_SERIALIZABLE;
0221 };
0222
0223 #endif