#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 edm::HepMCProduct *evtMC) |
GenMuonPair | findGenMuFromRes (const reco::GenParticleCollection *genParticles) |
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 31 of file MuScleFitMuonSelector.h.
|
inline |
Definition at line 51 of file MuScleFitMuonSelector.h.
|
inlineprotected |
Template function used to convert the muon collection to a vector of reco::LeafCandidate.
Definition at line 94 of file MuScleFitMuonSelector.h.
References gather_cfg::cout, debug_, mMu2, amptDefaultParameters_cff::mu, HLT_FULL_cff::muon, PDWG_BPHSkim_cff::muons, mathSSE::sqrt(), HLT_FULL_cff::track, and PDWG_EXOHSCP_cff::tracks.
Referenced by selectMuons().
|
protected |
Definition at line 355 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 397 of file MuScleFitMuonSelector.cc.
References funct::abs(), gather_cfg::cout, debug_, genParticles2HepMC_cfi::genParticles, getStatus1Muon(), ires, GenMuonPair::motherId, motherPdgIdArray, GenMuonPair::mu1, GenMuonPair::mu2, reco::Candidate::p4(), and resfind_.
Referenced by selectGenSimMuons().
|
protected |
Definition at line 456 of file MuScleFitMuonSelector.cc.
References funct::abs(), GenParticle::GenParticle, edm::HepMCProduct::GetEvent(), runTauDisplay::gp, ires, motherPdgIdArray, resfind_, muonSimHitMatcherPSet::simTrack, and TrackCandidateProducer_cfi::simTracks.
Referenced by selectSimulatedMuons().
const reco::Candidate * MuScleFitMuonSelector::getStatus1Muon | ( | const reco::Candidate * | status3Muon | ) |
Definition at line 9 of file MuScleFitMuonSelector.cc.
References reco::Candidate::daughter(), mps_fire::i, reco::Candidate::numberOfDaughters(), and reco::Candidate::pdgId().
Referenced by findGenMuFromRes().
const reco::Candidate * MuScleFitMuonSelector::getStatus3Muon | ( | const reco::Candidate * | status3Muon | ) |
Definition at line 32 of file MuScleFitMuonSelector.cc.
References reco::Candidate::daughter(), mps_fire::i, reco::Candidate::numberOfDaughters(), and reco::Candidate::pdgId().
|
protected |
For PATmuons the generator information is read directly from the PAT object.
Definition at line 237 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, debug_, edm::Ref< C, T, F >::get(), edm::Ref< C, T, F >::isAvailable(), trackerHitRTTI::isMatched(), objects.autophobj::motherId, and trackingPlots::plotter.
|
protected |
Definition at line 293 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, debug_, findGenMuFromRes(), genParticles2HepMC_cfi::genParticles, genParticlesName_, edm::HandleBase::isValid(), trackingPlots::plotter, 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 85 of file MuScleFitMuonSelector.cc.
References allMuons_cfi::allMuons, mergedMuons_cfi::caloMuons, reco::LeafCandidate::charge(), gather_cfg::cout, fillMuonCollection(), pat::Muon::innerTrack(), reco::Muon::isGlobalMuon(), reco::Muon::isTrackerMuon(), edm::HandleBase::isValid(), HLT_FULL_cff::muon, muonLabel_, PDWG_BPHSkim_cff::muons, muonType_, PATmuons_, trackingPlots::plotter, selectGenSimMuons(), selGlobalMuon(), selTrackerMuon(), speedup_, takeSelectedMuonType(), and PDWG_EXOHSCP_cff::tracks.
|
protected |
Definition at line 332 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, findSimMuFromRes(), trackingPlots::plotter, TrackCandidateProducer_cfi::simTracks, and simTracksCollectionName_.
Referenced by selectGenSimMuons().
|
protected |
Apply the Onia cuts to select globalMuons.
Definition at line 54 of file MuScleFitMuonSelector.cc.
References funct::abs(), pat::Muon::globalTrack(), pat::Muon::innerTrack(), pat::Muon::muonID(), AlCaHLTBitMon_ParallelJobs::p, and submitPVResolutionJobs::q.
Referenced by selectMuons().
|
protected |
Apply the Onia cuts to select trackerMuons.
Definition at line 70 of file MuScleFitMuonSelector.cc.
References funct::abs(), pat::Muon::innerTrack(), pat::Muon::muonID(), and AlCaHLTBitMon_ParallelJobs::p.
Referenced by selectMuons().
|
inlineprotected |
Template function used to extract the selected muon type from the muon collection.
Definition at line 130 of file MuScleFitMuonSelector.h.
References muonType_, and PDWG_EXOHSCP_cff::tracks.
Referenced by selectMuons().
|
protected |
Definition at line 155 of file MuScleFitMuonSelector.h.
|
protected |
Definition at line 158 of file MuScleFitMuonSelector.h.
Referenced by fillMuonCollection(), findGenMuFromRes(), selectGeneratedMuons(), and selectGenSimMuons().
|
protected |
Definition at line 154 of file MuScleFitMuonSelector.h.
Referenced by selectGenSimMuons().
|
staticprotected |
Definition at line 159 of file MuScleFitMuonSelector.h.
Referenced by fillMuonCollection().
|
staticprotected |
Definition at line 160 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and findSimMuFromRes().
|
protected |
Definition at line 149 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 150 of file MuScleFitMuonSelector.h.
Referenced by selectMuons(), and takeSelectedMuonType().
|
protected |
Definition at line 151 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 152 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and findSimMuFromRes().
|
protected |
Definition at line 157 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and selectGenSimMuons().
|
protected |
Definition at line 156 of file MuScleFitMuonSelector.h.
Referenced by selectSimulatedMuons().
|
protected |
Definition at line 153 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().