CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

EgammaHcalIsolation Class Reference

#include <EgammaHcalIsolation.h>

List of all members.

Public Types

enum  HcalDepth { AllDepths = 0, Depth1 = 1, Depth2 = 2 }

Public Member Functions

 EgammaHcalIsolation (double extRadius, double intRadius, double eLowB, double eLowE, double etLowB, double etLowE, edm::ESHandle< CaloGeometry > theCaloGeom, HBHERecHitMetaCollection *mhbhe)
double getHcalESum (const reco::SuperCluster *sc) const
double getHcalESum (const GlobalPoint &pclu) const
double getHcalESum (const reco::Candidate *c) const
double getHcalESum (const math::XYZPoint &p) const
double getHcalESumDepth1 (const GlobalPoint &pclu) const
double getHcalESumDepth1 (const reco::Candidate *c) const
double getHcalESumDepth1 (const reco::SuperCluster *sc) const
double getHcalESumDepth1 (const math::XYZPoint &p) const
double getHcalESumDepth2 (const reco::Candidate *c) const
double getHcalESumDepth2 (const reco::SuperCluster *sc) const
double getHcalESumDepth2 (const math::XYZPoint &p) const
double getHcalESumDepth2 (const GlobalPoint &pclu) const
double getHcalEtSum (const math::XYZPoint &p) const
double getHcalEtSum (const GlobalPoint &pclu) const
double getHcalEtSum (const reco::Candidate *c) const
double getHcalEtSum (const reco::SuperCluster *sc) const
double getHcalEtSumDepth1 (const math::XYZPoint &p) const
double getHcalEtSumDepth1 (const GlobalPoint &pclu) const
double getHcalEtSumDepth1 (const reco::Candidate *c) const
double getHcalEtSumDepth1 (const reco::SuperCluster *sc) const
double getHcalEtSumDepth2 (const math::XYZPoint &p) const
double getHcalEtSumDepth2 (const reco::Candidate *c) const
double getHcalEtSumDepth2 (const GlobalPoint &pclu) const
double getHcalEtSumDepth2 (const reco::SuperCluster *sc) const
 ~EgammaHcalIsolation ()

Private Member Functions

double getHcalSum (const GlobalPoint &, const HcalDepth &, double(*)(const double &)) const
bool isDepth2 (const DetId &) const

Private Attributes

CaloDualConeSelectordoubleConeSel_
double eLowB_
double eLowE_
double etLowB_
double etLowE_
double extRadius_
double intRadius_
HBHERecHitMetaCollectionmhbhe_
edm::ESHandle< CaloGeometrytheCaloGeom_

Detailed Description

Definition at line 32 of file EgammaHcalIsolation.h.


Member Enumeration Documentation

Enumerator:
AllDepths 
Depth1 
Depth2 

Definition at line 35 of file EgammaHcalIsolation.h.


Constructor & Destructor Documentation

EgammaHcalIsolation::EgammaHcalIsolation ( double  extRadius,
double  intRadius,
double  eLowB,
double  eLowE,
double  etLowB,
double  etLowE,
edm::ESHandle< CaloGeometry theCaloGeom,
HBHERecHitMetaCollection mhbhe 
)

Definition at line 28 of file EgammaHcalIsolation.cc.

References doubleConeSel_, extRadius_, DetId::Hcal, intRadius_, edm::ESHandle< T >::product(), and theCaloGeom_.

  :
  extRadius_(extRadius),
  intRadius_(intRadius),
  eLowB_(eLowB),
  eLowE_(eLowE),
  etLowB_(etLowB),
  etLowE_(etLowE),
  theCaloGeom_(theCaloGeom) ,  
  mhbhe_(mhbhe)
{
    //set up the geometry and selector
    const CaloGeometry* caloGeom = theCaloGeom_.product();
    doubleConeSel_ = new CaloDualConeSelector (intRadius_ ,extRadius_, caloGeom, DetId::Hcal);
}
EgammaHcalIsolation::~EgammaHcalIsolation ( )

Definition at line 52 of file EgammaHcalIsolation.cc.

References doubleConeSel_.

{
    delete doubleConeSel_;
}

Member Function Documentation

double EgammaHcalIsolation::getHcalESum ( const reco::Candidate c) const [inline]
double EgammaHcalIsolation::getHcalESum ( const math::XYZPoint p) const [inline]

Definition at line 57 of file EgammaHcalIsolation.h.

References getHcalESum().

Referenced by getHcalESum().

{ return getHcalESum(GlobalPoint(p.x(),p.y(),p.z())); } 
double EgammaHcalIsolation::getHcalESum ( const reco::SuperCluster sc) const [inline]

Definition at line 55 of file EgammaHcalIsolation.h.

References getHcalESum(), and reco::CaloCluster::position().

Referenced by getHcalESum().

{ return getHcalESum(sc->position()); } 
double EgammaHcalIsolation::getHcalESum ( const GlobalPoint pclu) const [inline]

Definition at line 59 of file EgammaHcalIsolation.h.

References AllDepths, getHcalSum(), and scaleToE().

{ return getHcalSum(pclu,AllDepths,&scaleToE); } 
double EgammaHcalIsolation::getHcalESumDepth1 ( const reco::Candidate c) const [inline]
double EgammaHcalIsolation::getHcalESumDepth1 ( const reco::SuperCluster sc) const [inline]

Definition at line 65 of file EgammaHcalIsolation.h.

References getHcalESumDepth1(), and reco::CaloCluster::position().

Referenced by getHcalESumDepth1().

{ return getHcalESumDepth1(sc->position()); } 
double EgammaHcalIsolation::getHcalESumDepth1 ( const math::XYZPoint p) const [inline]

Definition at line 67 of file EgammaHcalIsolation.h.

References getHcalESumDepth1().

Referenced by getHcalESumDepth1().

{ return getHcalESumDepth1(GlobalPoint(p.x(),p.y(),p.z())); } 
double EgammaHcalIsolation::getHcalESumDepth1 ( const GlobalPoint pclu) const [inline]

Definition at line 69 of file EgammaHcalIsolation.h.

References Depth1, getHcalSum(), and scaleToE().

{ return getHcalSum(pclu,Depth1,&scaleToE); } 
double EgammaHcalIsolation::getHcalESumDepth2 ( const reco::Candidate c) const [inline]
double EgammaHcalIsolation::getHcalESumDepth2 ( const reco::SuperCluster sc) const [inline]

Definition at line 75 of file EgammaHcalIsolation.h.

References getHcalESumDepth2(), and reco::CaloCluster::position().

Referenced by getHcalESumDepth2().

{ return getHcalESumDepth2(sc->position()); } 
double EgammaHcalIsolation::getHcalESumDepth2 ( const math::XYZPoint p) const [inline]

Definition at line 77 of file EgammaHcalIsolation.h.

References getHcalESumDepth2().

Referenced by getHcalESumDepth2().

{ return getHcalESumDepth2(GlobalPoint(p.x(),p.y(),p.z())); } 
double EgammaHcalIsolation::getHcalESumDepth2 ( const GlobalPoint pclu) const [inline]

Definition at line 79 of file EgammaHcalIsolation.h.

References Depth2, getHcalSum(), and scaleToE().

{ return getHcalSum(pclu,Depth2,&scaleToE); } 
double EgammaHcalIsolation::getHcalEtSum ( const GlobalPoint pclu) const [inline]

Definition at line 60 of file EgammaHcalIsolation.h.

References AllDepths, getHcalSum(), and scaleToEt().

{ return getHcalSum(pclu,AllDepths,&scaleToEt); }
double EgammaHcalIsolation::getHcalEtSum ( const reco::SuperCluster sc) const [inline]

Definition at line 56 of file EgammaHcalIsolation.h.

References getHcalEtSum(), and reco::CaloCluster::position().

Referenced by getHcalEtSum().

{ return getHcalEtSum(sc->position()); } 
double EgammaHcalIsolation::getHcalEtSum ( const reco::Candidate c) const [inline]

Definition at line 54 of file EgammaHcalIsolation.h.

References reco::Candidate::get(), edm::Ref< C, T, F >::get(), and getHcalEtSum().

Referenced by getHcalEtSum().

double EgammaHcalIsolation::getHcalEtSum ( const math::XYZPoint p) const [inline]

Definition at line 58 of file EgammaHcalIsolation.h.

References getHcalEtSum().

Referenced by getHcalEtSum().

{ return getHcalEtSum(GlobalPoint(p.x(),p.y(),p.z())); } 
double EgammaHcalIsolation::getHcalEtSumDepth1 ( const GlobalPoint pclu) const [inline]

Definition at line 70 of file EgammaHcalIsolation.h.

References Depth1, getHcalSum(), and scaleToEt().

{ return getHcalSum(pclu,Depth1,&scaleToEt); }
double EgammaHcalIsolation::getHcalEtSumDepth1 ( const math::XYZPoint p) const [inline]

Definition at line 68 of file EgammaHcalIsolation.h.

References getHcalEtSumDepth1().

Referenced by getHcalEtSumDepth1().

{ return getHcalEtSumDepth1(GlobalPoint(p.x(),p.y(),p.z())); } 
double EgammaHcalIsolation::getHcalEtSumDepth1 ( const reco::SuperCluster sc) const [inline]

Definition at line 66 of file EgammaHcalIsolation.h.

References getHcalEtSumDepth1(), and reco::CaloCluster::position().

Referenced by getHcalEtSumDepth1().

{ return getHcalEtSumDepth1(sc->position()); } 
double EgammaHcalIsolation::getHcalEtSumDepth1 ( const reco::Candidate c) const [inline]
double EgammaHcalIsolation::getHcalEtSumDepth2 ( const GlobalPoint pclu) const [inline]

Definition at line 80 of file EgammaHcalIsolation.h.

References Depth2, getHcalSum(), and scaleToEt().

{ return getHcalSum(pclu,Depth2,&scaleToEt); }
double EgammaHcalIsolation::getHcalEtSumDepth2 ( const math::XYZPoint p) const [inline]

Definition at line 78 of file EgammaHcalIsolation.h.

References getHcalEtSumDepth2().

Referenced by getHcalEtSumDepth2().

{ return getHcalEtSumDepth2(GlobalPoint(p.x(),p.y(),p.z())); } 
double EgammaHcalIsolation::getHcalEtSumDepth2 ( const reco::Candidate c) const [inline]
double EgammaHcalIsolation::getHcalEtSumDepth2 ( const reco::SuperCluster sc) const [inline]

Definition at line 76 of file EgammaHcalIsolation.h.

References getHcalEtSumDepth2(), and reco::CaloCluster::position().

Referenced by getHcalEtSumDepth2().

{ return getHcalEtSumDepth2(sc->position()); } 
double EgammaHcalIsolation::getHcalSum ( const GlobalPoint pclu,
const HcalDepth depth,
double(*)(const double &)  scale 
) const [private]

Definition at line 57 of file EgammaHcalIsolation.cc.

References AllDepths, Depth1, Depth2, doubleConeSel_, eLowB_, eLowE_, eta(), etLowB_, etLowE_, HcalBarrel, HcalEndcap, i, isDepth2(), mhbhe_, edm::ESHandle< T >::product(), scaleToEt(), CaloDualConeSelector::select(), and theCaloGeom_.

Referenced by getHcalESum(), getHcalESumDepth1(), getHcalESumDepth2(), getHcalEtSum(), getHcalEtSumDepth1(), and getHcalEtSumDepth2().

{
    double sum = 0.;
    if (mhbhe_) 
    {
        //Compute the HCAL energy behind ECAL
        double eta;
        std::auto_ptr<CaloRecHitMetaCollectionV> chosen = doubleConeSel_->select(pclu,*mhbhe_);
        CaloRecHitMetaCollectionV::const_iterator i;
        for (i = chosen->begin () ; i!= chosen->end () ; ++i) 
        {
            eta = theCaloGeom_.product()->getPosition(i->detid()).eta();
            HcalDetId hcalDetId(i->detid());
            if(hcalDetId.subdet() == HcalBarrel &&              //Is it in the barrel?
               i->energy() > eLowB_ &&                          //Does it pass the min energy?
               i->energy()*scaleToEt(eta) > etLowB_ &&          //Does it pass the min et?
               (depth == AllDepths || depth == Depth1)) {                    //Are we asking for the first depth?
                    sum += i->energy() * scale(eta);
            }
            if(hcalDetId.subdet() == HcalEndcap &&              //Is it in the endcap?
               i->energy() > eLowE_ &&                          //Does it pass the min energy?
               i->energy()*scaleToEt(eta) > etLowE_ ) {         //Does it pass the min et?
               switch(depth) {                                  //Which depth?
                    case AllDepths: sum += i->energy() * scale(eta); break;
                    case Depth1: sum += (isDepth2(i->detid())) ? 0 : i->energy() * scale(eta); break;
                    case Depth2: sum += (isDepth2(i->detid())) ? i->energy() * scale(eta) : 0; break;
               }
            }
        }
    } 
    return sum ;
}
bool EgammaHcalIsolation::isDepth2 ( const DetId detId) const [private]

Definition at line 91 of file EgammaHcalIsolation.cc.

Referenced by getHcalSum().

                                                           {
    
    if( (HcalDetId(detId).depth()==2 && HcalDetId(detId).ietaAbs()>=18 && HcalDetId(detId).ietaAbs()<27) ||
        (HcalDetId(detId).depth()==3 && HcalDetId(detId).ietaAbs()==27) ) {

        return true;

   } else {
        return false;
   }
}

Member Data Documentation

Definition at line 100 of file EgammaHcalIsolation.h.

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

double EgammaHcalIsolation::eLowB_ [private]

Definition at line 91 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

double EgammaHcalIsolation::eLowE_ [private]

Definition at line 92 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

double EgammaHcalIsolation::etLowB_ [private]

Definition at line 93 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

double EgammaHcalIsolation::etLowE_ [private]

Definition at line 94 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

Definition at line 89 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation().

Definition at line 90 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation().

Definition at line 98 of file EgammaHcalIsolation.h.

Referenced by getHcalSum().

Definition at line 97 of file EgammaHcalIsolation.h.

Referenced by EgammaHcalIsolation(), and getHcalSum().