CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
pat::PATMuonProducer Class Reference

class definition More...

Inheritance diagram for pat::PATMuonProducer:
edm::stream::EDProducer< edm::GlobalCache< PATMuonHeavyObjectCache > >

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 EDProduceroperator= (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< PATMuonHeavyObjectCacheinitializeGlobalCache (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::InputTagIsolationLabel
 
typedef std::vector< IsolationLabelIsolationLabels
 
typedef std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
 
typedef edm::RefToBase< reco::MuonMuonBaseRef
 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< GlobalPointgetMuonDirection (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)
 

Private Attributes

bool addEfficiencies_
 add efficiencies to the muon (this will be data members of th muon even w/o embedding) More...
 
bool addGenMatch_
 add generator match information More...
 
bool addInverseBeta_
 add combined inverse beta measurement into the muon More...
 
bool addPuppiIsolation_
 add puppi isolation More...
 
bool addResolutions_
 add resolutions to the muon (this will be data members of th muon even w/o embedding) More...
 
bool addTriggerMatching_
 Trigger. More...
 
edm::EDGetTokenT< reco::BeamSpotbeamLineToken_
 input source of the primary vertex/beamspot More...
 
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > caloMETMuonCorrsToken_
 source of caloMET muon corrections More...
 
bool computeMiniIso_
 
bool computeMuonMVA_
 standard muon selectors More...
 
bool computePuppiCombinedIso_
 
bool computeSoftMuonMVA_
 
std::vector< double > effectiveAreaVec_
 
pat::helper::EfficiencyLoader efficiencyLoader_
 helper class to add efficiencies to the muon More...
 
bool embedBestTrack_
 embed the track from best muon measurement (global pflow) More...
 
bool embedCaloMETMuonCorrs_
 embed muon MET correction info for caloMET into the muon More...
 
bool embedCombinedMuon_
 embed track of the combined fit into the muon More...
 
bool embedDytMuon_
 embed track from DYT muon fit into the muon More...
 
bool embedGenMatch_
 embed the gen match information into the muon More...
 
bool embedHighLevelSelection_
 embed high level selection variables More...
 
bool embedPFCandidate_
 embed pfCandidates into the muon More...
 
bool embedPfEcalEnergy_
 add ecal PF energy More...
 
bool embedPickyMuon_
 embed track from picky muon fit into the muon More...
 
bool embedStandAloneMuon_
 embed track from muon system into the muon More...
 
bool embedTcMETMuonCorrs_
 embed muon MET correction info for tcMET into the muon More...
 
bool embedTpfmsMuon_
 embed track from tpfms muon fit into the muon More...
 
bool embedTrack_
 embed the track from inner tracker into the muon More...
 
bool embedTunePBestTrack_
 embed the track from best muon measurement (muon only) More...
 
bool forceEmbedBestTrack_
 force separate embed of the best track even if already embedded More...
 
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
 input tags for generator match information More...
 
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecordgeometryToken_
 
std::vector< std::string > hltCollectionFilters_
 
IsolationLabels isoDepositLabels_
 input source for isoDeposits More...
 
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
 
IsolationLabels isolationValueLabels_
 input source isolation value maps More...
 
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
 
pat::helper::MultiIsolator isolator_
 
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
 isolation value pair for temporary storage before being folded into the muon More...
 
std::vector< double > miniIsoParams_
 
edm::EDGetTokenT< edm::ValueMap< reco::MuonTimeExtra > > muonTimeExtraToken_
 input tag for reading inverse beta More...
 
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
 input source More...
 
edm::EDGetTokenT< reco::JetTagCollectionmvaBTagCollectionTag_
 
edm::EDGetTokenT< reco::JetCorrectormvaL1Corrector_
 
edm::EDGetTokenT< reco::JetCorrectormvaL1L2L3ResCorrector_
 
bool mvaUseJec_
 
const edm::EDPutTokenT< std::vector< Muon > > patMuonPutToken_
 
edm::EDGetTokenT< pat::PackedCandidateCollectionpcToken_
 
edm::EDGetTokenT< reco::PFCandidateCollectionpfMuonToken_
 input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT More...
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
 
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
 
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
 input source of the primary vertex More...
 
bool recomputeBasicSelectors_
 
double relMiniIsoPUCorrected_
 
pat::helper::KinResolutionsLoader resolutionLoader_
 helper class to add resolutions to the muon More...
 
edm::EDGetTokenT< double > rho_
 
edm::EDGetTokenT< edm::ValueMap< reco::MuonSimInfo > > simInfo_
 MC info. More...
 
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcMETMuonCorrsToken_
 source of tcMET muon corrections More...
 
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecordtransientTrackBuilderToken_
 
edm::EDGetTokenT< std::vector< pat::TriggerObjectStandAlone > > triggerObjects_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResults_
 
bool useParticleFlow_
 switch to use particle flow (PF2PAT) or not More...
 
pat::PATUserDataHelper< pat::MuonuserDataHelper_
 helper class to add userData to the muon More...
 
bool useUserData_
 add user data to the muon (this will be data members of th muon even w/o embedding) More...
 

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
 

Detailed Description

class definition

Produces pat::Muon's.

The PATMuonProducer produces analysis-level pat::Muon's starting from a collection of objects of reco::Muon.

Author
Steven Lowette, Roger Wolf
Version
Id
PATMuonProducer.h,v 1.29 2012/08/22 15:02:52 bellan Exp

Definition at line 76 of file PATMuonProducer.cc.

Member Typedef Documentation

◆ GenAssociations

Definition at line 97 of file PATMuonProducer.cc.

◆ IsoDepositMaps

Definition at line 98 of file PATMuonProducer.cc.

◆ IsolationLabel

Definition at line 100 of file PATMuonProducer.cc.

◆ IsolationLabels

Definition at line 101 of file PATMuonProducer.cc.

◆ IsolationValueMaps

typedef std::vector<edm::Handle<edm::ValueMap<double> > > pat::PATMuonProducer::IsolationValueMaps
private

Definition at line 99 of file PATMuonProducer.cc.

◆ MuonBaseRef

typedefs for convenience

Definition at line 96 of file PATMuonProducer.cc.

Constructor & Destructor Documentation

◆ PATMuonProducer()

PATMuonProducer::PATMuonProducer ( const edm::ParameterSet iConfig,
PATMuonHeavyObjectCache const *   
)
explicit

default constructir

Definition at line 339 of file PATMuonProducer.cc.

341  useUserData_(iConfig.exists("userData")),
342  computeMuonMVA_(false),
343  computeSoftMuonMVA_(false),
345  mvaUseJec_(false),
346  isolator_(iConfig.exists("userIsolation") ? iConfig.getParameter<edm::ParameterSet>("userIsolation")
347  : edm::ParameterSet(),
348  consumesCollector(),
349  false),
351  transientTrackBuilderToken_{esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))},
352  patMuonPutToken_{produces<std::vector<Muon>>()} {
353  // input source
354  muonToken_ = consumes<edm::View<reco::Muon>>(iConfig.getParameter<edm::InputTag>("muonSource"));
355  // embedding of tracks
356  embedBestTrack_ = iConfig.getParameter<bool>("embedMuonBestTrack");
357  embedTunePBestTrack_ = iConfig.getParameter<bool>("embedTunePMuonBestTrack");
358  forceEmbedBestTrack_ = iConfig.getParameter<bool>("forceBestTrackEmbedding");
359  embedTrack_ = iConfig.getParameter<bool>("embedTrack");
360  embedCombinedMuon_ = iConfig.getParameter<bool>("embedCombinedMuon");
361  embedStandAloneMuon_ = iConfig.getParameter<bool>("embedStandAloneMuon");
362  // embedding of muon MET correction information
363  embedCaloMETMuonCorrs_ = iConfig.getParameter<bool>("embedCaloMETMuonCorrs");
364  embedTcMETMuonCorrs_ = iConfig.getParameter<bool>("embedTcMETMuonCorrs");
366  mayConsume<edm::ValueMap<reco::MuonMETCorrectionData>>(iConfig.getParameter<edm::InputTag>("caloMETMuonCorrs"));
368  mayConsume<edm::ValueMap<reco::MuonMETCorrectionData>>(iConfig.getParameter<edm::InputTag>("tcMETMuonCorrs"));
369  // pflow specific configurables
370  useParticleFlow_ = iConfig.getParameter<bool>("useParticleFlow");
371  embedPFCandidate_ = iConfig.getParameter<bool>("embedPFCandidate");
372  pfMuonToken_ = mayConsume<reco::PFCandidateCollection>(iConfig.getParameter<edm::InputTag>("pfMuonSource"));
373  embedPfEcalEnergy_ = iConfig.getParameter<bool>("embedPfEcalEnergy");
374  // embedding of tracks from TeV refit
375  embedPickyMuon_ = iConfig.getParameter<bool>("embedPickyMuon");
376  embedTpfmsMuon_ = iConfig.getParameter<bool>("embedTpfmsMuon");
377  embedDytMuon_ = iConfig.getParameter<bool>("embedDytMuon");
378  // embedding of inverse beta variable information
379  addInverseBeta_ = iConfig.getParameter<bool>("addInverseBeta");
380  if (addInverseBeta_) {
382  consumes<edm::ValueMap<reco::MuonTimeExtra>>(iConfig.getParameter<edm::InputTag>("sourceMuonTimeExtra"));
383  }
384  // Monte Carlo matching
385  addGenMatch_ = iConfig.getParameter<bool>("addGenMatch");
386  if (addGenMatch_) {
387  embedGenMatch_ = iConfig.getParameter<bool>("embedGenMatch");
388  if (iConfig.existsAs<edm::InputTag>("genParticleMatch")) {
390  iConfig.getParameter<edm::InputTag>("genParticleMatch")));
391  } else {
393  iConfig.getParameter<std::vector<edm::InputTag>>("genParticleMatch"),
394  [this](edm::InputTag const& tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
395  }
396  }
397  // efficiencies
398  addEfficiencies_ = iConfig.getParameter<bool>("addEfficiencies");
399  if (addEfficiencies_) {
401  pat::helper::EfficiencyLoader(iConfig.getParameter<edm::ParameterSet>("efficiencies"), consumesCollector());
402  }
403  // resolutions
404  addResolutions_ = iConfig.getParameter<bool>("addResolutions");
405  if (addResolutions_) {
407  }
408  // puppi
409  addPuppiIsolation_ = iConfig.getParameter<bool>("addPuppiIsolation");
410  if (addPuppiIsolation_) {
412  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationChargedHadrons"));
414  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationNeutralHadrons"));
416  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationPhotons"));
417  //puppiNoLeptons
419  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationChargedHadrons"));
421  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationNeutralHadrons"));
423  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationPhotons"));
424  }
425  // read isoDeposit labels, for direct embedding
426  readIsolationLabels(iConfig, "isoDeposits", isoDepositLabels_, isoDepositTokens_);
427  // read isolation value labels, for direct embedding
429  // check to see if the user wants to add user data
430  if (useUserData_) {
431  userDataHelper_ = PATUserDataHelper<Muon>(iConfig.getParameter<edm::ParameterSet>("userData"), consumesCollector());
432  }
433  // embed high level selection variables
434  embedHighLevelSelection_ = iConfig.getParameter<bool>("embedHighLevelSelection");
436  beamLineToken_ = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamLineSrc"));
437  pvToken_ = consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("pvSrc"));
438  }
439 
440  //for mini-isolation calculation
441  computeMiniIso_ = iConfig.getParameter<bool>("computeMiniIso");
442 
443  computePuppiCombinedIso_ = iConfig.getParameter<bool>("computePuppiCombinedIso");
444 
445  effectiveAreaVec_ = iConfig.getParameter<std::vector<double>>("effectiveAreaVec");
446 
447  miniIsoParams_ = iConfig.getParameter<std::vector<double>>("miniIsoParams");
448  if (computeMiniIso_ && miniIsoParams_.size() != 9) {
449  throw cms::Exception("ParameterError") << "miniIsoParams must have exactly 9 elements.\n";
450  }
452  pcToken_ = consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("pfCandsForMiniIso"));
453 
454  // standard selectors
455  recomputeBasicSelectors_ = iConfig.getParameter<bool>("recomputeBasicSelectors");
456  computeMuonMVA_ = iConfig.getParameter<bool>("computeMuonMVA");
457  if (computeMuonMVA_ and not computeMiniIso_)
458  throw cms::Exception("ConfigurationError") << "MiniIso is needed for Muon MVA calculation.\n";
459 
460  if (computeMuonMVA_) {
461  // pfCombinedInclusiveSecondaryVertexV2BJetTags
462  mvaBTagCollectionTag_ = consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("mvaJetTag"));
463  mvaL1Corrector_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("mvaL1Corrector"));
464  mvaL1L2L3ResCorrector_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("mvaL1L2L3ResCorrector"));
465  rho_ = consumes<double>(iConfig.getParameter<edm::InputTag>("rho"));
466  mvaUseJec_ = iConfig.getParameter<bool>("mvaUseJec");
467  }
468 
469  computeSoftMuonMVA_ = iConfig.getParameter<bool>("computeSoftMuonMVA");
470 
471  // MC info
472  simInfo_ = consumes<edm::ValueMap<reco::MuonSimInfo>>(iConfig.getParameter<edm::InputTag>("muonSimInfo"));
473 
474  addTriggerMatching_ = iConfig.getParameter<bool>("addTriggerMatching");
475  if (addTriggerMatching_) {
477  consumes<std::vector<pat::TriggerObjectStandAlone>>(iConfig.getParameter<edm::InputTag>("triggerObjects"));
478  triggerResults_ = consumes<edm::TriggerResults>(iConfig.getParameter<edm::InputTag>("triggerResults"));
479  }
480  hltCollectionFilters_ = iConfig.getParameter<std::vector<std::string>>("hltCollectionFilters");
481 }

References DeDxTools::esConsumes().

◆ ~PATMuonProducer()

PATMuonProducer::~PATMuonProducer ( )
override

default destructur

Definition at line 483 of file PATMuonProducer.cc.

483 {}

Member Function Documentation

◆ embedHighLevel()

void PATMuonProducer::embedHighLevel ( pat::Muon aMuon,
reco::TrackRef  track,
reco::TransientTrack tt,
reco::Vertex primaryVertex,
bool  primaryVertexIsValid,
reco::BeamSpot beamspot,
bool  beamspotIsValid 
)
private

Definition at line 1364 of file PATMuonProducer.cc.

1370  {
1371  // Correct to PV
1372 
1373  // PV2D
1374  aMuon.setDB(track->dxy(primaryVertex.position()),
1375  track->dxyError(primaryVertex.position(), primaryVertex.covariance()),
1376  pat::Muon::PV2D);
1377 
1378  // PV3D
1379  std::pair<bool, Measurement1D> result =
1381  double d0_corr = result.second.value();
1382  double d0_err = primaryVertexIsValid ? result.second.error() : -1.0;
1383  aMuon.setDB(d0_corr, d0_err, pat::Muon::PV3D);
1384 
1385  // Correct to beam spot
1386 
1387  // BS2D
1388  aMuon.setDB(track->dxy(beamspot), track->dxyError(beamspot), pat::Muon::BS2D);
1389 
1390  // make a fake vertex out of beam spot
1391  reco::Vertex vBeamspot(beamspot.position(), beamspot.rotatedCovariance3D());
1392 
1393  // BS3D
1394  result = IPTools::signedImpactParameter3D(tt, GlobalVector(track->px(), track->py(), track->pz()), vBeamspot);
1395  d0_corr = result.second.value();
1396  d0_err = beamspotIsValid ? result.second.error() : -1.0;
1397  aMuon.setDB(d0_corr, d0_err, pat::Muon::BS3D);
1398 
1399  // PVDZ
1400  aMuon.setDB(
1401  track->dz(primaryVertex.position()), std::hypot(track->dzError(), primaryVertex.zError()), pat::Muon::PVDZ);
1402 }

References pat::Muon::BS2D, pat::Muon::BS3D, BeamMonitor_cff::primaryVertex, pat::Muon::PV2D, pat::Muon::PV3D, pat::Muon::PVDZ, mps_fire::result, pat::Muon::setDB(), IPTools::signedImpactParameter3D(), HLT_FULL_cff::track, and groupFilesInBlocks::tt.

Referenced by produce().

◆ fillDescriptions()

void PATMuonProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

description of config file parameters

Definition at line 1219 of file PATMuonProducer.cc.

1219  {
1221  iDesc.setComment("PAT muon producer module");
1222 
1223  // input source
1224  iDesc.add<edm::InputTag>("muonSource", edm::InputTag("no default"))->setComment("input collection");
1225 
1226  // embedding
1227  iDesc.add<bool>("embedMuonBestTrack", true)->setComment("embed muon best track (global pflow)");
1228  iDesc.add<bool>("embedTunePMuonBestTrack", true)->setComment("embed muon best track (muon only)");
1229  iDesc.add<bool>("forceBestTrackEmbedding", true)
1230  ->setComment(
1231  "force embedding separately the best tracks even if they're already embedded e.g. as tracker or global "
1232  "tracks");
1233  iDesc.add<bool>("embedTrack", true)->setComment("embed external track");
1234  iDesc.add<bool>("embedStandAloneMuon", true)->setComment("embed external stand-alone muon");
1235  iDesc.add<bool>("embedCombinedMuon", false)->setComment("embed external combined muon");
1236  iDesc.add<bool>("embedPickyMuon", false)->setComment("embed external picky track");
1237  iDesc.add<bool>("embedTpfmsMuon", false)->setComment("embed external tpfms track");
1238  iDesc.add<bool>("embedDytMuon", false)->setComment("embed external dyt track ");
1239 
1240  // embedding of MET muon corrections
1241  iDesc.add<bool>("embedCaloMETMuonCorrs", true)->setComment("whether to add MET muon correction for caloMET or not");
1242  iDesc.add<edm::InputTag>("caloMETMuonCorrs", edm::InputTag("muonMETValueMapProducer", "muCorrData"))
1243  ->setComment("source of MET muon corrections for caloMET");
1244  iDesc.add<bool>("embedTcMETMuonCorrs", true)->setComment("whether to add MET muon correction for tcMET or not");
1245  iDesc.add<edm::InputTag>("tcMETMuonCorrs", edm::InputTag("muonTCMETValueMapProducer", "muCorrData"))
1246  ->setComment("source of MET muon corrections for tcMET");
1247 
1248  // pf specific parameters
1249  iDesc.add<edm::InputTag>("pfMuonSource", edm::InputTag("pfMuons"))->setComment("particle flow input collection");
1250  iDesc.add<bool>("useParticleFlow", false)->setComment("whether to use particle flow or not");
1251  iDesc.add<bool>("embedPFCandidate", false)->setComment("embed external particle flow object");
1252  iDesc.add<bool>("embedPfEcalEnergy", true)->setComment("add ecal energy as reconstructed by PF");
1253 
1254  // inverse beta computation
1255  iDesc.add<bool>("addInverseBeta", true)->setComment("add combined inverse beta");
1256  iDesc.add<edm::InputTag>("sourceInverseBeta", edm::InputTag("muons", "combined"))
1257  ->setComment("source of inverse beta values");
1258 
1259  // MC matching configurables
1260  iDesc.add<bool>("addGenMatch", true)->setComment("add MC matching");
1261  iDesc.add<bool>("embedGenMatch", false)->setComment("embed MC matched MC information");
1262  std::vector<edm::InputTag> emptySourceVector;
1263  iDesc
1264  .addNode(edm::ParameterDescription<edm::InputTag>("genParticleMatch", edm::InputTag(), true) xor
1265  edm::ParameterDescription<std::vector<edm::InputTag>>("genParticleMatch", emptySourceVector, true))
1266  ->setComment("input with MC match information");
1267 
1268  // mini-iso
1269  iDesc.add<bool>("computeMiniIso", false)->setComment("whether or not to compute and store electron mini-isolation");
1270  iDesc.add<bool>("computePuppiCombinedIso", false)
1271  ->setComment("whether or not to compute and store puppi combined isolation");
1272 
1273  iDesc.add<edm::InputTag>("pfCandsForMiniIso", edm::InputTag("packedPFCandidates"))
1274  ->setComment("collection to use to compute mini-iso");
1275  iDesc.add<std::vector<double>>("miniIsoParams", std::vector<double>())
1276  ->setComment("mini-iso parameters to use for muons");
1277 
1278  iDesc.add<bool>("addTriggerMatching", false)->setComment("add L1 and HLT matching to offline muon");
1279 
1281 
1282  // IsoDeposit configurables
1283  edm::ParameterSetDescription isoDepositsPSet;
1284  isoDepositsPSet.addOptional<edm::InputTag>("tracker");
1285  isoDepositsPSet.addOptional<edm::InputTag>("ecal");
1286  isoDepositsPSet.addOptional<edm::InputTag>("hcal");
1287  isoDepositsPSet.addOptional<edm::InputTag>("particle");
1288  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1289  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedAll");
1290  isoDepositsPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1291  isoDepositsPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1292  isoDepositsPSet.addOptional<edm::InputTag>("pfPhotons");
1293  isoDepositsPSet.addOptional<std::vector<edm::InputTag>>("user");
1294  iDesc.addOptional("isoDeposits", isoDepositsPSet);
1295 
1296  // isolation values configurables
1297  edm::ParameterSetDescription isolationValuesPSet;
1298  isolationValuesPSet.addOptional<edm::InputTag>("tracker");
1299  isolationValuesPSet.addOptional<edm::InputTag>("ecal");
1300  isolationValuesPSet.addOptional<edm::InputTag>("hcal");
1301  isolationValuesPSet.addOptional<edm::InputTag>("particle");
1302  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1303  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedAll");
1304  isolationValuesPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1305  isolationValuesPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1306  isolationValuesPSet.addOptional<edm::InputTag>("pfPhotons");
1307  iDesc.addOptional("isolationValues", isolationValuesPSet);
1308 
1309  iDesc.ifValue(edm::ParameterDescription<bool>("addPuppiIsolation", false, true),
1311  "puppiIsolationChargedHadrons",
1312  edm::InputTag("muonPUPPIIsolation", "h+-DR030-ThresholdVeto000-ConeVeto000"),
1313  true) and
1315  "puppiIsolationNeutralHadrons",
1316  edm::InputTag("muonPUPPIIsolation", "h0-DR030-ThresholdVeto000-ConeVeto001"),
1317  true) and
1319  "puppiIsolationPhotons",
1320  edm::InputTag("muonPUPPIIsolation", "gamma-DR030-ThresholdVeto000-ConeVeto001"),
1321  true) and
1323  "puppiNoLeptonsIsolationChargedHadrons",
1324  edm::InputTag("muonPUPPINoLeptonsIsolation", "h+-DR030-ThresholdVeto000-ConeVeto000"),
1325  true) and
1327  "puppiNoLeptonsIsolationNeutralHadrons",
1328  edm::InputTag("muonPUPPINoLeptonsIsolation", "h0-DR030-ThresholdVeto000-ConeVeto001"),
1329  true) and
1331  "puppiNoLeptonsIsolationPhotons",
1332  edm::InputTag("muonPUPPINoLeptonsIsolation", "gamma-DR030-ThresholdVeto000-ConeVeto001"),
1333  true)) or
1334  false >> edm::EmptyGroupDescription());
1335 
1336  // Efficiency configurables
1337  edm::ParameterSetDescription efficienciesPSet;
1338  efficienciesPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
1339  iDesc.add("efficiencies", efficienciesPSet);
1340  iDesc.add<bool>("addEfficiencies", false);
1341 
1342  // Check to see if the user wants to add user data
1343  edm::ParameterSetDescription userDataPSet;
1345  iDesc.addOptional("userData", userDataPSet);
1346 
1347  edm::ParameterSetDescription isolationPSet;
1348  isolationPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
1349  iDesc.add("userIsolation", isolationPSet);
1350 
1351  iDesc.add<bool>("embedHighLevelSelection", true)->setComment("embed high level selection");
1352  edm::ParameterSetDescription highLevelPSet;
1353  highLevelPSet.setAllowAnything();
1354  iDesc.addNode(edm::ParameterDescription<edm::InputTag>("beamLineSrc", edm::InputTag(), true))
1355  ->setComment("input with high level selection");
1357  ->setComment("input with high level selection");
1358 
1359  //descriptions.add("PATMuonProducer", iDesc);
1360 }

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addNode(), edm::ParameterSetDescription::addOptional(), pat::helper::KinResolutionsLoader::fillDescription(), pat::PATUserDataHelper< ObjectType >::fillDescription(), edm::ParameterSetDescription::ifValue(), HLT_FULL_cff::InputTag, or, edm::ParameterSetDescription::setAllowAnything(), edm::ParameterSetDescription::setComment(), and edm::ParameterDescriptionNode::setComment().

◆ fillHltTriggerInfo()

void PATMuonProducer::fillHltTriggerInfo ( pat::Muon muon,
edm::Handle< std::vector< pat::TriggerObjectStandAlone >> &  triggerObjects,
const edm::TriggerNames names,
const std::vector< std::string > &  collection_names 
)
private

Definition at line 548 of file PATMuonProducer.cc.

551  {
552  // WARNING: in a case of close-by muons the dR matching may select both muons.
553  // It's better to select the best match for a given collection.
554  for (const auto& triggerObject : *triggerObjects) {
555  if (triggerObject.hasTriggerObjectType(trigger::TriggerMuon)) {
556  bool keepIt = false;
557  for (const auto& name : collection_filter_names) {
558  if (triggerObject.hasCollection(name)) {
559  keepIt = true;
560  break;
561  }
562  }
563  if (not keepIt)
564  continue;
565  if (deltaR(triggerObject.p4(), muon) > 0.1)
566  continue;
567  pat::TriggerObjectStandAlone obj(triggerObject);
568  obj.unpackPathNames(names);
569  muon.addTriggerObjectMatch(obj);
570  }
571  }
572 }

References PbPb_ZMuSkimMuonDPG_cff::deltaR, HLT_FULL_cff::muon, Skims_PA_cff::name, names, getGTfromDQMFile::obj, trigger::TriggerMuon, and triggerMatchMonitor_cfi::triggerObjects.

Referenced by produce().

◆ fillL1TriggerInfo()

void PATMuonProducer::fillL1TriggerInfo ( pat::Muon muon,
edm::Handle< std::vector< pat::TriggerObjectStandAlone >> &  triggerObjects,
const edm::TriggerNames names,
const edm::ESHandle< GlobalTrackingGeometry > &  geometry 
)
private

Definition at line 496 of file PATMuonProducer.cc.

499  {
500  // L1 trigger object parameters are defined at MB2/ME2. Use the muon
501  // chamber matching information to get the local direction of the
502  // muon trajectory and convert it to a global direction to match the
503  // trigger objects
504 
505  std::optional<GlobalPoint> muonPosition;
506  // Loop over chambers
507  // initialize muonPosition with any available match, just in case
508  // the second station is missing - it's better folling back to
509  // dR matching at IP
510  for (const auto& chamberMatch : aMuon.matches()) {
511  if (chamberMatch.id.subdetId() == MuonSubdetId::DT) {
512  DTChamberId detId(chamberMatch.id.rawId());
513  if (abs(detId.station()) > 3)
514  continue;
515  muonPosition = getMuonDirection(chamberMatch, geometry, detId);
516  if (abs(detId.station()) == 2)
517  break;
518  }
519  if (chamberMatch.id.subdetId() == MuonSubdetId::CSC) {
520  CSCDetId detId(chamberMatch.id.rawId());
521  if (abs(detId.station()) > 3)
522  continue;
523  muonPosition = getMuonDirection(chamberMatch, geometry, detId);
524  if (abs(detId.station()) == 2)
525  break;
526  }
527  }
528  if (not muonPosition)
529  return;
530  for (const auto& triggerObject : *triggerObjects) {
531  if (triggerObject.hasTriggerObjectType(trigger::TriggerL1Mu)) {
532  if (std::abs(triggerObject.eta()) < 0.001) {
533  // L1 is defined in X-Y plain
534  if (deltaPhi(triggerObject.phi(), muonPosition->phi()) > 0.1)
535  continue;
536  } else {
537  // 3D L1
538  if (deltaR(triggerObject.p4(), *muonPosition) > 0.15)
539  continue;
540  }
541  pat::TriggerObjectStandAlone obj(triggerObject);
542  obj.unpackPathNames(names);
543  aMuon.addTriggerObjectMatch(obj);
544  }
545  }
546 }

References funct::abs(), pat::PATObject< ObjectType >::addTriggerObjectMatch(), MuonSubdetId::CSC, SiPixelRawToDigiRegional_cfi::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, MuonSubdetId::DT, getMuonDirection(), reco::Muon::matches(), names, getGTfromDQMFile::obj, trigger::TriggerL1Mu, and triggerMatchMonitor_cfi::triggerObjects.

Referenced by produce().

◆ fillMuon()

void PATMuonProducer::fillMuon ( Muon aMuon,
const MuonBaseRef muonRef,
const reco::CandidateBaseRef baseRef,
const GenAssociations genMatches,
const IsoDepositMaps deposits,
const IsolationValueMaps isolationValues 
) const
private

common muon filling, for both the standard and PF2PAT case

Definition at line 1055 of file PATMuonProducer.cc.

1060  {
1061  // in the particle flow algorithm,
1062  // the muon momentum is recomputed.
1063  // the new value is stored as the momentum of the
1064  // resulting PFCandidate of type Muon, and choosen
1065  // as the pat::Muon momentum
1066  if (useParticleFlow_)
1067  aMuon.setP4(aMuon.pfCandidateRef()->p4());
1068  if (embedTrack_)
1069  aMuon.embedTrack();
1071  aMuon.embedStandAloneMuon();
1072  if (embedCombinedMuon_)
1073  aMuon.embedCombinedMuon();
1074 
1075  // embed the TeV refit track refs (only available for globalMuons)
1076  if (aMuon.isGlobalMuon()) {
1078  aMuon.embedPickyMuon();
1080  aMuon.embedTpfmsMuon();
1082  aMuon.embedDytMuon();
1083  }
1084 
1085  // embed best tracks (at the end, so unless forceEmbedBestTrack_ is true we can save some space not embedding them twice)
1086  if (embedBestTrack_)
1090 
1091  // store the match to the generated final state muons
1092  if (addGenMatch_) {
1093  for (auto const& genMatch : genMatches) {
1094  reco::GenParticleRef genMuon = (*genMatch)[baseRef];
1095  aMuon.addGenParticleRef(genMuon);
1096  }
1097  if (embedGenMatch_)
1098  aMuon.embedGenParticle();
1099  }
1100  if (efficiencyLoader_.enabled()) {
1101  efficiencyLoader_.setEfficiencies(aMuon, muonRef);
1102  }
1103 
1104  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
1105  if (useParticleFlow_) {
1106  if (deposits[j]->contains(baseRef.id())) {
1107  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[baseRef]);
1108  } else if (deposits[j]->contains(muonRef.id())) {
1109  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[muonRef]);
1110  } else {
1111  reco::CandidatePtr source = aMuon.pfCandidateRef()->sourceCandidatePtr(0);
1113  }
1114  } else {
1115  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[muonRef]);
1116  }
1117  }
1118 
1119  for (size_t j = 0; j < isolationValues.size(); ++j) {
1120  if (useParticleFlow_) {
1121  if (isolationValues[j]->contains(baseRef.id())) {
1123  } else if (isolationValues[j]->contains(muonRef.id())) {
1125  } else {
1126  reco::CandidatePtr source = aMuon.pfCandidateRef()->sourceCandidatePtr(0);
1128  }
1129  } else {
1131  }
1132  }
1133 
1134  if (resolutionLoader_.enabled()) {
1136  }
1137 }

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(), first, forceEmbedBestTrack_, TtFullHadEvtBuilder_cfi::genMatch, edm::RefToBase< T >::id(), reco::Muon::isAValidMuonTrack(), reco::Muon::isGlobalMuon(), isoDepositLabels_, isolationValueLabels_, electronProducer_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().

◆ getMuonDirection()

std::optional< GlobalPoint > PATMuonProducer::getMuonDirection ( const reco::MuonChamberMatch chamberMatch,
const edm::ESHandle< GlobalTrackingGeometry > &  geometry,
const DetId chamberId 
)
private

Definition at line 485 of file PATMuonProducer.cc.

487  {
488  const GeomDet* chamberGeometry = geometry->idToDet(chamberId);
489  if (chamberGeometry) {
490  LocalPoint localPosition(chamberMatch.x, chamberMatch.y, 0);
491  return std::optional<GlobalPoint>(std::in_place, chamberGeometry->toGlobal(localPosition));
492  }
493  return std::optional<GlobalPoint>();
494 }

References GeomDet::toGlobal(), reco::MuonChamberMatch::x, and reco::MuonChamberMatch::y.

Referenced by fillL1TriggerInfo().

◆ getRelMiniIsoPUCorrected()

double PATMuonProducer::getRelMiniIsoPUCorrected ( const pat::Muon muon,
double  rho,
const std::vector< double > &  area 
)
private

Definition at line 1154 of file PATMuonProducer.cc.

1154  {
1155  double mindr(miniIsoParams_[0]);
1156  double maxdr(miniIsoParams_[1]);
1157  double kt_scale(miniIsoParams_[2]);
1158  double drcut = pat::miniIsoDr(muon.polarP4(), mindr, maxdr, kt_scale);
1159  return pat::muonRelMiniIsoPUCorrected(muon.miniPFIsolation(), muon.polarP4(), drcut, rho, area);
1160 }

References custom_jme_cff::area, MTVHistoProducerAlgoForTrackerBlock_cfi::maxdr, MTVHistoProducerAlgoForTrackerBlock_cfi::mindr, pat::miniIsoDr(), miniIsoParams_, and pat::muonRelMiniIsoPUCorrected().

Referenced by produce().

◆ globalEndJob()

static void pat::PATMuonProducer::globalEndJob ( PATMuonHeavyObjectCache )
inlinestatic

Definition at line 87 of file PATMuonProducer.cc.

87 {}

◆ initializeGlobalCache()

static std::unique_ptr<PATMuonHeavyObjectCache> pat::PATMuonProducer::initializeGlobalCache ( const edm::ParameterSet iConfig)
inlinestatic

Definition at line 83 of file PATMuonProducer.cc.

83  {
84  return std::make_unique<PATMuonHeavyObjectCache>(iConfig);
85  }

◆ isChargedHadron()

bool PATMuonProducer::isChargedHadron ( long  pdgid)
private

Definition at line 1214 of file PATMuonProducer.cc.

1214 { return std::abs(pdgid) == 211; }

References funct::abs(), and EgammaValidation_cff::pdgid.

Referenced by puppiCombinedIsolation().

◆ isNeutralHadron()

bool PATMuonProducer::isNeutralHadron ( long  pdgid)
private

Definition at line 1212 of file PATMuonProducer.cc.

1212 { return std::abs(pdgid) == 130; }

References funct::abs(), and EgammaValidation_cff::pdgid.

Referenced by puppiCombinedIsolation().

◆ isPhoton()

bool PATMuonProducer::isPhoton ( long  pdgid)
private

Definition at line 1216 of file PATMuonProducer.cc.

1216 { return pdgid == 22; }

References EgammaValidation_cff::pdgid.

Referenced by puppiCombinedIsolation().

◆ produce()

void PATMuonProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

everything that needs to be done during the event loop

Definition at line 574 of file PATMuonProducer.cc.

574  {
575  // get the tracking Geometry
576  auto geometry = iSetup.getHandle(geometryToken_);
577  if (!geometry.isValid())
578  throw cms::Exception("FatalError") << "Unable to find GlobalTrackingGeometryRecord in event!\n";
579 
580  // switch off embedding (in unschedules mode)
581  if (iEvent.isRealData()) {
582  addGenMatch_ = false;
583  embedGenMatch_ = false;
584  }
585 
587  iEvent.getByToken(muonToken_, muons);
588 
591  iEvent.getByToken(pcToken_, pc);
592 
593  // get the ESHandle for the transient track builder,
594  // if needed for high level selection embedding
595  TransientTrackBuilder const* trackBuilder = nullptr;
596 
597  if (isolator_.enabled())
598  isolator_.beginEvent(iEvent, iSetup);
603 
605  for (size_t j = 0; j < isoDepositTokens_.size(); ++j) {
606  iEvent.getByToken(isoDepositTokens_[j], deposits[j]);
607  }
608 
610  for (size_t j = 0; j < isolationValueTokens_.size(); ++j) {
612  }
613 
614  //value maps for puppi isolation
615  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_charged_hadrons;
616  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_neutral_hadrons;
617  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_photons;
618  //value maps for puppiNoLeptons isolation
619  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_charged_hadrons;
620  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_neutral_hadrons;
621  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_photons;
622  if (addPuppiIsolation_) {
623  //puppi
624  iEvent.getByToken(PUPPIIsolation_charged_hadrons_, PUPPIIsolation_charged_hadrons);
625  iEvent.getByToken(PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_neutral_hadrons);
626  iEvent.getByToken(PUPPIIsolation_photons_, PUPPIIsolation_photons);
627  //puppiNoLeptons
628  iEvent.getByToken(PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_charged_hadrons);
629  iEvent.getByToken(PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons);
630  iEvent.getByToken(PUPPINoLeptonsIsolation_photons_, PUPPINoLeptonsIsolation_photons);
631  }
632 
633  // inputs for muon mva
634  edm::Handle<reco::JetTagCollection> mvaBTagCollectionTag;
637  if (computeMuonMVA_) {
638  iEvent.getByToken(mvaBTagCollectionTag_, mvaBTagCollectionTag);
641  }
642 
643  // prepare the MC genMatchTokens_
644  GenAssociations genMatches(genMatchTokens_.size());
645  if (addGenMatch_) {
646  for (size_t j = 0, nd = genMatchTokens_.size(); j < nd; ++j) {
647  iEvent.getByToken(genMatchTokens_[j], genMatches[j]);
648  }
649  }
650 
651  // prepare the high level selection: needs beamline
652  // OR primary vertex, depending on user selection
655  bool beamSpotIsValid = false;
656  bool primaryVertexIsValid = false;
658  // get the beamspot
659  edm::Handle<reco::BeamSpot> beamSpotHandle;
660  iEvent.getByToken(beamLineToken_, beamSpotHandle);
661 
662  // get the primary vertex
664  iEvent.getByToken(pvToken_, pvHandle);
665 
666  if (beamSpotHandle.isValid()) {
667  beamSpot = *beamSpotHandle;
668  beamSpotIsValid = true;
669  } else {
670  edm::LogError("DataNotAvailable") << "No beam spot available from EventSetup, not adding high level selection \n";
671  }
672  if (pvHandle.isValid() && !pvHandle->empty()) {
673  primaryVertex = pvHandle->at(0);
674  primaryVertexIsValid = true;
675  } else {
676  edm::LogError("DataNotAvailable")
677  << "No primary vertex available from EventSetup, not adding high level selection \n";
678  }
679  // this is needed by the IPTools methods from the tracking group
680  trackBuilder = &iSetup.getData(transientTrackBuilderToken_);
681  }
682 
683  // MC info
685  bool simInfoIsAvailalbe = iEvent.getByToken(simInfo_, simInfo);
686 
687  // this will be the new object collection
688  std::vector<Muon> patMuons;
689 
691  if (useParticleFlow_) {
692  // get the PFCandidates of type muons
693  iEvent.getByToken(pfMuonToken_, pfMuons);
694 
695  unsigned index = 0;
696  for (reco::PFCandidateConstIterator i = pfMuons->begin(); i != pfMuons->end(); ++i, ++index) {
697  const reco::PFCandidate& pfmu = *i;
698  //const reco::IsolaPFCandidate& pfmu = *i;
699  const reco::MuonRef& muonRef = pfmu.muonRef();
700  assert(muonRef.isNonnull());
701 
702  MuonBaseRef muonBaseRef(muonRef);
703  Muon aMuon(muonBaseRef);
704 
705  if (useUserData_) {
706  userDataHelper_.add(aMuon, iEvent, iSetup);
707  }
708 
709  // embed high level selection
711  // get the tracks
712  reco::TrackRef innerTrack = muonBaseRef->innerTrack();
713  reco::TrackRef globalTrack = muonBaseRef->globalTrack();
714  reco::TrackRef bestTrack = muonBaseRef->muonBestTrack();
715  reco::TrackRef chosenTrack = innerTrack;
716  // Make sure the collection it points to is there
717  if (bestTrack.isNonnull() && bestTrack.isAvailable())
718  chosenTrack = bestTrack;
719 
720  if (chosenTrack.isNonnull() && chosenTrack.isAvailable()) {
721  unsigned int nhits = chosenTrack->numberOfValidHits(); // ????
722  aMuon.setNumberOfValidHits(nhits);
723 
724  reco::TransientTrack tt = trackBuilder->build(chosenTrack);
725  embedHighLevel(aMuon, chosenTrack, tt, primaryVertex, primaryVertexIsValid, beamSpot, beamSpotIsValid);
726  }
727 
728  if (globalTrack.isNonnull() && globalTrack.isAvailable() && !embedCombinedMuon_) {
729  double norm_chi2 = globalTrack->chi2() / globalTrack->ndof();
730  aMuon.setNormChi2(norm_chi2);
731  }
732  }
733  reco::PFCandidateRef pfRef(pfMuons, index);
734  //reco::PFCandidatePtr ptrToMother(pfMuons,index);
735  reco::CandidateBaseRef pfBaseRef(pfRef);
736 
737  aMuon.setPFCandidateRef(pfRef);
738  if (embedPFCandidate_)
739  aMuon.embedPFCandidate();
740  fillMuon(aMuon, muonBaseRef, pfBaseRef, genMatches, deposits, isolationValues);
741 
742  if (computeMiniIso_)
743  setMuonMiniIso(aMuon, pc.product());
744 
745  if (addPuppiIsolation_) {
746  aMuon.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[muonBaseRef],
747  (*PUPPIIsolation_neutral_hadrons)[muonBaseRef],
748  (*PUPPIIsolation_photons)[muonBaseRef]);
749 
750  aMuon.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[muonBaseRef],
751  (*PUPPINoLeptonsIsolation_neutral_hadrons)[muonBaseRef],
752  (*PUPPINoLeptonsIsolation_photons)[muonBaseRef]);
753  } else {
754  aMuon.setIsolationPUPPI(-999., -999., -999.);
755  aMuon.setIsolationPUPPINoLeptons(-999., -999., -999.);
756  }
757 
758  if (embedPfEcalEnergy_) {
759  aMuon.setPfEcalEnergy(pfmu.ecalEnergy());
760  }
761 
762  patMuons.push_back(aMuon);
763  }
764  } else {
766  iEvent.getByToken(muonToken_, muons);
767 
768  // embedding of muon MET corrections
770  //edm::ValueMap<reco::MuonMETCorrectionData> caloMETmuCorValueMap;
773  //caloMETmuCorValueMap = *caloMETmuCorValueMap_h;
774  }
776  //edm::ValueMap<reco::MuonMETCorrectionData> tcMETmuCorValueMap;
777  if (embedTcMETMuonCorrs_) {
779  //tcMETmuCorValueMap = *tcMETmuCorValueMap_h;
780  }
781 
783  // get the PFCandidates of type muons
784  iEvent.getByToken(pfMuonToken_, pfMuons);
785  }
786 
788  if (addInverseBeta_) {
789  // get MuonTimerExtra value map
790  iEvent.getByToken(muonTimeExtraToken_, muonsTimeExtra);
791  }
792 
793  for (edm::View<reco::Muon>::const_iterator itMuon = muons->begin(); itMuon != muons->end(); ++itMuon) {
794  // construct the Muon from the ref -> save ref to original object
795  unsigned int idx = itMuon - muons->begin();
796  MuonBaseRef muonRef = muons->refAt(idx);
797  reco::CandidateBaseRef muonBaseRef(muonRef);
798 
799  Muon aMuon(muonRef);
800  fillMuon(aMuon, muonRef, muonBaseRef, genMatches, deposits, isolationValues);
801  if (computeMiniIso_)
802  setMuonMiniIso(aMuon, pc.product());
803  if (addPuppiIsolation_) {
804  aMuon.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[muonRef],
805  (*PUPPIIsolation_neutral_hadrons)[muonRef],
806  (*PUPPIIsolation_photons)[muonRef]);
807  aMuon.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[muonRef],
808  (*PUPPINoLeptonsIsolation_neutral_hadrons)[muonRef],
809  (*PUPPINoLeptonsIsolation_photons)[muonRef]);
810  } else {
811  aMuon.setIsolationPUPPI(-999., -999., -999.);
812  aMuon.setIsolationPUPPINoLeptons(-999., -999., -999.);
813  }
814 
815  // Isolation
816  if (isolator_.enabled()) {
817  //reco::CandidatePtr mother = ptrToMother->sourceCandidatePtr(0);
819  typedef pat::helper::MultiIsolator::IsolationValuePairs IsolationValuePairs;
820  // better to loop backwards, so the vector is resized less times
821  for (IsolationValuePairs::const_reverse_iterator it = isolatorTmpStorage_.rbegin(),
822  ed = isolatorTmpStorage_.rend();
823  it != ed;
824  ++it) {
825  aMuon.setIsolation(it->first, it->second);
826  }
827  }
828 
829  // for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
830  // aMuon.setIsoDeposit(isoDepositLabels_[j].first,
831  // (*deposits[j])[muonRef]);
832  // }
833 
834  // add sel to selected
835  edm::Ptr<reco::Muon> muonsPtr = muons->ptrAt(idx);
836  if (useUserData_) {
837  userDataHelper_.add(aMuon, iEvent, iSetup);
838  }
839 
840  // embed high level selection
842  // get the tracks
843  reco::TrackRef innerTrack = itMuon->innerTrack();
844  reco::TrackRef globalTrack = itMuon->globalTrack();
845  reco::TrackRef bestTrack = itMuon->muonBestTrack();
846  reco::TrackRef chosenTrack = innerTrack;
847  // Make sure the collection it points to is there
848  if (bestTrack.isNonnull() && bestTrack.isAvailable())
849  chosenTrack = bestTrack;
850  if (chosenTrack.isNonnull() && chosenTrack.isAvailable()) {
851  unsigned int nhits = chosenTrack->numberOfValidHits(); // ????
852  aMuon.setNumberOfValidHits(nhits);
853 
854  reco::TransientTrack tt = trackBuilder->build(chosenTrack);
855  embedHighLevel(aMuon, chosenTrack, tt, primaryVertex, primaryVertexIsValid, beamSpot, beamSpotIsValid);
856  }
857 
858  if (globalTrack.isNonnull() && globalTrack.isAvailable()) {
859  double norm_chi2 = globalTrack->chi2() / globalTrack->ndof();
860  aMuon.setNormChi2(norm_chi2);
861  }
862  }
863 
864  // embed MET muon corrections
866  aMuon.embedCaloMETMuonCorrs((*caloMETMuonCorrs)[muonRef]);
868  aMuon.embedTcMETMuonCorrs((*tcMETMuonCorrs)[muonRef]);
869 
871  if (embedPfEcalEnergy_)
872  aMuon.setPfEcalEnergy(-99.0);
873  unsigned index = 0;
874  for (const reco::PFCandidate& pfmu : *pfMuons) {
875  if (pfmu.muonRef().isNonnull()) {
876  if (pfmu.muonRef().id() != muonRef.id())
877  throw cms::Exception("Configuration")
878  << "Muon reference within PF candidates does not point to the muon collection." << std::endl;
879  if (pfmu.muonRef().key() == muonRef.key()) {
880  reco::PFCandidateRef pfRef(pfMuons, index);
881  aMuon.setPFCandidateRef(pfRef);
882  if (embedPfEcalEnergy_)
883  aMuon.setPfEcalEnergy(pfmu.ecalEnergy());
884  if (embedPFCandidate_)
885  aMuon.embedPFCandidate();
886  break;
887  }
888  }
889  index++;
890  }
891  }
892 
893  if (addInverseBeta_) {
894  aMuon.readTimeExtra((*muonsTimeExtra)[muonRef]);
895  }
896  // MC info
897  aMuon.initSimInfo();
898  if (simInfoIsAvailalbe) {
899  const auto& msi = (*simInfo)[muonBaseRef];
900  aMuon.setSimType(msi.primaryClass);
901  aMuon.setExtSimType(msi.extendedClass);
902  aMuon.setSimFlavour(msi.flavour);
903  aMuon.setSimHeaviestMotherFlavour(msi.heaviestMotherFlavour);
904  aMuon.setSimPdgId(msi.pdgId);
905  aMuon.setSimMotherPdgId(msi.motherPdgId);
906  aMuon.setSimBX(msi.tpBX);
907  aMuon.setSimTpEvent(msi.tpEvent);
908  aMuon.setSimProdRho(msi.vertex.Rho());
909  aMuon.setSimProdZ(msi.vertex.Z());
910  aMuon.setSimPt(msi.p4.pt());
911  aMuon.setSimEta(msi.p4.eta());
912  aMuon.setSimPhi(msi.p4.phi());
913  aMuon.setSimMatchQuality(msi.tpAssoQuality);
914  }
915  patMuons.push_back(aMuon);
916  }
917  }
918 
919  // sort muons in pt
920  std::sort(patMuons.begin(), patMuons.end(), [](auto const& t1, auto const& t2) { return t1.pt() > t2.pt(); });
921 
922  // Store standard muon selection decisions and jet related
923  // quantaties.
924  // Need a separate loop over muons to have all inputs properly
925  // computed and stored in the object.
927  if (computeMuonMVA_)
928  iEvent.getByToken(rho_, rho);
929  const reco::Vertex* pv(nullptr);
930  if (primaryVertexIsValid)
931  pv = &primaryVertex;
932 
935  bool triggerObjectsAvailable = false;
936  bool triggerResultsAvailable = false;
937  if (addTriggerMatching_) {
938  triggerObjectsAvailable = iEvent.getByToken(triggerObjects_, triggerObjects);
939  triggerResultsAvailable = iEvent.getByToken(triggerResults_, triggerResults);
940  }
941 
942  for (auto& muon : patMuons) {
943  // trigger info
944  if (addTriggerMatching_ and triggerObjectsAvailable and triggerResultsAvailable) {
945  const edm::TriggerNames& triggerNames(iEvent.triggerNames(*triggerResults));
948  }
949 
951  muon.setSelectors(0);
952  bool isRun2016BCDEF = (272728 <= iEvent.run() && iEvent.run() <= 278808);
953  muon.setSelectors(muon::makeSelectorBitset(muon, pv, isRun2016BCDEF));
954  }
955  float miniIsoValue = -1;
956  if (computeMiniIso_) {
957  // MiniIsolation working points
958 
960 
961  muon.setSelector(reco::Muon::MiniIsoLoose, miniIsoValue < 0.40);
962  muon.setSelector(reco::Muon::MiniIsoMedium, miniIsoValue < 0.20);
963  muon.setSelector(reco::Muon::MiniIsoTight, miniIsoValue < 0.10);
964  muon.setSelector(reco::Muon::MiniIsoVeryTight, miniIsoValue < 0.05);
965  }
966 
967  double puppiCombinedIsolationPAT = -1;
969  puppiCombinedIsolationPAT = puppiCombinedIsolation(muon, pc.product());
970  muon.setSelector(reco::Muon::PuppiIsoLoose, puppiCombinedIsolationPAT < 0.27);
971  muon.setSelector(reco::Muon::PuppiIsoMedium, puppiCombinedIsolationPAT < 0.22);
972  muon.setSelector(reco::Muon::PuppiIsoTight, puppiCombinedIsolationPAT < 0.12);
973  }
974 
975  float jetPtRatio = 0.0;
976  float jetPtRel = 0.0;
977  float mva = 0.0;
978  float mva_lowpt = 0.0;
979  if (computeMuonMVA_ && primaryVertexIsValid && computeMiniIso_) {
980  if (mvaUseJec_) {
981  mva = globalCache()->muonMvaEstimator().computeMva(muon,
983  *(mvaBTagCollectionTag.product()),
984  jetPtRatio,
985  jetPtRel,
986  miniIsoValue,
987  mvaL1Corrector.product(),
988  mvaL1L2L3ResCorrector.product());
989  mva_lowpt = globalCache()->muonLowPtMvaEstimator().computeMva(muon,
991  *(mvaBTagCollectionTag.product()),
992  jetPtRatio,
993  jetPtRel,
994  miniIsoValue,
995  mvaL1Corrector.product(),
996  mvaL1L2L3ResCorrector.product());
997 
998  } else {
999  mva = globalCache()->muonMvaEstimator().computeMva(
1000  muon, primaryVertex, *mvaBTagCollectionTag, jetPtRatio, jetPtRel, miniIsoValue);
1001  mva_lowpt = globalCache()->muonLowPtMvaEstimator().computeMva(
1002  muon, primaryVertex, *mvaBTagCollectionTag, jetPtRatio, jetPtRel, miniIsoValue);
1003  }
1004 
1005  muon.setMvaValue(mva);
1006  muon.setLowPtMvaValue(mva_lowpt);
1007  muon.setJetPtRatio(jetPtRatio);
1008  muon.setJetPtRel(jetPtRel);
1009 
1010  // multi-isolation
1011  if (computeMiniIso_) {
1012  muon.setSelector(reco::Muon::MultiIsoMedium,
1013  miniIsoValue < 0.11 && (muon.jetPtRatio() > 0.74 || muon.jetPtRel() > 6.8));
1014  }
1015 
1016  // MVA working points
1017  // https://twiki.cern.ch/twiki/bin/viewauth/CMS/LeptonMVA
1018  const double dB2D = std::abs(muon.dB(pat::Muon::PV2D));
1019  const double dB3D = std::abs(muon.dB(pat::Muon::PV3D));
1020  const double edB3D = std::abs(muon.edB(pat::Muon::PV3D));
1021  const double sip3D = edB3D > 0 ? dB3D / edB3D : 0.0;
1022  const double dz = std::abs(muon.muonBestTrack()->dz(primaryVertex.position()));
1023 
1024  // muon preselection
1025  if (muon.pt() > 5 and muon.isLooseMuon() and muon.passed(reco::Muon::MiniIsoLoose) and sip3D < 8.0 and
1026  dB2D < 0.05 and dz < 0.1) {
1027  muon.setSelector(reco::Muon::MvaLoose, muon.mvaValue() > -0.60);
1028  muon.setSelector(reco::Muon::MvaMedium, muon.mvaValue() > -0.20);
1029  muon.setSelector(reco::Muon::MvaTight, muon.mvaValue() > 0.15);
1030  muon.setSelector(reco::Muon::MvaVTight, muon.mvaValue() > 0.45);
1031  muon.setSelector(reco::Muon::MvaVVTight, muon.mvaValue() > 0.9);
1032  }
1033  if (muon.pt() > 5 and muon.isLooseMuon() and sip3D < 4 and dB2D < 0.5 and dz < 1) {
1034  muon.setSelector(reco::Muon::LowPtMvaLoose, muon.lowptMvaValue() > -0.60);
1035  muon.setSelector(reco::Muon::LowPtMvaMedium, muon.lowptMvaValue() > -0.20);
1036  }
1037  }
1038 
1039  //SOFT MVA
1040  if (computeSoftMuonMVA_) {
1041  float mva = globalCache()->softMuonMvaEstimator().computeMva(muon);
1042  muon.setSoftMvaValue(mva);
1043  //preselection in SoftMuonMvaEstimator.cc
1044  muon.setSelector(reco::Muon::SoftMvaId, muon.softMvaValue() > 0.58); //WP choose for bmm4
1045  }
1046  }
1047 
1048  // put products in Event
1050 
1051  if (isolator_.enabled())
1052  isolator_.endEvent();
1053 }

References funct::abs(), 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_, computeMuonMVA_, computePuppiCombinedIso_, computeSoftMuonMVA_, CandIsolatorFromDeposits_cfi::deposits, PVValHelper::dz, 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_, electronProducer_cff::isolationValues, isolationValueTokens_, isolator_, isolatorTmpStorage_, edm::HandleBase::isValid(), dqmiolumiharvest::j, reco::Muon::LowPtMvaLoose, reco::Muon::LowPtMvaMedium, 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_, muonProducer_cfi::mvaL1Corrector, mvaL1Corrector_, muonProducer_cfi::mvaL1L2L3ResCorrector, mvaL1L2L3ResCorrector_, reco::Muon::MvaLoose, reco::Muon::MvaMedium, reco::Muon::MvaTight, mvaUseJec_, reco::Muon::MvaVTight, reco::Muon::MvaVVTight, 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(), pat::Muon::PV2D, pat::Muon::PV3D, 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_, groupFilesInBlocks::tt, useParticleFlow_, userDataHelper_, and useUserData_.

◆ puppiCombinedIsolation()

double PATMuonProducer::puppiCombinedIsolation ( const pat::Muon muon,
const pat::PackedCandidateCollection pc 
)
private

Definition at line 1162 of file PATMuonProducer.cc.

1162  {
1163  constexpr double dR_threshold = 0.4;
1164  constexpr double dR2_threshold = dR_threshold * dR_threshold;
1165  constexpr double mix_fraction = 0.5;
1166  enum particleType { CH = 0, NH = 1, PH = 2, OTHER = 100000 };
1167  double val_PuppiWithLep = 0.0;
1168  double val_PuppiWithoutLep = 0.0;
1169 
1170  for (const auto& cand : *pc) { //pat::pat::PackedCandidate loop start
1171 
1172  const particleType pType = isChargedHadron(cand.pdgId()) ? CH
1173  : isNeutralHadron(cand.pdgId()) ? NH
1174  : isPhoton(cand.pdgId()) ? PH
1175  : OTHER;
1176  if (pType == OTHER) {
1177  if (cand.pdgId() != 1 && cand.pdgId() != 2 && abs(cand.pdgId()) != 11 && abs(cand.pdgId()) != 13) {
1178  LogTrace("PATMuonProducer") << "candidate with PDGID = " << cand.pdgId()
1179  << " is not CH/NH/PH/e/mu or 1/2 (and this is removed from isolation calculation)"
1180  << std::endl;
1181  }
1182  continue;
1183  }
1184  double d_eta = std::abs(cand.eta() - muon.eta());
1185  if (d_eta > dR_threshold)
1186  continue;
1187 
1188  double d_phi = std::abs(reco::deltaPhi(cand.phi(), muon.phi()));
1189  if (d_phi > dR_threshold)
1190  continue;
1191 
1192  double dR2 = reco::deltaR2(cand, muon);
1193  if (dR2 > dR2_threshold)
1194  continue;
1195  if (pType == CH && dR2 < 0.0001 * 0.0001)
1196  continue;
1197  if (pType == NH && dR2 < 0.01 * 0.01)
1198  continue;
1199  if (pType == PH && dR2 < 0.01 * 0.01)
1200  continue;
1201  val_PuppiWithLep += cand.pt() * cand.puppiWeight();
1202  val_PuppiWithoutLep += cand.pt() * cand.puppiWeightNoLep();
1203 
1204  } //pat::pat::PackedCandidate loop end
1205 
1206  double reliso_Puppi_withLep = val_PuppiWithLep / muon.pt();
1207  double reliso_Puppi_withoutlep = val_PuppiWithoutLep / muon.pt();
1208  double reliso_Puppi_combined = mix_fraction * reliso_Puppi_withLep + (1.0 - mix_fraction) * reliso_Puppi_withoutlep;
1209  return reliso_Puppi_combined;
1210 }

References funct::abs(), L1DTConfigBti_cff::CH, reco::deltaPhi(), reco::deltaR2(), isChargedHadron(), isNeutralHadron(), isPhoton(), LogTrace, dqm::qstatus::OTHER, and PbPb_ZMuSkimMuonDPG_cff::particleType.

Referenced by produce().

◆ readIsolationLabels()

template<typename T >
void pat::PATMuonProducer::readIsolationLabels ( const edm::ParameterSet iConfig,
const char *  psetName,
IsolationLabels labels,
std::vector< edm::EDGetTokenT< edm::ValueMap< T >>> &  tokens 
)
private

fill label vector from the contents of the parameter set, for the embedding of isoDeposits or userIsolation values

Definition at line 272 of file PATMuonProducer.cc.

275  {
276  labels.clear();
277 
278  if (iConfig.exists(psetName)) {
279  edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>(psetName);
280 
281  if (depconf.exists("tracker"))
282  labels.emplace_back(pat::TrackIso, depconf.getParameter<edm::InputTag>("tracker"));
283  if (depconf.exists("ecal"))
284  labels.emplace_back(pat::EcalIso, depconf.getParameter<edm::InputTag>("ecal"));
285  if (depconf.exists("hcal"))
286  labels.emplace_back(pat::HcalIso, depconf.getParameter<edm::InputTag>("hcal"));
287  if (depconf.exists("pfAllParticles")) {
288  labels.emplace_back(pat::PfAllParticleIso, depconf.getParameter<edm::InputTag>("pfAllParticles"));
289  }
290  if (depconf.exists("pfChargedHadrons")) {
291  labels.emplace_back(pat::PfChargedHadronIso, depconf.getParameter<edm::InputTag>("pfChargedHadrons"));
292  }
293  if (depconf.exists("pfChargedAll")) {
294  labels.emplace_back(pat::PfChargedAllIso, depconf.getParameter<edm::InputTag>("pfChargedAll"));
295  }
296  if (depconf.exists("pfPUChargedHadrons")) {
297  labels.emplace_back(pat::PfPUChargedHadronIso, depconf.getParameter<edm::InputTag>("pfPUChargedHadrons"));
298  }
299  if (depconf.exists("pfNeutralHadrons")) {
300  labels.emplace_back(pat::PfNeutralHadronIso, depconf.getParameter<edm::InputTag>("pfNeutralHadrons"));
301  }
302  if (depconf.exists("pfPhotons")) {
303  labels.emplace_back(pat::PfGammaIso, depconf.getParameter<edm::InputTag>("pfPhotons"));
304  }
305  if (depconf.exists("user")) {
306  std::vector<edm::InputTag> userdeps = depconf.getParameter<std::vector<edm::InputTag>>("user");
307  std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
309  for (; it != ed; ++it, ++key) {
310  labels.push_back(std::make_pair(pat::IsolationKeys(key), *it));
311  }
312  tokens = edm::vector_transform(
313  labels, [this](IsolationLabel const& label) { return consumes<edm::ValueMap<T>>(label.second); });
314  }
315  }
317  return consumes<edm::ValueMap<T>>(label.second);
318  });
319 }

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, pat::TrackIso, pat::UserBaseIso, and edm::vector_transform().

◆ relMiniIsoPUCorrected()

double pat::PATMuonProducer::relMiniIsoPUCorrected ( const pat::Muon aMuon,
double  rho 
)
private

◆ setMuonMiniIso()

void PATMuonProducer::setMuonMiniIso ( pat::Muon aMuon,
const pat::PackedCandidateCollection pc 
)
private

Definition at line 1139 of file PATMuonProducer.cc.

1139  {
1141  aMuon.polarP4(),
1142  miniIsoParams_[0],
1143  miniIsoParams_[1],
1144  miniIsoParams_[2],
1145  miniIsoParams_[3],
1146  miniIsoParams_[4],
1147  miniIsoParams_[5],
1148  miniIsoParams_[6],
1149  miniIsoParams_[7],
1150  miniIsoParams_[8]);
1151  aMuon.setMiniPFIsolation(miniiso);
1152 }

References pat::getMiniPFIsolation(), miniIsoParams_, reco::LeafCandidate::polarP4(), and pat::Lepton< LeptonType >::setMiniPFIsolation().

Referenced by produce().

Member Data Documentation

◆ addEfficiencies_

bool pat::PATMuonProducer::addEfficiencies_
private

add efficiencies to the muon (this will be data members of th muon even w/o embedding)

Definition at line 219 of file PATMuonProducer.cc.

◆ addGenMatch_

bool pat::PATMuonProducer::addGenMatch_
private

add generator match information

Definition at line 191 of file PATMuonProducer.cc.

Referenced by fillMuon(), and produce().

◆ addInverseBeta_

bool pat::PATMuonProducer::addInverseBeta_
private

add combined inverse beta measurement into the muon

Definition at line 187 of file PATMuonProducer.cc.

Referenced by produce().

◆ addPuppiIsolation_

bool pat::PATMuonProducer::addPuppiIsolation_
private

add puppi isolation

Definition at line 225 of file PATMuonProducer.cc.

Referenced by produce().

◆ addResolutions_

bool pat::PATMuonProducer::addResolutions_
private

add resolutions to the muon (this will be data members of th muon even w/o embedding)

Definition at line 197 of file PATMuonProducer.cc.

◆ addTriggerMatching_

bool pat::PATMuonProducer::addTriggerMatching_
private

Trigger.

Definition at line 258 of file PATMuonProducer.cc.

Referenced by produce().

◆ beamLineToken_

edm::EDGetTokenT<reco::BeamSpot> pat::PATMuonProducer::beamLineToken_
private

input source of the primary vertex/beamspot

Definition at line 209 of file PATMuonProducer.cc.

Referenced by produce().

◆ caloMETMuonCorrsToken_

edm::EDGetTokenT<edm::ValueMap<reco::MuonMETCorrectionData> > pat::PATMuonProducer::caloMETMuonCorrsToken_
private

source of caloMET muon corrections

Definition at line 175 of file PATMuonProducer.cc.

Referenced by produce().

◆ computeMiniIso_

bool pat::PATMuonProducer::computeMiniIso_
private

Definition at line 154 of file PATMuonProducer.cc.

Referenced by produce().

◆ computeMuonMVA_

bool pat::PATMuonProducer::computeMuonMVA_
private

standard muon selectors

Definition at line 235 of file PATMuonProducer.cc.

Referenced by produce().

◆ computePuppiCombinedIso_

bool pat::PATMuonProducer::computePuppiCombinedIso_
private

Definition at line 155 of file PATMuonProducer.cc.

Referenced by produce().

◆ computeSoftMuonMVA_

bool pat::PATMuonProducer::computeSoftMuonMVA_
private

Definition at line 236 of file PATMuonProducer.cc.

Referenced by produce().

◆ effectiveAreaVec_

std::vector<double> pat::PATMuonProducer::effectiveAreaVec_
private

Definition at line 156 of file PATMuonProducer.cc.

Referenced by produce().

◆ efficiencyLoader_

pat::helper::EfficiencyLoader pat::PATMuonProducer::efficiencyLoader_
private

helper class to add efficiencies to the muon

Definition at line 250 of file PATMuonProducer.cc.

Referenced by fillMuon(), and produce().

◆ embedBestTrack_

bool pat::PATMuonProducer::embedBestTrack_
private

embed the track from best muon measurement (global pflow)

Definition at line 161 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ embedCaloMETMuonCorrs_

bool pat::PATMuonProducer::embedCaloMETMuonCorrs_
private

embed muon MET correction info for caloMET into the muon

Definition at line 173 of file PATMuonProducer.cc.

Referenced by produce().

◆ embedCombinedMuon_

bool pat::PATMuonProducer::embedCombinedMuon_
private

embed track of the combined fit into the muon

Definition at line 171 of file PATMuonProducer.cc.

Referenced by fillMuon(), and produce().

◆ embedDytMuon_

bool pat::PATMuonProducer::embedDytMuon_
private

embed track from DYT muon fit into the muon

Definition at line 185 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ embedGenMatch_

bool pat::PATMuonProducer::embedGenMatch_
private

embed the gen match information into the muon

Definition at line 195 of file PATMuonProducer.cc.

Referenced by fillMuon(), and produce().

◆ embedHighLevelSelection_

bool pat::PATMuonProducer::embedHighLevelSelection_
private

embed high level selection variables

Definition at line 207 of file PATMuonProducer.cc.

Referenced by produce().

◆ embedPFCandidate_

bool pat::PATMuonProducer::embedPFCandidate_
private

embed pfCandidates into the muon

Definition at line 205 of file PATMuonProducer.cc.

Referenced by produce().

◆ embedPfEcalEnergy_

bool pat::PATMuonProducer::embedPfEcalEnergy_
private

add ecal PF energy

Definition at line 223 of file PATMuonProducer.cc.

Referenced by produce().

◆ embedPickyMuon_

bool pat::PATMuonProducer::embedPickyMuon_
private

embed track from picky muon fit into the muon

Definition at line 181 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ embedStandAloneMuon_

bool pat::PATMuonProducer::embedStandAloneMuon_
private

embed track from muon system into the muon

Definition at line 169 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ embedTcMETMuonCorrs_

bool pat::PATMuonProducer::embedTcMETMuonCorrs_
private

embed muon MET correction info for tcMET into the muon

Definition at line 177 of file PATMuonProducer.cc.

Referenced by produce().

◆ embedTpfmsMuon_

bool pat::PATMuonProducer::embedTpfmsMuon_
private

embed track from tpfms muon fit into the muon

Definition at line 183 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ embedTrack_

bool pat::PATMuonProducer::embedTrack_
private

embed the track from inner tracker into the muon

Definition at line 167 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ embedTunePBestTrack_

bool pat::PATMuonProducer::embedTunePBestTrack_
private

embed the track from best muon measurement (muon only)

Definition at line 163 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ forceEmbedBestTrack_

bool pat::PATMuonProducer::forceEmbedBestTrack_
private

force separate embed of the best track even if already embedded

Definition at line 165 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ genMatchTokens_

std::vector<edm::EDGetTokenT<edm::Association<reco::GenParticleCollection> > > pat::PATMuonProducer::genMatchTokens_
private

input tags for generator match information

Definition at line 193 of file PATMuonProducer.cc.

Referenced by produce().

◆ geometryToken_

const edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> pat::PATMuonProducer::geometryToken_
private

Definition at line 263 of file PATMuonProducer.cc.

Referenced by produce().

◆ hltCollectionFilters_

std::vector<std::string> pat::PATMuonProducer::hltCollectionFilters_
private

Definition at line 261 of file PATMuonProducer.cc.

Referenced by produce().

◆ isoDepositLabels_

IsolationLabels pat::PATMuonProducer::isoDepositLabels_
private

input source for isoDeposits

Definition at line 213 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ isoDepositTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<IsoDeposit> > > pat::PATMuonProducer::isoDepositTokens_
private

Definition at line 214 of file PATMuonProducer.cc.

Referenced by produce().

◆ isolationValueLabels_

IsolationLabels pat::PATMuonProducer::isolationValueLabels_
private

input source isolation value maps

Definition at line 216 of file PATMuonProducer.cc.

Referenced by fillMuon().

◆ isolationValueTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<double> > > pat::PATMuonProducer::isolationValueTokens_
private

Definition at line 217 of file PATMuonProducer.cc.

Referenced by produce().

◆ isolator_

pat::helper::MultiIsolator pat::PATMuonProducer::isolator_
private

— tools — helper class to add userdefined isolation values to the muon

Definition at line 246 of file PATMuonProducer.cc.

Referenced by produce().

◆ isolatorTmpStorage_

pat::helper::MultiIsolator::IsolationValuePairs pat::PATMuonProducer::isolatorTmpStorage_
private

isolation value pair for temporary storage before being folded into the muon

Definition at line 248 of file PATMuonProducer.cc.

Referenced by produce().

◆ miniIsoParams_

std::vector<double> pat::PATMuonProducer::miniIsoParams_
private

Definition at line 157 of file PATMuonProducer.cc.

Referenced by getRelMiniIsoPUCorrected(), and setMuonMiniIso().

◆ muonTimeExtraToken_

edm::EDGetTokenT<edm::ValueMap<reco::MuonTimeExtra> > pat::PATMuonProducer::muonTimeExtraToken_
private

input tag for reading inverse beta

Definition at line 189 of file PATMuonProducer.cc.

Referenced by produce().

◆ muonToken_

edm::EDGetTokenT<edm::View<reco::Muon> > pat::PATMuonProducer::muonToken_
private

input source

Definition at line 150 of file PATMuonProducer.cc.

Referenced by produce().

◆ mvaBTagCollectionTag_

edm::EDGetTokenT<reco::JetTagCollection> pat::PATMuonProducer::mvaBTagCollectionTag_
private

Definition at line 239 of file PATMuonProducer.cc.

Referenced by produce().

◆ mvaL1Corrector_

edm::EDGetTokenT<reco::JetCorrector> pat::PATMuonProducer::mvaL1Corrector_
private

Definition at line 240 of file PATMuonProducer.cc.

Referenced by produce().

◆ mvaL1L2L3ResCorrector_

edm::EDGetTokenT<reco::JetCorrector> pat::PATMuonProducer::mvaL1L2L3ResCorrector_
private

Definition at line 241 of file PATMuonProducer.cc.

Referenced by produce().

◆ mvaUseJec_

bool pat::PATMuonProducer::mvaUseJec_
private

Definition at line 238 of file PATMuonProducer.cc.

Referenced by produce().

◆ patMuonPutToken_

const edm::EDPutTokenT<std::vector<Muon> > pat::PATMuonProducer::patMuonPutToken_
private

Definition at line 266 of file PATMuonProducer.cc.

Referenced by produce().

◆ pcToken_

edm::EDGetTokenT<pat::PackedCandidateCollection> pat::PATMuonProducer::pcToken_
private

Definition at line 153 of file PATMuonProducer.cc.

Referenced by produce().

◆ pfMuonToken_

edm::EDGetTokenT<reco::PFCandidateCollection> pat::PATMuonProducer::pfMuonToken_
private

input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT

Definition at line 203 of file PATMuonProducer.cc.

Referenced by produce().

◆ PUPPIIsolation_charged_hadrons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATMuonProducer::PUPPIIsolation_charged_hadrons_
private

Definition at line 227 of file PATMuonProducer.cc.

Referenced by produce().

◆ PUPPIIsolation_neutral_hadrons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATMuonProducer::PUPPIIsolation_neutral_hadrons_
private

Definition at line 228 of file PATMuonProducer.cc.

Referenced by produce().

◆ PUPPIIsolation_photons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATMuonProducer::PUPPIIsolation_photons_
private

Definition at line 229 of file PATMuonProducer.cc.

Referenced by produce().

◆ PUPPINoLeptonsIsolation_charged_hadrons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATMuonProducer::PUPPINoLeptonsIsolation_charged_hadrons_
private

Definition at line 231 of file PATMuonProducer.cc.

Referenced by produce().

◆ PUPPINoLeptonsIsolation_neutral_hadrons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATMuonProducer::PUPPINoLeptonsIsolation_neutral_hadrons_
private

Definition at line 232 of file PATMuonProducer.cc.

Referenced by produce().

◆ PUPPINoLeptonsIsolation_photons_

edm::EDGetTokenT<edm::ValueMap<float> > pat::PATMuonProducer::PUPPINoLeptonsIsolation_photons_
private

Definition at line 233 of file PATMuonProducer.cc.

Referenced by produce().

◆ pvToken_

edm::EDGetTokenT<std::vector<reco::Vertex> > pat::PATMuonProducer::pvToken_
private

input source of the primary vertex

Definition at line 211 of file PATMuonProducer.cc.

Referenced by produce().

◆ recomputeBasicSelectors_

bool pat::PATMuonProducer::recomputeBasicSelectors_
private

Definition at line 237 of file PATMuonProducer.cc.

Referenced by produce().

◆ relMiniIsoPUCorrected_

double pat::PATMuonProducer::relMiniIsoPUCorrected_
private

Definition at line 158 of file PATMuonProducer.cc.

◆ resolutionLoader_

pat::helper::KinResolutionsLoader pat::PATMuonProducer::resolutionLoader_
private

helper class to add resolutions to the muon

Definition at line 199 of file PATMuonProducer.cc.

Referenced by fillMuon(), and produce().

◆ rho_

edm::EDGetTokenT<double> pat::PATMuonProducer::rho_
private

Definition at line 242 of file PATMuonProducer.cc.

Referenced by produce().

◆ simInfo_

edm::EDGetTokenT<edm::ValueMap<reco::MuonSimInfo> > pat::PATMuonProducer::simInfo_
private

MC info.

Definition at line 255 of file PATMuonProducer.cc.

Referenced by produce().

◆ tcMETMuonCorrsToken_

edm::EDGetTokenT<edm::ValueMap<reco::MuonMETCorrectionData> > pat::PATMuonProducer::tcMETMuonCorrsToken_
private

source of tcMET muon corrections

Definition at line 179 of file PATMuonProducer.cc.

Referenced by produce().

◆ transientTrackBuilderToken_

const edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> pat::PATMuonProducer::transientTrackBuilderToken_
private

Definition at line 264 of file PATMuonProducer.cc.

Referenced by produce().

◆ triggerObjects_

edm::EDGetTokenT<std::vector<pat::TriggerObjectStandAlone> > pat::PATMuonProducer::triggerObjects_
private

Definition at line 259 of file PATMuonProducer.cc.

Referenced by produce().

◆ triggerResults_

edm::EDGetTokenT<edm::TriggerResults> pat::PATMuonProducer::triggerResults_
private

Definition at line 260 of file PATMuonProducer.cc.

Referenced by produce().

◆ useParticleFlow_

bool pat::PATMuonProducer::useParticleFlow_
private

switch to use particle flow (PF2PAT) or not

Definition at line 201 of file PATMuonProducer.cc.

Referenced by fillMuon(), and produce().

◆ userDataHelper_

pat::PATUserDataHelper<pat::Muon> pat::PATMuonProducer::userDataHelper_
private

helper class to add userData to the muon

Definition at line 252 of file PATMuonProducer.cc.

Referenced by produce().

◆ useUserData_

bool pat::PATMuonProducer::useUserData_
private

add user data to the muon (this will be data members of th muon even w/o embedding)

Definition at line 221 of file PATMuonProducer.cc.

Referenced by produce().

pat::PATMuonProducer::addInverseBeta_
bool addInverseBeta_
add combined inverse beta measurement into the muon
Definition: PATMuonProducer.cc:187
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
pat::Muon::embedTpfmsMuon
void embedTpfmsMuon()
embed reference to the above tpfms Track
reco::Muon::isAValidMuonTrack
bool isAValidMuonTrack(const MuonTrackType &type) const
pat::PATMuonProducer::fillMuon
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
Definition: PATMuonProducer.cc:1055
cutBasedMuonId_MuonPOG_V0_cff.globalTrack
globalTrack
Definition: cutBasedMuonId_MuonPOG_V0_cff.py:135
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
reco::Muon::MvaVTight
Definition: Muon.h:232
pat::PATMuonProducer::getRelMiniIsoPUCorrected
double getRelMiniIsoPUCorrected(const pat::Muon &muon, double rho, const std::vector< double > &area)
Definition: PATMuonProducer.cc:1154
pat::PATUserDataHelper
Assists in assimilating all pat::UserData into pat objects.
Definition: PATUserDataHelper.h:49
mps_fire.i
i
Definition: mps_fire.py:428
pat::EcalIso
Definition: Isolation.h:11
edm::ESInputTag
Definition: ESInputTag.h:87
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
pat::PATMuonProducer::embedTrack_
bool embedTrack_
embed the track from inner tracker into the muon
Definition: PATMuonProducer.cc:167
GeomDet
Definition: GeomDet.h:27
edm::Handle::product
T const * product() const
Definition: Handle.h:70
pat::Muon::PVDZ
Definition: Muon.h:237
pat::Muon::BS3D
Definition: Muon.h:237
electronProducer_cff.isolationValues
isolationValues
Definition: electronProducer_cff.py:26
triggerMatchMonitor_cfi.triggerObjects
triggerObjects
Definition: triggerMatchMonitor_cfi.py:15
reco::Muon::MiniIsoVeryTight
Definition: Muon.h:223
pat::PATMuonProducer::embedPfEcalEnergy_
bool embedPfEcalEnergy_
add ecal PF energy
Definition: PATMuonProducer.cc:223
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
pat::PATMuonProducer::IsolationLabel
std::pair< pat::IsolationKeys, edm::InputTag > IsolationLabel
Definition: PATMuonProducer.cc:100
muon
Definition: MuonCocktails.h:17
pat::miniIsoDr
float miniIsoDr(const reco::Candidate::PolarLorentzVector &p4, float mindr, float maxdr, float kt_scale)
Definition: MiniIsolation.cc:15
reco::MuonChamberMatch::x
float x
Definition: MuonChamberMatch.h:19
muonProducer_cfi.caloMETMuonCorrs
caloMETMuonCorrs
Definition: muonProducer_cfi.py:48
pat::helper::EfficiencyLoader
Definition: EfficiencyLoader.h:16
reco::Muon::TPFMS
Definition: Muon.h:36
edm::Ref::isAvailable
bool isAvailable() const
Definition: Ref.h:537
reco::deltaPhi
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
pat::muonRelMiniIsoPUCorrected
double muonRelMiniIsoPUCorrected(const PFIsolation &iso, const reco::Candidate::PolarLorentzVector &p4, double dr, double rho, const std::vector< double > &area)
Definition: MiniIsolation.cc:59
pat::TriggerObjectStandAlone
Analysis-level trigger object class (stand-alone)
Definition: TriggerObjectStandAlone.h:32
pat::PATMuonProducer::embedTunePBestTrack_
bool embedTunePBestTrack_
embed the track from best muon measurement (muon only)
Definition: PATMuonProducer.cc:163
pat::helper::MultiIsolator::fill
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
Definition: MultiIsolator.h:84
pat::PATUserDataHelper::fillDescription
static void fillDescription(edm::ParameterSetDescription &iDesc)
Definition: PATUserDataHelper.h:135
reco::Muon::DYT
Definition: Muon.h:36
pat::PATMuonProducer::embedPickyMuon_
bool embedPickyMuon_
embed track from picky muon fit into the muon
Definition: PATMuonProducer.cc:181
geometry
Definition: geometry.py:1
reco::PFCandidateConstIterator
PFCandidateCollection::const_iterator PFCandidateConstIterator
iterator
Definition: PFCandidateFwd.h:18
reco::Muon::PuppiIsoLoose
Definition: Muon.h:229
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
reco::Muon::SoftMvaId
Definition: Muon.h:216
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
pat::Lepton::setIsolation
void setIsolation(IsolationKeys key, float value)
Definition: Lepton.h:115
pat::helper::EfficiencyLoader::enabled
bool enabled() const
'true' if this there is at least one efficiency configured
Definition: EfficiencyLoader.h:25
cms::cuda::assert
assert(be >=bs)
pat::PATMuonProducer::isolatorTmpStorage_
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
isolation value pair for temporary storage before being folded into the muon
Definition: PATMuonProducer.cc:248
pat::Muon::embedDytMuon
void embedDytMuon()
embed reference to the above dyt Track
pat::PATMuonProducer::triggerObjects_
edm::EDGetTokenT< std::vector< pat::TriggerObjectStandAlone > > triggerObjects_
Definition: PATMuonProducer.cc:259
pat::PATObject::addGenParticleRef
void addGenParticleRef(const reco::GenParticleRef &ref)
Definition: PATObject.h:751
pat::PfAllParticleIso
Definition: Isolation.h:13
pat::PATMuonProducer::GenAssociations
std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
Definition: PATMuonProducer.cc:97
pat::PATMuonProducer::mvaL1L2L3ResCorrector_
edm::EDGetTokenT< reco::JetCorrector > mvaL1L2L3ResCorrector_
Definition: PATMuonProducer.cc:241
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
pat::PATMuonProducer::embedDytMuon_
bool embedDytMuon_
embed track from DYT muon fit into the muon
Definition: PATMuonProducer.cc:185
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
pat::Muon::embedMuonBestTrack
void embedMuonBestTrack(bool force=false)
beam_dqm_sourceclient-live_cfg.mva
mva
Definition: beam_dqm_sourceclient-live_cfg.py:127
pat::PATMuonProducer::fillHltTriggerInfo
void fillHltTriggerInfo(pat::Muon &muon, edm::Handle< std::vector< pat::TriggerObjectStandAlone >> &triggerObjects, const edm::TriggerNames &names, const std::vector< std::string > &collection_names)
Definition: PATMuonProducer.cc:548
pat::PATMuonProducer::recomputeBasicSelectors_
bool recomputeBasicSelectors_
Definition: PATMuonProducer.cc:237
edm::Handle
Definition: AssociativeIterator.h:50
edm::ParameterSetDescription::addOptional
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:105
pat::Muon::embedCombinedMuon
void embedCombinedMuon()
set reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon...
pat::helper::MultiIsolator::IsolationValuePairs
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
Definition: MultiIsolator.h:17
pat::PATMuonProducer::isolationValueTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
Definition: PATMuonProducer.cc:217
pat::helper::KinResolutionsLoader::enabled
bool enabled() const
'true' if this there is at least one efficiency configured
Definition: KinResolutionsLoader.h:27
pat::PATMuonProducer::embedCombinedMuon_
bool embedCombinedMuon_
embed track of the combined fit into the muon
Definition: PATMuonProducer.cc:171
Muon
Definition: Muon.py:1
pat::helper::MultiIsolator::enabled
bool enabled() const
True if it has a non null configuration.
Definition: MultiIsolator.h:55
pat::PATMuonProducer::isPhoton
bool isPhoton(long pdgid)
Definition: PATMuonProducer.cc:1216
edm::Ref< GenParticleCollection >
pat::PATMuonProducer::embedGenMatch_
bool embedGenMatch_
embed the gen match information into the muon
Definition: PATMuonProducer.cc:195
pat::PATMuonProducer::PUPPIIsolation_neutral_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
Definition: PATMuonProducer.cc:228
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
pat::helper::MultiIsolator::endEvent
void endEvent()
Definition: MultiIsolator.cc:85
pat::Muon::BS2D
Definition: Muon.h:237
reco::Muon::PuppiIsoTight
Definition: Muon.h:231
BeamMonitor_cff.primaryVertex
primaryVertex
hltOfflineBeamSpot for HLTMON
Definition: BeamMonitor_cff.py:7
MTVHistoProducerAlgoForTrackerBlock_cfi.maxdr
maxdr
Definition: MTVHistoProducerAlgoForTrackerBlock_cfi.py:80
pat::PATMuonProducer::isolationValueLabels_
IsolationLabels isolationValueLabels_
input source isolation value maps
Definition: PATMuonProducer.cc:216
pat::PATMuonProducer::IsolationValueMaps
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
Definition: PATMuonProducer.cc:99
pat::PATMuonProducer::efficiencyLoader_
pat::helper::EfficiencyLoader efficiencyLoader_
helper class to add efficiencies to the muon
Definition: PATMuonProducer.cc:250
reco::PFCandidate::muonRef
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:421
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
reco::Muon::PuppiIsoMedium
Definition: Muon.h:230
pat::PATMuonProducer::useUserData_
bool useUserData_
add user data to the muon (this will be data members of th muon even w/o embedding)
Definition: PATMuonProducer.cc:221
pat::PATMuonProducer::patMuonPutToken_
const edm::EDPutTokenT< std::vector< Muon > > patMuonPutToken_
Definition: PATMuonProducer.cc:266
pat::PATMuonProducer::PUPPIIsolation_charged_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
Definition: PATMuonProducer.cc:227
pat::PATMuonProducer::MuonBaseRef
edm::RefToBase< reco::Muon > MuonBaseRef
typedefs for convenience
Definition: PATMuonProducer.cc:96
pat::PATMuonProducer::forceEmbedBestTrack_
bool forceEmbedBestTrack_
force separate embed of the best track even if already embedded
Definition: PATMuonProducer.cc:165
pat::Muon::embedStandAloneMuon
void embedStandAloneMuon()
set reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)
pat::getMiniPFIsolation
PFIsolation getMiniPFIsolation(const pat::PackedCandidateCollection *pfcands, const reco::Candidate::PolarLorentzVector &p4, float mindr=0.05, float maxdr=0.2, float kt_scale=10.0, float ptthresh=0.5, float deadcone_ch=0.0001, float deadcone_pu=0.01, float deadcone_ph=0.01, float deadcone_nh=0.01, float dZ_cut=0.0)
Definition: MiniIsolation.cc:19
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
pat::PfChargedHadronIso
Definition: Isolation.h:14
pat::PATMuonProducer::addPuppiIsolation_
bool addPuppiIsolation_
add puppi isolation
Definition: PATMuonProducer.cc:225
IPTools::signedImpactParameter3D
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:81
pat::Muon::embedTrack
void embedTrack()
set reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)
pat::PATUserDataHelper::add
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
Definition: PATUserDataHelper.h:114
HLT_FULL_cff.muon
muon
Definition: HLT_FULL_cff.py:11725
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
pat::helper::EfficiencyLoader::newEvent
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
Definition: EfficiencyLoader.cc:21
reco::Muon::MvaLoose
Definition: Muon.h:217
pat::PATMuonProducer::genMatchTokens_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
input tags for generator match information
Definition: PATMuonProducer.cc:193
pat::PATMuonProducer::isNeutralHadron
bool isNeutralHadron(long pdgid)
Definition: PATMuonProducer.cc:1212
reco::BeamSpot
Definition: BeamSpot.h:21
trigger::TriggerMuon
Definition: TriggerTypeDefs.h:79
source
static const std::string source
Definition: EdmProvDump.cc:47
pat::helper::KinResolutionsLoader
Definition: KinResolutionsLoader.h:18
pat::Lepton::setIsoDeposit
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
Definition: Lepton.h:191
muonProducer_cfi.mvaL1Corrector
mvaL1Corrector
Definition: muonProducer_cfi.py:119
beamspot
Definition: BeamSpotWrite2Txt.h:8
pat::PATMuonProducer::embedHighLevelSelection_
bool embedHighLevelSelection_
embed high level selection variables
Definition: PATMuonProducer.cc:207
reco::Muon::MvaVVTight
Definition: Muon.h:233
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
reco::Muon::MiniIsoLoose
Definition: Muon.h:220
pat::Muon::PV3D
Definition: Muon.h:237
Point3DBase< float, LocalTag >
nhits
Definition: HIMultiTrackSelector.h:42
pat::Muon::setDB
void setDB(double dB, double edB, IPTYPE type=PV2D)
Definition: Muon.h:247
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
reco::Muon::Picky
Definition: Muon.h:36
pat::PATMuonProducer::resolutionLoader_
pat::helper::KinResolutionsLoader resolutionLoader_
helper class to add resolutions to the muon
Definition: PATMuonProducer.cc:199
muonProducer_cfi.tcMETMuonCorrs
tcMETMuonCorrs
Definition: muonProducer_cfi.py:51
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
pat::PATMuonProducer::computeMiniIso_
bool computeMiniIso_
Definition: PATMuonProducer.cc:154
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
reco::Muon::MiniIsoTight
Definition: Muon.h:222
DDAxes::rho
edm::vector_transform
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
pat::PATMuonProducer::isoDepositLabels_
IsolationLabels isoDepositLabels_
input source for isoDeposits
Definition: PATMuonProducer.cc:213
pat::PATMuonProducer::getMuonDirection
std::optional< GlobalPoint > getMuonDirection(const reco::MuonChamberMatch &chamberMatch, const edm::ESHandle< GlobalTrackingGeometry > &geometry, const DetId &chamberId)
Definition: PATMuonProducer.cc:485
dqm::qstatus::OTHER
static const int OTHER
Definition: MonitorElement.h:48
reco::Muon::isGlobalMuon
bool isGlobalMuon() const override
Definition: Muon.h:299
pat::helper::KinResolutionsLoader::setResolutions
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
Definition: KinResolutionsLoader.h:49
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
pat::PATMuonProducer::embedTcMETMuonCorrs_
bool embedTcMETMuonCorrs_
embed muon MET correction info for tcMET into the muon
Definition: PATMuonProducer.cc:177
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
edm::ParameterSet
Definition: ParameterSet.h:47
edm::ParameterSetDescription::setComment
void setComment(std::string const &value)
Definition: ParameterSetDescription.cc:33
pat::PATMuonProducer::isChargedHadron
bool isChargedHadron(long pdgid)
Definition: PATMuonProducer.cc:1214
pat::PATMuonProducer::readIsolationLabels
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T >>> &tokens)
Definition: PATMuonProducer.cc:272
pat::PATMuonProducer::mvaUseJec_
bool mvaUseJec_
Definition: PATMuonProducer.cc:238
pat::PfGammaIso
Definition: Isolation.h:16
pat::PATMuonProducer::embedPFCandidate_
bool embedPFCandidate_
embed pfCandidates into the muon
Definition: PATMuonProducer.cc:205
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
pat::PATMuonProducer::PUPPIIsolation_photons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
Definition: PATMuonProducer.cc:229
pat::helper::KinResolutionsLoader::fillDescription
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
Definition: KinResolutionsLoader.cc:34
pat::PATMuonProducer::computeMuonMVA_
bool computeMuonMVA_
standard muon selectors
Definition: PATMuonProducer.cc:235
trigger::TriggerL1Mu
enum start value shifted to 81 so as to avoid clashes with PDG codes
Definition: TriggerTypeDefs.h:30
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
pat::PATMuonProducer::mvaL1Corrector_
edm::EDGetTokenT< reco::JetCorrector > mvaL1Corrector_
Definition: PATMuonProducer.cc:240
reco::Muon::LowPtMvaMedium
Definition: Muon.h:235
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
pat::UserBaseIso
Definition: Isolation.h:22
pat::PATMuonProducer::caloMETMuonCorrsToken_
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > caloMETMuonCorrsToken_
source of caloMET muon corrections
Definition: PATMuonProducer.cc:175
CSCDetId
Definition: CSCDetId.h:26
edm::ParameterSetDescription::ifValue
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases)
Definition: ParameterSetDescription.h:220
cand
Definition: decayParser.h:32
pat::TrackIso
Definition: Isolation.h:10
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
iEvent
int iEvent
Definition: GenABIO.cc:224
reco::Muon::MultiIsoMedium
Definition: Muon.h:228
pat::HcalIso
Definition: Isolation.h:12
pat::PATMuonProducer::PUPPINoLeptonsIsolation_charged_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
Definition: PATMuonProducer.cc:231
pat::Muon::PV2D
Definition: Muon.h:237
pat::PATMuonProducer::pvToken_
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
input source of the primary vertex
Definition: PATMuonProducer.cc:211
pat::PATMuonProducer::embedCaloMETMuonCorrs_
bool embedCaloMETMuonCorrs_
embed muon MET correction info for caloMET into the muon
Definition: PATMuonProducer.cc:173
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
susybsm::HSCParticleType::innerTrack
Definition: HSCParticle.h:20
reco::Muon::LowPtMvaLoose
Definition: Muon.h:234
pat::PfNeutralHadronIso
Definition: Isolation.h:15
pat::PATMuonProducer::embedTpfmsMuon_
bool embedTpfmsMuon_
embed track from tpfms muon fit into the muon
Definition: PATMuonProducer.cc:183
pat::Lepton::setMiniPFIsolation
void setMiniPFIsolation(PFIsolation const &iso)
Definition: Lepton.h:217
pat::PATMuonProducer::computePuppiCombinedIso_
bool computePuppiCombinedIso_
Definition: PATMuonProducer.cc:155
TransientTrackBuilder
Definition: TransientTrackBuilder.h:16
pat::PfChargedAllIso
Definition: Isolation.h:25
reco::Muon::MiniIsoMedium
Definition: Muon.h:221
edm::Association
Definition: Association.h:18
edm::ParameterSetDescription::addNode
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Definition: ParameterSetDescription.cc:41
pat::PATMuonProducer::muonTimeExtraToken_
edm::EDGetTokenT< edm::ValueMap< reco::MuonTimeExtra > > muonTimeExtraToken_
input tag for reading inverse beta
Definition: PATMuonProducer.cc:189
pat::PATMuonProducer::PUPPINoLeptonsIsolation_photons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
Definition: PATMuonProducer.cc:233
edm::contains
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
edm::ParameterSetDescription::setAllowAnything
void setAllowAnything()
allow any parameter label/value pairs
Definition: ParameterSetDescription.cc:37
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
pat::PATMuonProducer::addEfficiencies_
bool addEfficiencies_
add efficiencies to the muon (this will be data members of th muon even w/o embedding)
Definition: PATMuonProducer.cc:219
pat::PATMuonProducer::muonToken_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
input source
Definition: PATMuonProducer.cc:150
pat::PfPUChargedHadronIso
Definition: Isolation.h:24
pat::helper::KinResolutionsLoader::newEvent
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
Definition: KinResolutionsLoader.cc:27
pat::PATMuonProducer::transientTrackBuilderToken_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackBuilderToken_
Definition: PATMuonProducer.cc:264
pat::PATMuonProducer::pfMuonToken_
edm::EDGetTokenT< reco::PFCandidateCollection > pfMuonToken_
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT
Definition: PATMuonProducer.cc:203
reco::PFCandidate::ecalEnergy
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:221
L1DTConfigBti_cff.CH
CH
LTS and SET for low trigger suppression.
Definition: L1DTConfigBti_cff.py:38
reco::Muon::MvaMedium
Definition: Muon.h:218
muon::makeSelectorBitset
reco::Muon::Selector makeSelectorBitset(reco::Muon const &muon, reco::Vertex const *vertex=nullptr, bool run2016_hip_mitigation=false)
Definition: MuonSelectors.cc:1033
edm::Ptr< Candidate >
edm::RefToBase::id
ProductID id() const
Definition: RefToBase.h:214
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
pat::PATMuonProducer::addResolutions_
bool addResolutions_
add resolutions to the muon (this will be data members of th muon even w/o embedding)
Definition: PATMuonProducer.cc:197
pat::PATMuonProducer::tcMETMuonCorrsToken_
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcMETMuonCorrsToken_
source of tcMET muon corrections
Definition: PATMuonProducer.cc:179
pat::PFIsolation
Definition: PFIsolation.h:12
pat::PATMuonProducer::beamLineToken_
edm::EDGetTokenT< reco::BeamSpot > beamLineToken_
input source of the primary vertex/beamspot
Definition: PATMuonProducer.cc:209
pat::PATMuonProducer::IsoDepositMaps
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps
Definition: PATMuonProducer.cc:98
edm::Ref::id
ProductID id() const
Accessor for product ID.
Definition: Ref.h:244
reco::LeafCandidate::setP4
void setP4(const LorentzVector &p4) final
set 4-momentum
Definition: LeafCandidate.h:158
pat::PATMuonProducer::simInfo_
edm::EDGetTokenT< edm::ValueMap< reco::MuonSimInfo > > simInfo_
MC info.
Definition: PATMuonProducer.cc:255
eostools.move
def move(src, dest)
Definition: eostools.py:511
pat::PATMuonProducer::computeSoftMuonMVA_
bool computeSoftMuonMVA_
Definition: PATMuonProducer.cc:236
pat::PATMuonProducer::setMuonMiniIso
void setMuonMiniIso(pat::Muon &aMuon, const pat::PackedCandidateCollection *pc)
Definition: PATMuonProducer.cc:1139
pat::IsolationKeys
IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
reco::TransientTrack
Definition: TransientTrack.h:19
pat::PATMuonProducer::addTriggerMatching_
bool addTriggerMatching_
Trigger.
Definition: PATMuonProducer.cc:258
pat::helper::MultiIsolator::beginEvent
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
Definition: MultiIsolator.cc:79
pat::PATMuonProducer::rho_
edm::EDGetTokenT< double > rho_
Definition: PATMuonProducer.cc:242
pat::helper::EfficiencyLoader::setEfficiencies
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
Definition: EfficiencyLoader.h:41
MTVHistoProducerAlgoForTrackerBlock_cfi.mindr
mindr
Definition: MTVHistoProducerAlgoForTrackerBlock_cfi.py:79
pat::PATMuonProducer::PUPPINoLeptonsIsolation_neutral_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
Definition: PATMuonProducer.cc:232
PVValHelper::dz
Definition: PVValidationHelpers.h:51
pat::PATMuonProducer::addGenMatch_
bool addGenMatch_
add generator match information
Definition: PATMuonProducer.cc:191
pat::PATMuonProducer::mvaBTagCollectionTag_
edm::EDGetTokenT< reco::JetTagCollection > mvaBTagCollectionTag_
Definition: PATMuonProducer.cc:239
pat::PATMuonProducer::fillL1TriggerInfo
void fillL1TriggerInfo(pat::Muon &muon, edm::Handle< std::vector< pat::TriggerObjectStandAlone >> &triggerObjects, const edm::TriggerNames &names, const edm::ESHandle< GlobalTrackingGeometry > &geometry)
Definition: PATMuonProducer.cc:496
Exception
Definition: hltDiff.cc:245
pat::PATMuonProducer::isoDepositTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
Definition: PATMuonProducer.cc:214
edm::TriggerNames
Definition: TriggerNames.h:55
reco::MuonChamberMatch::y
float y
Definition: MuonChamberMatch.h:20
pat::PATMuonProducer::useParticleFlow_
bool useParticleFlow_
switch to use particle flow (PF2PAT) or not
Definition: PATMuonProducer.cc:201
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
pat::PATMuonProducer::userDataHelper_
pat::PATUserDataHelper< pat::Muon > userDataHelper_
helper class to add userData to the muon
Definition: PATMuonProducer.cc:252
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::RefToBase< Candidate >
pat::PATMuonProducer::triggerResults_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: PATMuonProducer.cc:260
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
hemisphereProducer_cfi.patMuons
patMuons
Definition: hemisphereProducer_cfi.py:6
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
muonProducer_cfi.mvaL1L2L3ResCorrector
mvaL1L2L3ResCorrector
Definition: muonProducer_cfi.py:120
pat::PATMuonProducer::embedHighLevel
void embedHighLevel(pat::Muon &aMuon, reco::TrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid)
Definition: PATMuonProducer.cc:1364
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
edm::Ref::key
key_type key() const
Accessor for product key.
Definition: Ref.h:250
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
pat::PATMuonProducer::embedBestTrack_
bool embedBestTrack_
embed the track from best muon measurement (global pflow)
Definition: PATMuonProducer.cc:161
mps_fire.result
result
Definition: mps_fire.py:311
cms::Exception
Definition: Exception.h:70
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DTChamberId
Definition: DTChamberId.h:14
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
reco::LeafCandidate::polarP4
const PolarLorentzVector & polarP4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:116
reco::Muon::MvaTight
Definition: Muon.h:219
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition: ParameterDescriptionNode.cc:106
pat::PATMuonProducer::geometryToken_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > geometryToken_
Definition: PATMuonProducer.cc:263
PbPb_ZMuSkimMuonDPG_cff.particleType
particleType
Definition: PbPb_ZMuSkimMuonDPG_cff.py:27
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TtFullHadEvtBuilder_cfi.genMatch
genMatch
add extra information on genMatch
Definition: TtFullHadEvtBuilder_cfi.py:37
pat::PATObject::embedGenParticle
void embedGenParticle()
Definition: PATObject.h:768
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
pat::PATMuonProducer::miniIsoParams_
std::vector< double > miniIsoParams_
Definition: PATMuonProducer.cc:157
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:29
crabWrapper.key
key
Definition: crabWrapper.py:19
pat::PATMuonProducer::embedStandAloneMuon_
bool embedStandAloneMuon_
embed track from muon system into the muon
Definition: PATMuonProducer.cc:169
pat::PATMuonProducer::puppiCombinedIsolation
double puppiCombinedIsolation(const pat::Muon &muon, const pat::PackedCandidateCollection *pc)
Definition: PATMuonProducer.cc:1162
edm::EmptyGroupDescription
Definition: EmptyGroupDescription.h:15
edm::ParameterDescription
Definition: ParameterDescription.h:110
CandIsolatorFromDeposits_cfi.deposits
deposits
Definition: CandIsolatorFromDeposits_cfi.py:4
custom_jme_cff.area
area
Definition: custom_jme_cff.py:140
edm::InputTag
Definition: InputTag.h:15
pat::PATMuonProducer::hltCollectionFilters_
std::vector< std::string > hltCollectionFilters_
Definition: PATMuonProducer.cc:261
label
const char * label
Definition: PFTauDecayModeTools.cc:11
pat::Muon::embedPickyMuon
void embedPickyMuon()
embed reference to the above picky Track
pat::PATMuonProducer::effectiveAreaVec_
std::vector< double > effectiveAreaVec_
Definition: PATMuonProducer.cc:156
reco::Vertex
Definition: Vertex.h:35
pat::Muon::pfCandidateRef
reco::PFCandidateRef pfCandidateRef() const
pat::Muon::embedTunePMuonBestTrack
void embedTunePMuonBestTrack(bool force=false)
pat::PATMuonProducer::relMiniIsoPUCorrected_
double relMiniIsoPUCorrected_
Definition: PATMuonProducer.cc:158
pat::PATMuonProducer::pcToken_
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
Definition: PATMuonProducer.cc:153
pat::PATMuonProducer::isolator_
pat::helper::MultiIsolator isolator_
Definition: PATMuonProducer.cc:246
edm::ProductID::id
ProductIndex id() const
Definition: ProductID.h:35