#include <RecoEgamma/EgammaIsolationAlgos/interface/EgammaHcalIsolation.h>
Public Member Functions | |
EgammaHcalIsolation (double extRadius, double intRadius, double etLow, edm::ESHandle< CaloGeometry >, HBHERecHitMetaCollection *) | |
double | getHcalEtSum (const reco::Candidate *) const |
~EgammaHcalIsolation () | |
Private Attributes | |
CaloDualConeSelector * | doubleConeSel_ |
double | etLow_ |
double | extRadius_ |
double | intRadius_ |
HBHERecHitMetaCollection * | mhbhe_ |
edm::ESHandle< CaloGeometry > | theCaloGeom_ |
Definition at line 23 of file EgammaHcalIsolation.h.
EgammaHcalIsolation::EgammaHcalIsolation | ( | double | extRadius, | |
double | intRadius, | |||
double | etLow, | |||
edm::ESHandle< CaloGeometry > | theCaloGeom, | |||
HBHERecHitMetaCollection * | mhbhe | |||
) |
Definition at line 29 of file EgammaHcalIsolation.cc.
References doubleConeSel_, extRadius_, DetId::Hcal, intRadius_, edm::ESHandle< T >::product(), and theCaloGeom_.
00033 : 00034 extRadius_(extRadius), 00035 intRadius_(intRadius), 00036 etLow_(etLow), 00037 theCaloGeom_(theCaloGeom) , 00038 mhbhe_(mhbhe) 00039 { 00040 //set up the geometry and selector 00041 const CaloGeometry* caloGeom = theCaloGeom_.product(); 00042 doubleConeSel_ = new CaloDualConeSelector (intRadius_ ,extRadius_, caloGeom, DetId::Hcal); 00043 }
EgammaHcalIsolation::~EgammaHcalIsolation | ( | ) |
Definition at line 45 of file EgammaHcalIsolation.cc.
References doubleConeSel_.
00046 { 00047 delete doubleConeSel_; 00048 }
double EgammaHcalIsolation::getHcalEtSum | ( | const reco::Candidate * | emObject | ) | const |
Definition at line 50 of file EgammaHcalIsolation.cc.
References doubleConeSel_, eta, etLow_, funct::exp(), reco::Candidate::get(), edm::Ref< C, T, F >::get(), CaloGeometry::getPosition(), i, mhbhe_, edm::ESHandle< T >::product(), CaloDualConeSelector::select(), funct::sin(), and theCaloGeom_.
Referenced by EgammaHcalIsolationProducer::produce().
00051 { 00052 00053 double hcalEt = 0.; 00054 if (mhbhe_) 00055 { 00056 //Take the SC position 00057 reco::SuperClusterRef sc = emObject->get<reco::SuperClusterRef>(); 00058 math::XYZPoint theCaloPosition = sc.get()->position(); 00059 // math::XYZPoint theCaloPosition = (emObject->get<reco::SuperClusterRef>())->position() ; 00060 GlobalPoint pclu (theCaloPosition.x () , 00061 theCaloPosition.y () , 00062 theCaloPosition.z () ); 00063 //Compute the HCAL energy behind ECAL 00064 std::auto_ptr<CaloRecHitMetaCollectionV> chosen = doubleConeSel_->select(pclu,*mhbhe_); 00065 for (CaloRecHitMetaCollectionV::const_iterator i = chosen->begin () ; 00066 i!= chosen->end () ; 00067 ++i) 00068 { 00069 double hcalHit_eta = theCaloGeom_.product()->getPosition(i->detid()).eta(); 00070 double hcalHit_Et = i->energy()*sin(2*atan(exp(-hcalHit_eta))); 00071 if ( hcalHit_Et > etLow_) 00072 hcalEt += hcalHit_Et; 00073 } 00074 } 00075 return hcalEt ; 00076 }
Definition at line 48 of file EgammaHcalIsolation.h.
Referenced by EgammaHcalIsolation(), getHcalEtSum(), and ~EgammaHcalIsolation().
double EgammaHcalIsolation::etLow_ [private] |
double EgammaHcalIsolation::extRadius_ [private] |
double EgammaHcalIsolation::intRadius_ [private] |
Definition at line 45 of file EgammaHcalIsolation.h.
Referenced by EgammaHcalIsolation(), and getHcalEtSum().