CMS 3D CMS Logo

L1CaloGeometry.h

Go to the documentation of this file.
00001 #ifndef L1Geometry_L1CaloGeometry_h
00002 #define L1Geometry_L1CaloGeometry_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     L1Geometry
00006 // Class  :     L1CaloGeometry
00007 // 
00016 //
00017 // Original Author:  Werner Sun
00018 //         Created:  Mon Oct 23 21:52:29 EDT 2006
00019 // $Id: L1CaloGeometry.h,v 1.1 2008/04/16 23:20:48 wsun Exp $
00020 //
00021 
00022 // system include files
00023 #include <vector>
00024 
00025 // user include files
00026 #include "DataFormats/L1CaloTrigger/interface/L1CaloRegionDetId.h"
00027 
00028 // forward declarations
00029 
00030 class L1CaloGeometry
00031 {
00032 
00033    public:
00034 /*       static const unsigned int kNumberGctEmJetPhiBins = 18 ; */
00035 /*       static const unsigned int kNumberGctEtSumPhiBins = 72 ; */
00036 /*       static const unsigned int kNumberGctCentralEtaBinsPerHalf = 7 ; */
00037 /*       static const unsigned int kNumberGctForwardEtaBinsPerHalf = 4 ; */
00038 
00039       // calo sign bit is the 4th bit
00040 /*       static const unsigned int kEtaSignBitOffset = 8 ; */
00041 
00042       L1CaloGeometry();
00043       L1CaloGeometry( unsigned int numberGctEmJetPhiBins,
00044                       double gctEmJetPhiBinOffset, // -0.5 bins usually
00045                       unsigned int numberGctEtSumPhiBins,
00046                       double gctEtSumPhiBinOffset, // 0 bins usually
00047                       unsigned int numberGctCentralEtaBinsPerHalf,
00048                       unsigned int numberGctForwardEtaBinsPerHalf,
00049                       unsigned int etaSignBitOffset,
00050                       const std::vector< double >& gctEtaBinBoundaries ) ;
00051       virtual ~L1CaloGeometry();
00052 
00053       // ---------- const member functions ---------------------
00054 
00055       // Central/tau jets and EM have etaIndex = 0-6 for eta = 0.0-3.0
00056       // Forward jets have etaIndex = 0-3 for eta = 3.0-5.0
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       // Global index = 0-21
00065       double globalEtaBinCenter( unsigned int globalEtaIndex ) const ;
00066       double globalEtaBinLowEdge( unsigned int globalEtaIndex ) const ;
00067       double globalEtaBinHighEdge( unsigned int globalEtaIndex ) const ;
00068 
00069       // Eta index of L1CaloRegionDetId is global index 0-21.
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 ; // 0-6 or 0-3
00093       unsigned int globalEtaIndex( const double& etaValue ) const ; // 0-21
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       // ---------- static member functions --------------------
00109 
00110       // ---------- member functions ---------------------------
00111 
00112    private:
00113       //L1CaloGeometry(const L1CaloGeometry&); // stop default
00114 
00115       //const L1CaloGeometry& operator=(const L1CaloGeometry&); // stop default
00116 
00117       // ---------- member data --------------------------------
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       // Calo phi bins are uniform.
00129       double m_gctEmJetPhiBinWidth ;
00130       double m_gctEtSumPhiBinWidth ;
00131       double m_gctEmJetPhiOffset ;
00132       double m_gctEtSumPhiOffset ;
00133 };
00134 
00135 
00136 #endif

Generated on Tue Jun 9 17:26:37 2009 for CMSSW by  doxygen 1.5.4