Definition at line 79 of file MuonWithPFIsoProducer.cc.
References reco::Muon::clone(), DEFINE_FWK_MODULE, boostedElectronIsolation_cff::deltaR, reco::PFCandidate::e, reco::PFCandidate::egamma_HF, reco::MuonIsolation::emEt, reco::MuonIsolation::emVetoEt, reco::PFCandidate::gamma, gammaIsoVeto_, edm::Event::getByToken(), reco::PFCandidate::h, reco::PFCandidate::h0, reco::PFCandidate::h_HF, reco::MuonIsolation::hadEt, reco::MuonIsolation::hadVetoEt, mps_fire::i, reco::Muon::innerTrack(), edm::Ref< C, T, F >::isNonnull(), reco::LeafCandidate::momentum(), eostools::move(), RPCpg::mu, reco::PFCandidate::mu, HiRecoMuon_cff::muonCollection, muonToken_, neutralHadronIsoVeto_, MuonAlignmentFromReference_cff::newmuons, reco::MuonIsolation::nTracks, reco::PFCandidate::particleId(), packedPFCandidateRefMixer_cfi::pf, pfToken_, reco::LeafCandidate::pt(), edm::Event::put(), reco::Muon::setIsolation(), reco::MuonIsolation::sumPt, reco::MuonIsolation::trackerVetoPt, trackIsoVeto_, reco::PFCandidate::trackRef(), and usePfMuonsOnly_.
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
87 edm::LogError(
"") <<
">>> Muon collection does not exist !!!";
95 edm::LogError(
"") <<
">>> PFCandidate collection does not exist !!!";
106 unsigned int muonCollectionSize = muonCollection->size();
107 unsigned int pfCollectionSize = pfCollection->size();
108 for (
unsigned int i=0;
i<muonCollectionSize;
i++) {
112 bool muonFound =
false;
122 for (
unsigned int j=0; j<pfCollectionSize; j++) {
126 bool thisIsTheMuon =
false;
128 thisIsTheMuon =
true;
134 if (deltaR>0.5)
continue;
159 if (deltaR<0.3) iso03.
emEt += pf->
pt();
169 if (deltaR<0.3) iso03.
hadEt += pf->
pt();
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
float sumPt
sum-pt of tracks
virtual TrackRef innerTrack() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
float hadVetoEt
hcal sum-et in the veto region in r-phi
double pt() const final
transverse momentum
std::vector< Muon > MuonCollection
collection of Muon objects
reco::TrackRef trackRef() const
Vector momentum() const final
spatial momentum vector
int nTracks
number of tracks in the cone (excluding veto region)
float emVetoEt
ecal sum-et in the veto region in r-phi
edm::EDGetTokenT< edm::View< reco::PFCandidate > > pfToken_
double neutralHadronIsoVeto_
void setIsolation(const MuonIsolation &isoR03, const MuonIsolation &isoR05)
virtual ParticleType particleId() const
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
Muon * clone() const override
create a clone
float trackerVetoPt
(sum-)pt inside the veto region in r-phi