CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

Enumerator
kOrig 
kAddedMHTPhi 
kNumVersions 

Definition at line 43 of file L1CaloGeometry.h.

Constructor & Destructor Documentation

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::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 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.

89  m_gctEtaBinBoundaries(gctEtaBinBoundaries) {
91 
95 
96  m_gctEmJetPhiOffset = gctEmJetPhiBinOffset * m_gctEmJetPhiBinWidth;
97  m_gctEtSumPhiOffset = gctEtSumPhiBinOffset * m_gctEtSumPhiBinWidth;
98  m_gctHtSumPhiOffset = gctHtSumPhiBinOffset * m_gctHtSumPhiBinWidth;
99 }
unsigned int numberGctForwardEtaBinsPerHalf() const
unsigned int numberGctHtSumPhiBins() const
unsigned int numberGctEtSumPhiBins() const
unsigned int m_numberGctEtSumPhiBins
double m_gctEmJetPhiBinWidth
unsigned int numberGctEmJetPhiBins() const
double m_gctEtSumPhiOffset
unsigned int numberGctCentralEtaBinsPerHalf() const
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
#define M_PI
unsigned int m_etaSignBitOffset
unsigned int m_etaBinsPerHalf
unsigned int m_numberGctHtSumPhiBins
unsigned int etaSignBitOffset() const
unsigned int m_numberGctForwardEtaBinsPerHalf
L1CaloGeometry::~L1CaloGeometry ( )
virtual

Definition at line 106 of file L1CaloGeometry.cc.

106 {}

Member Function Documentation

double L1CaloGeometry::emJetPhiBinCenter ( unsigned int  phiIndex) const

Definition at line 224 of file L1CaloGeometry.cc.

References m_gctEmJetPhiBinWidth, and m_gctEmJetPhiOffset.

Referenced by L1ExtraParticlesProd::gctLorentzVector(), and operator<<().

224  {
225  return ((double)phiIndex + 0.5) * m_gctEmJetPhiBinWidth + m_gctEmJetPhiOffset;
226 }
double m_gctEmJetPhiBinWidth
double m_gctEmJetPhiOffset
double L1CaloGeometry::emJetPhiBinCenter ( const L1CaloRegionDetId detId) const
inline

Definition at line 82 of file L1CaloGeometry.h.

References emJetPhiBinCenter(), and L1CaloRegionDetId::iphi().

Referenced by emJetPhiBinCenter().

82 { return emJetPhiBinCenter(detId.iphi()); }
unsigned iphi() const
global phi index (0-17)
double emJetPhiBinCenter(unsigned int phiIndex) const
double L1CaloGeometry::emJetPhiBinHighEdge ( unsigned int  phiIndex) const
double L1CaloGeometry::emJetPhiBinHighEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 84 of file L1CaloGeometry.h.

References emJetPhiBinHighEdge(), and L1CaloRegionDetId::iphi().

Referenced by emJetPhiBinHighEdge().

84 { return emJetPhiBinHighEdge(detId.iphi()); }
unsigned iphi() const
global phi index (0-17)
double emJetPhiBinHighEdge(unsigned int phiIndex) const
double L1CaloGeometry::emJetPhiBinLowEdge ( unsigned int  phiIndex) const
double L1CaloGeometry::emJetPhiBinLowEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 83 of file L1CaloGeometry.h.

References emJetPhiBinLowEdge(), and L1CaloRegionDetId::iphi().

Referenced by emJetPhiBinLowEdge().

83 { return emJetPhiBinLowEdge(detId.iphi()); }
unsigned iphi() const
global phi index (0-17)
double emJetPhiBinLowEdge(unsigned int phiIndex) const
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
double L1CaloGeometry::etaBinCenter ( unsigned int  etaIndex,
bool  central = true 
) const

Definition at line 167 of file L1CaloGeometry.cc.

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

Referenced by L1GtEtaPhiConversions::convertL1Scales(), L1GctConfigProducers::etToEnergyConversion(), L1ExtraParticlesProd::gctLorentzVector(), operator<<(), and L1GtEtaPhiConversions::print().

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 m_etaSignBitOffset
unsigned int etaIndex(const double &etaValue) const
double L1CaloGeometry::etaBinCenter ( const L1CaloRegionDetId detId) const
inline

Definition at line 74 of file L1CaloGeometry.h.

References globalEtaBinCenter(), and L1CaloRegionDetId::ieta().

74 { return globalEtaBinCenter(detId.ieta()); }
unsigned ieta() const
global eta index (0-21)
double globalEtaBinCenter(unsigned int globalEtaIndex) const
double L1CaloGeometry::etaBinHighEdge ( unsigned int  etaIndex,
bool  central = true 
) const

Definition at line 205 of file L1CaloGeometry.cc.

References m_etaSignBitOffset, m_gctEtaBinBoundaries, and m_numberGctCentralEtaBinsPerHalf.

Referenced by HLTRechitInRegionsProducer< T1 >::getEtaPhiRegions(), L1RegionData< T1 >::getEtaPhiRegions(), and operator<<().

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 m_etaSignBitOffset
unsigned int etaIndex(const double &etaValue) const
double L1CaloGeometry::etaBinHighEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 76 of file L1CaloGeometry.h.

References globalEtaBinHighEdge(), and L1CaloRegionDetId::ieta().

76 { return globalEtaBinHighEdge(detId.ieta()); }
unsigned ieta() const
global eta index (0-21)
double globalEtaBinHighEdge(unsigned int globalEtaIndex) const
double L1CaloGeometry::etaBinLowEdge ( unsigned int  etaIndex,
bool  central = true 
) const

Definition at line 186 of file L1CaloGeometry.cc.

References m_etaSignBitOffset, m_gctEtaBinBoundaries, and m_numberGctCentralEtaBinsPerHalf.

Referenced by HLTRechitInRegionsProducer< T1 >::getEtaPhiRegions(), L1RegionData< T1 >::getEtaPhiRegions(), and operator<<().

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 m_etaSignBitOffset
unsigned int etaIndex(const double &etaValue) const
double L1CaloGeometry::etaBinLowEdge ( const L1CaloRegionDetId detId) const
inline

Definition at line 75 of file L1CaloGeometry.h.

References globalEtaBinLowEdge(), and L1CaloRegionDetId::ieta().

75 { return globalEtaBinLowEdge(detId.ieta()); }
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
unsigned ieta() const
global eta index (0-21)
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(), 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.) {
288  etaIndex += m_etaSignBitOffset;
289  }
290 
291  return etaIndex;
292 }
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaSignBitOffset
unsigned int m_numberGctForwardEtaBinsPerHalf
unsigned int etaIndex(const double &etaValue) const
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
double L1CaloGeometry::etSumPhiBinCenter ( unsigned int  phiIndex) const

Definition at line 236 of file L1CaloGeometry.cc.

References m_gctEtSumPhiBinWidth, and m_gctEtSumPhiOffset.

Referenced by operator<<(), and L1ExtraParticlesProd::produce().

236  {
237  return ((double)phiIndex + 0.5) * m_gctEtSumPhiBinWidth + m_gctEtSumPhiOffset;
238 }
double m_gctEtSumPhiOffset
double m_gctEtSumPhiBinWidth
double L1CaloGeometry::etSumPhiBinHighEdge ( unsigned int  phiIndex) const
double L1CaloGeometry::etSumPhiBinLowEdge ( unsigned int  phiIndex) const
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
double L1CaloGeometry::globalEtaBinCenter ( unsigned int  globalEtaIndex) const

Definition at line 128 of file L1CaloGeometry.cc.

References etaIndex(), m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

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

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

Definition at line 154 of file L1CaloGeometry.cc.

References etaIndex(), m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

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

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

Definition at line 141 of file L1CaloGeometry.cc.

References etaIndex(), m_etaBinsPerHalf, and m_gctEtaBinBoundaries.

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

141  {
142  int etaIndex;
143  double etaSign = 1.;
145  etaIndex = m_etaBinsPerHalf - globalEtaIndex - 1;
146  etaSign = -1.;
147  } else {
148  etaIndex = globalEtaIndex - m_etaBinsPerHalf;
149  }
150 
151  return (etaSign > 0. ? m_gctEtaBinBoundaries[etaIndex] : -m_gctEtaBinBoundaries[etaIndex + 1]);
152 }
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaBinsPerHalf
unsigned int globalEtaIndex(const double &etaValue) const
unsigned int etaIndex(const double &etaValue) const
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(), 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]) {
300  etaIndex = m_etaBinsPerHalf - i;
301  }
302  }
303  } else {
304  for (unsigned int i = 0; i < m_etaBinsPerHalf; ++i) {
305  if (etaValue >= m_gctEtaBinBoundaries[i]) {
306  etaIndex = i + m_etaBinsPerHalf;
307  }
308  }
309  }
310 
311  return etaIndex;
312 }
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_etaBinsPerHalf
unsigned int etaIndex(const double &etaValue) const
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 operator<<(), and 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
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(), operator<<(), 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
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(), operator<<(), 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
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
unsigned int L1CaloGeometry::numberGctCentralEtaBinsPerHalf ( ) const
inline
unsigned int L1CaloGeometry::numberGctEmJetPhiBins ( ) const
inline
unsigned int L1CaloGeometry::numberGctEtSumPhiBins ( ) const
inline
unsigned int L1CaloGeometry::numberGctForwardEtaBinsPerHalf ( ) const
inline
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(), L1GetHistLimits::getHistLimits(), and operator<<().

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
template<class Archive >
void L1CaloGeometry::serialize ( Archive &  ar,
const unsigned int  version 
)
private
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

friend class boost::serialization::access
friend

Definition at line 138 of file L1CaloGeometry.h.

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

Definition at line 138 of file L1CaloGeometry.h.

Member Data Documentation

unsigned int L1CaloGeometry::m_etaBinsPerHalf
private
unsigned int L1CaloGeometry::m_etaSignBitOffset
private

Definition at line 125 of file L1CaloGeometry.h.

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

double L1CaloGeometry::m_gctEmJetPhiBinWidth
private
double L1CaloGeometry::m_gctEmJetPhiOffset
private
std::vector<double> L1CaloGeometry::m_gctEtaBinBoundaries
private
double L1CaloGeometry::m_gctEtSumPhiBinWidth
private
double L1CaloGeometry::m_gctEtSumPhiOffset
private
double L1CaloGeometry::m_gctHtSumPhiBinWidth
private
double L1CaloGeometry::m_gctHtSumPhiOffset
private
unsigned int L1CaloGeometry::m_numberGctCentralEtaBinsPerHalf
private
unsigned int L1CaloGeometry::m_numberGctEmJetPhiBins
private

Definition at line 120 of file L1CaloGeometry.h.

Referenced by L1CaloGeometry(), and numberGctEmJetPhiBins().

unsigned int L1CaloGeometry::m_numberGctEtSumPhiBins
private

Definition at line 121 of file L1CaloGeometry.h.

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

unsigned int L1CaloGeometry::m_numberGctForwardEtaBinsPerHalf
private

Definition at line 124 of file L1CaloGeometry.h.

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

unsigned int L1CaloGeometry::m_numberGctHtSumPhiBins
private

Definition at line 122 of file L1CaloGeometry.h.

Referenced by L1CaloGeometry(), and numberGctHtSumPhiBins().

unsigned int L1CaloGeometry::m_version
private