CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoEgamma/EgammaIsolationAlgos/interface/EgammaHadTower.h

Go to the documentation of this file.
00001 #ifndef EgammaHadTower_h
00002 #define EgammaHadTower_h
00003 
00004 // Finds the towers behind a super-cluster using the CaloTowerConstituentMap
00005 // Florian Beaudette 22 Jun 2011
00006 
00007 #include "FWCore/Framework/interface/EventSetup.h"
00008 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
00009 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00010 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
00011 #include "DataFormats/CaloRecHit/interface/CaloCluster.h"
00012 #include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h"
00013 
00014 
00015 class EgammaHadTower {
00016  public:
00017 
00018   enum HoeMode{SingleTower=0,TowersBehindCluster=1};
00019 
00020   EgammaHadTower(const edm::EventSetup &es,HoeMode mode=SingleTower);
00021   ~EgammaHadTower(){;}
00022   double getDepth1HcalESum( const reco::SuperCluster & sc ) const ;
00023   double getDepth2HcalESum( const reco::SuperCluster & sc ) const ;
00024   double getDepth1HcalESum( const std::vector<CaloTowerDetId> & towers ) const ;
00025   double getDepth2HcalESum( const std::vector<CaloTowerDetId> & towers ) const ;
00026   std::vector<CaloTowerDetId> towersOf(const reco::SuperCluster& sc) const ;
00027   CaloTowerDetId  towerOf(const reco::CaloCluster& cluster) const ;
00028   void setTowerCollection(const CaloTowerCollection* towercollection);
00029 
00030  private:
00031   const CaloTowerConstituentsMap * towerMap_;
00032   HoeMode mode_;
00033   const CaloTowerCollection * towerCollection_;
00034   unsigned int NMaxClusters_;
00035 };
00036 
00037 bool ClusterGreaterThan(const reco::CaloClusterPtr& c1, const reco::CaloClusterPtr& c2) ;
00038 
00039 #endif