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 (T1, edm::Handle< std::vector< reco::PFCluster > >)
 
double getSum (T1Ref, edm::Handle< std::vector< reco::PFCluster > >)
 
 ~EcalPFClusterIsolation ()
 

Private Member Functions

bool computedRVeto (T1Ref candRef, reco::PFClusterRef pfclu)
 
bool computedRVeto (T1 cand, 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 
)

Definition at line 19 of file EcalPFClusterIsolation.cc.

◆ ~EcalPFClusterIsolation()

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

Definition at line 35 of file EcalPFClusterIsolation.cc.

35 {}

Member Function Documentation

◆ computedRVeto() [1/3]

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

Definition at line 38 of file EcalPFClusterIsolation.cc.

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

38  {
39  float dR2 = deltaR2(candRef->eta(), candRef->phi(), pfclu->eta(), pfclu->phi());
40  if (dR2 > (drMax_ * drMax_))
41  return false;
42 
43  if (candRef->superCluster().isNonnull()) {
44  // Exclude clusters that are part of the candidate
45  for (reco::CaloCluster_iterator it = candRef->superCluster()->clustersBegin();
46  it != candRef->superCluster()->clustersEnd();
47  ++it) {
48  if ((*it)->seed() == pfclu->seed()) {
49  return false;
50  }
51  }
52  }
53 
54  return true;
55 }
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)

◆ computedRVeto() [2/3]

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

Definition at line 109 of file EcalPFClusterIsolation.cc.

References HLTMuonOfflineAnalyzer_cfi::deltaR2, ALPAKA_ACCELERATOR_NAMESPACE::dR2(), and ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it.

109  {
110  float dR2 = deltaR2(cand.eta(), cand.phi(), pfclu->eta(), pfclu->phi());
111  if (dR2 > (drMax_ * drMax_))
112  return false;
113 
114  if (cand.superCluster().isNonnull()) {
115  // Exclude clusters that are part of the candidate
116  for (reco::CaloCluster_iterator it = cand.superCluster()->clustersBegin(); it != cand.superCluster()->clustersEnd();
117  ++it) {
118  if ((*it)->seed() == pfclu->seed()) {
119  return false;
120  }
121  }
122  }
123 
124  return true;
125 }
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)

◆ computedRVeto() [3/3]

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

Definition at line 58 of file EcalPFClusterIsolation.cc.

References HLTMuonOfflineAnalyzer_cfi::deltaR2, and ALPAKA_ACCELERATOR_NAMESPACE::dR2().

58  {
59  float dR2 = deltaR2(candRef->eta(), candRef->phi(), pfclu->eta(), pfclu->phi());
60  if (dR2 > (drMax_ * drMax_) || dR2 < drVeto2_)
61  return false;
62  else
63  return true;
64 }
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)

◆ getSum() [1/2]

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

◆ getSum() [2/2]

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

Definition at line 104 of file EcalPFClusterIsolation.cc.

104  {
105  return getSum(*ref, clusts);
106 }
double getSum(T1, edm::Handle< std::vector< reco::PFCluster > >)

Member Data Documentation

◆ drMax_

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

Definition at line 39 of file EcalPFClusterIsolation.h.

◆ drVeto2_

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

Definition at line 38 of file EcalPFClusterIsolation.h.

◆ drVetoBarrel_

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

Definition at line 40 of file EcalPFClusterIsolation.h.

◆ drVetoEndcap_

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

Definition at line 41 of file EcalPFClusterIsolation.h.

◆ energyBarrel_

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

Definition at line 44 of file EcalPFClusterIsolation.h.

◆ energyEndcap_

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

Definition at line 45 of file EcalPFClusterIsolation.h.

◆ etaStripBarrel_

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

Definition at line 42 of file EcalPFClusterIsolation.h.

◆ etaStripEndcap_

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

Definition at line 43 of file EcalPFClusterIsolation.h.