CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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.4 2009/09/28 22:59:12 wsun Exp $
20 //
21 
22 // system include files
23 #include <vector>
24 #include <ostream>
25 
26 // user include files
28 
29 // forward declarations
30 
32 {
33 
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,
65  bool central = true ) const ;
66  double etaBinLowEdge( unsigned int etaIndex,
67  bool central = true ) const ;
68  double etaBinHighEdge( unsigned int etaIndex,
69  bool central = true ) const ;
70 
71  // Global index = 0-21
72  double globalEtaBinCenter( unsigned int globalEtaIndex ) const ;
73  double globalEtaBinLowEdge( unsigned int globalEtaIndex ) const ;
74  double globalEtaBinHighEdge( unsigned int globalEtaIndex ) const ;
75 
76  // Eta index of L1CaloRegionDetId is global index 0-21.
77  double etaBinCenter( const L1CaloRegionDetId& detId ) const
78  { return globalEtaBinCenter( detId.ieta() ) ; }
79  double etaBinLowEdge( const L1CaloRegionDetId& detId ) const
80  { return globalEtaBinLowEdge( detId.ieta() ) ; }
81  double etaBinHighEdge( const L1CaloRegionDetId& detId ) const
82  { return globalEtaBinHighEdge( detId.ieta() ) ; }
83 
84  double emJetPhiBinCenter( unsigned int phiIndex ) const ;
85  double emJetPhiBinLowEdge( unsigned int phiIndex ) const ;
86  double emJetPhiBinHighEdge( unsigned int phiIndex ) const ;
87 
88  double emJetPhiBinCenter( const L1CaloRegionDetId& detId ) const
89  { return emJetPhiBinCenter( detId.iphi() ) ; }
90  double emJetPhiBinLowEdge( const L1CaloRegionDetId& detId ) const
91  { return emJetPhiBinLowEdge( detId.iphi() ) ; }
92  double emJetPhiBinHighEdge( const L1CaloRegionDetId& detId ) const
93  { return emJetPhiBinHighEdge( detId.iphi() ) ; }
94 
95  double etSumPhiBinCenter( unsigned int phiIndex ) const ;
96  double etSumPhiBinLowEdge( unsigned int phiIndex ) const ;
97  double etSumPhiBinHighEdge( unsigned int phiIndex ) const ;
98 
99  double htSumPhiBinCenter( unsigned int phiIndex ) const ;
100  double htSumPhiBinLowEdge( unsigned int phiIndex ) const ;
101  double htSumPhiBinHighEdge( unsigned int phiIndex ) const ;
102 
103  unsigned int etaIndex( const double& etaValue ) const ; // 0-6 or 0-3
104  unsigned int globalEtaIndex( const double& etaValue ) const ; // 0-21
105  unsigned int emJetPhiIndex( const double& phiValue ) const ;
106  unsigned int etSumPhiIndex( const double& phiValue ) const ;
107  unsigned int htSumPhiIndex( const double& phiValue ) const ;
108 
109  unsigned int numberGctEmJetPhiBins() const
110  { return m_numberGctEmJetPhiBins ; }
111  unsigned int numberGctEtSumPhiBins() const
112  { return m_numberGctEtSumPhiBins ; }
113  unsigned int numberGctHtSumPhiBins() const ;
114  unsigned int numberGctCentralEtaBinsPerHalf() const
116  unsigned int numberGctForwardEtaBinsPerHalf() const
118  unsigned int etaSignBitOffset() const
119  { return m_etaBinsPerHalf ; }
120 
121  // ---------- static member functions --------------------
122 
123  // ---------- member functions ---------------------------
124 
125  private:
126  //L1CaloGeometry(const L1CaloGeometry&); // stop default
127 
128  //const L1CaloGeometry& operator=(const L1CaloGeometry&); // stop default
129 
130  // ---------- member data --------------------------------
131 
132  unsigned int m_version ;
133 
134  unsigned int m_numberGctEmJetPhiBins ;
135  unsigned int m_numberGctEtSumPhiBins ;
136  unsigned int m_numberGctHtSumPhiBins ;
139  unsigned int m_etaSignBitOffset ;
140  std::vector< double > m_gctEtaBinBoundaries ;
141 
142  unsigned int m_etaBinsPerHalf ;
143 
144  // Calo phi bins are uniform.
151 };
152 
153 std::ostream& operator << ( std::ostream& os, const L1CaloGeometry& obj ) ;
154 
155 #endif
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
unsigned int numberGctForwardEtaBinsPerHalf() const
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
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
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
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