CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
EgammaHLTHcalIsolationDoubleCone Class Reference

#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. More...
 
float getExclusion ()
 Get exclusion region. More...
 
float getptMin ()
 Get pt cut for hcal hits. More...
 
float isolPtSum (const reco::RecoCandidate *recocandidate, const HBHERecHitCollection *hbhe, const HFRecHitCollection *hf, const CaloGeometry *geometry)
 

Private Attributes

float conesize
 
float exclusion
 
float ptMin
 

Detailed Description

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.

Constructor & Destructor Documentation

EgammaHLTHcalIsolationDoubleCone::EgammaHLTHcalIsolationDoubleCone ( double  egHcalIso_PtMin,
double  egHcalIso_ConeSize,
double  egHcalIso_Exclusion 
)
inline

Definition at line 43 of file EgammaHLTHcalIsolationDoubleCone.h.

43  :
44  ptMin(egHcalIso_PtMin),conesize(egHcalIso_ConeSize),exclusion(egHcalIso_Exclusion){
45  /*
46  std::cout << "EgammaHLTHcalIsolation instance:"
47  << " ptMin=" << ptMin << "|" << ptMinG
48  << " conesize="<< conesize << "|" << conesizeG
49  << std::endl;
50  */
51  }

Member Function Documentation

float EgammaHLTHcalIsolationDoubleCone::getConeSize ( )
inline

Get isolation cone size.

Definition at line 60 of file EgammaHLTHcalIsolationDoubleCone.h.

References conesize.

float EgammaHLTHcalIsolationDoubleCone::getExclusion ( )
inline

Get exclusion region.

Definition at line 62 of file EgammaHLTHcalIsolationDoubleCone.h.

References exclusion.

float EgammaHLTHcalIsolationDoubleCone::getptMin ( )
inline

Get pt cut for hcal hits.

Definition at line 58 of file EgammaHLTHcalIsolationDoubleCone.h.

References 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().

25  {
26 
27  float hcalIsol=0.;
28 
29  float candSCphi = recocandidate->superCluster()->phi();
30  float candSCeta = recocandidate->superCluster()->eta();
31  if(candSCphi<0) candSCphi+=TWOPI;
32  float conesizeSquared=conesize*conesize;
33  float exclusionSquared= exclusion*exclusion;
34 
35  for(HBHERecHitCollection::const_iterator hbheItr = hbhe->begin(); hbheItr != hbhe->end(); ++hbheItr){
36  double HcalHit_eta=geometry->getPosition(hbheItr->id()).eta(); //Attention getpos
37  if(fabs(HcalHit_eta-candSCeta)<conesize) {
38  float HcalHit_pth=hbheItr->energy()*sin(2*atan(exp(-HcalHit_eta)));
39  if(HcalHit_pth>ptMin) {
40  double HcalHit_phi=geometry->getPosition(hbheItr->id()).phi();
41  float deltaeta=fabs(HcalHit_eta-candSCeta);
42  if(HcalHit_phi<0) HcalHit_phi+=TWOPI;
43  float deltaphi=fabs(HcalHit_phi-candSCphi);
44  if(deltaphi>TWOPI) deltaphi-=TWOPI;
45  if(deltaphi>PI) deltaphi=TWOPI-deltaphi;
46  float newDelta= (deltaphi*deltaphi+ deltaeta*deltaeta);
47  if(newDelta<conesizeSquared && newDelta>exclusionSquared ) hcalIsol+=HcalHit_pth;
48  }
49  }
50  }
51 
52  for(HFRecHitCollection::const_iterator hfItr = hf->begin(); hfItr != hf->end(); ++hfItr){
53  double HcalHit_eta=geometry->getPosition(hfItr->id()).eta(); //Attention getpos
54  if(fabs(HcalHit_eta-candSCeta)<conesize) {
55  float HcalHit_pth=hfItr->energy()*sin(2*atan(exp(-HcalHit_eta)));
56  if(HcalHit_pth>ptMin) {
57  double HcalHit_phi=geometry->getPosition(hfItr->id()).phi();
58  float deltaeta=fabs(HcalHit_eta-candSCeta);
59  float deltaphi;
60  if(HcalHit_phi<0) HcalHit_phi+=TWOPI;
61  if(candSCphi<0) candSCphi+=TWOPI;
62  deltaphi=fabs(HcalHit_phi-candSCphi);
63  if(deltaphi>TWOPI) deltaphi-=TWOPI;
64  if(deltaphi>PI) deltaphi=TWOPI-deltaphi;
65  float newDelta= (deltaphi*deltaphi+ deltaeta*deltaeta);
66  if(newDelta<conesizeSquared && newDelta>exclusionSquared ) hcalIsol+=HcalHit_pth;
67  }
68  }
69  }
70 
71 
72  return hcalIsol;
73 
74 }
#define PI
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< T >::const_iterator const_iterator
T eta() const
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:68
const_iterator end() const
const_iterator begin() const
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: DDAxes.h:10

Member Data Documentation

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().