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
00025
00026 #include "DataFormats/L1CaloTrigger/interface/L1CaloRegionDetId.h"
00027
00028
00029
00030 class L1CaloGeometry
00031 {
00032
00033 public:
00034
00035
00036
00037
00038
00039
00040
00041
00042 L1CaloGeometry();
00043 L1CaloGeometry( unsigned int numberGctEmJetPhiBins,
00044 double gctEmJetPhiBinOffset,
00045 unsigned int numberGctEtSumPhiBins,
00046 double gctEtSumPhiBinOffset,
00047 unsigned int numberGctCentralEtaBinsPerHalf,
00048 unsigned int numberGctForwardEtaBinsPerHalf,
00049 unsigned int etaSignBitOffset,
00050 const std::vector< double >& gctEtaBinBoundaries ) ;
00051 virtual ~L1CaloGeometry();
00052
00053
00054
00055
00056
00057 double etaBinCenter( unsigned int etaIndex,
00058 bool central = true ) const ;
00059 double etaBinLowEdge( unsigned int etaIndex,
00060 bool central = true ) const ;
00061 double etaBinHighEdge( unsigned int etaIndex,
00062 bool central = true ) const ;
00063
00064
00065 double globalEtaBinCenter( unsigned int globalEtaIndex ) const ;
00066 double globalEtaBinLowEdge( unsigned int globalEtaIndex ) const ;
00067 double globalEtaBinHighEdge( unsigned int globalEtaIndex ) const ;
00068
00069
00070 double etaBinCenter( const L1CaloRegionDetId& detId ) const
00071 { return globalEtaBinCenter( detId.ieta() ) ; }
00072 double etaBinLowEdge( const L1CaloRegionDetId& detId ) const
00073 { return globalEtaBinLowEdge( detId.ieta() ) ; }
00074 double etaBinHighEdge( const L1CaloRegionDetId& detId ) const
00075 { return globalEtaBinHighEdge( detId.ieta() ) ; }
00076
00077 double emJetPhiBinCenter( unsigned int phiIndex ) const ;
00078 double emJetPhiBinLowEdge( unsigned int phiIndex ) const ;
00079 double emJetPhiBinHighEdge( unsigned int phiIndex ) const ;
00080
00081 double emJetPhiBinCenter( const L1CaloRegionDetId& detId ) const
00082 { return emJetPhiBinCenter( detId.iphi() ) ; }
00083 double emJetPhiBinLowEdge( const L1CaloRegionDetId& detId ) const
00084 { return emJetPhiBinLowEdge( detId.iphi() ) ; }
00085 double emJetPhiBinHighEdge( const L1CaloRegionDetId& detId ) const
00086 { return emJetPhiBinHighEdge( detId.iphi() ) ; }
00087
00088 double etSumPhiBinCenter( unsigned int phiIndex ) const ;
00089 double etSumPhiBinLowEdge( unsigned int phiIndex ) const ;
00090 double etSumPhiBinHighEdge( unsigned int phiIndex ) const ;
00091
00092 unsigned int etaIndex( const double& etaValue ) const ;
00093 unsigned int globalEtaIndex( const double& etaValue ) const ;
00094 unsigned int emJetPhiIndex( const double& phiValue ) const ;
00095 unsigned int etSumPhiIndex( const double& phiValue ) const ;
00096
00097 unsigned int numberGctEmJetPhiBins() const
00098 { return m_numberGctEmJetPhiBins ; }
00099 unsigned int numberGctEtSumPhiBins() const
00100 { return m_numberGctEtSumPhiBins ; }
00101 unsigned int numberGctCentralEtaBinsPerHalf() const
00102 { return m_numberGctCentralEtaBinsPerHalf ; }
00103 unsigned int numberGctForwardEtaBinsPerHalf() const
00104 { return m_numberGctForwardEtaBinsPerHalf ; }
00105 unsigned int etaSignBitOffset() const
00106 { return m_etaBinsPerHalf ; }
00107
00108
00109
00110
00111
00112 private:
00113
00114
00115
00116
00117
00118
00119 unsigned int m_numberGctEmJetPhiBins ;
00120 unsigned int m_numberGctEtSumPhiBins ;
00121 unsigned int m_numberGctCentralEtaBinsPerHalf ;
00122 unsigned int m_numberGctForwardEtaBinsPerHalf ;
00123 unsigned int m_etaSignBitOffset ;
00124 std::vector< double > m_gctEtaBinBoundaries ;
00125
00126 unsigned int m_etaBinsPerHalf ;
00127
00128
00129 double m_gctEmJetPhiBinWidth ;
00130 double m_gctEtSumPhiBinWidth ;
00131 double m_gctEmJetPhiOffset ;
00132 double m_gctEtSumPhiOffset ;
00133 };
00134
00135
00136 #endif