Go to the documentation of this file.00001 #ifndef L1Geometry_L1CaloGeometry_h
00002 #define L1Geometry_L1CaloGeometry_h
00003
00004
00005
00006
00007
00016
00017
00018
00019
00020
00021
00022
00023 #include <vector>
00024 #include <ostream>
00025
00026
00027 #include "DataFormats/L1CaloTrigger/interface/L1CaloRegionDetId.h"
00028
00029
00030
00031 class L1CaloGeometry
00032 {
00033
00034 public:
00035
00036
00037
00038
00039
00040
00041
00042
00043 enum Versions{ kOrig, kAddedMHTPhi, kNumVersions } ;
00044
00045 L1CaloGeometry();
00046 L1CaloGeometry( unsigned int numberGctEmJetPhiBins,
00047 double gctEmJetPhiBinOffset,
00048 unsigned int numberGctEtSumPhiBins,
00049 double gctEtSumPhiBinOffset,
00050 unsigned int numberGctHtSumPhiBins,
00051 double gctHtSumPhiBinOffset,
00052 unsigned int numberGctCentralEtaBinsPerHalf,
00053 unsigned int numberGctForwardEtaBinsPerHalf,
00054 unsigned int etaSignBitOffset,
00055 const std::vector< double >& gctEtaBinBoundaries ) ;
00056 virtual ~L1CaloGeometry();
00057
00058
00059
00060 unsigned int version() const { return m_version ; }
00061
00062
00063
00064 double etaBinCenter( unsigned int etaIndex,
00065 bool central = true ) const ;
00066 double etaBinLowEdge( unsigned int etaIndex,
00067 bool central = true ) const ;
00068 double etaBinHighEdge( unsigned int etaIndex,
00069 bool central = true ) const ;
00070
00071
00072 double globalEtaBinCenter( unsigned int globalEtaIndex ) const ;
00073 double globalEtaBinLowEdge( unsigned int globalEtaIndex ) const ;
00074 double globalEtaBinHighEdge( unsigned int globalEtaIndex ) const ;
00075
00076
00077 double etaBinCenter( const L1CaloRegionDetId& detId ) const
00078 { return globalEtaBinCenter( detId.ieta() ) ; }
00079 double etaBinLowEdge( const L1CaloRegionDetId& detId ) const
00080 { return globalEtaBinLowEdge( detId.ieta() ) ; }
00081 double etaBinHighEdge( const L1CaloRegionDetId& detId ) const
00082 { return globalEtaBinHighEdge( detId.ieta() ) ; }
00083
00084 double emJetPhiBinCenter( unsigned int phiIndex ) const ;
00085 double emJetPhiBinLowEdge( unsigned int phiIndex ) const ;
00086 double emJetPhiBinHighEdge( unsigned int phiIndex ) const ;
00087
00088 double emJetPhiBinCenter( const L1CaloRegionDetId& detId ) const
00089 { return emJetPhiBinCenter( detId.iphi() ) ; }
00090 double emJetPhiBinLowEdge( const L1CaloRegionDetId& detId ) const
00091 { return emJetPhiBinLowEdge( detId.iphi() ) ; }
00092 double emJetPhiBinHighEdge( const L1CaloRegionDetId& detId ) const
00093 { return emJetPhiBinHighEdge( detId.iphi() ) ; }
00094
00095 double etSumPhiBinCenter( unsigned int phiIndex ) const ;
00096 double etSumPhiBinLowEdge( unsigned int phiIndex ) const ;
00097 double etSumPhiBinHighEdge( unsigned int phiIndex ) const ;
00098
00099 double htSumPhiBinCenter( unsigned int phiIndex ) const ;
00100 double htSumPhiBinLowEdge( unsigned int phiIndex ) const ;
00101 double htSumPhiBinHighEdge( unsigned int phiIndex ) const ;
00102
00103 unsigned int etaIndex( const double& etaValue ) const ;
00104 unsigned int globalEtaIndex( const double& etaValue ) const ;
00105 unsigned int emJetPhiIndex( const double& phiValue ) const ;
00106 unsigned int etSumPhiIndex( const double& phiValue ) const ;
00107 unsigned int htSumPhiIndex( const double& phiValue ) const ;
00108
00109 unsigned int numberGctEmJetPhiBins() const
00110 { return m_numberGctEmJetPhiBins ; }
00111 unsigned int numberGctEtSumPhiBins() const
00112 { return m_numberGctEtSumPhiBins ; }
00113 unsigned int numberGctHtSumPhiBins() const ;
00114 unsigned int numberGctCentralEtaBinsPerHalf() const
00115 { return m_numberGctCentralEtaBinsPerHalf ; }
00116 unsigned int numberGctForwardEtaBinsPerHalf() const
00117 { return m_numberGctForwardEtaBinsPerHalf ; }
00118 unsigned int etaSignBitOffset() const
00119 { return m_etaBinsPerHalf ; }
00120
00121
00122
00123
00124
00125 private:
00126
00127
00128
00129
00130
00131
00132 unsigned int m_version ;
00133
00134 unsigned int m_numberGctEmJetPhiBins ;
00135 unsigned int m_numberGctEtSumPhiBins ;
00136 unsigned int m_numberGctHtSumPhiBins ;
00137 unsigned int m_numberGctCentralEtaBinsPerHalf ;
00138 unsigned int m_numberGctForwardEtaBinsPerHalf ;
00139 unsigned int m_etaSignBitOffset ;
00140 std::vector< double > m_gctEtaBinBoundaries ;
00141
00142 unsigned int m_etaBinsPerHalf ;
00143
00144
00145 double m_gctEmJetPhiBinWidth ;
00146 double m_gctEtSumPhiBinWidth ;
00147 double m_gctHtSumPhiBinWidth ;
00148 double m_gctEmJetPhiOffset ;
00149 double m_gctEtSumPhiOffset ;
00150 double m_gctHtSumPhiOffset ;
00151 };
00152
00153 std::ostream& operator << ( std::ostream& os, const L1CaloGeometry& obj ) ;
00154
00155 #endif