CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
EcalPFClusterIsolation< T1 > Class Template Reference

#include <EcalPFClusterIsolation.h>

Public Types

typedef std::vector< T1 > T1Collection
 
typedef edm::Ref< T1CollectionT1Ref
 

Public Member Functions

 EcalPFClusterIsolation (double drMax, double drVetoBarrel, double drVetoEndcap, double etaStripBarrel, double etaStripEndcap, double energyBarrel, double energyEndcap)
 
double getSum (T1Ref, edm::Handle< std::vector< reco::PFCluster > >)
 
 ~EcalPFClusterIsolation ()
 

Private Member Functions

bool computedRVeto (T1Ref candRef, reco::PFClusterRef pfclu)
 
template<>
bool computedRVeto (T1Ref candRef, reco::PFClusterRef pfclu)
 

Private Attributes

const double drMax_
 
double drVeto2_
 
const double drVetoBarrel_
 
const double drVetoEndcap_
 
const double energyBarrel_
 
const double energyEndcap_
 
const double etaStripBarrel_
 
const double etaStripEndcap_
 

Detailed Description

template<typename T1>
class EcalPFClusterIsolation< T1 >

Definition at line 17 of file EcalPFClusterIsolation.h.

Member Typedef Documentation

◆ T1Collection

template<typename T1>
typedef std::vector<T1> EcalPFClusterIsolation< T1 >::T1Collection

Definition at line 19 of file EcalPFClusterIsolation.h.

◆ T1Ref

template<typename T1>
typedef edm::Ref<T1Collection> EcalPFClusterIsolation< T1 >::T1Ref

Definition at line 20 of file EcalPFClusterIsolation.h.

Constructor & Destructor Documentation

◆ EcalPFClusterIsolation()

template<typename T1 >
EcalPFClusterIsolation< T1 >::EcalPFClusterIsolation ( double  drMax,
double  drVetoBarrel,
double  drVetoEndcap,
double  etaStripBarrel,
double  etaStripEndcap,
double  energyBarrel,
double  energyEndcap 
)

◆ ~EcalPFClusterIsolation()

template<typename T1 >
EcalPFClusterIsolation< T1 >::~EcalPFClusterIsolation ( )

Definition at line 35 of file EcalPFClusterIsolation.cc.

35 {}

Member Function Documentation

◆ computedRVeto() [1/2]

template<typename T1 >
bool EcalPFClusterIsolation< T1 >::computedRVeto ( T1Ref  candRef,
reco::PFClusterRef  pfclu 
)
private

Definition at line 75 of file EcalPFClusterIsolation.cc.

75  {
76  float dR2 = deltaR2(candRef->eta(), candRef->phi(), pfclu->eta(), pfclu->phi());
77  if (dR2 > (drMax_ * drMax_))
78  return false;
79 
80  if (candRef->superCluster().isNonnull()) {
81  // Exclude clusters that are part of the candidate
82  for (reco::CaloCluster_iterator it = candRef->superCluster()->clustersBegin();
83  it != candRef->superCluster()->clustersEnd();
84  ++it) {
85  if ((*it)->seed() == pfclu->seed()) {
86  return false;
87  }
88  }
89  }
90 
91  return true;
92 }

References HLTMuonOfflineAnalyzer_cfi::deltaR2, and edm::Ref< C, T, F >::isNonnull().

◆ computedRVeto() [2/2]

template<>
bool EcalPFClusterIsolation< reco::RecoChargedCandidate >::computedRVeto ( T1Ref  candRef,
reco::PFClusterRef  pfclu 
)
private

Definition at line 95 of file EcalPFClusterIsolation.cc.

95  {
96  float dR2 = deltaR2(candRef->eta(), candRef->phi(), pfclu->eta(), pfclu->phi());
97  if (dR2 > (drMax_ * drMax_) || dR2 < drVeto2_)
98  return false;
99  else
100  return true;
101 }

References HLTMuonOfflineAnalyzer_cfi::deltaR2.

◆ getSum()

template<typename T1>
double EcalPFClusterIsolation< T1 >::getSum ( T1Ref  ,
edm::Handle< std::vector< reco::PFCluster > >   
)

Definition at line 38 of file EcalPFClusterIsolation.cc.

38  {
39  drVeto2_ = -1.;
40  float etaStrip = -1;
41 
42  if (fabs(candRef->eta()) < 1.479) {
44  etaStrip = etaStripBarrel_;
45  } else {
47  etaStrip = etaStripEndcap_;
48  }
49 
50  float etSum = 0;
51  for (size_t i = 0; i < clusterHandle->size(); i++) {
52  reco::PFClusterRef pfclu(clusterHandle, i);
53 
54  if (fabs(candRef->eta()) < 1.479) {
55  if (fabs(pfclu->pt()) < energyBarrel_)
56  continue;
57  } else {
58  if (fabs(pfclu->energy()) < energyEndcap_)
59  continue;
60  }
61 
62  float dEta = fabs(candRef->eta() - pfclu->eta());
63  if (dEta < etaStrip)
64  continue;
65  if (not computedRVeto(candRef, pfclu))
66  continue;
67 
68  etSum += pfclu->pt();
69  }
70 
71  return etSum;
72 }

References HLT_FULL_cff::dEta, and mps_fire::i.

Referenced by EgammaEcalPFClusterIsolationProducer< T1 >::produce(), and HLTEcalPFClusterIsolationProducer< T1 >::produce().

Member Data Documentation

◆ drMax_

template<typename T1>
const double EcalPFClusterIsolation< T1 >::drMax_
private

Definition at line 37 of file EcalPFClusterIsolation.h.

◆ drVeto2_

template<typename T1>
double EcalPFClusterIsolation< T1 >::drVeto2_
private

Definition at line 36 of file EcalPFClusterIsolation.h.

◆ drVetoBarrel_

template<typename T1>
const double EcalPFClusterIsolation< T1 >::drVetoBarrel_
private

Definition at line 38 of file EcalPFClusterIsolation.h.

◆ drVetoEndcap_

template<typename T1>
const double EcalPFClusterIsolation< T1 >::drVetoEndcap_
private

Definition at line 39 of file EcalPFClusterIsolation.h.

◆ energyBarrel_

template<typename T1>
const double EcalPFClusterIsolation< T1 >::energyBarrel_
private

Definition at line 42 of file EcalPFClusterIsolation.h.

◆ energyEndcap_

template<typename T1>
const double EcalPFClusterIsolation< T1 >::energyEndcap_
private

Definition at line 43 of file EcalPFClusterIsolation.h.

◆ etaStripBarrel_

template<typename T1>
const double EcalPFClusterIsolation< T1 >::etaStripBarrel_
private

Definition at line 40 of file EcalPFClusterIsolation.h.

◆ etaStripEndcap_

template<typename T1>
const double EcalPFClusterIsolation< T1 >::etaStripEndcap_
private

Definition at line 41 of file EcalPFClusterIsolation.h.

mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.drVetoEndcap
drVetoEndcap
Definition: HLT_FULL_cff.py:18959
HLT_FULL_cff.etaStripBarrel
etaStripBarrel
Definition: HLT_FULL_cff.py:18950
EcalPFClusterIsolation::computedRVeto
bool computedRVeto(T1Ref candRef, reco::PFClusterRef pfclu)
Definition: EcalPFClusterIsolation.cc:75
EcalPFClusterIsolation::drVetoEndcap_
const double drVetoEndcap_
Definition: EcalPFClusterIsolation.h:39
edm::PtrVectorItr
Definition: PtrVector.h:51
HLT_FULL_cff.energyEndcap
energyEndcap
Definition: HLT_FULL_cff.py:18951
EcalPFClusterIsolation::drMax_
const double drMax_
Definition: EcalPFClusterIsolation.h:37
edm::Ref< PFClusterCollection >
EcalPFClusterIsolation::drVeto2_
double drVeto2_
Definition: EcalPFClusterIsolation.h:36
EcalPFClusterIsolation::energyBarrel_
const double energyBarrel_
Definition: EcalPFClusterIsolation.h:42
HLT_FULL_cff.drVetoBarrel
drVetoBarrel
Definition: HLT_FULL_cff.py:18955
EcalPFClusterIsolation::etaStripEndcap_
const double etaStripEndcap_
Definition: EcalPFClusterIsolation.h:41
HLTMuonOfflineAnalyzer_cfi.deltaR2
deltaR2
Definition: HLTMuonOfflineAnalyzer_cfi.py:105
EcalPFClusterIsolation::energyEndcap_
const double energyEndcap_
Definition: EcalPFClusterIsolation.h:43
HLT_FULL_cff.dEta
dEta
Definition: HLT_FULL_cff.py:13701
HLT_FULL_cff.etaStripEndcap
etaStripEndcap
Definition: HLT_FULL_cff.py:18954
EcalPFClusterIsolation::etaStripBarrel_
const double etaStripBarrel_
Definition: EcalPFClusterIsolation.h:40
EcalPFClusterIsolation::drVetoBarrel_
const double drVetoBarrel_
Definition: EcalPFClusterIsolation.h:38
HLT_FULL_cff.energyBarrel
energyBarrel
Definition: HLT_FULL_cff.py:18957
HLT_FULL_cff.drMax
drMax
Definition: HLT_FULL_cff.py:18956