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 {
35 
36  public:
37 /* static const unsigned int kNumberGctEmJetPhiBins = 18 ; */
38 /* static const unsigned int kNumberGctEtSumPhiBins = 72 ; */
39 /* static const unsigned int kNumberGctCentralEtaBinsPerHalf = 7 ; */
40 /* static const unsigned int kNumberGctForwardEtaBinsPerHalf = 4 ; */
41 
42  // calo sign bit is the 4th bit
43 /* static const unsigned int kEtaSignBitOffset = 8 ; */
44 
46 
49  double gctEmJetPhiBinOffset, // -0.5 bins usually
50  unsigned int numberGctEtSumPhiBins,
51  double gctEtSumPhiBinOffset, // 0 bins usually
52  unsigned int numberGctHtSumPhiBins,
53  double gctHtSumPhiBinOffset, // 0 bins usually
54  unsigned int numberGctCentralEtaBinsPerHalf,
55  unsigned int numberGctForwardEtaBinsPerHalf,
56  unsigned int etaSignBitOffset,
57  const std::vector< double >& gctEtaBinBoundaries ) ;
58  virtual ~L1CaloGeometry();
59 
60  // ---------- const member functions ---------------------
61 
62  unsigned int version() const { return m_version ; }
63 
64  // Central/tau jets and EM have etaIndex = 0-6 for eta = 0.0-3.0
65  // Forward jets have etaIndex = 0-3 for eta = 3.0-5.0
66  double etaBinCenter( unsigned int etaIndex,
67  bool central = true ) const ;
68  double etaBinLowEdge( unsigned int etaIndex,
69  bool central = true ) const ;
70  double etaBinHighEdge( unsigned int etaIndex,
71  bool central = true ) const ;
72 
73  // Global index = 0-21
74  double globalEtaBinCenter( unsigned int globalEtaIndex ) const ;
75  double globalEtaBinLowEdge( unsigned int globalEtaIndex ) const ;
76  double globalEtaBinHighEdge( unsigned int globalEtaIndex ) const ;
77 
78  // Eta index of L1CaloRegionDetId is global index 0-21.
79  double etaBinCenter( const L1CaloRegionDetId& detId ) const
80  { return globalEtaBinCenter( detId.ieta() ) ; }
81  double etaBinLowEdge( const L1CaloRegionDetId& detId ) const
82  { return globalEtaBinLowEdge( detId.ieta() ) ; }
83  double etaBinHighEdge( const L1CaloRegionDetId& detId ) const
84  { return globalEtaBinHighEdge( detId.ieta() ) ; }
85 
86  double emJetPhiBinCenter( unsigned int phiIndex ) const ;
87  double emJetPhiBinLowEdge( unsigned int phiIndex ) const ;
88  double emJetPhiBinHighEdge( unsigned int phiIndex ) const ;
89 
90  double emJetPhiBinCenter( const L1CaloRegionDetId& detId ) const
91  { return emJetPhiBinCenter( detId.iphi() ) ; }
92  double emJetPhiBinLowEdge( const L1CaloRegionDetId& detId ) const
93  { return emJetPhiBinLowEdge( detId.iphi() ) ; }
94  double emJetPhiBinHighEdge( const L1CaloRegionDetId& detId ) const
95  { return emJetPhiBinHighEdge( detId.iphi() ) ; }
96 
97  double etSumPhiBinCenter( unsigned int phiIndex ) const ;
98  double etSumPhiBinLowEdge( unsigned int phiIndex ) const ;
99  double etSumPhiBinHighEdge( unsigned int phiIndex ) const ;
100 
101  double htSumPhiBinCenter( unsigned int phiIndex ) const ;
102  double htSumPhiBinLowEdge( unsigned int phiIndex ) const ;
103  double htSumPhiBinHighEdge( unsigned int phiIndex ) const ;
104 
105  unsigned int etaIndex( const double& etaValue ) const ; // 0-6 or 0-3
106  unsigned int globalEtaIndex( const double& etaValue ) const ; // 0-21
107  unsigned int emJetPhiIndex( const double& phiValue ) const ;
108  unsigned int etSumPhiIndex( const double& phiValue ) const ;
109  unsigned int htSumPhiIndex( const double& phiValue ) const ;
110 
111  unsigned int numberGctEmJetPhiBins() const
112  { return m_numberGctEmJetPhiBins ; }
113  unsigned int numberGctEtSumPhiBins() const
114  { return m_numberGctEtSumPhiBins ; }
115  unsigned int numberGctHtSumPhiBins() const ;
116  unsigned int numberGctCentralEtaBinsPerHalf() const
118  unsigned int numberGctForwardEtaBinsPerHalf() const
120  unsigned int etaSignBitOffset() const
121  { return m_etaBinsPerHalf ; }
122 
123  // ---------- static member functions --------------------
124 
125  // ---------- member functions ---------------------------
126 
127  private:
128  //L1CaloGeometry(const L1CaloGeometry&); // stop default
129 
130  //const L1CaloGeometry& operator=(const L1CaloGeometry&); // stop default
131 
132  // ---------- member data --------------------------------
133 
134  unsigned int m_version ;
135 
136  unsigned int m_numberGctEmJetPhiBins ;
137  unsigned int m_numberGctEtSumPhiBins ;
138  unsigned int m_numberGctHtSumPhiBins ;
141  unsigned int m_etaSignBitOffset ;
142  std::vector< double > m_gctEtaBinBoundaries ;
143 
144  unsigned int m_etaBinsPerHalf ;
145 
146  // Calo phi bins are uniform.
153 
155 };
156 
157 std::ostream& operator << ( std::ostream& os, const L1CaloGeometry& obj ) ;
158 
159 #endif
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
unsigned int numberGctForwardEtaBinsPerHalf() const
std::ostream & operator<<(std::ostream &os, const L1CaloGeometry &obj)
double etaBinHighEdge(unsigned int etaIndex, bool central=true) const
unsigned int numberGctHtSumPhiBins() const
unsigned ieta() const
global eta index (0-21)
unsigned int version() const
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
double htSumPhiBinLowEdge(unsigned int phiIndex) const
double emJetPhiBinCenter(const L1CaloRegionDetId &detId) const
unsigned int numberGctEtSumPhiBins() const
unsigned int m_numberGctEtSumPhiBins
virtual ~L1CaloGeometry()
double m_gctEmJetPhiBinWidth
unsigned int numberGctEmJetPhiBins() const
double m_gctEtSumPhiOffset
double etaBinCenter(unsigned int etaIndex, bool central=true) const
unsigned int numberGctCentralEtaBinsPerHalf() const
unsigned int htSumPhiIndex(const double &phiValue) const
double m_gctHtSumPhiOffset
double etaBinLowEdge(const L1CaloRegionDetId &detId) const
unsigned int m_numberGctCentralEtaBinsPerHalf
std::vector< double > m_gctEtaBinBoundaries
unsigned int m_version
unsigned int m_numberGctEmJetPhiBins
double m_gctEmJetPhiOffset
double htSumPhiBinCenter(unsigned int phiIndex) const
unsigned int etSumPhiIndex(const double &phiValue) const
double m_gctHtSumPhiBinWidth
double etaBinCenter(const L1CaloRegionDetId &detId) const
double m_gctEtSumPhiBinWidth
unsigned int emJetPhiIndex(const double &phiValue) const
double globalEtaBinCenter(unsigned int globalEtaIndex) const
double globalEtaBinHighEdge(unsigned int globalEtaIndex) const
double etSumPhiBinLowEdge(unsigned int phiIndex) const
#define COND_SERIALIZABLE
Definition: Serializable.h:38
unsigned int m_etaSignBitOffset
unsigned int m_etaBinsPerHalf
unsigned int m_numberGctHtSumPhiBins
double emJetPhiBinLowEdge(const L1CaloRegionDetId &detId) const
unsigned int etaSignBitOffset() const
unsigned int m_numberGctForwardEtaBinsPerHalf
unsigned iphi() const
global phi index (0-17)
double emJetPhiBinHighEdge(const L1CaloRegionDetId &detId) const
double emJetPhiBinCenter(unsigned int phiIndex) const
double emJetPhiBinLowEdge(unsigned int phiIndex) const
double htSumPhiBinHighEdge(unsigned int phiIndex) const
unsigned int globalEtaIndex(const double &etaValue) const
double etSumPhiBinCenter(unsigned int phiIndex) const
double etaBinHighEdge(const L1CaloRegionDetId &detId) const
double emJetPhiBinHighEdge(unsigned int phiIndex) const
double etSumPhiBinHighEdge(unsigned int phiIndex) const
unsigned int etaIndex(const double &etaValue) const