CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
L1CaloGeometry Class Reference

#include <L1TriggerConfig/L1Geometry/interface/L1CaloGeometry.h>

Public Types

enum  Versions { kOrig, kAddedMHTPhi, kNumVersions }
 

Public Member Functions

double emJetPhiBinCenter (unsigned int phiIndex) const
 
double emJetPhiBinCenter (const L1CaloRegionDetId &detId) const
 
double emJetPhiBinHighEdge (unsigned int phiIndex) const
 
double emJetPhiBinHighEdge (const L1CaloRegionDetId &detId) const
 
double emJetPhiBinLowEdge (unsigned int phiIndex) const
 
double emJetPhiBinLowEdge (const L1CaloRegionDetId &detId) const
 
unsigned int emJetPhiIndex (const double &phiValue) const
 
double etaBinCenter (unsigned int etaIndex, bool central=true) const
 
double etaBinCenter (const L1CaloRegionDetId &detId) const
 
double etaBinHighEdge (unsigned int etaIndex, bool central=true) const
 
double etaBinHighEdge (const L1CaloRegionDetId &detId) const
 
double etaBinLowEdge (unsigned int etaIndex, bool central=true) const
 
double etaBinLowEdge (const L1CaloRegionDetId &detId) const
 
unsigned int etaIndex (const double &etaValue) const
 
unsigned int etaSignBitOffset () const
 
double etSumPhiBinCenter (unsigned int phiIndex) const
 
double etSumPhiBinHighEdge (unsigned int phiIndex) const
 
double etSumPhiBinLowEdge (unsigned int phiIndex) const
 
unsigned int etSumPhiIndex (const double &phiValue) const
 
double globalEtaBinCenter (unsigned int globalEtaIndex) const
 
double globalEtaBinHighEdge (unsigned int globalEtaIndex) const
 
double globalEtaBinLowEdge (unsigned int globalEtaIndex) const
 
unsigned int globalEtaIndex (const double &etaValue) const
 
double htSumPhiBinCenter (unsigned int phiIndex) const
 
double htSumPhiBinHighEdge (unsigned int phiIndex) const
 
double htSumPhiBinLowEdge (unsigned int phiIndex) const
 
unsigned int htSumPhiIndex (const double &phiValue) const
 
 L1CaloGeometry ()
 
 L1CaloGeometry (unsigned int numberGctEmJetPhiBins, double gctEmJetPhiBinOffset, unsigned int numberGctEtSumPhiBins, double gctEtSumPhiBinOffset, unsigned int numberGctHtSumPhiBins, double gctHtSumPhiBinOffset, unsigned int numberGctCentralEtaBinsPerHalf, unsigned int numberGctForwardEtaBinsPerHalf, unsigned int etaSignBitOffset, const std::vector< double > &gctEtaBinBoundaries)
 
unsigned int numberGctCentralEtaBinsPerHalf () const
 
unsigned int numberGctEmJetPhiBins () const
 
unsigned int numberGctEtSumPhiBins () const
 
unsigned int numberGctForwardEtaBinsPerHalf () const
 
unsigned int numberGctHtSumPhiBins () const
 
unsigned int version () const
 
virtual ~L1CaloGeometry ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

unsigned int m_etaBinsPerHalf
 
unsigned int m_etaSignBitOffset
 
double m_gctEmJetPhiBinWidth
 
double m_gctEmJetPhiOffset
 
std::vector< double > m_gctEtaBinBoundaries
 
double m_gctEtSumPhiBinWidth
 
double m_gctEtSumPhiOffset
 
double m_gctHtSumPhiBinWidth
 
double m_gctHtSumPhiOffset
 
unsigned int m_numberGctCentralEtaBinsPerHalf
 
unsigned int m_numberGctEmJetPhiBins
 
unsigned int m_numberGctEtSumPhiBins
 
unsigned int m_numberGctForwardEtaBinsPerHalf
 
unsigned int m_numberGctHtSumPhiBins
 
unsigned int m_version
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 33 of file L1CaloGeometry.h.

Member Enumeration Documentation

◆ Versions

Enumerator
kOrig 
kAddedMHTPhi 
kNumVersions 

Definition at line 43 of file L1CaloGeometry.h.

Constructor & Destructor Documentation

◆ L1CaloGeometry() [1/2]

L1CaloGeometry::L1CaloGeometry ( )

Definition at line 55 of file L1CaloGeometry.cc.

56  : m_version(kOrig), // if version is not in CondDB, set it to kOrig
70  m_gctHtSumPhiOffset(0.) {}
unsigned int m_numberGctEtSumPhiBins
double m_gctEmJetPhiBinWidth
double m_gctEtSumPhiOffset
double m_gctHtSumPhiOffset
unsigned int m_numberGctCentralEtaBinsPerHalf
unsigned int m_version
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_numberGctEmJetPhiBins
double m_gctEmJetPhiOffset
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth
unsigned int m_etaSignBitOffset
unsigned int m_etaBinsPerHalf
unsigned int m_numberGctHtSumPhiBins
unsigned int m_numberGctForwardEtaBinsPerHalf

◆ L1CaloGeometry() [2/2]

L1CaloGeometry::L1CaloGeometry ( unsigned int  numberGctEmJetPhiBins,
double  gctEmJetPhiBinOffset,
unsigned int  numberGctEtSumPhiBins,
double  gctEtSumPhiBinOffset,
unsigned int  numberGctHtSumPhiBins,
double  gctHtSumPhiBinOffset,
unsigned int  numberGctCentralEtaBinsPerHalf,
unsigned int  numberGctForwardEtaBinsPerHalf,
unsigned int  etaSignBitOffset,
const std::vector< double > &  gctEtaBinBoundaries 
)

Definition at line 72 of file L1CaloGeometry.cc.

References l1CaloGeometry_cfi::gctEmJetPhiBinOffset, l1CaloGeometry_cfi::gctEtSumPhiBinOffset, l1CaloGeometry_cfi::gctHtSumPhiBinOffset, m_etaBinsPerHalf, m_gctEmJetPhiBinWidth, m_gctEmJetPhiOffset, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, m_gctHtSumPhiOffset, m_numberGctCentralEtaBinsPerHalf, m_numberGctEmJetPhiBins, m_numberGctEtSumPhiBins, m_numberGctForwardEtaBinsPerHalf, m_numberGctHtSumPhiBins, and M_PI.

91 
95 
99 }
unsigned int m_numberGctEtSumPhiBins
double m_gctEmJetPhiBinWidth
double m_gctEtSumPhiOffset
double m_gctHtSumPhiOffset
unsigned int m_numberGctCentralEtaBinsPerHalf
unsigned int m_version
std::vector< double > m_gctEtaBinBoundaries
unsigned int numberGctEtSumPhiBins() const
unsigned int m_numberGctEmJetPhiBins
double m_gctEmJetPhiOffset
double m_gctHtSumPhiBinWidth
unsigned int numberGctEmJetPhiBins() const
double m_gctEtSumPhiBinWidth
#define M_PI
unsigned int numberGctForwardEtaBinsPerHalf() const
unsigned int m_etaSignBitOffset
unsigned int m_etaBinsPerHalf
unsigned int m_numberGctHtSumPhiBins
unsigned int numberGctHtSumPhiBins() const
unsigned int m_numberGctForwardEtaBinsPerHalf
unsigned int numberGctCentralEtaBinsPerHalf() const
unsigned int etaSignBitOffset() const

◆ ~L1CaloGeometry()

L1CaloGeometry::~L1CaloGeometry ( )
virtual

Definition at line 106 of file L1CaloGeometry.cc.

106 {}

Member Function Documentation

◆ emJetPhiBinCenter() [1/2]

double L1CaloGeometry::emJetPhiBinCenter ( unsigned int  phiIndex) const

Definition at line 224 of file L1CaloGeometry.cc.

References m_gctEmJetPhiBinWidth, and m_gctEmJetPhiOffset.

Referenced by L1GctInternJetProducer::produce().

224  {
225  return ((double)phiIndex + 0.5) * m_gctEmJetPhiBinWidth + m_gctEmJetPhiOffset;
226 }
double m_gctEmJetPhiBinWidth
double m_gctEmJetPhiOffset

◆ emJetPhiBinCenter() [2/2]

double L1CaloGeometry::emJetPhiBinCenter ( const L1CaloRegionDetId detId) const
inline

Definition at line 82 of file L1CaloGeometry.h.

References hcalRecHitTable_cff::detId, and emJetPhiBinCenter().

Referenced by emJetPhiBinCenter().

82 { return emJetPhiBinCenter(detId.iphi()); }
double emJetPhiBinCenter(unsigned int phiIndex) const

◆ emJetPhiBinHighEdge() [1/2]

double L1CaloGeometry::emJetPhiBinHighEdge ( unsigned int  phiIndex) const

Definition at line 232 of file L1CaloGeometry.cc.

References m_gctEmJetPhiBinWidth, and m_gctEmJetPhiOffset.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GetHistLimits::getHistLimits(), and L1GtEtaPhiConversions::print().

232  {
233  return ((double)phiIndex + 1.) * m_gctEmJetPhiBinWidth + m_gctEmJetPhiOffset;
234 }
double m_gctEmJetPhiBinWidth
double m_gctEmJetPhiOffset

◆ emJetPhiBinHighEdge() [2/2]

double L1CaloGeometry::emJetPhiBinHighEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 84 of file L1CaloGeometry.h.

References hcalRecHitTable_cff::detId, and emJetPhiBinHighEdge().

Referenced by emJetPhiBinHighEdge().

84 { return emJetPhiBinHighEdge(detId.iphi()); }
double emJetPhiBinHighEdge(unsigned int phiIndex) const

◆ emJetPhiBinLowEdge() [1/2]

double L1CaloGeometry::emJetPhiBinLowEdge ( unsigned int  phiIndex) const

◆ emJetPhiBinLowEdge() [2/2]

double L1CaloGeometry::emJetPhiBinLowEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 83 of file L1CaloGeometry.h.

References hcalRecHitTable_cff::detId, and emJetPhiBinLowEdge().

Referenced by emJetPhiBinLowEdge().

83 { return emJetPhiBinLowEdge(detId.iphi()); }
double emJetPhiBinLowEdge(unsigned int phiIndex) const

◆ emJetPhiIndex()

unsigned int L1CaloGeometry::emJetPhiIndex ( const double &  phiValue) const

Definition at line 314 of file L1CaloGeometry.cc.

References m_gctEmJetPhiBinWidth, m_gctEmJetPhiOffset, and M_PI.

314  {
315  double phiAdjusted = phiValue - m_gctEmJetPhiOffset;
316 
317  // Check phiValue is between m_gctEmJetPhiOffset and m_gctEmJetPhiOffset+2pi
318  if (phiAdjusted < 0.) {
319  do {
320  phiAdjusted += 2. * M_PI;
321  } while (phiAdjusted < 0.);
322  } else if (phiAdjusted > 2. * M_PI) {
323  do {
324  phiAdjusted -= 2. * M_PI;
325  } while (phiAdjusted > 2. * M_PI);
326  }
327 
328  return ((int)(phiAdjusted / m_gctEmJetPhiBinWidth));
329 }
double m_gctEmJetPhiBinWidth
double m_gctEmJetPhiOffset
#define M_PI

◆ etaBinCenter() [1/2]

double L1CaloGeometry::etaBinCenter ( unsigned int  etaIndex,
bool  central = true 
) const

Definition at line 167 of file L1CaloGeometry.cc.

References central, etaIndex(), m_etaSignBitOffset, m_gctEtaBinBoundaries, and m_numberGctCentralEtaBinsPerHalf.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GtEtaPhiConversions::print(), and L1GctInternJetProducer::produce().

167  {
168  // Central/tau jets and EM have etaIndex = 0-6 for eta = 0-3.
169  // Forward jets have etaIndex = 0-3 for eta = 3-5.
170  double etaSign = 1.;
171 
172  // Check sign BEFORE shifting forward jet bin index.
173  if (etaIndex >= m_etaSignBitOffset) {
174  etaSign = -1.;
176  }
177 
178  // Shift forward jet bin index AFTER checking sign bit.
179  if (!central) {
181  }
182 
183  return 0.5 * etaSign * (m_gctEtaBinBoundaries[etaIndex] + m_gctEtaBinBoundaries[etaIndex + 1]);
184 }
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int etaIndex(const double &etaValue) const
unsigned int m_etaSignBitOffset

◆ etaBinCenter() [2/2]

double L1CaloGeometry::etaBinCenter ( const L1CaloRegionDetId detId) const
inline

Definition at line 74 of file L1CaloGeometry.h.

References hcalRecHitTable_cff::detId, and globalEtaBinCenter().

74 { return globalEtaBinCenter(detId.ieta()); }
double globalEtaBinCenter(unsigned int globalEtaIndex) const

◆ etaBinHighEdge() [1/2]

double L1CaloGeometry::etaBinHighEdge ( unsigned int  etaIndex,
bool  central = true 
) const

Definition at line 205 of file L1CaloGeometry.cc.

References central, etaIndex(), m_etaSignBitOffset, m_gctEtaBinBoundaries, and m_numberGctCentralEtaBinsPerHalf.

205  {
206  // Central/tau jets and EM have etaIndex = 0-6 for eta = 0-3.
207  // Forward jets have etaIndex = 0-3 for eta = 3-5.
208  double etaSign = 1.;
209 
210  // Check sign BEFORE shifting forward jet bin index.
211  if (etaIndex >= m_etaSignBitOffset) {
212  etaSign = -1.;
214  }
215 
216  // Shift forward jet bin index AFTER checking sign bit.
217  if (!central) {
219  }
220 
221  return (etaSign > 0. ? m_gctEtaBinBoundaries[etaIndex + 1] : -m_gctEtaBinBoundaries[etaIndex]);
222 }
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int etaIndex(const double &etaValue) const
unsigned int m_etaSignBitOffset

◆ etaBinHighEdge() [2/2]

double L1CaloGeometry::etaBinHighEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 76 of file L1CaloGeometry.h.

References hcalRecHitTable_cff::detId, and globalEtaBinHighEdge().

76 { return globalEtaBinHighEdge(detId.ieta()); }
double globalEtaBinHighEdge(unsigned int globalEtaIndex) const

◆ etaBinLowEdge() [1/2]

double L1CaloGeometry::etaBinLowEdge ( unsigned int  etaIndex,
bool  central = true 
) const

Definition at line 186 of file L1CaloGeometry.cc.

References central, etaIndex(), m_etaSignBitOffset, m_gctEtaBinBoundaries, and m_numberGctCentralEtaBinsPerHalf.

186  {
187  // Central/tau jets and EM have etaIndex = 0-6 for eta = 0-3.
188  // Forward jets have etaIndex = 0-3 for eta = 3-5.
189  double etaSign = 1.;
190 
191  // Check sign BEFORE shifting forward jet bin index.
192  if (etaIndex >= m_etaSignBitOffset) {
193  etaSign = -1.;
195  }
196 
197  // Shift forward jet bin index AFTER checking sign bit.
198  if (!central) {
200  }
201 
202  return (etaSign > 0. ? m_gctEtaBinBoundaries[etaIndex] : -m_gctEtaBinBoundaries[etaIndex + 1]);
203 }
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int etaIndex(const double &etaValue) const
unsigned int m_etaSignBitOffset

◆ etaBinLowEdge() [2/2]

double L1CaloGeometry::etaBinLowEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 75 of file L1CaloGeometry.h.

References hcalRecHitTable_cff::detId, and globalEtaBinLowEdge().

75 { return globalEtaBinLowEdge(detId.ieta()); }
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const

◆ etaIndex()

unsigned int L1CaloGeometry::etaIndex ( const double &  etaValue) const

Definition at line 272 of file L1CaloGeometry.cc.

References mps_fire::i, m_etaSignBitOffset, m_gctEtaBinBoundaries, m_numberGctCentralEtaBinsPerHalf, and m_numberGctForwardEtaBinsPerHalf.

Referenced by etaBinCenter(), etaBinHighEdge(), etaBinLowEdge(), globalEtaBinCenter(), globalEtaBinHighEdge(), globalEtaBinLowEdge(), and globalEtaIndex().

272  {
273  unsigned int etaIndex = 0;
274 
275  for (unsigned int i = 0; i < m_numberGctCentralEtaBinsPerHalf; ++i) {
276  if (fabs(etaValue) >= m_gctEtaBinBoundaries[i]) {
277  etaIndex = i;
278  }
279  }
280 
281  for (unsigned int i = 0; i < m_numberGctForwardEtaBinsPerHalf; ++i) {
282  if (fabs(etaValue) >= m_gctEtaBinBoundaries[i + m_numberGctCentralEtaBinsPerHalf]) {
283  etaIndex = i;
284  }
285  }
286 
287  if (etaValue < 0.) {
289  }
290 
291  return etaIndex;
292 }
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int etaIndex(const double &etaValue) const
unsigned int m_etaSignBitOffset
unsigned int m_numberGctForwardEtaBinsPerHalf

◆ etaSignBitOffset()

unsigned int L1CaloGeometry::etaSignBitOffset ( ) const
inline

Definition at line 105 of file L1CaloGeometry.h.

References m_etaBinsPerHalf.

105 { return m_etaBinsPerHalf; }
unsigned int m_etaBinsPerHalf

◆ etSumPhiBinCenter()

double L1CaloGeometry::etSumPhiBinCenter ( unsigned int  phiIndex) const

Definition at line 236 of file L1CaloGeometry.cc.

References m_gctEtSumPhiBinWidth, and m_gctEtSumPhiOffset.

Referenced by L1ExtraParticlesProd::produce().

236  {
237  return ((double)phiIndex + 0.5) * m_gctEtSumPhiBinWidth + m_gctEtSumPhiOffset;
238 }
double m_gctEtSumPhiOffset
double m_gctEtSumPhiBinWidth

◆ etSumPhiBinHighEdge()

double L1CaloGeometry::etSumPhiBinHighEdge ( unsigned int  phiIndex) const

Definition at line 244 of file L1CaloGeometry.cc.

References m_gctEtSumPhiBinWidth, and m_gctEtSumPhiOffset.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GetHistLimits::getHistLimits(), and L1GtEtaPhiConversions::print().

244  {
245  return ((double)phiIndex + 1.) * m_gctEtSumPhiBinWidth + m_gctEtSumPhiOffset;
246 }
double m_gctEtSumPhiOffset
double m_gctEtSumPhiBinWidth

◆ etSumPhiBinLowEdge()

double L1CaloGeometry::etSumPhiBinLowEdge ( unsigned int  phiIndex) const

◆ etSumPhiIndex()

unsigned int L1CaloGeometry::etSumPhiIndex ( const double &  phiValue) const

Definition at line 331 of file L1CaloGeometry.cc.

References m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, and M_PI.

331  {
332  double phiAdjusted = phiValue - m_gctEtSumPhiOffset;
333 
334  // Check phiValue is between m_gctEtSumPhiOffset and m_gctEtSumPhiOffset+2pi
335  if (phiAdjusted < 0.) {
336  do {
337  phiAdjusted += 2. * M_PI;
338  } while (phiAdjusted < 0.);
339  } else if (phiAdjusted > 2. * M_PI) {
340  do {
341  phiAdjusted -= 2. * M_PI;
342  } while (phiAdjusted > 2. * M_PI);
343  }
344 
345  return ((int)(phiAdjusted / m_gctEtSumPhiBinWidth));
346 }
double m_gctEtSumPhiOffset
double m_gctEtSumPhiBinWidth
#define M_PI

◆ globalEtaBinCenter()

double L1CaloGeometry::globalEtaBinCenter ( unsigned int  globalEtaIndex) const

Definition at line 128 of file L1CaloGeometry.cc.

References etaIndex(), globalEtaIndex(), m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

Referenced by etaBinCenter(), and L1MuGMTMIAUEtaProLUT::TheLookupFunction().

128  {
129  int etaIndex;
130  double etaSign = 1.;
133  etaSign = -1.;
134  } else {
136  }
137 
138  return 0.5 * etaSign * (m_gctEtaBinBoundaries[etaIndex] + m_gctEtaBinBoundaries[etaIndex + 1]);
139 }
std::vector< double > m_gctEtaBinBoundaries
unsigned int globalEtaIndex(const double &etaValue) const
unsigned int etaIndex(const double &etaValue) const
unsigned int m_etaBinsPerHalf

◆ globalEtaBinHighEdge()

double L1CaloGeometry::globalEtaBinHighEdge ( unsigned int  globalEtaIndex) const

Definition at line 154 of file L1CaloGeometry.cc.

References etaIndex(), globalEtaIndex(), m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

Referenced by etaBinHighEdge(), and L1GetHistLimits::getHistLimits().

154  {
155  int etaIndex;
156  double etaSign = 1.;
159  etaSign = -1.;
160  } else {
162  }
163 
164  return (etaSign > 0. ? m_gctEtaBinBoundaries[etaIndex + 1] : -m_gctEtaBinBoundaries[etaIndex]);
165 }
std::vector< double > m_gctEtaBinBoundaries
unsigned int globalEtaIndex(const double &etaValue) const
unsigned int etaIndex(const double &etaValue) const
unsigned int m_etaBinsPerHalf

◆ globalEtaBinLowEdge()

double L1CaloGeometry::globalEtaBinLowEdge ( unsigned int  globalEtaIndex) const

Definition at line 141 of file L1CaloGeometry.cc.

References etaIndex(), globalEtaIndex(), m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), etaBinLowEdge(), L1GetHistLimits::getHistLimits(), and L1GtEtaPhiConversions::print().

141  {
142  int etaIndex;
143  double etaSign = 1.;
146  etaSign = -1.;
147  } else {
149  }
150 
151  return (etaSign > 0. ? m_gctEtaBinBoundaries[etaIndex] : -m_gctEtaBinBoundaries[etaIndex + 1]);
152 }
std::vector< double > m_gctEtaBinBoundaries
unsigned int globalEtaIndex(const double &etaValue) const
unsigned int etaIndex(const double &etaValue) const
unsigned int m_etaBinsPerHalf

◆ globalEtaIndex()

unsigned int L1CaloGeometry::globalEtaIndex ( const double &  etaValue) const

Definition at line 294 of file L1CaloGeometry.cc.

References etaIndex(), mps_fire::i, m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), globalEtaBinCenter(), globalEtaBinHighEdge(), globalEtaBinLowEdge(), L1GtEtaPhiConversions::print(), and L1MuGMTMIAUEtaProLUT::TheLookupFunction().

294  {
295  unsigned int etaIndex = 0;
296 
297  if (etaValue < 0.) {
298  for (unsigned int i = m_etaBinsPerHalf; i > 0; --i) {
299  if (fabs(etaValue) < m_gctEtaBinBoundaries[i]) {
301  }
302  }
303  } else {
304  for (unsigned int i = 0; i < m_etaBinsPerHalf; ++i) {
305  if (etaValue >= m_gctEtaBinBoundaries[i]) {
307  }
308  }
309  }
310 
311  return etaIndex;
312 }
std::vector< double > m_gctEtaBinBoundaries
unsigned int etaIndex(const double &etaValue) const
unsigned int m_etaBinsPerHalf

◆ htSumPhiBinCenter()

double L1CaloGeometry::htSumPhiBinCenter ( unsigned int  phiIndex) const

Definition at line 248 of file L1CaloGeometry.cc.

References kOrig, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, m_gctHtSumPhiOffset, and m_version.

Referenced by L1ExtraParticlesProd::produce().

248  {
249  if (m_version == kOrig) {
250  return ((double)phiIndex + 0.5) * m_gctEtSumPhiBinWidth * 4. + m_gctEtSumPhiOffset;
251  } else {
252  return ((double)phiIndex + 0.5) * m_gctHtSumPhiBinWidth + m_gctHtSumPhiOffset;
253  }
254 }
double m_gctEtSumPhiOffset
double m_gctHtSumPhiOffset
unsigned int m_version
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth

◆ htSumPhiBinHighEdge()

double L1CaloGeometry::htSumPhiBinHighEdge ( unsigned int  phiIndex) const

Definition at line 264 of file L1CaloGeometry.cc.

References kOrig, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, m_gctHtSumPhiOffset, and m_version.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GetHistLimits::getHistLimits(), and L1GtEtaPhiConversions::print().

264  {
265  if (m_version == kOrig) {
266  return ((double)phiIndex + 1.) * m_gctEtSumPhiBinWidth * 4. + m_gctEtSumPhiOffset;
267  } else {
268  return ((double)phiIndex + 1.) * m_gctHtSumPhiBinWidth + m_gctHtSumPhiOffset;
269  }
270 }
double m_gctEtSumPhiOffset
double m_gctHtSumPhiOffset
unsigned int m_version
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth

◆ htSumPhiBinLowEdge()

double L1CaloGeometry::htSumPhiBinLowEdge ( unsigned int  phiIndex) const

Definition at line 256 of file L1CaloGeometry.cc.

References kOrig, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, m_gctHtSumPhiOffset, and m_version.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GetHistLimits::getHistLimits(), and L1GtEtaPhiConversions::print().

256  {
257  if (m_version == kOrig) {
258  return ((double)phiIndex) * m_gctEtSumPhiBinWidth * 4. + m_gctEtSumPhiOffset;
259  } else {
260  return ((double)phiIndex) * m_gctHtSumPhiBinWidth + m_gctHtSumPhiOffset;
261  }
262 }
double m_gctEtSumPhiOffset
double m_gctHtSumPhiOffset
unsigned int m_version
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth

◆ htSumPhiIndex()

unsigned int L1CaloGeometry::htSumPhiIndex ( const double &  phiValue) const

Definition at line 348 of file L1CaloGeometry.cc.

References kOrig, m_gctEtSumPhiBinWidth, m_gctEtSumPhiOffset, m_gctHtSumPhiBinWidth, M_PI, and m_version.

348  {
349  double phiAdjusted = phiValue - m_gctEtSumPhiOffset;
350 
351  // Check phiValue is between m_gctEtSumPhiOffset and m_gctEtSumPhiOffset+2pi
352  if (phiAdjusted < 0.) {
353  do {
354  phiAdjusted += 2. * M_PI;
355  } while (phiAdjusted < 0.);
356  } else if (phiAdjusted > 2. * M_PI) {
357  do {
358  phiAdjusted -= 2. * M_PI;
359  } while (phiAdjusted > 2. * M_PI);
360  }
361 
362  if (m_version == kOrig) {
363  return ((int)(phiAdjusted / (m_gctEtSumPhiBinWidth * 4.)));
364  } else {
365  return ((int)(phiAdjusted / m_gctHtSumPhiBinWidth));
366  }
367 }
double m_gctEtSumPhiOffset
unsigned int m_version
double m_gctHtSumPhiBinWidth
double m_gctEtSumPhiBinWidth
#define M_PI

◆ numberGctCentralEtaBinsPerHalf()

unsigned int L1CaloGeometry::numberGctCentralEtaBinsPerHalf ( ) const
inline

◆ numberGctEmJetPhiBins()

unsigned int L1CaloGeometry::numberGctEmJetPhiBins ( ) const
inline

Definition at line 100 of file L1CaloGeometry.h.

References m_numberGctEmJetPhiBins.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), and L1GetHistLimits::getHistLimits().

100 { return m_numberGctEmJetPhiBins; }
unsigned int m_numberGctEmJetPhiBins

◆ numberGctEtSumPhiBins()

unsigned int L1CaloGeometry::numberGctEtSumPhiBins ( ) const
inline

Definition at line 101 of file L1CaloGeometry.h.

References m_numberGctEtSumPhiBins.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), and L1GetHistLimits::getHistLimits().

101 { return m_numberGctEtSumPhiBins; }
unsigned int m_numberGctEtSumPhiBins

◆ numberGctForwardEtaBinsPerHalf()

unsigned int L1CaloGeometry::numberGctForwardEtaBinsPerHalf ( ) const
inline

◆ numberGctHtSumPhiBins()

unsigned int L1CaloGeometry::numberGctHtSumPhiBins ( ) const

Definition at line 369 of file L1CaloGeometry.cc.

References kOrig, m_numberGctEtSumPhiBins, m_numberGctHtSumPhiBins, and m_version.

Referenced by L1GtEtaPhiConversions::convertL1Scales(), and L1GetHistLimits::getHistLimits().

369  {
370  if (m_version == kOrig) {
371  return m_numberGctEtSumPhiBins / 4;
372  } else {
374  }
375 }
unsigned int m_numberGctEtSumPhiBins
unsigned int m_version
unsigned int m_numberGctHtSumPhiBins

◆ serialize()

template<class Archive >
void L1CaloGeometry::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ version()

unsigned int L1CaloGeometry::version ( ) const
inline

Definition at line 60 of file L1CaloGeometry.h.

References m_version.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

60 { return m_version; }
unsigned int m_version

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 138 of file L1CaloGeometry.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 138 of file L1CaloGeometry.h.

Member Data Documentation

◆ m_etaBinsPerHalf

unsigned int L1CaloGeometry::m_etaBinsPerHalf
private

◆ m_etaSignBitOffset

unsigned int L1CaloGeometry::m_etaSignBitOffset
private

Definition at line 125 of file L1CaloGeometry.h.

Referenced by etaBinCenter(), etaBinHighEdge(), etaBinLowEdge(), and etaIndex().

◆ m_gctEmJetPhiBinWidth

double L1CaloGeometry::m_gctEmJetPhiBinWidth
private

◆ m_gctEmJetPhiOffset

double L1CaloGeometry::m_gctEmJetPhiOffset
private

◆ m_gctEtaBinBoundaries

std::vector<double> L1CaloGeometry::m_gctEtaBinBoundaries
private

◆ m_gctEtSumPhiBinWidth

double L1CaloGeometry::m_gctEtSumPhiBinWidth
private

◆ m_gctEtSumPhiOffset

double L1CaloGeometry::m_gctEtSumPhiOffset
private

◆ m_gctHtSumPhiBinWidth

double L1CaloGeometry::m_gctHtSumPhiBinWidth
private

◆ m_gctHtSumPhiOffset

double L1CaloGeometry::m_gctHtSumPhiOffset
private

◆ m_numberGctCentralEtaBinsPerHalf

unsigned int L1CaloGeometry::m_numberGctCentralEtaBinsPerHalf
private

◆ m_numberGctEmJetPhiBins

unsigned int L1CaloGeometry::m_numberGctEmJetPhiBins
private

Definition at line 120 of file L1CaloGeometry.h.

Referenced by L1CaloGeometry(), and numberGctEmJetPhiBins().

◆ m_numberGctEtSumPhiBins

unsigned int L1CaloGeometry::m_numberGctEtSumPhiBins
private

Definition at line 121 of file L1CaloGeometry.h.

Referenced by L1CaloGeometry(), numberGctEtSumPhiBins(), and numberGctHtSumPhiBins().

◆ m_numberGctForwardEtaBinsPerHalf

unsigned int L1CaloGeometry::m_numberGctForwardEtaBinsPerHalf
private

Definition at line 124 of file L1CaloGeometry.h.

Referenced by etaIndex(), L1CaloGeometry(), and numberGctForwardEtaBinsPerHalf().

◆ m_numberGctHtSumPhiBins

unsigned int L1CaloGeometry::m_numberGctHtSumPhiBins
private

Definition at line 122 of file L1CaloGeometry.h.

Referenced by L1CaloGeometry(), and numberGctHtSumPhiBins().

◆ m_version

unsigned int L1CaloGeometry::m_version
private