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
double globalEtaBinCenter(unsigned int globalEtaIndex) const
std::ostream & operator<<(std::ostream &os, const L1CaloGeometry &obj)
double emJetPhiBinHighEdge(unsigned int phiIndex) const
double emJetPhiBinHighEdge(const L1CaloRegionDetId &detId) const
double etaBinLowEdge(const L1CaloRegionDetId &detId) const
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
double htSumPhiBinCenter(unsigned int phiIndex) const
unsigned int m_numberGctEtSumPhiBins
virtual ~L1CaloGeometry()
double m_gctEmJetPhiBinWidth
double m_gctEtSumPhiOffset
double etSumPhiBinCenter(unsigned int phiIndex) const
double m_gctHtSumPhiOffset
double etaBinCenter(const L1CaloRegionDetId &detId) const
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 emJetPhiBinCenter(const L1CaloRegionDetId &detId) const
double m_gctHtSumPhiBinWidth
unsigned int etSumPhiIndex(const double &phiValue) const
unsigned int numberGctEmJetPhiBins() const
double m_gctEtSumPhiBinWidth
double etSumPhiBinLowEdge(unsigned int phiIndex) const
double globalEtaBinHighEdge(unsigned int globalEtaIndex) const
unsigned int globalEtaIndex(const double &etaValue) const
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
double emJetPhiBinLowEdge(const L1CaloRegionDetId &detId) const
unsigned int version() const
unsigned int numberGctForwardEtaBinsPerHalf() const
unsigned int emJetPhiIndex(const double &phiValue) const
double htSumPhiBinLowEdge(unsigned int phiIndex) const
unsigned int etaIndex(const double &etaValue) const
#define COND_SERIALIZABLE
Definition: Serializable.h:39
unsigned int m_etaSignBitOffset
double etaBinHighEdge(const L1CaloRegionDetId &detId) const
double etaBinHighEdge(unsigned int etaIndex, bool central=true) const
unsigned int m_etaBinsPerHalf
unsigned int m_numberGctHtSumPhiBins
unsigned int numberGctHtSumPhiBins() const
double emJetPhiBinCenter(unsigned int phiIndex) const
unsigned int m_numberGctForwardEtaBinsPerHalf
double etaBinCenter(unsigned int etaIndex, bool central=true) const
unsigned int numberGctCentralEtaBinsPerHalf() const
unsigned int htSumPhiIndex(const double &phiValue) const
double etSumPhiBinHighEdge(unsigned int phiIndex) const
double htSumPhiBinHighEdge(unsigned int phiIndex) const
unsigned int etaSignBitOffset() const
double emJetPhiBinLowEdge(unsigned int phiIndex) const