CMS 3D CMS Logo

EgammaHcalIsolation Class Reference

#include <RecoEgamma/EgammaIsolationAlgos/interface/EgammaHcalIsolation.h>

List of all members.

Public Member Functions

 EgammaHcalIsolation (double extRadius, double intRadius, double etLow, edm::ESHandle< CaloGeometry >, HBHERecHitMetaCollection *)
double getHcalEtSum (const reco::Candidate *) const
 ~EgammaHcalIsolation ()

Private Attributes

CaloDualConeSelectordoubleConeSel_
double etLow_
double extRadius_
double intRadius_
HBHERecHitMetaCollectionmhbhe_
edm::ESHandle< CaloGeometrytheCaloGeom_


Detailed Description

Definition at line 23 of file EgammaHcalIsolation.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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 }


Member Data Documentation

CaloDualConeSelector* EgammaHcalIsolation::doubleConeSel_ [private]

Definition at line 48 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation(), getHcalEtSum(), and ~EgammaHcalIsolation().

double EgammaHcalIsolation::etLow_ [private]

Definition at line 42 of file EgammaHcalIsolation.h.

Referenced by getHcalEtSum().

double EgammaHcalIsolation::extRadius_ [private]

Definition at line 40 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation().

double EgammaHcalIsolation::intRadius_ [private]

Definition at line 41 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation().

HBHERecHitMetaCollection* EgammaHcalIsolation::mhbhe_ [private]

Definition at line 46 of file EgammaHcalIsolation.h.

Referenced by getHcalEtSum().

edm::ESHandle<CaloGeometry> EgammaHcalIsolation::theCaloGeom_ [private]

Definition at line 45 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation(), and getHcalEtSum().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:10 2009 for CMSSW by  doxygen 1.5.4