class definition More...
Public Member Functions | |
PATMuonProducer (const edm::ParameterSet &iConfig, PATMuonHeavyObjectCache const *) | |
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< edm::GlobalCache< PATMuonHeavyObjectCache > > | |
EDProducer ()=default | |
EDProducer (const EDProducer &)=delete | |
bool | hasAbilityToProduceInBeginLumis () const final |
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
bool | hasAbilityToProduceInBeginRuns () const final |
bool | hasAbilityToProduceInEndLumis () const final |
bool | hasAbilityToProduceInEndProcessBlocks () const final |
bool | hasAbilityToProduceInEndRuns () const final |
const EDProducer & | operator= (const EDProducer &)=delete |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
description of config file parameters More... | |
static void | globalEndJob (PATMuonHeavyObjectCache *) |
static std::unique_ptr< PATMuonHeavyObjectCache > | initializeGlobalCache (const edm::ParameterSet &iConfig) |
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 | fillHltTriggerInfo (pat::Muon &muon, edm::Handle< std::vector< pat::TriggerObjectStandAlone >> &triggerObjects, const edm::TriggerNames &names, const std::vector< std::string > &collection_names) |
void | fillL1TriggerInfo (pat::Muon &muon, edm::Handle< std::vector< pat::TriggerObjectStandAlone >> &triggerObjects, const edm::TriggerNames &names, const edm::ESHandle< GlobalTrackingGeometry > &geometry) |
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... | |
std::optional< GlobalPoint > | getMuonDirection (const reco::MuonChamberMatch &chamberMatch, const edm::ESHandle< GlobalTrackingGeometry > &geometry, const DetId &chamberId) |
double | getRelMiniIsoPUCorrected (const pat::Muon &muon, double rho, const std::vector< double > &area) |
bool | isChargedHadron (long pdgid) |
bool | isNeutralHadron (long pdgid) |
bool | isPhoton (long pdgid) |
double | puppiCombinedIsolation (const pat::Muon &muon, const pat::PackedCandidateCollection *pc) |
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< edm::GlobalCache< PATMuonHeavyObjectCache > > | |
using | CacheTypes = CacheContexts< T... > |
using | GlobalCache = typename CacheTypes::GlobalCache |
using | HasAbility = AbilityChecker< T... > |
using | InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache |
using | LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache |
using | LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > |
using | LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache |
using | RunCache = typename CacheTypes::RunCache |
using | RunContext = RunContextT< RunCache, GlobalCache > |
using | RunSummaryCache = typename CacheTypes::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 76 of file PATMuonProducer.cc.
|
private |
Definition at line 97 of file PATMuonProducer.cc.
|
private |
Definition at line 98 of file PATMuonProducer.cc.
|
private |
Definition at line 100 of file PATMuonProducer.cc.
|
private |
Definition at line 101 of file PATMuonProducer.cc.
|
private |
Definition at line 99 of file PATMuonProducer.cc.
|
private |
typedefs for convenience
Definition at line 96 of file PATMuonProducer.cc.
|
explicit |
default constructir
Definition at line 341 of file PATMuonProducer.cc.
References deDxTools::esConsumes().
|
override |
|
private |
Definition at line 1335 of file PATMuonProducer.cc.
References pat::Muon::BS2D, pat::Muon::BS3D, Matriplex::hypot(), BeamMonitor_cff::primaryVertex, pat::Muon::PV2D, pat::Muon::PV3D, pat::Muon::PVDZ, mps_fire::result, pat::Muon::setDB(), IPTools::signedImpactParameter3D(), and HLT_2023v12_cff::track.
Referenced by produce().
|
static |
description of config file parameters
Definition at line 1190 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(), ProducerED_cfi::InputTag, or, edm::ParameterSetDescription::setAllowAnything(), edm::ParameterSetDescription::setComment(), and edm::ParameterDescriptionNode::setComment().
|
private |
Definition at line 550 of file PATMuonProducer.cc.
References PbPb_ZMuSkimMuonDPG_cff::deltaR, HLT_2023v12_cff::muon, Skims_PA_cff::name, names, getGTfromDQMFile::obj, trigger::TriggerMuon, and triggerMatchMonitor_cfi::triggerObjects.
Referenced by produce().
|
private |
Definition at line 498 of file PATMuonProducer.cc.
References funct::abs(), pat::PATObject< ObjectType >::addTriggerObjectMatch(), MuonSubdetId::CSC, SiPixelRawToDigiRegional_cfi::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, hcalRecHitTable_cff::detId, MuonSubdetId::DT, getMuonDirection(), reco::Muon::matches(), names, getGTfromDQMFile::obj, trigger::TriggerL1Mu, and triggerMatchMonitor_cfi::triggerObjects.
Referenced by produce().
|
private |
common muon filling, for both the standard and PF2PAT case
Definition at line 1026 of file PATMuonProducer.cc.
References addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), edm::contains(), CandIsolatorFromDeposits_cfi::deposits, 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(), dqmdumpme::first, forceEmbedBestTrack_, TtFullHadEvtBuilder_cfi::genMatch, edm::RefToBase< T >::id(), reco::Muon::isAValidMuonTrack(), reco::Muon::isGlobalMuon(), isoDepositLabels_, isolationValueLabels_, displacedMuonProducer_cff::isolationValues, dqmiolumiharvest::j, 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 487 of file PATMuonProducer.cc.
References GeomDet::toGlobal(), reco::MuonChamberMatch::x, and reco::MuonChamberMatch::y.
Referenced by fillL1TriggerInfo().
|
private |
Definition at line 1125 of file PATMuonProducer.cc.
References custom_jme_cff::area, MTVHistoProducerAlgoForTrackerBlock_cfi::maxdr, MTVHistoProducerAlgoForTrackerBlock_cfi::mindr, pat::miniIsoDr(), miniIsoParams_, and pat::muonRelMiniIsoPUCorrected().
Referenced by produce().
|
inlinestatic |
Definition at line 87 of file PATMuonProducer.cc.
|
inlinestatic |
Definition at line 83 of file PATMuonProducer.cc.
|
private |
Definition at line 1185 of file PATMuonProducer.cc.
References funct::abs(), and EgammaValidation_cff::pdgid.
Referenced by puppiCombinedIsolation().
|
private |
Definition at line 1183 of file PATMuonProducer.cc.
References funct::abs(), and EgammaValidation_cff::pdgid.
Referenced by puppiCombinedIsolation().
|
private |
Definition at line 1187 of file PATMuonProducer.cc.
References EgammaValidation_cff::pdgid.
Referenced by puppiCombinedIsolation().
|
override |
everything that needs to be done during the event loop
Definition at line 576 of file PATMuonProducer.cc.
References pat::PATUserDataHelper< ObjectType >::add(), addGenMatch_, addInverseBeta_, addPuppiIsolation_, addTriggerMatching_, cms::cuda::assert(), beamLineToken_, pwdgSkimBPark_cfi::beamSpot, pat::helper::MultiIsolator::beginEvent(), TransientTrackBuilder::build(), muonProducer_cfi::caloMETMuonCorrs, caloMETMuonCorrsToken_, computeMiniIso_, computeMuonIDMVA_, computePuppiCombinedIso_, computeSoftMuonMVA_, CandIsolatorFromDeposits_cfi::deposits, reco::PFCandidate::ecalEnergy(), effectiveAreaVec_, 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(), fillHltTriggerInfo(), fillL1TriggerInfo(), fillMuon(), genMatchTokens_, geometryToken_, edm::EventSetup::getData(), edm::EventSetup::getHandle(), getRelMiniIsoPUCorrected(), cutBasedMuonId_MuonPOG_V0_cff::globalTrack, hltCollectionFilters_, mps_fire::i, heavyIonCSV_trainingSettings::idx, iEvent, pat::Muon::initSimInfo(), susybsm::HSCParticleType::innerTrack, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), isoDepositTokens_, displacedMuonProducer_cff::isolationValues, isolationValueTokens_, isolator_, isolatorTmpStorage_, edm::HandleBase::isValid(), dqmiolumiharvest::j, muon::makeSelectorBitset(), reco::Muon::MiniIsoLoose, reco::Muon::MiniIsoMedium, reco::Muon::MiniIsoTight, reco::Muon::MiniIsoVeryTight, eostools::move(), reco::Muon::MultiIsoMedium, reco::PFCandidate::muonRef(), PDWG_BPHSkim_cff::muons, muonTimeExtraToken_, muonToken_, beam_dqm_sourceclient-live_cfg::mva, mvaBTagCollectionTag_, photons_cff::mvaID, mvaIDmediumCut_, mvaIDtightCut_, reco::Muon::MvaIDwpMedium, reco::Muon::MvaIDwpTight, displacedMuonProducer_cff::mvaL1Corrector, mvaL1Corrector_, displacedMuonProducer_cff::mvaL1L2L3ResCorrector, mvaL1L2L3ResCorrector_, pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), nhits, patMuonPutToken_, hemisphereProducer_cfi::patMuons, pcToken_, pfMuonToken_, BeamMonitor_cff::primaryVertex, edm::Handle< T >::product(), puppiCombinedIsolation(), PUPPIIsolation_charged_hadrons_, PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_photons_, reco::Muon::PuppiIsoLoose, reco::Muon::PuppiIsoMedium, reco::Muon::PuppiIsoTight, PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_photons_, MetAnalyzer::pv(), pvToken_, pat::Muon::readTimeExtra(), recomputeBasicSelectors_, resolutionLoader_, rho_, 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::setSimMatchQuality(), pat::Muon::setSimMotherPdgId(), pat::Muon::setSimPdgId(), pat::Muon::setSimPhi(), pat::Muon::setSimProdRho(), pat::Muon::setSimProdZ(), pat::Muon::setSimPt(), pat::Muon::setSimTpEvent(), pat::Muon::setSimType(), simInfo_, reco::Muon::SoftMvaId, jetUpdater_cfi::sort, RandomServiceHelper::t1, RandomServiceHelper::t2, muonProducer_cfi::tcMETMuonCorrs, tcMETMuonCorrsToken_, transientTrackBuilderToken_, L1TEGammaOffline_cfi::triggerNames, triggerMatchMonitor_cfi::triggerObjects, triggerObjects_, triggerResults, triggerResults_, useJec_, useParticleFlow_, userDataHelper_, and useUserData_.
|
private |
Definition at line 1133 of file PATMuonProducer.cc.
References funct::abs(), L1DTConfigBti_cff::CH, reco::deltaPhi(), reco::deltaR2(), isChargedHadron(), isNeutralHadron(), isPhoton(), LogTrace, makePlotsFromDump::NH, dqm::qstatus::OTHER, and PbPb_ZMuSkimMuonDPG_cff::particleType.
Referenced by produce().
|
private |
fill label vector from the contents of the parameter set, for the embedding of isoDeposits or userIsolation values
Definition at line 274 of file PATMuonProducer.cc.
References pat::EcalIso, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), pat::HcalIso, crabWrapper::key, label, SummaryClient_cfi::labels, pat::PfAllParticleIso, pat::PfChargedAllIso, pat::PfChargedHadronIso, pat::PfGammaIso, pat::PfNeutralHadronIso, pat::PfPUChargedHadronIso, crabTemplate::psetName, pat::TrackIso, pat::UserBaseIso, and edm::vector_transform().
|
private |
|
private |
Definition at line 1110 of file PATMuonProducer.cc.
References pat::getMiniPFIsolation(), miniIsoParams_, reco::LeafCandidate::polarP4(), 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 221 of file PATMuonProducer.cc.
|
private |
add generator match information
Definition at line 193 of file PATMuonProducer.cc.
Referenced by fillMuon(), and produce().
|
private |
add combined inverse beta measurement into the muon
Definition at line 189 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
|
private |
add resolutions to the muon (this will be data members of th muon even w/o embedding)
Definition at line 199 of file PATMuonProducer.cc.
|
private |
|
private |
input source of the primary vertex/beamspot
Definition at line 211 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
source of caloMET muon corrections
Definition at line 177 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 154 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
|
private |
Definition at line 155 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 238 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 156 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
helper class to add efficiencies to the muon
Definition at line 252 of file PATMuonProducer.cc.
Referenced by fillMuon(), and produce().
|
private |
embed the track from best muon measurement (global pflow)
Definition at line 163 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
embed muon MET correction info for caloMET into the muon
Definition at line 175 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
embed track of the combined fit into the muon
Definition at line 173 of file PATMuonProducer.cc.
Referenced by fillMuon(), and produce().
|
private |
embed track from DYT muon fit into the muon
Definition at line 187 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
embed the gen match information into the muon
Definition at line 197 of file PATMuonProducer.cc.
Referenced by fillMuon(), and produce().
|
private |
embed high level selection variables
Definition at line 209 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
embed pfCandidates into the muon
Definition at line 207 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
|
private |
embed track from picky muon fit into the muon
Definition at line 183 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
embed track from muon system into the muon
Definition at line 171 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
embed muon MET correction info for tcMET into the muon
Definition at line 179 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
embed track from tpfms muon fit into the muon
Definition at line 185 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
embed the track from inner tracker into the muon
Definition at line 169 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
embed the track from best muon measurement (muon only)
Definition at line 165 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
force separate embed of the best track even if already embedded
Definition at line 167 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
input tags for generator match information
Definition at line 195 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 265 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 263 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
input source for isoDeposits
Definition at line 215 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
Definition at line 216 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
input source isolation value maps
Definition at line 218 of file PATMuonProducer.cc.
Referenced by fillMuon().
|
private |
Definition at line 219 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
— tools — helper class to add userdefined isolation values to the muon
Definition at line 248 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
isolation value pair for temporary storage before being folded into the muon
Definition at line 250 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 157 of file PATMuonProducer.cc.
Referenced by getRelMiniIsoPUCorrected(), and setMuonMiniIso().
|
private |
input tag for reading inverse beta
Definition at line 191 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
|
private |
Definition at line 241 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 161 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
working points of the muon MVA ID
Definition at line 160 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 242 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 243 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 268 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 153 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT
Definition at line 205 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 229 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 230 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 231 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 233 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 234 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 235 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
input source of the primary vertex
Definition at line 213 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 239 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 158 of file PATMuonProducer.cc.
|
private |
helper class to add resolutions to the muon
Definition at line 201 of file PATMuonProducer.cc.
Referenced by fillMuon(), and produce().
|
private |
Definition at line 244 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
|
private |
source of tcMET muon corrections
Definition at line 181 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 266 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 261 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 262 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
Definition at line 240 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
switch to use particle flow (PF2PAT) or not
Definition at line 203 of file PATMuonProducer.cc.
Referenced by fillMuon(), and produce().
|
private |
helper class to add userData to the muon
Definition at line 254 of file PATMuonProducer.cc.
Referenced by produce().
|
private |
add user data to the muon (this will be data members of th muon even w/o embedding)
Definition at line 223 of file PATMuonProducer.cc.
Referenced by produce().