#include <RecoEgamma/EgammaHLTAlgos/interface/EgammaHLTHcalIsolationDoubleCone.h>
Public Member Functions | |
EgammaHLTHcalIsolationDoubleCone (double egHcalIso_PtMin, double egHcalIso_ConeSize, double egHcalIso_Exclusion) | |
float | getConeSize () |
Get isolation cone size. | |
float | getExclusion () |
Get exclusion region. | |
float | getptMin () |
Get pt cut for hcal hits. | |
float | isolPtSum (const reco::RecoCandidate *recocandidate, const HBHERecHitCollection *hbhe, const HFRecHitCollection *hf, const CaloGeometry *geometry) |
Private Attributes | |
float | conesize |
float | exclusion |
float | ptMin |
Description: sum pt hcal hits in cone around egamma candidate but exlude central cone mostly identical to EgammaHLTHcalIsolation, but with an inner exclusion cone
Usage: <usage>
Definition at line 38 of file EgammaHLTHcalIsolationDoubleCone.h.
EgammaHLTHcalIsolationDoubleCone::EgammaHLTHcalIsolationDoubleCone | ( | double | egHcalIso_PtMin, |
double | egHcalIso_ConeSize, | ||
double | egHcalIso_Exclusion | ||
) | [inline] |
Definition at line 43 of file EgammaHLTHcalIsolationDoubleCone.h.
float EgammaHLTHcalIsolationDoubleCone::getConeSize | ( | ) | [inline] |
Get isolation cone size.
Definition at line 60 of file EgammaHLTHcalIsolationDoubleCone.h.
References conesize.
{ return conesize; }
float EgammaHLTHcalIsolationDoubleCone::getExclusion | ( | ) | [inline] |
Get exclusion region.
Definition at line 62 of file EgammaHLTHcalIsolationDoubleCone.h.
References exclusion.
{ return exclusion; }
float EgammaHLTHcalIsolationDoubleCone::getptMin | ( | ) | [inline] |
Get pt cut for hcal hits.
Definition at line 58 of file EgammaHLTHcalIsolationDoubleCone.h.
References ptMin.
{ return ptMin; }
float EgammaHLTHcalIsolationDoubleCone::isolPtSum | ( | const reco::RecoCandidate * | recocandidate, |
const HBHERecHitCollection * | hbhe, | ||
const HFRecHitCollection * | hf, | ||
const CaloGeometry * | geometry | ||
) |
Definition at line 25 of file EgammaHLTHcalIsolationDoubleCone.cc.
References edm::SortedCollection< T, SORT >::begin(), conesize, edm::SortedCollection< T, SORT >::end(), eta(), exclusion, create_public_lumi_plots::exp, CaloGeometry::getPosition(), phi, PI, ptMin, funct::sin(), reco::RecoCandidate::superCluster(), and TWOPI.
Referenced by EgammaHLTHcalIsolationDoubleConeProducers::produce().
{ float hcalIsol=0.; float candSCphi = recocandidate->superCluster()->phi(); float candSCeta = recocandidate->superCluster()->eta(); if(candSCphi<0) candSCphi+=TWOPI; float conesizeSquared=conesize*conesize; float exclusionSquared= exclusion*exclusion; for(HBHERecHitCollection::const_iterator hbheItr = hbhe->begin(); hbheItr != hbhe->end(); ++hbheItr){ double HcalHit_eta=geometry->getPosition(hbheItr->id()).eta(); //Attention getpos if(fabs(HcalHit_eta-candSCeta)<conesize) { float HcalHit_pth=hbheItr->energy()*sin(2*atan(exp(-HcalHit_eta))); if(HcalHit_pth>ptMin) { double HcalHit_phi=geometry->getPosition(hbheItr->id()).phi(); float deltaeta=fabs(HcalHit_eta-candSCeta); if(HcalHit_phi<0) HcalHit_phi+=TWOPI; float deltaphi=fabs(HcalHit_phi-candSCphi); if(deltaphi>TWOPI) deltaphi-=TWOPI; if(deltaphi>PI) deltaphi=TWOPI-deltaphi; float newDelta= (deltaphi*deltaphi+ deltaeta*deltaeta); if(newDelta<conesizeSquared && newDelta>exclusionSquared ) hcalIsol+=HcalHit_pth; } } } for(HFRecHitCollection::const_iterator hfItr = hf->begin(); hfItr != hf->end(); ++hfItr){ double HcalHit_eta=geometry->getPosition(hfItr->id()).eta(); //Attention getpos if(fabs(HcalHit_eta-candSCeta)<conesize) { float HcalHit_pth=hfItr->energy()*sin(2*atan(exp(-HcalHit_eta))); if(HcalHit_pth>ptMin) { double HcalHit_phi=geometry->getPosition(hfItr->id()).phi(); float deltaeta=fabs(HcalHit_eta-candSCeta); float deltaphi; if(HcalHit_phi<0) HcalHit_phi+=TWOPI; if(candSCphi<0) candSCphi+=TWOPI; deltaphi=fabs(HcalHit_phi-candSCphi); if(deltaphi>TWOPI) deltaphi-=TWOPI; if(deltaphi>PI) deltaphi=TWOPI-deltaphi; float newDelta= (deltaphi*deltaphi+ deltaeta*deltaeta); if(newDelta<conesizeSquared && newDelta>exclusionSquared ) hcalIsol+=HcalHit_pth; } } } return hcalIsol; }
float EgammaHLTHcalIsolationDoubleCone::conesize [private] |
Definition at line 69 of file EgammaHLTHcalIsolationDoubleCone.h.
Referenced by getConeSize(), and isolPtSum().
float EgammaHLTHcalIsolationDoubleCone::exclusion [private] |
Definition at line 70 of file EgammaHLTHcalIsolationDoubleCone.h.
Referenced by getExclusion(), and isolPtSum().
float EgammaHLTHcalIsolationDoubleCone::ptMin [private] |
Definition at line 68 of file EgammaHLTHcalIsolationDoubleCone.h.
Referenced by getptMin(), and isolPtSum().