CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/RecoEgamma/EgammaElectronAlgos/interface/ElectronHcalHelper.h

Go to the documentation of this file.
00001 
00002 #ifndef ElectronHcalHelper_h
00003 #define ElectronHcalHelper_h
00004 
00005 class EgammaHcalIsolation ;
00006 class EgammaTowerIsolation ;
00007 
00008 #include "RecoCaloTools/MetaCollections/interface/CaloRecHitMetaCollections.h"
00009 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
00010 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00011 #include "FWCore/Framework/interface/Event.h"
00012 #include "FWCore/Framework/interface/EventSetup.h"
00013 #include "FWCore/Framework/interface/ESHandle.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
00016 #include "DataFormats/Common/interface/Handle.h"
00017 
00018 class EgammaHadTower;
00019 
00020 class ElectronHcalHelper
00021  {
00022   public:
00023 
00024     struct Configuration
00025      {
00026       // common parameters
00027       double hOverEConeSize ;
00028 
00029       // strategy
00030       bool useTowers ;
00031 
00032       // specific parameters if use towers
00033       edm::InputTag hcalTowers ;
00034       double hOverEPtMin ;            // min tower Et for H/E evaluation
00035 
00036       // specific parameters if use rechits
00037       edm::InputTag hcalRecHits ;
00038       double hOverEHBMinE ;
00039       double hOverEHFMinE ;
00040      } ;
00041 
00042     ElectronHcalHelper( const Configuration & ) ;
00043     void checkSetup( const edm::EventSetup & ) ;
00044     void readEvent( const edm::Event & ) ;
00045     ~ElectronHcalHelper() ;
00046 
00047     double hcalESum( const reco::SuperCluster & , const std::vector<CaloTowerDetId> * excludeTowers = 0) ;
00048     double hcalESumDepth1( const reco::SuperCluster &, const std::vector<CaloTowerDetId> * excludeTowers = 0) ;
00049     double hcalESumDepth2( const reco::SuperCluster & ,const std::vector<CaloTowerDetId> * excludeTowers = 0 ) ;
00050     double hOverEConeSize() const { return cfg_.hOverEConeSize ; }
00051 
00052     // Behind clusters
00053     std::vector<CaloTowerDetId> hcalTowersBehindClusters( const reco::SuperCluster & sc ) ;
00054     double hcalESumDepth1BehindClusters( const std::vector<CaloTowerDetId> & towers ) ;
00055     double hcalESumDepth2BehindClusters( const std::vector<CaloTowerDetId> & towers ) ;
00056 
00057   private:
00058 
00059     const Configuration cfg_ ;
00060 
00061     // event setup data (rechits strategy)
00062     unsigned long long caloGeomCacheId_ ;
00063     edm::ESHandle<CaloGeometry> caloGeom_ ;
00064 
00065     // event data (rechits strategy)
00066     edm::Handle<HBHERecHitCollection> * hbhe_ ;
00067     HBHERecHitMetaCollection * mhbhe_ ;
00068     EgammaHcalIsolation * hcalIso_ ;
00069 
00070     // event data (towers strategy)
00071     edm::Handle<CaloTowerCollection> * towersH_ ;
00072     EgammaTowerIsolation * towerIso1_ ;
00073     EgammaTowerIsolation * towerIso2_ ;
00074     EgammaHadTower * hadTower_;
00075  } ;
00076 
00077 #endif
00078 
00079 
00080