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 31 of file EcalPFClusterIsolation.h.

Member Typedef Documentation

◆ T1Collection

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

Definition at line 33 of file EcalPFClusterIsolation.h.

◆ T1Ref

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

Definition at line 34 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_2018_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 51 of file EcalPFClusterIsolation.h.

◆ drVeto2_

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

Definition at line 50 of file EcalPFClusterIsolation.h.

◆ drVetoBarrel_

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

Definition at line 52 of file EcalPFClusterIsolation.h.

◆ drVetoEndcap_

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

Definition at line 53 of file EcalPFClusterIsolation.h.

◆ energyBarrel_

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

Definition at line 56 of file EcalPFClusterIsolation.h.

◆ energyEndcap_

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

Definition at line 57 of file EcalPFClusterIsolation.h.

◆ etaStripBarrel_

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

Definition at line 54 of file EcalPFClusterIsolation.h.

◆ etaStripEndcap_

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

Definition at line 55 of file EcalPFClusterIsolation.h.

HLT_2018_cff.etaStripEndcap
etaStripEndcap
Definition: HLT_2018_cff.py:17512
mps_fire.i
i
Definition: mps_fire.py:355
EcalPFClusterIsolation::computedRVeto
bool computedRVeto(T1Ref candRef, reco::PFClusterRef pfclu)
Definition: EcalPFClusterIsolation.cc:75
EcalPFClusterIsolation::drVetoEndcap_
const double drVetoEndcap_
Definition: EcalPFClusterIsolation.h:53
edm::PtrVectorItr
Definition: PtrVector.h:51
EcalPFClusterIsolation::drMax_
const double drMax_
Definition: EcalPFClusterIsolation.h:51
HLT_2018_cff.dEta
dEta
Definition: HLT_2018_cff.py:12289
edm::Ref< PFClusterCollection >
HLT_2018_cff.drMax
drMax
Definition: HLT_2018_cff.py:17514
EcalPFClusterIsolation::drVeto2_
double drVeto2_
Definition: EcalPFClusterIsolation.h:50
HLT_2018_cff.drVetoBarrel
drVetoBarrel
Definition: HLT_2018_cff.py:17513
EcalPFClusterIsolation::energyBarrel_
const double energyBarrel_
Definition: EcalPFClusterIsolation.h:56
HLT_2018_cff.drVetoEndcap
drVetoEndcap
Definition: HLT_2018_cff.py:17517
HLT_2018_cff.energyBarrel
energyBarrel
Definition: HLT_2018_cff.py:17515
HLT_2018_cff.energyEndcap
energyEndcap
Definition: HLT_2018_cff.py:17509
EcalPFClusterIsolation::etaStripEndcap_
const double etaStripEndcap_
Definition: EcalPFClusterIsolation.h:55
HLTMuonOfflineAnalyzer_cfi.deltaR2
deltaR2
Definition: HLTMuonOfflineAnalyzer_cfi.py:105
EcalPFClusterIsolation::energyEndcap_
const double energyEndcap_
Definition: EcalPFClusterIsolation.h:57
EcalPFClusterIsolation::etaStripBarrel_
const double etaStripBarrel_
Definition: EcalPFClusterIsolation.h:54
EcalPFClusterIsolation::drVetoBarrel_
const double drVetoBarrel_
Definition: EcalPFClusterIsolation.h:52
HLT_2018_cff.etaStripBarrel
etaStripBarrel
Definition: HLT_2018_cff.py:17508