#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 &) |
MuPFIsoHelper (const edm::ParameterSet &iConfig) | |
~MuPFIsoHelper () | |
Private Attributes | |
edm::Handle< CandDoubleMap > | chargedHadron03_ |
edm::Handle< CandDoubleMap > | chargedHadron04_ |
edm::Handle< CandDoubleMap > | chargedParticle03_ |
edm::Handle< CandDoubleMap > | chargedParticle04_ |
edm::ParameterSet | isoCfg03_ |
edm::ParameterSet | isoCfg04_ |
edm::Handle< CandDoubleMap > | neutralHadron03_ |
edm::Handle< CandDoubleMap > | neutralHadron04_ |
edm::Handle< CandDoubleMap > | photon03_ |
edm::Handle< CandDoubleMap > | photon04_ |
edm::Handle< CandDoubleMap > | pu03_ |
edm::Handle< CandDoubleMap > | pu04_ |
Definition at line 27 of file MuPFIsoHelper.h.
typedef edm::ValueMap<double> MuPFIsoHelper::CandDoubleMap |
Definition at line 29 of file MuPFIsoHelper.h.
MuPFIsoHelper::MuPFIsoHelper | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 4 of file MuPFIsoHelper.cc.
: isoCfg03_(iConfig.getParameter<edm::ParameterSet>("isolationR03")), isoCfg04_(iConfig.getParameter<edm::ParameterSet>("isolationR04")) { }
MuPFIsoHelper::~MuPFIsoHelper | ( | ) |
Definition at line 14 of file MuPFIsoHelper.cc.
{ }
void MuPFIsoHelper::beginEvent | ( | const edm::Event & | iEvent | ) |
Definition at line 83 of file MuPFIsoHelper.cc.
References chargedHadron03_, chargedHadron04_, chargedParticle03_, chargedParticle04_, edm::Event::getByLabel(), edm::ParameterSet::getParameter(), isoCfg03_, isoCfg04_, neutralHadron03_, neutralHadron04_, photon03_, photon04_, pu03_, and pu04_.
Referenced by MuPFIsoEmbedder::produce(), and MuonProducer::produce().
{ iEvent.getByLabel(isoCfg03_.getParameter<edm::InputTag>("chargedParticle"),chargedParticle03_); iEvent.getByLabel(isoCfg03_.getParameter<edm::InputTag>("chargedHadron"),chargedHadron03_); iEvent.getByLabel(isoCfg03_.getParameter<edm::InputTag>("neutralHadron"),neutralHadron03_); iEvent.getByLabel(isoCfg03_.getParameter<edm::InputTag>("photon"),photon03_); iEvent.getByLabel(isoCfg03_.getParameter<edm::InputTag>("pu"),pu03_); iEvent.getByLabel(isoCfg04_.getParameter<edm::InputTag>("chargedParticle"),chargedParticle04_); iEvent.getByLabel(isoCfg04_.getParameter<edm::InputTag>("chargedHadron"),chargedHadron04_); iEvent.getByLabel(isoCfg04_.getParameter<edm::InputTag>("neutralHadron"),neutralHadron04_); iEvent.getByLabel(isoCfg04_.getParameter<edm::InputTag>("photon"),photon04_); iEvent.getByLabel(isoCfg04_.getParameter<edm::InputTag>("pu"),pu04_); }
int MuPFIsoHelper::embedPFIsolation | ( | reco::Muon & | muon, |
reco::MuonRef & | muonRef | ||
) |
Definition at line 20 of file MuPFIsoHelper.cc.
References chargedHadron03_, chargedHadron04_, chargedParticle03_, chargedParticle04_, HiCaloIsolation_cff::isoR3, HiCaloIsolation_cff::isoR4, edm::HandleBase::isValid(), neutralHadron03_, neutralHadron04_, photon03_, photon04_, pu03_, pu04_, reco::Muon::setPFIsolation(), reco::MuonPFIsolation::sumChargedHadronPt, reco::MuonPFIsolation::sumChargedParticlePt, reco::MuonPFIsolation::sumNeutralHadronEt, reco::MuonPFIsolation::sumPhotonEt, and reco::MuonPFIsolation::sumPUPt.
Referenced by MuPFIsoEmbedder::produce(), and MuonProducer::produce().
{ reco::MuonPFIsolation isoR3; if(chargedParticle03_.isValid()) { isoR3.sumChargedParticlePt = (*chargedParticle03_)[muonRef]; } else { return -1;} if(chargedHadron03_.isValid()) { isoR3.sumChargedHadronPt = (*chargedHadron03_)[muonRef]; } else { return -1;} if(neutralHadron03_.isValid()) { isoR3.sumNeutralHadronEt = (*neutralHadron03_)[muonRef]; } else { return -1;} if(photon03_.isValid()) { isoR3.sumPhotonEt = (*photon03_)[muonRef]; } else { return -1;} if(pu03_.isValid()) { isoR3.sumPUPt = (*pu03_)[muonRef]; } else { return -1;} reco::MuonPFIsolation isoR4; if(chargedParticle04_.isValid()) { isoR4.sumChargedParticlePt = (*chargedParticle04_)[muonRef]; } else { return -1;} if(chargedHadron04_.isValid()) { isoR4.sumChargedHadronPt = (*chargedHadron04_)[muonRef]; } else { return -1;} if(neutralHadron04_.isValid()) { isoR4.sumNeutralHadronEt = (*neutralHadron04_)[muonRef]; } else { return -1;} if(photon04_.isValid()) { isoR4.sumPhotonEt = (*photon04_)[muonRef]; } else { return -1;} if(pu04_.isValid()) { isoR4.sumPUPt = (*pu04_)[muonRef]; } else { return -1;} muon.setPFIsolation(isoR3,isoR4); return 0; }
Definition at line 45 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().
Definition at line 51 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().
Definition at line 44 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().
Definition at line 50 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().
edm::ParameterSet MuPFIsoHelper::isoCfg03_ [private] |
Definition at line 40 of file MuPFIsoHelper.h.
Referenced by beginEvent().
edm::ParameterSet MuPFIsoHelper::isoCfg04_ [private] |
Definition at line 41 of file MuPFIsoHelper.h.
Referenced by beginEvent().
Definition at line 46 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().
Definition at line 52 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().
edm::Handle<CandDoubleMap> MuPFIsoHelper::photon03_ [private] |
Definition at line 47 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().
edm::Handle<CandDoubleMap> MuPFIsoHelper::photon04_ [private] |
Definition at line 53 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().
edm::Handle<CandDoubleMap> MuPFIsoHelper::pu03_ [private] |
Definition at line 48 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().
edm::Handle<CandDoubleMap> MuPFIsoHelper::pu04_ [private] |
Definition at line 54 of file MuPFIsoHelper.h.
Referenced by beginEvent(), and embedPFIsolation().