CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
MuPFIsoHelper Class Reference

#include <MuPFIsoHelper.h>

Public Types

typedef edm::ValueMap< double > CandDoubleMap
 

Public Member Functions

void beginEvent (const edm::Event &iEvent)
 
int embedPFIsolation (reco::Muon &, reco::MuonRef &)
 
reco::MuonPFIsolation makeIsoDeposit (reco::MuonRef &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &)
 
 MuPFIsoHelper (const std::map< std::string, edm::ParameterSet > &, edm::ConsumesCollector &&)
 
 ~MuPFIsoHelper ()
 

Private Attributes

std::vector< edm::Handle< CandDoubleMap > > chargedHadron_
 
std::vector< edm::EDGetTokenT< CandDoubleMap > > chargedHadronToken_
 
std::vector< edm::Handle< CandDoubleMap > > chargedParticle_
 
std::vector< edm::EDGetTokenT< CandDoubleMap > > chargedParticleToken_
 
std::map< std::string, edm::ParameterSetlabelMap_
 
std::vector< edm::Handle< CandDoubleMap > > neutralHadron_
 
std::vector< edm::Handle< CandDoubleMap > > neutralHadronHighThreshold_
 
std::vector< edm::EDGetTokenT< CandDoubleMap > > neutralHadronHighThresholdToken_
 
std::vector< edm::EDGetTokenT< CandDoubleMap > > neutralHadronToken_
 
std::vector< edm::Handle< CandDoubleMap > > photon_
 
std::vector< edm::Handle< CandDoubleMap > > photonHighThreshold_
 
std::vector< edm::EDGetTokenT< CandDoubleMap > > photonHighThresholdToken_
 
std::vector< edm::EDGetTokenT< CandDoubleMap > > photonToken_
 
std::vector< edm::Handle< CandDoubleMap > > pu_
 
std::vector< edm::EDGetTokenT< CandDoubleMap > > puToken_
 

Detailed Description

Definition at line 25 of file MuPFIsoHelper.h.

Member Typedef Documentation

◆ CandDoubleMap

Definition at line 27 of file MuPFIsoHelper.h.

Constructor & Destructor Documentation

◆ MuPFIsoHelper()

MuPFIsoHelper::MuPFIsoHelper ( const std::map< std::string, edm::ParameterSet > &  labelMap,
edm::ConsumesCollector &&  iC 
)

Definition at line 3 of file MuPFIsoHelper.cc.

4  : labelMap_(labelMap) {
6  for (std::map<std::string, edm::ParameterSet>::const_iterator i = labelMap_.begin(); i != labelMap_.end(); ++i) {
7  chargedParticle_.push_back(nullHandle);
8  chargedHadron_.push_back(nullHandle);
9  neutralHadron_.push_back(nullHandle);
10  neutralHadronHighThreshold_.push_back(nullHandle);
11  photon_.push_back(nullHandle);
12  photonHighThreshold_.push_back(nullHandle);
13  pu_.push_back(nullHandle);
14 
15  chargedParticleToken_.push_back(
16  iC.consumes<CandDoubleMap>(i->second.getParameter<edm::InputTag>("chargedParticle")));
17  chargedHadronToken_.push_back(iC.consumes<CandDoubleMap>(i->second.getParameter<edm::InputTag>("chargedHadron")));
18  neutralHadronToken_.push_back(iC.consumes<CandDoubleMap>(i->second.getParameter<edm::InputTag>("neutralHadron")));
20  iC.consumes<CandDoubleMap>(i->second.getParameter<edm::InputTag>("neutralHadronHighThreshold")));
21  photonToken_.push_back(iC.consumes<CandDoubleMap>(i->second.getParameter<edm::InputTag>("photon")));
22  photonHighThresholdToken_.push_back(
23  iC.consumes<CandDoubleMap>(i->second.getParameter<edm::InputTag>("photonHighThreshold")));
24  puToken_.push_back(iC.consumes<CandDoubleMap>(i->second.getParameter<edm::InputTag>("pu")));
25  }
26 }

References chargedHadron_, chargedHadronToken_, chargedParticle_, chargedParticleToken_, mps_fire::i, labelMap_, neutralHadron_, neutralHadronHighThreshold_, neutralHadronHighThresholdToken_, neutralHadronToken_, photon_, photonHighThreshold_, photonHighThresholdToken_, photonToken_, pu_, and puToken_.

◆ ~MuPFIsoHelper()

MuPFIsoHelper::~MuPFIsoHelper ( )

Definition at line 28 of file MuPFIsoHelper.cc.

28 {}

Member Function Documentation

◆ beginEvent()

void MuPFIsoHelper::beginEvent ( const edm::Event iEvent)

◆ embedPFIsolation()

int MuPFIsoHelper::embedPFIsolation ( reco::Muon muon,
reco::MuonRef muonRef 
)

Definition at line 63 of file MuPFIsoHelper.cc.

63  {
64  unsigned int count = 0;
65  for (std::map<std::string, edm::ParameterSet>::const_iterator i = labelMap_.begin(); i != labelMap_.end(); ++i) {
71  photon_[count],
73  pu_[count]);
74 
75  muon.setPFIsolation(i->first, iso);
76  count++;
77  }
78 
79  return 0;
80 }

References chargedHadron_, chargedParticle_, KineDebug3::count(), mps_fire::i, labelMap_, makeIsoDeposit(), neutralHadron_, neutralHadronHighThreshold_, photon_, photonHighThreshold_, and pu_.

Referenced by MuPFIsoEmbedder::produce(), and MuonProducer::produce().

◆ makeIsoDeposit()

reco::MuonPFIsolation MuPFIsoHelper::makeIsoDeposit ( reco::MuonRef muonRef,
const edm::Handle< CandDoubleMap > &  chargedParticle,
const edm::Handle< CandDoubleMap > &  chargedHadron,
const edm::Handle< CandDoubleMap > &  neutralHadron,
const edm::Handle< CandDoubleMap > &  neutralHadronHighThreshold,
const edm::Handle< CandDoubleMap > &  photon,
const edm::Handle< CandDoubleMap > &  photonHighThreshold,
const edm::Handle< CandDoubleMap > &  pu 
)

Member Data Documentation

◆ chargedHadron_

std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::chargedHadron_
private

Definition at line 49 of file MuPFIsoHelper.h.

Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().

◆ chargedHadronToken_

std::vector<edm::EDGetTokenT<CandDoubleMap> > MuPFIsoHelper::chargedHadronToken_
private

Definition at line 57 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and MuPFIsoHelper().

◆ chargedParticle_

std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::chargedParticle_
private

Definition at line 48 of file MuPFIsoHelper.h.

Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().

◆ chargedParticleToken_

std::vector<edm::EDGetTokenT<CandDoubleMap> > MuPFIsoHelper::chargedParticleToken_
private

Definition at line 56 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and MuPFIsoHelper().

◆ labelMap_

std::map<std::string, edm::ParameterSet> MuPFIsoHelper::labelMap_
private

Definition at line 46 of file MuPFIsoHelper.h.

Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().

◆ neutralHadron_

std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::neutralHadron_
private

Definition at line 50 of file MuPFIsoHelper.h.

Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().

◆ neutralHadronHighThreshold_

std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::neutralHadronHighThreshold_
private

Definition at line 51 of file MuPFIsoHelper.h.

Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().

◆ neutralHadronHighThresholdToken_

std::vector<edm::EDGetTokenT<CandDoubleMap> > MuPFIsoHelper::neutralHadronHighThresholdToken_
private

Definition at line 59 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and MuPFIsoHelper().

◆ neutralHadronToken_

std::vector<edm::EDGetTokenT<CandDoubleMap> > MuPFIsoHelper::neutralHadronToken_
private

Definition at line 58 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and MuPFIsoHelper().

◆ photon_

std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::photon_
private

Definition at line 52 of file MuPFIsoHelper.h.

Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().

◆ photonHighThreshold_

std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::photonHighThreshold_
private

Definition at line 53 of file MuPFIsoHelper.h.

Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().

◆ photonHighThresholdToken_

std::vector<edm::EDGetTokenT<CandDoubleMap> > MuPFIsoHelper::photonHighThresholdToken_
private

Definition at line 61 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and MuPFIsoHelper().

◆ photonToken_

std::vector<edm::EDGetTokenT<CandDoubleMap> > MuPFIsoHelper::photonToken_
private

Definition at line 60 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and MuPFIsoHelper().

◆ pu_

std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::pu_
private

Definition at line 54 of file MuPFIsoHelper.h.

Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().

◆ puToken_

std::vector<edm::EDGetTokenT<CandDoubleMap> > MuPFIsoHelper::puToken_
private

Definition at line 62 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and MuPFIsoHelper().

reco::MuonPFIsolation::sumPhotonEtHighThreshold
float sumPhotonEtHighThreshold
sum pt of PF photons with a higher threshold
Definition: MuonPFIsolation.h:11
muons2muons_cfi.photon
photon
Definition: muons2muons_cfi.py:28
MuPFIsoHelper::puToken_
std::vector< edm::EDGetTokenT< CandDoubleMap > > puToken_
Definition: MuPFIsoHelper.h:62
mps_fire.i
i
Definition: mps_fire.py:355
reco::MuonPFIsolation::sumNeutralHadronEt
float sumNeutralHadronEt
sum pt of neutral hadrons
Definition: MuonPFIsolation.h:8
muon
Definition: MuonCocktails.h:17
reco::MuonPFIsolation::sumNeutralHadronEtHighThreshold
float sumNeutralHadronEtHighThreshold
sum pt of neutral hadrons with a higher threshold
Definition: MuonPFIsolation.h:10
muons2muons_cfi.neutralHadronHighThreshold
neutralHadronHighThreshold
Definition: muons2muons_cfi.py:29
MuPFIsoHelper::neutralHadronToken_
std::vector< edm::EDGetTokenT< CandDoubleMap > > neutralHadronToken_
Definition: MuPFIsoHelper.h:58
MuPFIsoHelper::neutralHadronHighThreshold_
std::vector< edm::Handle< CandDoubleMap > > neutralHadronHighThreshold_
Definition: MuPFIsoHelper.h:51
MuPFIsoHelper::neutralHadronHighThresholdToken_
std::vector< edm::EDGetTokenT< CandDoubleMap > > neutralHadronHighThresholdToken_
Definition: MuPFIsoHelper.h:59
edm::Handle
Definition: AssociativeIterator.h:50
HPSPFTauProducerPuppi_cfi.chargedHadron
chargedHadron
Definition: HPSPFTauProducerPuppi_cfi.py:7
MuPFIsoHelper::chargedParticleToken_
std::vector< edm::EDGetTokenT< CandDoubleMap > > chargedParticleToken_
Definition: MuPFIsoHelper.h:56
MuPFIsoHelper::photonHighThresholdToken_
std::vector< edm::EDGetTokenT< CandDoubleMap > > photonHighThresholdToken_
Definition: MuPFIsoHelper.h:61
MuPFIsoHelper::chargedParticle_
std::vector< edm::Handle< CandDoubleMap > > chargedParticle_
Definition: MuPFIsoHelper.h:48
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
MuPFIsoHelper::chargedHadronToken_
std::vector< edm::EDGetTokenT< CandDoubleMap > > chargedHadronToken_
Definition: MuPFIsoHelper.h:57
MuPFIsoHelper::makeIsoDeposit
reco::MuonPFIsolation makeIsoDeposit(reco::MuonRef &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &, const edm::Handle< CandDoubleMap > &)
Definition: MuPFIsoHelper.cc:30
MuPFIsoHelper::CandDoubleMap
edm::ValueMap< double > CandDoubleMap
Definition: MuPFIsoHelper.h:27
muons2muons_cfi.chargedParticle
chargedParticle
Definition: muons2muons_cfi.py:25
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
MuPFIsoHelper::photonHighThreshold_
std::vector< edm::Handle< CandDoubleMap > > photonHighThreshold_
Definition: MuPFIsoHelper.h:53
iEvent
int iEvent
Definition: GenABIO.cc:224
MuPFIsoHelper::chargedHadron_
std::vector< edm::Handle< CandDoubleMap > > chargedHadron_
Definition: MuPFIsoHelper.h:49
reco::MuonPFIsolation::sumChargedParticlePt
float sumChargedParticlePt
sum-pt of charged Particles(inludes e/mu)
Definition: MuonPFIsolation.h:7
MuPFIsoHelper::pu_
std::vector< edm::Handle< CandDoubleMap > > pu_
Definition: MuPFIsoHelper.h:54
reco::MuonPFIsolation
Definition: MuonPFIsolation.h:5
MuPFIsoHelper::photonToken_
std::vector< edm::EDGetTokenT< CandDoubleMap > > photonToken_
Definition: MuPFIsoHelper.h:60
reco::MuonPFIsolation::sumPUPt
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
Definition: MuonPFIsolation.h:12
MuPFIsoHelper::photon_
std::vector< edm::Handle< CandDoubleMap > > photon_
Definition: MuPFIsoHelper.h:52
reco::MuonPFIsolation::sumPhotonEt
float sumPhotonEt
sum pt of PF photons
Definition: MuonPFIsolation.h:9
muons2muons_cfi.pu
pu
Definition: muons2muons_cfi.py:31
muons2muons_cfi.neutralHadron
neutralHadron
Definition: muons2muons_cfi.py:27
muons2muons_cfi.photonHighThreshold
photonHighThreshold
Definition: muons2muons_cfi.py:30
MuPFIsoHelper::neutralHadron_
std::vector< edm::Handle< CandDoubleMap > > neutralHadron_
Definition: MuPFIsoHelper.h:50
edm::InputTag
Definition: InputTag.h:15
reco::MuonPFIsolation::sumChargedHadronPt
float sumChargedHadronPt
sum-pt of charged Hadron
Definition: MuonPFIsolation.h:6
MuPFIsoHelper::labelMap_
std::map< std::string, edm::ParameterSet > labelMap_
Definition: MuPFIsoHelper.h:46