CMS 3D CMS Logo

L1CaloGeometry.h
Go to the documentation of this file.
1 #ifndef L1Geometry_L1CaloGeometry_h
2 #define L1Geometry_L1CaloGeometry_h
3 // -*- C++ -*-
4 //
5 // Package: L1Geometry
6 // Class : L1CaloGeometry
7 //
16 //
17 // Original Author: Werner Sun
18 // Created: Mon Oct 23 21:52:29 EDT 2006
19 // $Id: L1CaloGeometry.h,v 1.3 2009/07/17 17:37:10 wsun Exp $
20 //
21 
22 // system include files
24 
25 #include <vector>
26 #include <ostream>
27 
28 // user include files
30 
31 // forward declarations
32 
34 public:
35  /* static const unsigned int kNumberGctEmJetPhiBins = 18 ; */
36  /* static const unsigned int kNumberGctEtSumPhiBins = 72 ; */
37  /* static const unsigned int kNumberGctCentralEtaBinsPerHalf = 7 ; */
38  /* static const unsigned int kNumberGctForwardEtaBinsPerHalf = 4 ; */
39 
40  // calo sign bit is the 4th bit
41  /* static const unsigned int kEtaSignBitOffset = 8 ; */
42 
44 
47  double gctEmJetPhiBinOffset, // -0.5 bins usually
48  unsigned int numberGctEtSumPhiBins,
49  double gctEtSumPhiBinOffset, // 0 bins usually
50  unsigned int numberGctHtSumPhiBins,
51  double gctHtSumPhiBinOffset, // 0 bins usually
52  unsigned int numberGctCentralEtaBinsPerHalf,
53  unsigned int numberGctForwardEtaBinsPerHalf,
54  unsigned int etaSignBitOffset,
55  const std::vector<double>& gctEtaBinBoundaries);
56  virtual ~L1CaloGeometry();
57 
58  // ---------- const member functions ---------------------
59 
60  unsigned int version() const { return m_version; }
61 
62  // Central/tau jets and EM have etaIndex = 0-6 for eta = 0.0-3.0
63  // Forward jets have etaIndex = 0-3 for eta = 3.0-5.0
64  double etaBinCenter(unsigned int etaIndex, bool central = true) const;
65  double etaBinLowEdge(unsigned int etaIndex, bool central = true) const;
66  double etaBinHighEdge(unsigned int etaIndex, bool central = true) const;
67 
68  // Global index = 0-21
69  double globalEtaBinCenter(unsigned int globalEtaIndex) const;
70  double globalEtaBinLowEdge(unsigned int globalEtaIndex) const;
71  double globalEtaBinHighEdge(unsigned int globalEtaIndex) const;
72 
73  // Eta index of L1CaloRegionDetId is global index 0-21.
74  double etaBinCenter(const L1CaloRegionDetId& detId) const { return globalEtaBinCenter(detId.ieta()); }
75  double etaBinLowEdge(const L1CaloRegionDetId& detId) const { return globalEtaBinLowEdge(detId.ieta()); }
76  double etaBinHighEdge(const L1CaloRegionDetId& detId) const { return globalEtaBinHighEdge(detId.ieta()); }
77 
78  double emJetPhiBinCenter(unsigned int phiIndex) const;
79  double emJetPhiBinLowEdge(unsigned int phiIndex) const;
80  double emJetPhiBinHighEdge(unsigned int phiIndex) const;
81 
82  double emJetPhiBinCenter(const L1CaloRegionDetId& detId) const { return emJetPhiBinCenter(detId.iphi()); }
83  double emJetPhiBinLowEdge(const L1CaloRegionDetId& detId) const { return emJetPhiBinLowEdge(detId.iphi()); }
84  double emJetPhiBinHighEdge(const L1CaloRegionDetId& detId) const { return emJetPhiBinHighEdge(detId.iphi()); }
85 
86  double etSumPhiBinCenter(unsigned int phiIndex) const;
87  double etSumPhiBinLowEdge(unsigned int phiIndex) const;
88  double etSumPhiBinHighEdge(unsigned int phiIndex) const;
89 
90  double htSumPhiBinCenter(unsigned int phiIndex) const;
91  double htSumPhiBinLowEdge(unsigned int phiIndex) const;
92  double htSumPhiBinHighEdge(unsigned int phiIndex) const;
93 
94  unsigned int etaIndex(const double& etaValue) const; // 0-6 or 0-3
95  unsigned int globalEtaIndex(const double& etaValue) const; // 0-21
96  unsigned int emJetPhiIndex(const double& phiValue) const;
97  unsigned int etSumPhiIndex(const double& phiValue) const;
98  unsigned int htSumPhiIndex(const double& phiValue) const;
99 
100  unsigned int numberGctEmJetPhiBins() const { return m_numberGctEmJetPhiBins; }
101  unsigned int numberGctEtSumPhiBins() const { return m_numberGctEtSumPhiBins; }
102  unsigned int numberGctHtSumPhiBins() const;
105  unsigned int etaSignBitOffset() const { return m_etaBinsPerHalf; }
106 
107  // ---------- static member functions --------------------
108 
109  // ---------- member functions ---------------------------
110 
111 private:
112  //L1CaloGeometry(const L1CaloGeometry&); // stop default
113 
114  //const L1CaloGeometry& operator=(const L1CaloGeometry&); // stop default
115 
116  // ---------- member data --------------------------------
117 
118  unsigned int m_version;
119 
125  unsigned int m_etaSignBitOffset;
126  std::vector<double> m_gctEtaBinBoundaries;
127 
128  unsigned int m_etaBinsPerHalf;
129 
130  // Calo phi bins are uniform.
137 
139 };
140 
141 std::ostream& operator<<(std::ostream& os, const L1CaloGeometry& obj);
142 
143 #endif
L1CaloGeometry::htSumPhiBinCenter
double htSumPhiBinCenter(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:248
L1CaloGeometry::emJetPhiBinHighEdge
double emJetPhiBinHighEdge(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:232
L1CaloGeometry::m_numberGctEtSumPhiBins
unsigned int m_numberGctEtSumPhiBins
Definition: L1CaloGeometry.h:121
L1CaloGeometry::etSumPhiBinHighEdge
double etSumPhiBinHighEdge(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:244
L1CaloGeometry::emJetPhiBinCenter
double emJetPhiBinCenter(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:224
L1CaloGeometry::emJetPhiBinHighEdge
double emJetPhiBinHighEdge(const L1CaloRegionDetId &detId) const
Definition: L1CaloGeometry.h:84
L1CaloGeometry::htSumPhiBinHighEdge
double htSumPhiBinHighEdge(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:264
L1CaloGeometry::kAddedMHTPhi
Definition: L1CaloGeometry.h:43
L1CaloGeometry::emJetPhiBinCenter
double emJetPhiBinCenter(const L1CaloRegionDetId &detId) const
Definition: L1CaloGeometry.h:82
L1CaloGeometry::etaBinCenter
double etaBinCenter(const L1CaloRegionDetId &detId) const
Definition: L1CaloGeometry.h:74
L1CaloGeometry::m_gctEmJetPhiBinWidth
double m_gctEmJetPhiBinWidth
Definition: L1CaloGeometry.h:131
L1CaloGeometry::etaBinHighEdge
double etaBinHighEdge(unsigned int etaIndex, bool central=true) const
Definition: L1CaloGeometry.cc:205
L1CaloGeometry::numberGctCentralEtaBinsPerHalf
unsigned int numberGctCentralEtaBinsPerHalf() const
Definition: L1CaloGeometry.h:103
L1CaloGeometry::L1CaloGeometry
L1CaloGeometry()
Definition: L1CaloGeometry.cc:55
L1CaloGeometry::m_gctEtSumPhiOffset
double m_gctEtSumPhiOffset
Definition: L1CaloGeometry.h:135
central
Definition: L1ECALPrefiringWeightProducer.cc:36
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
L1CaloGeometry::m_numberGctCentralEtaBinsPerHalf
unsigned int m_numberGctCentralEtaBinsPerHalf
Definition: L1CaloGeometry.h:123
L1CaloGeometry::etSumPhiBinLowEdge
double etSumPhiBinLowEdge(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:240
L1CaloGeometry::~L1CaloGeometry
virtual ~L1CaloGeometry()
Definition: L1CaloGeometry.cc:106
operator<<
std::ostream & operator<<(std::ostream &os, const L1CaloGeometry &obj)
Definition: L1CaloGeometry.cc:377
L1CaloGeometry::kNumVersions
Definition: L1CaloGeometry.h:43
L1CaloGeometry::etaBinLowEdge
double etaBinLowEdge(const L1CaloRegionDetId &detId) const
Definition: L1CaloGeometry.h:75
L1CaloRegionDetId::ieta
unsigned ieta() const
global eta index (0-21)
Definition: L1CaloRegionDetId.h:37
L1CaloGeometry::numberGctEmJetPhiBins
unsigned int numberGctEmJetPhiBins() const
Definition: L1CaloGeometry.h:100
L1CaloGeometry::globalEtaBinLowEdge
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
Definition: L1CaloGeometry.cc:141
L1CaloGeometry::m_numberGctEmJetPhiBins
unsigned int m_numberGctEmJetPhiBins
Definition: L1CaloGeometry.h:120
L1CaloGeometry::m_gctEtaBinBoundaries
std::vector< double > m_gctEtaBinBoundaries
Definition: L1CaloGeometry.h:126
L1CaloRegionDetId
Definition: L1CaloRegionDetId.h:18
L1CaloGeometry::numberGctEtSumPhiBins
unsigned int numberGctEtSumPhiBins() const
Definition: L1CaloGeometry.h:101
L1CaloGeometry::m_gctHtSumPhiOffset
double m_gctHtSumPhiOffset
Definition: L1CaloGeometry.h:136
L1CaloGeometry::m_gctHtSumPhiBinWidth
double m_gctHtSumPhiBinWidth
Definition: L1CaloGeometry.h:133
L1CaloGeometry::etSumPhiBinCenter
double etSumPhiBinCenter(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:236
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
L1CaloRegionDetId.h
L1CaloGeometry::m_etaBinsPerHalf
unsigned int m_etaBinsPerHalf
Definition: L1CaloGeometry.h:128
L1CaloGeometry::emJetPhiBinLowEdge
double emJetPhiBinLowEdge(const L1CaloRegionDetId &detId) const
Definition: L1CaloGeometry.h:83
L1CaloGeometry
Definition: L1CaloGeometry.h:33
L1CaloGeometry::emJetPhiIndex
unsigned int emJetPhiIndex(const double &phiValue) const
Definition: L1CaloGeometry.cc:314
L1CaloGeometry::m_gctEtSumPhiBinWidth
double m_gctEtSumPhiBinWidth
Definition: L1CaloGeometry.h:132
L1CaloGeometry::m_etaSignBitOffset
unsigned int m_etaSignBitOffset
Definition: L1CaloGeometry.h:125
L1CaloGeometry::m_numberGctHtSumPhiBins
unsigned int m_numberGctHtSumPhiBins
Definition: L1CaloGeometry.h:122
L1CaloGeometry::m_version
unsigned int m_version
Definition: L1CaloGeometry.h:118
L1CaloRegionDetId::iphi
unsigned iphi() const
global phi index (0-17)
Definition: L1CaloRegionDetId.h:40
L1CaloGeometry::globalEtaBinHighEdge
double globalEtaBinHighEdge(unsigned int globalEtaIndex) const
Definition: L1CaloGeometry.cc:154
L1CaloGeometry::globalEtaIndex
unsigned int globalEtaIndex(const double &etaValue) const
Definition: L1CaloGeometry.cc:294
Serializable.h
L1CaloGeometry::m_gctEmJetPhiOffset
double m_gctEmJetPhiOffset
Definition: L1CaloGeometry.h:134
L1CaloGeometry::emJetPhiBinLowEdge
double emJetPhiBinLowEdge(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:228
L1CaloGeometry::etaSignBitOffset
unsigned int etaSignBitOffset() const
Definition: L1CaloGeometry.h:105
L1CaloGeometry::version
unsigned int version() const
Definition: L1CaloGeometry.h:60
l1CaloGeometry_cfi.gctHtSumPhiBinOffset
gctHtSumPhiBinOffset
Definition: l1CaloGeometry_cfi.py:10
L1CaloGeometry::globalEtaBinCenter
double globalEtaBinCenter(unsigned int globalEtaIndex) const
Definition: L1CaloGeometry.cc:128
l1CaloGeometry_cfi.gctEtaBinBoundaries
gctEtaBinBoundaries
Definition: l1CaloGeometry_cfi.py:14
L1CaloGeometry::htSumPhiBinLowEdge
double htSumPhiBinLowEdge(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:256
L1CaloGeometry::numberGctForwardEtaBinsPerHalf
unsigned int numberGctForwardEtaBinsPerHalf() const
Definition: L1CaloGeometry.h:104
L1CaloGeometry::m_numberGctForwardEtaBinsPerHalf
unsigned int m_numberGctForwardEtaBinsPerHalf
Definition: L1CaloGeometry.h:124
L1CaloGeometry::etaIndex
unsigned int etaIndex(const double &etaValue) const
Definition: L1CaloGeometry.cc:272
L1CaloGeometry::numberGctHtSumPhiBins
unsigned int numberGctHtSumPhiBins() const
Definition: L1CaloGeometry.cc:369
l1CaloGeometry_cfi.gctEmJetPhiBinOffset
gctEmJetPhiBinOffset
Definition: l1CaloGeometry_cfi.py:6
L1CaloGeometry::etSumPhiIndex
unsigned int etSumPhiIndex(const double &phiValue) const
Definition: L1CaloGeometry.cc:331
L1CaloGeometry::Versions
Versions
Definition: L1CaloGeometry.h:43
L1CaloGeometry::htSumPhiIndex
unsigned int htSumPhiIndex(const double &phiValue) const
Definition: L1CaloGeometry.cc:348
L1CaloGeometry::etaBinCenter
double etaBinCenter(unsigned int etaIndex, bool central=true) const
Definition: L1CaloGeometry.cc:167
L1CaloGeometry::kOrig
Definition: L1CaloGeometry.h:43
L1CaloGeometry::etaBinHighEdge
double etaBinHighEdge(const L1CaloRegionDetId &detId) const
Definition: L1CaloGeometry.h:76
L1CaloGeometry::etaBinLowEdge
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
Definition: L1CaloGeometry.cc:186
l1CaloGeometry_cfi.gctEtSumPhiBinOffset
gctEtSumPhiBinOffset
Definition: l1CaloGeometry_cfi.py:8