#include <MuScleFitMuonSelector.h>
Public Member Functions | |
const reco::Candidate * | getStatus1Muon (const reco::Candidate *status3Muon) |
const reco::Candidate * | getStatus3Muon (const reco::Candidate *status3Muon) |
MuScleFitMuonSelector (edm::ConsumesCollector &iC, 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 ()=default | |
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 edm::EDGetTokenT< reco::CaloMuonCollection > | caloMuonToken_ |
const bool | compareToSimTracks_ |
const bool | debug_ |
const edm::EDGetTokenT< edm::HepMCProduct > | evtMCToken_ |
const std::string | genParticlesName_ |
const edm::EDGetTokenT< reco::GenParticleCollection > | genParticleToken_ |
const edm::InputTag | muonLabel_ |
const int | muonType_ |
const edm::EDGetTokenT< pat::CompositeCandidateCollection > | onia2MuMuToken_ |
const bool | PATmuons_ |
const edm::EDGetTokenT< pat::MuonCollection > | patMuonToken_ |
const edm::EDGetTokenT< reco::MuonCollection > | recoMuonToken_ |
const std::vector< int > | resfind_ |
const bool | sherpa_ |
const edm::InputTag | simTracksCollectionName_ |
const edm::EDGetTokenT< edm::SimTrackContainer > | simTrackToken_ |
const bool | speedup_ |
const edm::EDGetTokenT< reco::TrackCollection > | trackCollectionToken_ |
Static Protected Attributes | |
static const double | mMu2 = 0.011163612 |
static const unsigned int | motherPdgIdArray [6] = {23, 100553, 100553, 553, 100443, 443} |
Definition at line 30 of file MuScleFitMuonSelector.h.
|
inline |
Definition at line 32 of file MuScleFitMuonSelector.h.
|
default |
|
inlineprotected |
Template function used to convert the muon collection to a vector of reco::LeafCandidate.
Definition at line 104 of file MuScleFitMuonSelector.h.
References gather_cfg::cout, debug_, mMu2, amptDefaultParameters_cff::mu, HLT_2023v12_cff::muon, PDWG_BPHSkim_cff::muons, mathSSE::sqrt(), HLT_2023v12_cff::track, and pwdgSkimBPark_cfi::tracks.
Referenced by selectMuons().
|
protected |
Definition at line 388 of file MuScleFitMuonSelector.cc.
References funct::abs(), gather_cfg::cout, debug_, AJJGenJetFilter_cfi::genParticles, getStatus1Muon(), GenMuonPair::motherId, motherPdgIdArray, GenMuonPair::mu1, GenMuonPair::mu2, reco::Candidate::p4(), and resfind_.
Referenced by selectGenSimMuons().
|
protected |
Definition at line 346 of file MuScleFitMuonSelector.cc.
References funct::abs(), edm::HepMCProduct::GetEvent(), GenMuonPair::motherId, motherPdgIdArray, GenMuonPair::mu1, GenMuonPair::mu2, resfind_, and sherpa_.
|
protected |
Definition at line 447 of file MuScleFitMuonSelector.cc.
References funct::abs(), GenParticle::GenParticle, edm::HepMCProduct::GetEvent(), runTauDisplay::gp, motherPdgIdArray, resfind_, cscDigiValidation_cfi::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 232 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 mkLumiAveragedPlots::plotter.
|
protected |
Definition at line 288 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, debug_, evtMCToken_, findGenMuFromRes(), AJJGenJetFilter_cfi::genParticles, genParticleToken_, edm::HandleBase::isValid(), mkLumiAveragedPlots::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, caloMuonToken_, reco::LeafCandidate::charge(), gather_cfg::cout, fillMuonCollection(), pat::Muon::innerTrack(), reco::Muon::isGlobalMuon(), reco::Muon::isTrackerMuon(), edm::HandleBase::isValid(), HLT_2023v12_cff::muon, PDWG_BPHSkim_cff::muons, muonType_, onia2MuMuToken_, PATmuons_, patMuonToken_, mkLumiAveragedPlots::plotter, recoMuonToken_, selectGenSimMuons(), selGlobalMuon(), selTrackerMuon(), speedup_, takeSelectedMuonType(), trackCollectionToken_, and pwdgSkimBPark_cfi::tracks.
|
protected |
Definition at line 324 of file MuScleFitMuonSelector.cc.
References gather_cfg::cout, findSimMuFromRes(), mkLumiAveragedPlots::plotter, TrackCandidateProducer_cfi::simTracks, and simTrackToken_.
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 140 of file MuScleFitMuonSelector.h.
References muonType_, and pwdgSkimBPark_cfi::tracks.
Referenced by selectMuons().
|
protected |
Definition at line 174 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 165 of file MuScleFitMuonSelector.h.
|
protected |
Definition at line 168 of file MuScleFitMuonSelector.h.
Referenced by fillMuonCollection(), findGenMuFromRes(), selectGeneratedMuons(), and selectGenSimMuons().
|
protected |
Definition at line 175 of file MuScleFitMuonSelector.h.
Referenced by selectGenSimMuons().
|
protected |
Definition at line 164 of file MuScleFitMuonSelector.h.
|
protected |
Definition at line 176 of file MuScleFitMuonSelector.h.
Referenced by selectGenSimMuons().
|
staticprotected |
Definition at line 179 of file MuScleFitMuonSelector.h.
Referenced by fillMuonCollection().
|
staticprotected |
Definition at line 180 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and findSimMuFromRes().
|
protected |
Definition at line 159 of file MuScleFitMuonSelector.h.
|
protected |
Definition at line 160 of file MuScleFitMuonSelector.h.
Referenced by selectMuons(), and takeSelectedMuonType().
|
protected |
Definition at line 170 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 161 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 172 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 173 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 162 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and findSimMuFromRes().
|
protected |
Definition at line 167 of file MuScleFitMuonSelector.h.
Referenced by findGenMuFromRes(), and selectGenSimMuons().
|
protected |
Definition at line 166 of file MuScleFitMuonSelector.h.
|
protected |
Definition at line 177 of file MuScleFitMuonSelector.h.
Referenced by selectSimulatedMuons().
|
protected |
Definition at line 163 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().
|
protected |
Definition at line 171 of file MuScleFitMuonSelector.h.
Referenced by selectMuons().