class definition More...
#include "PhysicsTools/PatAlgos/interface/PATMuonProducer.h"
Public Member Functions | |
PATMuonProducer (const edm::ParameterSet &iConfig) | |
default constructir More... | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override |
everything that needs to be done during the event loop More... | |
~PATMuonProducer () override | |
default destructur More... | |
Public Member Functions inherited from edm::stream::EDProducer<> | |
EDProducer ()=default | |
bool | hasAbilityToProduceInLumis () const final |
bool | hasAbilityToProduceInRuns () const final |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
description of config file parameters More... | |
Private Types | |
typedef std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > | GenAssociations |
typedef std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > | IsoDepositMaps |
typedef std::pair< pat::IsolationKeys, edm::InputTag > | IsolationLabel |
typedef std::vector< IsolationLabel > | IsolationLabels |
typedef std::vector< edm::Handle< edm::ValueMap< double > > > | IsolationValueMaps |
typedef edm::RefToBase< reco::Muon > | MuonBaseRef |
typedefs for convenience More... | |
Private Member Functions | |
void | embedHighLevel (pat::Muon &aMuon, reco::TrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid) |
void | fillMuon (Muon &aMuon, const MuonBaseRef &muonRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const |
common muon filling, for both the standard and PF2PAT case More... | |
double | getRelMiniIsoPUCorrected (const pat::Muon &muon, float rho) |
template<typename T > | |
void | readIsolationLabels (const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens) |
double | relMiniIsoPUCorrected (const pat::Muon &aMuon, double rho) |
void | setMuonMiniIso (pat::Muon &aMuon, const pat::PackedCandidateCollection *pc) |
Additional Inherited Members | |
Public Types inherited from edm::stream::EDProducer<> | |
typedef CacheContexts< T... > | CacheTypes |
typedef CacheTypes::GlobalCache | GlobalCache |
typedef AbilityChecker< T... > | HasAbility |
typedef CacheTypes::LuminosityBlockCache | LuminosityBlockCache |
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > | LuminosityBlockContext |
typedef CacheTypes::LuminosityBlockSummaryCache | LuminosityBlockSummaryCache |
typedef CacheTypes::RunCache | RunCache |
typedef RunContextT< RunCache, GlobalCache > | RunContext |
typedef CacheTypes::RunSummaryCache | RunSummaryCache |
class definition
Produces pat::Muon's.
The PATMuonProducer produces analysis-level pat::Muon's starting from a collection of objects of reco::Muon.
Definition at line 44 of file PATMuonProducer.h.
|
private |
Definition at line 59 of file PATMuonProducer.h.
|
private |
Definition at line 60 of file PATMuonProducer.h.
|
private |
Definition at line 62 of file PATMuonProducer.h.
|
private |
Definition at line 63 of file PATMuonProducer.h.
|
private |
Definition at line 61 of file PATMuonProducer.h.
|
private |
typedefs for convenience
Definition at line 58 of file PATMuonProducer.h.
|
explicit |
default constructir
Definition at line 56 of file PATMuonProducer.cc.
References addEfficiencies_, addGenMatch_, addPuppiIsolation_, addResolutions_, beamLineToken_, caloMETMuonCorrsToken_, computeMiniIso_, computeMuonMVA_, computeSoftMuonMVA_, efficiencyLoader_, embedBestTrack_, embedCaloMETMuonCorrs_, embedCombinedMuon_, embedDytMuon_, embedGenMatch_, embedHighLevelSelection_, embedPFCandidate_, embedPfEcalEnergy_, embedPickyMuon_, embedStandAloneMuon_, embedTcMETMuonCorrs_, embedTpfmsMuon_, embedTrack_, embedTunePBestTrack_, Exception, edm::ParameterSet::existsAs(), forceEmbedBestTrack_, edm::FileInPath::fullPath(), genMatchTokens_, edm::ParameterSet::getParameter(), pat::SoftMuonMvaEstimator::initialize(), pat::MuonMvaEstimator::initialize(), isoDepositLabels_, isoDepositTokens_, isolationValueLabels_, isolationValueTokens_, miniIsoParams_, muonToken_, mvaBTagCollectionTag_, mvaDrMax_, mvaEstimator_, mvaL1Corrector_, mvaL1L2L3ResCorrector_, mvaTrainingFile_, mvaUseJec_, pcToken_, pfMuonToken_, PUPPIIsolation_charged_hadrons_, PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_photons_, PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_photons_, pvToken_, readIsolationLabels(), recomputeBasicSelectors_, resolutionLoader_, rho_, simInfo_, softMvaEstimator_, softMvaTrainingFile_, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, tcMETMuonCorrsToken_, useParticleFlow_, userDataHelper_, useUserData_, and edm::vector_transform().
|
override |
|
private |
Definition at line 803 of file PATMuonProducer.cc.
References pat::Muon::BS2D, pat::Muon::BS3D, DEFINE_FWK_MODULE, reco::BeamSpot::position(), reco::Vertex::position(), pat::Muon::PV2D, pat::Muon::PV3D, pat::Muon::PVDZ, mps_fire::result, reco::BeamSpot::rotatedCovariance3D(), pat::Muon::setDB(), IPTools::signedImpactParameter3D(), IPTools::signedTransverseImpactParameter(), and reco::Vertex::zError().
Referenced by produce().
|
static |
description of config file parameters
Definition at line 691 of file PATMuonProducer.cc.
References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addNode(), edm::ParameterSetDescription::addOptional(), pat::helper::KinResolutionsLoader::fillDescription(), pat::PATUserDataHelper< ObjectType >::fillDescription(), edm::ParameterSetDescription::ifValue(), or, edm::ParameterSetDescription::setAllowAnything(), edm::ParameterSetDescription::setComment(), and edm::ParameterDescriptionNode::setComment().
|
private |
common muon filling, for both the standard and PF2PAT case
Definition at line 596 of file PATMuonProducer.cc.
References addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), edm::contains(), reco::Muon::DYT, efficiencyLoader_, embedBestTrack_, pat::Muon::embedCombinedMuon(), embedCombinedMuon_, pat::Muon::embedDytMuon(), embedDytMuon_, embedGenMatch_, pat::PATObject< ObjectType >::embedGenParticle(), pat::Muon::embedMuonBestTrack(), pat::Muon::embedPickyMuon(), embedPickyMuon_, pat::Muon::embedStandAloneMuon(), embedStandAloneMuon_, pat::Muon::embedTpfmsMuon(), embedTpfmsMuon_, pat::Muon::embedTrack(), embedTrack_, embedTunePBestTrack_, pat::Muon::embedTunePMuonBestTrack(), pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), plotBeamSpotDB::first, forceEmbedBestTrack_, mps_fire::i, edm::RefToBase< T >::id(), reco::Muon::isAValidMuonTrack(), reco::Muon::isGlobalMuon(), isoDepositLabels_, isolationValueLabels_, gen::n, pat::Muon::pfCandidateRef(), reco::Muon::Picky, resolutionLoader_, pat::helper::EfficiencyLoader::setEfficiencies(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), reco::LeafCandidate::setP4(), pat::helper::KinResolutionsLoader::setResolutions(), source, reco::Muon::TPFMS, and useParticleFlow_.
Referenced by produce().
|
private |
Definition at line 681 of file PATMuonProducer.cc.
References MTVHistoProducerAlgoForTrackerBlock_cfi::maxdr, MTVHistoProducerAlgoForTrackerBlock_cfi::mindr, pat::miniIsoDr(), miniIsoParams_, pat::Lepton< LeptonType >::miniPFIsolation(), pat::muonRelMiniIsoPUCorrected(), and reco::LeafCandidate::p4().
Referenced by produce().
|
override |
everything that needs to be done during the event loop
Definition at line 188 of file PATMuonProducer.cc.
References addGenMatch_, addPuppiIsolation_, beamLineToken_, ecalDrivenElectronSeedsParameters_cff::beamSpot, pat::helper::MultiIsolator::beginEvent(), pat::Muon::BS2D, TransientTrackBuilder::build(), muonProducer_cfi::caloMETMuonCorrs, caloMETMuonCorrsToken_, computeMiniIso_, computeMuonMVA_, pat::SoftMuonMvaEstimator::computeMva(), pat::MuonMvaEstimator::computeMva(), computeSoftMuonMVA_, CandIsolatorFromDeposits_cfi::deposits, PVValHelper::dz, reco::PFCandidate::ecalEnergy(), efficiencyLoader_, pat::Muon::embedCaloMETMuonCorrs(), embedCaloMETMuonCorrs_, embedCombinedMuon_, embedGenMatch_, embedHighLevel(), embedHighLevelSelection_, pat::Muon::embedPFCandidate(), embedPFCandidate_, embedPfEcalEnergy_, pat::Muon::embedTcMETMuonCorrs(), embedTcMETMuonCorrs_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), pat::helper::MultiIsolator::enabled(), pat::helper::MultiIsolator::endEvent(), pat::helper::MultiIsolator::fill(), fillMuon(), genMatchTokens_, edm::EventSetup::get(), edm::Event::getByToken(), getRelMiniIsoPUCorrected(), cutBasedMuonId_MuonPOG_V0_cff::globalTrack, mps_fire::i, training_settings::idx, pat::Muon::initSimInfo(), susybsm::HSCParticleType::innerTrack, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), isoDepositTokens_, electronProducer_cff::isolationValues, isolationValueTokens_, isolator_, isolatorTmpStorage_, edm::EventBase::isRealData(), edm::HandleBase::isValid(), pat::MuonMvaEstimator::jetPtRatio(), pat::MuonMvaEstimator::jetPtRel(), reco::Muon::MiniIsoLoose, reco::Muon::MiniIsoMedium, reco::Muon::MiniIsoTight, reco::Muon::MiniIsoVeryTight, eostools::move(), reco::Muon::MultiIsoLoose, reco::Muon::MultiIsoMedium, reco::PFCandidate::muonRef(), nano_cff::muons, muonToken_, pat::SoftMuonMvaEstimator::mva(), pat::MuonMvaEstimator::mva(), mvaBTagCollectionTag_, mvaEstimator_, muonProducer_cfi::mvaL1Corrector, mvaL1Corrector_, muonProducer_cfi::mvaL1L2L3ResCorrector, mvaL1L2L3ResCorrector_, reco::Muon::MvaLoose, reco::Muon::MvaMedium, reco::Muon::MvaTight, mvaUseJec_, pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), nhits, hemisphereProducer_cfi::patMuons, pcToken_, pfMuonToken_, reco::Vertex::position(), impactParameterTagInfos_cfi::primaryVertex, edm::Handle< T >::product(), pTComparator_, PUPPIIsolation_charged_hadrons_, PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_photons_, PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_photons_, edm::Event::put(), MetAnalyzer::pv(), pat::Muon::PV3D, pvToken_, recomputeBasicSelectors_, resolutionLoader_, rho_, edm::Event::run(), muon::setCutBasedSelectorFlags(), pat::Muon::setExtSimType(), pat::Lepton< LeptonType >::setIsolation(), pat::Muon::setIsolationPUPPI(), pat::Muon::setIsolationPUPPINoLeptons(), setMuonMiniIso(), pat::Muon::setNormChi2(), pat::Muon::setNumberOfValidHits(), pat::Muon::setPFCandidateRef(), pat::Muon::setPfEcalEnergy(), pat::Muon::setSimBX(), pat::Muon::setSimEta(), pat::Muon::setSimFlavour(), pat::Muon::setSimHeaviestMotherFlavour(), pat::Muon::setSimMotherPdgId(), pat::Muon::setSimPdgId(), pat::Muon::setSimPhi(), pat::Muon::setSimProdRho(), pat::Muon::setSimProdZ(), pat::Muon::setSimPt(), pat::Muon::setSimType(), simInfo_, softMvaEstimator_, reco::Muon::SoftMvaId, muonProducer_cfi::tcMETMuonCorrs, tcMETMuonCorrsToken_, groupFilesInBlocks::tt, useParticleFlow_, userDataHelper_, and useUserData_.
|
private |
fill label vector from the contents of the parameter set, for the embedding of isoDeposits or userIsolation values
Definition at line 204 of file PATMuonProducer.h.
References pat::EcalIso, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), pat::HcalIso, crabWrapper::key, diffTwoXMLs::label, pat::PfAllParticleIso, pat::PfChargedAllIso, pat::PfChargedHadronIso, pat::PfGammaIso, pat::PfNeutralHadronIso, pat::PfPUChargedHadronIso, pat::TrackIso, pat::UserBaseIso, and edm::vector_transform().
Referenced by PATMuonProducer().
|
private |
|
private |
Definition at line 672 of file PATMuonProducer.cc.
References pat::getMiniPFIsolation(), miniIsoParams_, reco::LeafCandidate::p4(), and pat::Lepton< LeptonType >::setMiniPFIsolation().
Referenced by produce().
|
private |
add efficiencies to the muon (this will be data members of th muon even w/o embedding)
Definition at line 152 of file PATMuonProducer.h.
Referenced by PATMuonProducer().
|
private |
add generator match information
Definition at line 124 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
add puppi isolation
Definition at line 158 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
add resolutions to the muon (this will be data members of th muon even w/o embedding)
Definition at line 130 of file PATMuonProducer.h.
Referenced by PATMuonProducer().
|
private |
input source of the primary vertex/beamspot
Definition at line 142 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
source of caloMET muon corrections
Definition at line 112 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 93 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
standard muon selectors
Definition at line 168 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 169 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
helper class to add efficiencies to the muon
Definition at line 190 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
embed the track from best muon measurement (global pflow)
Definition at line 98 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed muon MET correction info for caloMET into the muon
Definition at line 110 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed track of the combined fit into the muon
Definition at line 108 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
embed track from DYT muon fit into the muon
Definition at line 122 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed the gen match information into the muon
Definition at line 128 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
embed high level selection variables
Definition at line 140 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed pfCandidates into the muon
Definition at line 138 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
add ecal PF energy
Definition at line 156 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed track from picky muon fit into the muon
Definition at line 118 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed track from muon system into the muon
Definition at line 106 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed muon MET correction info for tcMET into the muon
Definition at line 114 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed track from tpfms muon fit into the muon
Definition at line 120 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed the track from inner tracker into the muon
Definition at line 104 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed the track from best muon measurement (muon only)
Definition at line 100 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
force separate embed of the best track even if already embedded
Definition at line 102 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
input tags for generator match information
Definition at line 126 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
input source for isoDeposits
Definition at line 146 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
Definition at line 147 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
input source isolation value maps
Definition at line 149 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
Definition at line 150 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
helper class to add userdefined isolation values to the muon
Definition at line 186 of file PATMuonProducer.h.
Referenced by produce().
|
private |
isolation value pair for temporary storage before being folded into the muon
Definition at line 188 of file PATMuonProducer.h.
Referenced by produce().
|
private |
Definition at line 94 of file PATMuonProducer.h.
Referenced by getRelMiniIsoPUCorrected(), PATMuonProducer(), and setMuonMiniIso().
|
private |
input source
Definition at line 89 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 173 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 171 of file PATMuonProducer.h.
Referenced by PATMuonProducer().
|
private |
Definition at line 177 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 174 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 175 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 178 of file PATMuonProducer.h.
Referenced by PATMuonProducer().
|
private |
Definition at line 172 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 92 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT
Definition at line 136 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
— tools — comparator for pt ordering
Definition at line 184 of file PATMuonProducer.h.
Referenced by produce().
|
private |
Definition at line 160 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 161 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 162 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 164 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 165 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 166 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
input source of the primary vertex
Definition at line 144 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 170 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 95 of file PATMuonProducer.h.
|
private |
helper class to add resolutions to the muon
Definition at line 132 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
Definition at line 176 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
MC info.
Definition at line 195 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 179 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
Definition at line 180 of file PATMuonProducer.h.
Referenced by PATMuonProducer().
|
private |
source of tcMET muon corrections
Definition at line 116 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
switch to use particle flow (PF2PAT) or not
Definition at line 134 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
helper class to add userData to the muon
Definition at line 192 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
add user data to the muon (this will be data members of th muon even w/o embedding)
Definition at line 154 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().