![]() |
![]() |
#include <MuPFIsoHelper.h>
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 std::map< std::string, edm::ParameterSet > & | labelMap | ) |
Definition at line 4 of file MuPFIsoHelper.cc.
References chargedHadron_, chargedParticle_, i, labelMap_, neutralHadron_, neutralHadronHighThreshold_, photon_, photonHighThreshold_, and pu_.
: labelMap_(labelMap) { edm::Handle<CandDoubleMap> nullHandle; for(std::map<std::string,edm::ParameterSet>::const_iterator i = labelMap_.begin();i!=labelMap_.end();++i) { chargedParticle_.push_back(nullHandle); chargedHadron_.push_back(nullHandle); neutralHadron_.push_back(nullHandle); neutralHadronHighThreshold_.push_back(nullHandle); photon_.push_back(nullHandle); photonHighThreshold_.push_back(nullHandle); pu_.push_back(nullHandle); } }
MuPFIsoHelper::~MuPFIsoHelper | ( | ) |
Definition at line 25 of file MuPFIsoHelper.cc.
{ }
void MuPFIsoHelper::beginEvent | ( | const edm::Event & | iEvent | ) |
Definition at line 88 of file MuPFIsoHelper.cc.
References chargedHadron_, chargedParticle_, prof2calltree::count, edm::Event::getByLabel(), i, labelMap_, neutralHadron_, neutralHadronHighThreshold_, photon_, photonHighThreshold_, and pu_.
Referenced by MuPFIsoEmbedder::produce(), and MuonProducer::produce().
{ unsigned int count=0; for(std::map<std::string,edm::ParameterSet>::const_iterator i = labelMap_.begin();i!=labelMap_.end();++i) { iEvent.getByLabel(i->second.getParameter<edm::InputTag>("chargedParticle"),chargedParticle_[count]); iEvent.getByLabel(i->second.getParameter<edm::InputTag>("chargedHadron"),chargedHadron_[count]); iEvent.getByLabel(i->second.getParameter<edm::InputTag>("neutralHadron"),neutralHadron_[count]); iEvent.getByLabel(i->second.getParameter<edm::InputTag>("neutralHadronHighThreshold"),neutralHadronHighThreshold_[count]); iEvent.getByLabel(i->second.getParameter<edm::InputTag>("photon"),photon_[count]); iEvent.getByLabel(i->second.getParameter<edm::InputTag>("photonHighThreshold"),photonHighThreshold_[count]); iEvent.getByLabel(i->second.getParameter<edm::InputTag>("pu"),pu_[count]); count++; } }
int MuPFIsoHelper::embedPFIsolation | ( | reco::Muon & | muon, |
reco::MuonRef & | muonRef | ||
) |
Definition at line 65 of file MuPFIsoHelper.cc.
References chargedHadron_, chargedParticle_, prof2calltree::count, i, labelMap_, makeIsoDeposit(), neutralHadron_, neutralHadronHighThreshold_, photon_, photonHighThreshold_, pu_, and reco::Muon::setPFIsolation().
Referenced by MuPFIsoEmbedder::produce(), and MuonProducer::produce().
{ unsigned int count=0; for(std::map<std::string,edm::ParameterSet>::const_iterator i = labelMap_.begin();i!=labelMap_.end();++i) { reco::MuonPFIsolation iso =makeIsoDeposit(muonRef, chargedParticle_[count], chargedHadron_[count], neutralHadron_[count], neutralHadronHighThreshold_[count], photon_[count], photonHighThreshold_[count], pu_[count]); muon.setPFIsolation(i->first,iso); count++; } return 0; }
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 | ||
) |
Definition at line 30 of file MuPFIsoHelper.cc.
References edm::HandleBase::isValid(), reco::MuonPFIsolation::sumChargedHadronPt, reco::MuonPFIsolation::sumChargedParticlePt, reco::MuonPFIsolation::sumNeutralHadronEt, reco::MuonPFIsolation::sumNeutralHadronEtHighThreshold, reco::MuonPFIsolation::sumPhotonEt, reco::MuonPFIsolation::sumPhotonEtHighThreshold, and reco::MuonPFIsolation::sumPUPt.
Referenced by embedPFIsolation().
{ reco::MuonPFIsolation iso; if(chargedParticle.isValid()) iso.sumChargedParticlePt = (*chargedParticle)[muonRef]; if(chargedHadron.isValid()) iso.sumChargedHadronPt = (*chargedHadron)[muonRef]; if(neutralHadron.isValid()) iso.sumNeutralHadronEt = (*neutralHadron)[muonRef]; if(neutralHadronHighThreshold.isValid()) iso.sumNeutralHadronEtHighThreshold = (*neutralHadronHighThreshold)[muonRef]; if(photon.isValid()) iso.sumPhotonEt = (*photon)[muonRef]; if(photonHighThreshold.isValid()) iso.sumPhotonEtHighThreshold = (*photonHighThreshold)[muonRef]; if(pu.isValid()) iso.sumPUPt = (*pu)[muonRef]; return iso; }
std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::chargedHadron_ [private] |
Definition at line 54 of file MuPFIsoHelper.h.
Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().
std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::chargedParticle_ [private] |
Definition at line 53 of file MuPFIsoHelper.h.
Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().
std::map<std::string,edm::ParameterSet> MuPFIsoHelper::labelMap_ [private] |
Definition at line 51 of file MuPFIsoHelper.h.
Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().
std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::neutralHadron_ [private] |
Definition at line 55 of file MuPFIsoHelper.h.
Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().
std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::neutralHadronHighThreshold_ [private] |
Definition at line 56 of file MuPFIsoHelper.h.
Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().
std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::photon_ [private] |
Definition at line 57 of file MuPFIsoHelper.h.
Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().
std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::photonHighThreshold_ [private] |
Definition at line 58 of file MuPFIsoHelper.h.
Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().
std::vector<edm::Handle<CandDoubleMap> > MuPFIsoHelper::pu_ [private] |
Definition at line 59 of file MuPFIsoHelper.h.
Referenced by beginEvent(), embedPFIsolation(), and MuPFIsoHelper().