#include <MuScleFitMuonSelector.h>
Public Member Functions | |
const reco::Candidate * | getStatus1Muon (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.
|
inlineprotected |
Template function used to convert the muon collection to a vector of reco::LeafCandidate.
Definition at line 87 of file MuScleFitMuonSelector.h.
References gather_cfg::cout, debug_, mMu2, RPCpg::mu, metsig::muon, patZpeak::muons, and mathSSE::sqrt().
Referenced by selectMuons().
|
protected |
Definition at line 395 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, debug_, getStatus1Muon(), ires, motherPdgIdArray, GenMuonPair::mu1, GenMuonPair::mu2, reco::Candidate::p4(), and resfind_.
Referenced by selectGenSimMuons().
|
protected |
Definition at line 352 of file MuScleFitMuonSelector.cc.
References edm::HepMCProduct::GetEvent(), ires, GenMuonPair::motherId, motherPdgIdArray, GenMuonPair::mu1, GenMuonPair::mu2, resfind_, and sherpa_.
|
protected |
Definition at line 437 of file MuScleFitMuonSelector.cc.
References configurableAnalysis::GenParticle, ires, motherPdgIdArray, and resfind_.
Referenced by selectSimulatedMuons().
const reco::Candidate * MuScleFitMuonSelector::getStatus1Muon | ( | const reco::Candidate * | status3Muon | ) |
Definition at line 10 of file MuScleFitMuonSelector.cc.
References reco::Candidate::daughter(), i, reco::Candidate::numberOfDaughters(), reco::Candidate::pdgId(), reco::Candidate::status(), and ntuplemaker::status.
Referenced by findGenMuFromRes().
|
protected |
For PATmuons the generator information is read directly from the PAT object.
Definition at line 229 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, debug_, MuScleFitPlotter::fillGen(), edm::Ref< C, T, F >::get(), edm::Ref< C, T, F >::isAvailable(), and trackerHitRTTI::isMatched().
Referenced by selectMuons().
|
protected |
Definition at line 289 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, debug_, MuScleFitPlotter::fillGen(), findGenMuFromRes(), genParticleCandidates2GenParticles_cfi::genParticles, genParticlesName_, edm::HandleBase::isValid(), edm::Handle< T >::product(), selectSimulatedMuons(), and sherpa_.
Referenced by selectMuons().
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 69 of file MuScleFitMuonSelector.cc.
References allMuons_cfi::allMuons, 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_, selectGeneratedMuons(), selectGenSimMuons(), selGlobalMuon(), selTrackerMuon(), speedup_, takeSelectedMuonType(), testEve_cfg::tracks, and pat::PATObject< ObjectType >::userFloat().
|
protected |
Definition at line 328 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, MuScleFitPlotter::fillGenSim(), MuScleFitPlotter::fillSim(), findSimMuFromRes(), edm::HandleBase::isValid(), and simTracksCollectionName_.
Referenced by selectGenSimMuons().
|
protected |
Apply the Onia cuts to select globalMuons.
Definition at line 29 of file MuScleFitMuonSelector.cc.
References pat::Muon::globalTrack(), pat::Muon::innerTrack(), pat::Muon::muonID(), reco::HitPattern::numberOfValidMuonHits(), AlCaHLTBitMon_ParallelJobs::p, reco::HitPattern::pixelLayersWithMeasurement(), and lumiQueryAPI::q.
Referenced by selectMuons().
|
protected |
Apply the Onia cuts to select trackerMuons.
Definition at line 50 of file MuScleFitMuonSelector.cc.
References pat::Muon::innerTrack(), pat::Muon::muonID(), AlCaHLTBitMon_ParallelJobs::p, and reco::HitPattern::pixelLayersWithMeasurement().
Referenced by selectMuons().
|
inlineprotected |
Template function used to extract the selected muon type from the muon collection.
Definition at line 127 of file MuScleFitMuonSelector.h.
References muonType_.
Referenced by selectMuons().
|
protected |
Definition at line 153 of file MuScleFitMuonSelector.h.
|
protected |
Definition at line 156 of file MuScleFitMuonSelector.h.
Referenced by fillMuonCollection(), findGenMuFromRes(), selectGeneratedMuons(), and selectGenSimMuons().
|
protected |
Definition at line 152 of file MuScleFitMuonSelector.h.
Referenced by selectGenSimMuons().
|
staticprotected |
Definition at line 157 of file MuScleFitMuonSelector.h.
Referenced by fillMuonCollection().
|
staticprotected |
Definition at line 158 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and findSimMuFromRes().
|
protected |
Definition at line 147 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 148 of file MuScleFitMuonSelector.h.
Referenced by selectMuons(), and takeSelectedMuonType().
|
protected |
Definition at line 149 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 150 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and findSimMuFromRes().
|
protected |
Definition at line 155 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and selectGenSimMuons().
|
protected |
Definition at line 154 of file MuScleFitMuonSelector.h.
Referenced by selectSimulatedMuons().
|
protected |
Definition at line 151 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().