#include <MuScleFitMuonSelector.h>
Public Member Functions | |
const reco::Candidate * | getStatus1Muon (const reco::Candidate *status3Muon) |
const reco::Candidate * | getStatus3Muon (const reco::Candidate *status3Muon) |
MuScleFitMuonSelector (const edm::InputTag &muonLabel, const int muonType, const bool PATmuons, const std::vector< int > &resfind, const bool speedup, const std::string &genParticlesName, const bool compareToSimTracks, const edm::InputTag &simTracksCollectionName, const bool sherpa, const bool debug) | |
void | selectMuons (const edm::Event &event, std::vector< MuScleFitMuon > &muons, std::vector< GenMuonPair > &genPair, std::vector< std::pair< lorentzVector, lorentzVector > > &simPair, MuScleFitPlotter *plotter) |
Main method used to select muons of type specified by muonType_ from the collection specified by muonLabel_ and PATmuons_. More... | |
~MuScleFitMuonSelector () | |
Protected Member Functions | |
template<typename T > | |
std::vector< MuScleFitMuon > | fillMuonCollection (const std::vector< T > &tracks) |
Template function used to convert the muon collection to a vector of reco::LeafCandidate. More... | |
GenMuonPair | findGenMuFromRes (const reco::GenParticleCollection *genParticles) |
GenMuonPair | findGenMuFromRes (const edm::HepMCProduct *evtMC) |
std::pair< lorentzVector, lorentzVector > | findSimMuFromRes (const edm::Handle< edm::HepMCProduct > &evtMC, const edm::Handle< edm::SimTrackContainer > &simTracks) |
void | selectGeneratedMuons (const edm::Handle< pat::CompositeCandidateCollection > &collAll, const std::vector< const pat::Muon * > &collMuSel, std::vector< GenMuonPair > &genPair, MuScleFitPlotter *plotter) |
For PATmuons the generator information is read directly from the PAT object. More... | |
void | selectGenSimMuons (const edm::Event &event, std::vector< GenMuonPair > &genPair, std::vector< std::pair< lorentzVector, lorentzVector > > &simPair, MuScleFitPlotter *plotter) |
void | selectSimulatedMuons (const edm::Event &event, const bool ifHepMC, edm::Handle< edm::HepMCProduct > evtMC, std::vector< std::pair< lorentzVector, lorentzVector > > &simPair, MuScleFitPlotter *plotter) |
bool | selGlobalMuon (const pat::Muon *aMuon) |
Apply the Onia cuts to select globalMuons. More... | |
bool | selTrackerMuon (const pat::Muon *aMuon) |
Apply the Onia cuts to select trackerMuons. More... | |
template<typename T > | |
void | takeSelectedMuonType (const T &muon, std::vector< reco::Track > &tracks) |
Template function used to extract the selected muon type from the muon collection. More... | |
Protected Attributes | |
const bool | compareToSimTracks_ |
const bool | debug_ |
const std::string | genParticlesName_ |
const edm::InputTag | muonLabel_ |
const int | muonType_ |
const bool | PATmuons_ |
const std::vector< int > | resfind_ |
const bool | sherpa_ |
const edm::InputTag | simTracksCollectionName_ |
const bool | speedup_ |
Static Protected Attributes | |
static const double | mMu2 = 0.011163612 |
static const unsigned int | motherPdgIdArray [6] = {23, 100553, 100553, 553, 100443, 443} |
Definition at line 29 of file MuScleFitMuonSelector.h.
|
inline |
Definition at line 32 of file MuScleFitMuonSelector.h.
|
inline |
Definition at line 48 of file MuScleFitMuonSelector.h.
References findGenMuFromRes(), findSimMuFromRes(), GenHFHadronMatcher_cfi::genParticles, getStatus1Muon(), getStatus3Muon(), nano_cff::muons, trackingPlots::plotter, selectGeneratedMuons(), selectGenSimMuons(), selectMuons(), selectSimulatedMuons(), selGlobalMuon(), selTrackerMuon(), and tkConvValidator_cfi::simTracks.
|
inlineprotected |
Template function used to convert the muon collection to a vector of reco::LeafCandidate.
Definition at line 90 of file MuScleFitMuonSelector.h.
References gather_cfg::cout, debug_, mMu2, RPCpg::mu, metsig::muon, nano_cff::muons, mathSSE::sqrt(), and HiIsolationCommonParameters_cff::track.
Referenced by selectMuons().
|
protected |
Definition at line 418 of file MuScleFitMuonSelector.cc.
References funct::abs(), gather_cfg::cout, debug_, getStatus1Muon(), ires, GenMuonPair::motherId, motherPdgIdArray, GenMuonPair::mu1, GenMuonPair::mu2, reco::Candidate::p4(), and resfind_.
Referenced by selectGenSimMuons(), and ~MuScleFitMuonSelector().
|
protected |
Definition at line 375 of file MuScleFitMuonSelector.cc.
References funct::abs(), edm::HepMCProduct::GetEvent(), ires, GenMuonPair::motherId, motherPdgIdArray, GenMuonPair::mu1, GenMuonPair::mu2, resfind_, and sherpa_.
|
protected |
Definition at line 468 of file MuScleFitMuonSelector.cc.
References funct::abs(), GenParticle::GenParticle, edm::HepMCProduct::GetEvent(), runTauDisplay::gp, ires, motherPdgIdArray, resfind_, and simTrackMatching_cfi::simTrack.
Referenced by selectSimulatedMuons(), and ~MuScleFitMuonSelector().
const reco::Candidate * MuScleFitMuonSelector::getStatus1Muon | ( | const reco::Candidate * | status3Muon | ) |
Definition at line 10 of file MuScleFitMuonSelector.cc.
References reco::Candidate::daughter(), mps_fire::i, reco::Candidate::numberOfDaughters(), and reco::Candidate::pdgId().
Referenced by findGenMuFromRes(), and ~MuScleFitMuonSelector().
const reco::Candidate * MuScleFitMuonSelector::getStatus3Muon | ( | const reco::Candidate * | status3Muon | ) |
Definition at line 30 of file MuScleFitMuonSelector.cc.
References reco::Candidate::daughter(), mps_fire::i, reco::Candidate::numberOfDaughters(), and reco::Candidate::pdgId().
Referenced by ~MuScleFitMuonSelector().
|
protected |
For PATmuons the generator information is read directly from the PAT object.
Definition at line 252 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, debug_, MuScleFitPlotter::fillGen(), edm::Ref< C, T, F >::get(), edm::Ref< C, T, F >::isAvailable(), trackerHitRTTI::isMatched(), objects.autophobj::motherId, and nullptr.
Referenced by ~MuScleFitMuonSelector().
|
protected |
Definition at line 312 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, debug_, MuScleFitPlotter::fillGen(), findGenMuFromRes(), GenHFHadronMatcher_cfi::genParticles, genParticlesName_, edm::HandleBase::isValid(), edm::Handle< T >::product(), selectSimulatedMuons(), and sherpa_.
Referenced by selectMuons(), and ~MuScleFitMuonSelector().
void MuScleFitMuonSelector::selectMuons | ( | const edm::Event & | event, |
std::vector< MuScleFitMuon > & | muons, | ||
std::vector< GenMuonPair > & | genPair, | ||
std::vector< std::pair< lorentzVector, lorentzVector > > & | simPair, | ||
MuScleFitPlotter * | plotter | ||
) |
Main method used to select muons of type specified by muonType_ from the collection specified by muonLabel_ and PATmuons_.
Definition at line 90 of file MuScleFitMuonSelector.cc.
References allMuons_cfi::allMuons, mergedMuons_cfi::caloMuons, reco::LeafCandidate::charge(), gather_cfg::cout, reco::CompositeCandidate::daughter(), fillMuonCollection(), MuScleFitPlotter::fillRec(), pat::Muon::innerTrack(), reco::Muon::isGlobalMuon(), reco::Muon::isTrackerMuon(), edm::HandleBase::isValid(), metsig::muon, muonLabel_, muonType_, PATmuons_, selectGenSimMuons(), selGlobalMuon(), selTrackerMuon(), speedup_, takeSelectedMuonType(), l1t::tracks, and pat::PATObject< ObjectType >::userFloat().
Referenced by ~MuScleFitMuonSelector().
|
protected |
Definition at line 351 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, MuScleFitPlotter::fillGenSim(), MuScleFitPlotter::fillSim(), findSimMuFromRes(), edm::HandleBase::isValid(), tkConvValidator_cfi::simTracks, and simTracksCollectionName_.
Referenced by selectGenSimMuons(), and ~MuScleFitMuonSelector().
|
protected |
Apply the Onia cuts to select globalMuons.
Definition at line 50 of file MuScleFitMuonSelector.cc.
References funct::abs(), pat::Muon::globalTrack(), pat::Muon::innerTrack(), pat::Muon::muonID(), reco::HitPattern::numberOfValidMuonHits(), AlCaHLTBitMon_ParallelJobs::p, reco::HitPattern::pixelLayersWithMeasurement(), and lumiQueryAPI::q.
Referenced by selectMuons(), and ~MuScleFitMuonSelector().
|
protected |
Apply the Onia cuts to select trackerMuons.
Definition at line 71 of file MuScleFitMuonSelector.cc.
References funct::abs(), pat::Muon::innerTrack(), pat::Muon::muonID(), AlCaHLTBitMon_ParallelJobs::p, and reco::HitPattern::pixelLayersWithMeasurement().
Referenced by selectMuons(), and ~MuScleFitMuonSelector().
|
inlineprotected |
Template function used to extract the selected muon type from the muon collection.
Definition at line 130 of file MuScleFitMuonSelector.h.
References muonType_.
Referenced by selectMuons().
|
protected |
Definition at line 156 of file MuScleFitMuonSelector.h.
|
protected |
Definition at line 159 of file MuScleFitMuonSelector.h.
Referenced by fillMuonCollection(), findGenMuFromRes(), selectGeneratedMuons(), and selectGenSimMuons().
|
protected |
Definition at line 155 of file MuScleFitMuonSelector.h.
Referenced by selectGenSimMuons().
|
staticprotected |
Definition at line 160 of file MuScleFitMuonSelector.h.
Referenced by fillMuonCollection().
|
staticprotected |
Definition at line 161 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and findSimMuFromRes().
|
protected |
Definition at line 150 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 151 of file MuScleFitMuonSelector.h.
Referenced by selectMuons(), and takeSelectedMuonType().
|
protected |
Definition at line 152 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 153 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and findSimMuFromRes().
|
protected |
Definition at line 158 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and selectGenSimMuons().
|
protected |
Definition at line 157 of file MuScleFitMuonSelector.h.
Referenced by selectSimulatedMuons().
|
protected |
Definition at line 154 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().