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...

#include "PhysicsTools/PatAlgos/interface/PATMuonProducer.h"

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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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...
 
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_
 helper class to add userdefined isolation values to the muon More...
 
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_
 
edm::EDGetTokenT< pat::PackedCandidateCollectionpcToken_
 
edm::EDGetTokenT< reco::PFCandidateCollectionpfMuonToken_
 input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT More...
 
GreaterByPt< MuonpTComparator_
 
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...
 
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 > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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 66 of file PATMuonProducer.h.

Member Typedef Documentation

◆ GenAssociations

Definition at line 87 of file PATMuonProducer.h.

◆ IsoDepositMaps

Definition at line 88 of file PATMuonProducer.h.

◆ IsolationLabel

Definition at line 90 of file PATMuonProducer.h.

◆ IsolationLabels

Definition at line 91 of file PATMuonProducer.h.

◆ IsolationValueMaps

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

Definition at line 89 of file PATMuonProducer.h.

◆ MuonBaseRef

typedefs for convenience

Definition at line 86 of file PATMuonProducer.h.

Constructor & Destructor Documentation

◆ PATMuonProducer()

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

default constructir

Definition at line 75 of file PATMuonProducer.cc.

77  useUserData_(iConfig.exists("userData")),
78  computeMuonMVA_(false),
79  computeSoftMuonMVA_(false),
81  mvaUseJec_(false),
82  isolator_(iConfig.exists("userIsolation") ? iConfig.getParameter<edm::ParameterSet>("userIsolation")
84  consumesCollector(),
85  false) {
86  // input source
87  muonToken_ = consumes<edm::View<reco::Muon>>(iConfig.getParameter<edm::InputTag>("muonSource"));
88  // embedding of tracks
89  embedBestTrack_ = iConfig.getParameter<bool>("embedMuonBestTrack");
90  embedTunePBestTrack_ = iConfig.getParameter<bool>("embedTunePMuonBestTrack");
91  forceEmbedBestTrack_ = iConfig.getParameter<bool>("forceBestTrackEmbedding");
92  embedTrack_ = iConfig.getParameter<bool>("embedTrack");
93  embedCombinedMuon_ = iConfig.getParameter<bool>("embedCombinedMuon");
94  embedStandAloneMuon_ = iConfig.getParameter<bool>("embedStandAloneMuon");
95  // embedding of muon MET correction information
96  embedCaloMETMuonCorrs_ = iConfig.getParameter<bool>("embedCaloMETMuonCorrs");
97  embedTcMETMuonCorrs_ = iConfig.getParameter<bool>("embedTcMETMuonCorrs");
99  mayConsume<edm::ValueMap<reco::MuonMETCorrectionData>>(iConfig.getParameter<edm::InputTag>("caloMETMuonCorrs"));
101  mayConsume<edm::ValueMap<reco::MuonMETCorrectionData>>(iConfig.getParameter<edm::InputTag>("tcMETMuonCorrs"));
102  // pflow specific configurables
103  useParticleFlow_ = iConfig.getParameter<bool>("useParticleFlow");
104  embedPFCandidate_ = iConfig.getParameter<bool>("embedPFCandidate");
105  pfMuonToken_ = mayConsume<reco::PFCandidateCollection>(iConfig.getParameter<edm::InputTag>("pfMuonSource"));
106  embedPfEcalEnergy_ = iConfig.getParameter<bool>("embedPfEcalEnergy");
107  // embedding of tracks from TeV refit
108  embedPickyMuon_ = iConfig.getParameter<bool>("embedPickyMuon");
109  embedTpfmsMuon_ = iConfig.getParameter<bool>("embedTpfmsMuon");
110  embedDytMuon_ = iConfig.getParameter<bool>("embedDytMuon");
111  // embedding of inverse beta variable information
112  addInverseBeta_ = iConfig.getParameter<bool>("addInverseBeta");
113  if (addInverseBeta_) {
115  consumes<edm::ValueMap<reco::MuonTimeExtra>>(iConfig.getParameter<edm::InputTag>("sourceMuonTimeExtra"));
116  }
117  // Monte Carlo matching
118  addGenMatch_ = iConfig.getParameter<bool>("addGenMatch");
119  if (addGenMatch_) {
120  embedGenMatch_ = iConfig.getParameter<bool>("embedGenMatch");
121  if (iConfig.existsAs<edm::InputTag>("genParticleMatch")) {
123  iConfig.getParameter<edm::InputTag>("genParticleMatch")));
124  } else {
126  iConfig.getParameter<std::vector<edm::InputTag>>("genParticleMatch"),
127  [this](edm::InputTag const& tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
128  }
129  }
130  // efficiencies
131  addEfficiencies_ = iConfig.getParameter<bool>("addEfficiencies");
132  if (addEfficiencies_) {
134  pat::helper::EfficiencyLoader(iConfig.getParameter<edm::ParameterSet>("efficiencies"), consumesCollector());
135  }
136  // resolutions
137  addResolutions_ = iConfig.getParameter<bool>("addResolutions");
138  if (addResolutions_) {
140  }
141  // puppi
142  addPuppiIsolation_ = iConfig.getParameter<bool>("addPuppiIsolation");
143  if (addPuppiIsolation_) {
145  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationChargedHadrons"));
147  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationNeutralHadrons"));
149  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiIsolationPhotons"));
150  //puppiNoLeptons
152  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationChargedHadrons"));
154  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationNeutralHadrons"));
156  consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationPhotons"));
157  }
158  // read isoDeposit labels, for direct embedding
159  readIsolationLabels(iConfig, "isoDeposits", isoDepositLabels_, isoDepositTokens_);
160  // read isolation value labels, for direct embedding
162  // check to see if the user wants to add user data
163  if (useUserData_) {
164  userDataHelper_ = PATUserDataHelper<Muon>(iConfig.getParameter<edm::ParameterSet>("userData"), consumesCollector());
165  }
166  // embed high level selection variables
167  embedHighLevelSelection_ = iConfig.getParameter<bool>("embedHighLevelSelection");
169  beamLineToken_ = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamLineSrc"));
170  pvToken_ = consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("pvSrc"));
171  }
172 
173  //for mini-isolation calculation
174  computeMiniIso_ = iConfig.getParameter<bool>("computeMiniIso");
175 
176  computePuppiCombinedIso_ = iConfig.getParameter<bool>("computePuppiCombinedIso");
177 
178  effectiveAreaVec_ = iConfig.getParameter<std::vector<double>>("effectiveAreaVec");
179 
180  miniIsoParams_ = iConfig.getParameter<std::vector<double>>("miniIsoParams");
181  if (computeMiniIso_ && miniIsoParams_.size() != 9) {
182  throw cms::Exception("ParameterError") << "miniIsoParams must have exactly 9 elements.\n";
183  }
185  pcToken_ = consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("pfCandsForMiniIso"));
186 
187  // standard selectors
188  recomputeBasicSelectors_ = iConfig.getParameter<bool>("recomputeBasicSelectors");
189  computeMuonMVA_ = iConfig.getParameter<bool>("computeMuonMVA");
190  if (computeMuonMVA_ and not computeMiniIso_)
191  throw cms::Exception("ConfigurationError") << "MiniIso is needed for Muon MVA calculation.\n";
192 
193  if (computeMuonMVA_) {
194  // pfCombinedInclusiveSecondaryVertexV2BJetTags
195  mvaBTagCollectionTag_ = consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("mvaJetTag"));
196  mvaL1Corrector_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("mvaL1Corrector"));
197  mvaL1L2L3ResCorrector_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("mvaL1L2L3ResCorrector"));
198  rho_ = consumes<double>(iConfig.getParameter<edm::InputTag>("rho"));
199  mvaUseJec_ = iConfig.getParameter<bool>("mvaUseJec");
200  }
201 
202  computeSoftMuonMVA_ = iConfig.getParameter<bool>("computeSoftMuonMVA");
203 
204  // MC info
205  simInfo_ = consumes<edm::ValueMap<reco::MuonSimInfo>>(iConfig.getParameter<edm::InputTag>("muonSimInfo"));
206 
207  addTriggerMatching_ = iConfig.getParameter<bool>("addTriggerMatching");
208  if (addTriggerMatching_) {
210  consumes<std::vector<pat::TriggerObjectStandAlone>>(iConfig.getParameter<edm::InputTag>("triggerObjects"));
211  triggerResults_ = consumes<edm::TriggerResults>(iConfig.getParameter<edm::InputTag>("triggerResults"));
212  }
213  hltCollectionFilters_ = iConfig.getParameter<std::vector<std::string>>("hltCollectionFilters");
214 
215  // produces vector of muons
216  produces<std::vector<Muon>>();
217 }

References addEfficiencies_, addGenMatch_, addInverseBeta_, addPuppiIsolation_, addResolutions_, addTriggerMatching_, beamLineToken_, caloMETMuonCorrsToken_, computeMiniIso_, computeMuonMVA_, computePuppiCombinedIso_, computeSoftMuonMVA_, effectiveAreaVec_, efficiencyLoader_, embedBestTrack_, embedCaloMETMuonCorrs_, embedCombinedMuon_, embedDytMuon_, embedGenMatch_, embedHighLevelSelection_, embedPFCandidate_, embedPfEcalEnergy_, embedPickyMuon_, embedStandAloneMuon_, embedTcMETMuonCorrs_, embedTpfmsMuon_, embedTrack_, embedTunePBestTrack_, Exception, edm::ParameterSet::existsAs(), forceEmbedBestTrack_, genMatchTokens_, edm::ParameterSet::getParameter(), hltCollectionFilters_, isoDepositLabels_, isoDepositTokens_, isolationValueLabels_, isolationValueTokens_, miniIsoParams_, muonTimeExtraToken_, muonToken_, mvaBTagCollectionTag_, mvaL1Corrector_, mvaL1L2L3ResCorrector_, mvaUseJec_, pcToken_, pfMuonToken_, PUPPIIsolation_charged_hadrons_, PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_photons_, PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_photons_, pvToken_, readIsolationLabels(), recomputeBasicSelectors_, resolutionLoader_, rho_, simInfo_, GlobalPosition_Frontier_DevDB_cff::tag, tcMETMuonCorrsToken_, triggerObjects_, triggerResults_, useParticleFlow_, userDataHelper_, useUserData_, and edm::vector_transform().

◆ ~PATMuonProducer()

PATMuonProducer::~PATMuonProducer ( )
override

default destructur

Definition at line 219 of file PATMuonProducer.cc.

219 {}

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 1100 of file PATMuonProducer.cc.

1106  {
1107  // Correct to PV
1108 
1109  // PV2D
1110  aMuon.setDB(track->dxy(primaryVertex.position()),
1111  track->dxyError(primaryVertex.position(), primaryVertex.covariance()),
1112  pat::Muon::PV2D);
1113 
1114  // PV3D
1115  std::pair<bool, Measurement1D> result =
1117  double d0_corr = result.second.value();
1118  double d0_err = primaryVertexIsValid ? result.second.error() : -1.0;
1119  aMuon.setDB(d0_corr, d0_err, pat::Muon::PV3D);
1120 
1121  // Correct to beam spot
1122 
1123  // BS2D
1124  aMuon.setDB(track->dxy(beamspot), track->dxyError(beamspot), pat::Muon::BS2D);
1125 
1126  // make a fake vertex out of beam spot
1127  reco::Vertex vBeamspot(beamspot.position(), beamspot.rotatedCovariance3D());
1128 
1129  // BS3D
1130  result = IPTools::signedImpactParameter3D(tt, GlobalVector(track->px(), track->py(), track->pz()), vBeamspot);
1131  d0_corr = result.second.value();
1132  d0_err = beamspotIsValid ? result.second.error() : -1.0;
1133  aMuon.setDB(d0_corr, d0_err, pat::Muon::BS3D);
1134 
1135  // PVDZ
1136  aMuon.setDB(
1137  track->dz(primaryVertex.position()), std::hypot(track->dzError(), primaryVertex.zError()), pat::Muon::PVDZ);
1138 }

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 955 of file PATMuonProducer.cc.

955  {
957  iDesc.setComment("PAT muon producer module");
958 
959  // input source
960  iDesc.add<edm::InputTag>("muonSource", edm::InputTag("no default"))->setComment("input collection");
961 
962  // embedding
963  iDesc.add<bool>("embedMuonBestTrack", true)->setComment("embed muon best track (global pflow)");
964  iDesc.add<bool>("embedTunePMuonBestTrack", true)->setComment("embed muon best track (muon only)");
965  iDesc.add<bool>("forceBestTrackEmbedding", true)
966  ->setComment(
967  "force embedding separately the best tracks even if they're already embedded e.g. as tracker or global "
968  "tracks");
969  iDesc.add<bool>("embedTrack", true)->setComment("embed external track");
970  iDesc.add<bool>("embedStandAloneMuon", true)->setComment("embed external stand-alone muon");
971  iDesc.add<bool>("embedCombinedMuon", false)->setComment("embed external combined muon");
972  iDesc.add<bool>("embedPickyMuon", false)->setComment("embed external picky track");
973  iDesc.add<bool>("embedTpfmsMuon", false)->setComment("embed external tpfms track");
974  iDesc.add<bool>("embedDytMuon", false)->setComment("embed external dyt track ");
975 
976  // embedding of MET muon corrections
977  iDesc.add<bool>("embedCaloMETMuonCorrs", true)->setComment("whether to add MET muon correction for caloMET or not");
978  iDesc.add<edm::InputTag>("caloMETMuonCorrs", edm::InputTag("muonMETValueMapProducer", "muCorrData"))
979  ->setComment("source of MET muon corrections for caloMET");
980  iDesc.add<bool>("embedTcMETMuonCorrs", true)->setComment("whether to add MET muon correction for tcMET or not");
981  iDesc.add<edm::InputTag>("tcMETMuonCorrs", edm::InputTag("muonTCMETValueMapProducer", "muCorrData"))
982  ->setComment("source of MET muon corrections for tcMET");
983 
984  // pf specific parameters
985  iDesc.add<edm::InputTag>("pfMuonSource", edm::InputTag("pfMuons"))->setComment("particle flow input collection");
986  iDesc.add<bool>("useParticleFlow", false)->setComment("whether to use particle flow or not");
987  iDesc.add<bool>("embedPFCandidate", false)->setComment("embed external particle flow object");
988  iDesc.add<bool>("embedPfEcalEnergy", true)->setComment("add ecal energy as reconstructed by PF");
989 
990  // inverse beta computation
991  iDesc.add<bool>("addInverseBeta", true)->setComment("add combined inverse beta");
992  iDesc.add<edm::InputTag>("sourceInverseBeta", edm::InputTag("muons", "combined"))
993  ->setComment("source of inverse beta values");
994 
995  // MC matching configurables
996  iDesc.add<bool>("addGenMatch", true)->setComment("add MC matching");
997  iDesc.add<bool>("embedGenMatch", false)->setComment("embed MC matched MC information");
998  std::vector<edm::InputTag> emptySourceVector;
999  iDesc
1000  .addNode(edm::ParameterDescription<edm::InputTag>("genParticleMatch", edm::InputTag(), true) xor
1001  edm::ParameterDescription<std::vector<edm::InputTag>>("genParticleMatch", emptySourceVector, true))
1002  ->setComment("input with MC match information");
1003 
1004  // mini-iso
1005  iDesc.add<bool>("computeMiniIso", false)->setComment("whether or not to compute and store electron mini-isolation");
1006  iDesc.add<bool>("computePuppiCombinedIso", false)
1007  ->setComment("whether or not to compute and store puppi combined isolation");
1008 
1009  iDesc.add<edm::InputTag>("pfCandsForMiniIso", edm::InputTag("packedPFCandidates"))
1010  ->setComment("collection to use to compute mini-iso");
1011  iDesc.add<std::vector<double>>("miniIsoParams", std::vector<double>())
1012  ->setComment("mini-iso parameters to use for muons");
1013 
1014  iDesc.add<bool>("addTriggerMatching", false)->setComment("add L1 and HLT matching to offline muon");
1015 
1017 
1018  // IsoDeposit configurables
1019  edm::ParameterSetDescription isoDepositsPSet;
1020  isoDepositsPSet.addOptional<edm::InputTag>("tracker");
1021  isoDepositsPSet.addOptional<edm::InputTag>("ecal");
1022  isoDepositsPSet.addOptional<edm::InputTag>("hcal");
1023  isoDepositsPSet.addOptional<edm::InputTag>("particle");
1024  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1025  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedAll");
1026  isoDepositsPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1027  isoDepositsPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1028  isoDepositsPSet.addOptional<edm::InputTag>("pfPhotons");
1029  isoDepositsPSet.addOptional<std::vector<edm::InputTag>>("user");
1030  iDesc.addOptional("isoDeposits", isoDepositsPSet);
1031 
1032  // isolation values configurables
1033  edm::ParameterSetDescription isolationValuesPSet;
1034  isolationValuesPSet.addOptional<edm::InputTag>("tracker");
1035  isolationValuesPSet.addOptional<edm::InputTag>("ecal");
1036  isolationValuesPSet.addOptional<edm::InputTag>("hcal");
1037  isolationValuesPSet.addOptional<edm::InputTag>("particle");
1038  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedHadrons");
1039  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedAll");
1040  isolationValuesPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
1041  isolationValuesPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
1042  isolationValuesPSet.addOptional<edm::InputTag>("pfPhotons");
1043  iDesc.addOptional("isolationValues", isolationValuesPSet);
1044 
1045  iDesc.ifValue(edm::ParameterDescription<bool>("addPuppiIsolation", false, true),
1047  "puppiIsolationChargedHadrons",
1048  edm::InputTag("muonPUPPIIsolation", "h+-DR030-ThresholdVeto000-ConeVeto000"),
1049  true) and
1051  "puppiIsolationNeutralHadrons",
1052  edm::InputTag("muonPUPPIIsolation", "h0-DR030-ThresholdVeto000-ConeVeto001"),
1053  true) and
1055  "puppiIsolationPhotons",
1056  edm::InputTag("muonPUPPIIsolation", "gamma-DR030-ThresholdVeto000-ConeVeto001"),
1057  true) and
1059  "puppiNoLeptonsIsolationChargedHadrons",
1060  edm::InputTag("muonPUPPINoLeptonsIsolation", "h+-DR030-ThresholdVeto000-ConeVeto000"),
1061  true) and
1063  "puppiNoLeptonsIsolationNeutralHadrons",
1064  edm::InputTag("muonPUPPINoLeptonsIsolation", "h0-DR030-ThresholdVeto000-ConeVeto001"),
1065  true) and
1067  "puppiNoLeptonsIsolationPhotons",
1068  edm::InputTag("muonPUPPINoLeptonsIsolation", "gamma-DR030-ThresholdVeto000-ConeVeto001"),
1069  true)) or
1070  false >> edm::EmptyGroupDescription());
1071 
1072  // Efficiency configurables
1073  edm::ParameterSetDescription efficienciesPSet;
1074  efficienciesPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
1075  iDesc.add("efficiencies", efficienciesPSet);
1076  iDesc.add<bool>("addEfficiencies", false);
1077 
1078  // Check to see if the user wants to add user data
1079  edm::ParameterSetDescription userDataPSet;
1081  iDesc.addOptional("userData", userDataPSet);
1082 
1083  edm::ParameterSetDescription isolationPSet;
1084  isolationPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
1085  iDesc.add("userIsolation", isolationPSet);
1086 
1087  iDesc.add<bool>("embedHighLevelSelection", true)->setComment("embed high level selection");
1088  edm::ParameterSetDescription highLevelPSet;
1089  highLevelPSet.setAllowAnything();
1090  iDesc.addNode(edm::ParameterDescription<edm::InputTag>("beamLineSrc", edm::InputTag(), true))
1091  ->setComment("input with high level selection");
1093  ->setComment("input with high level selection");
1094 
1095  //descriptions.add("PATMuonProducer", iDesc);
1096 }

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 284 of file PATMuonProducer.cc.

287  {
288  // WARNING: in a case of close-by muons the dR matching may select both muons.
289  // It's better to select the best match for a given collection.
290  for (const auto& triggerObject : *triggerObjects) {
291  if (triggerObject.hasTriggerObjectType(trigger::TriggerMuon)) {
292  bool keepIt = false;
293  for (const auto& name : collection_filter_names) {
294  if (triggerObject.hasCollection(name)) {
295  keepIt = true;
296  break;
297  }
298  }
299  if (not keepIt)
300  continue;
301  if (deltaR(triggerObject.p4(), muon) > 0.1)
302  continue;
303  pat::TriggerObjectStandAlone obj(triggerObject);
304  obj.unpackPathNames(names);
305  muon.addTriggerObjectMatch(obj);
306  }
307  }
308 }

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 232 of file PATMuonProducer.cc.

235  {
236  // L1 trigger object parameters are defined at MB2/ME2. Use the muon
237  // chamber matching information to get the local direction of the
238  // muon trajectory and convert it to a global direction to match the
239  // trigger objects
240 
241  std::optional<GlobalPoint> muonPosition;
242  // Loop over chambers
243  // initialize muonPosition with any available match, just in case
244  // the second station is missing - it's better folling back to
245  // dR matching at IP
246  for (const auto& chamberMatch : aMuon.matches()) {
247  if (chamberMatch.id.subdetId() == MuonSubdetId::DT) {
248  DTChamberId detId(chamberMatch.id.rawId());
249  if (abs(detId.station()) > 3)
250  continue;
251  muonPosition = getMuonDirection(chamberMatch, geometry, detId);
252  if (abs(detId.station()) == 2)
253  break;
254  }
255  if (chamberMatch.id.subdetId() == MuonSubdetId::CSC) {
256  CSCDetId detId(chamberMatch.id.rawId());
257  if (abs(detId.station()) > 3)
258  continue;
259  muonPosition = getMuonDirection(chamberMatch, geometry, detId);
260  if (abs(detId.station()) == 2)
261  break;
262  }
263  }
264  if (not muonPosition)
265  return;
266  for (const auto& triggerObject : *triggerObjects) {
267  if (triggerObject.hasTriggerObjectType(trigger::TriggerL1Mu)) {
268  if (fabs(triggerObject.eta()) < 0.001) {
269  // L1 is defined in X-Y plain
270  if (deltaPhi(triggerObject.phi(), muonPosition->phi()) > 0.1)
271  continue;
272  } else {
273  // 3D L1
274  if (deltaR(triggerObject.p4(), *muonPosition) > 0.15)
275  continue;
276  }
277  pat::TriggerObjectStandAlone obj(triggerObject);
278  obj.unpackPathNames(names);
279  aMuon.addTriggerObjectMatch(obj);
280  }
281  }
282 }

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 793 of file PATMuonProducer.cc.

798  {
799  // in the particle flow algorithm,
800  // the muon momentum is recomputed.
801  // the new value is stored as the momentum of the
802  // resulting PFCandidate of type Muon, and choosen
803  // as the pat::Muon momentum
804  if (useParticleFlow_)
805  aMuon.setP4(aMuon.pfCandidateRef()->p4());
806  if (embedTrack_)
807  aMuon.embedTrack();
809  aMuon.embedStandAloneMuon();
810  if (embedCombinedMuon_)
811  aMuon.embedCombinedMuon();
812 
813  // embed the TeV refit track refs (only available for globalMuons)
814  if (aMuon.isGlobalMuon()) {
816  aMuon.embedPickyMuon();
818  aMuon.embedTpfmsMuon();
820  aMuon.embedDytMuon();
821  }
822 
823  // embed best tracks (at the end, so unless forceEmbedBestTrack_ is true we can save some space not embedding them twice)
824  if (embedBestTrack_)
828 
829  // store the match to the generated final state muons
830  if (addGenMatch_) {
831  for (size_t i = 0, n = genMatches.size(); i < n; ++i) {
832  reco::GenParticleRef genMuon = (*genMatches[i])[baseRef];
833  aMuon.addGenParticleRef(genMuon);
834  }
835  if (embedGenMatch_)
836  aMuon.embedGenParticle();
837  }
838  if (efficiencyLoader_.enabled()) {
839  efficiencyLoader_.setEfficiencies(aMuon, muonRef);
840  }
841 
842  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
843  if (useParticleFlow_) {
844  if (deposits[j]->contains(baseRef.id())) {
845  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[baseRef]);
846  } else if (deposits[j]->contains(muonRef.id())) {
847  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[muonRef]);
848  } else {
849  reco::CandidatePtr source = aMuon.pfCandidateRef()->sourceCandidatePtr(0);
851  }
852  } else {
853  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[muonRef]);
854  }
855  }
856 
857  for (size_t j = 0; j < isolationValues.size(); ++j) {
858  if (useParticleFlow_) {
859  if (isolationValues[j]->contains(baseRef.id())) {
861  } else if (isolationValues[j]->contains(muonRef.id())) {
863  } else {
864  reco::CandidatePtr source = aMuon.pfCandidateRef()->sourceCandidatePtr(0);
866  }
867  } else {
869  }
870  }
871 
872  if (resolutionLoader_.enabled()) {
874  }
875 }

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_, mps_fire::i, edm::RefToBase< T >::id(), reco::Muon::isAValidMuonTrack(), reco::Muon::isGlobalMuon(), isoDepositLabels_, isolationValueLabels_, electronProducer_cff::isolationValues, dqmiolumiharvest::j, dqmiodumpmetadata::n, pat::Muon::pfCandidateRef(), reco::Muon::Picky, resolutionLoader_, pat::helper::EfficiencyLoader::setEfficiencies(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), reco::LeafCandidate::setP4(), pat::helper::KinResolutionsLoader::setResolutions(), source, reco::Muon::TPFMS, and useParticleFlow_.

Referenced by produce().

◆ getMuonDirection()

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

Definition at line 221 of file PATMuonProducer.cc.

223  {
224  const GeomDet* chamberGeometry = geometry->idToDet(chamberId);
225  if (chamberGeometry) {
226  LocalPoint localPosition(chamberMatch.x, chamberMatch.y, 0);
227  return std::optional<GlobalPoint>(std::in_place, chamberGeometry->toGlobal(localPosition));
228  }
229  return std::optional<GlobalPoint>();
230 }

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 892 of file PATMuonProducer.cc.

892  {
893  double mindr(miniIsoParams_[0]);
894  double maxdr(miniIsoParams_[1]);
895  double kt_scale(miniIsoParams_[2]);
896  double drcut = pat::miniIsoDr(muon.polarP4(), mindr, maxdr, kt_scale);
897  return pat::muonRelMiniIsoPUCorrected(muon.miniPFIsolation(), muon.polarP4(), drcut, rho, area);
898 }

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 77 of file PATMuonProducer.h.

77 {}

◆ initializeGlobalCache()

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

Definition at line 73 of file PATMuonProducer.h.

73  {
74  return std::make_unique<PATMuonHeavyObjectCache>(iConfig);
75  }

◆ isChargedHadron()

bool PATMuonProducer::isChargedHadron ( long  pdgid)
private

Definition at line 950 of file PATMuonProducer.cc.

950 { 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 948 of file PATMuonProducer.cc.

948 { 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 952 of file PATMuonProducer.cc.

952 { 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 310 of file PATMuonProducer.cc.

310  {
311  // get the tracking Geometry
314  if (!geometry.isValid())
315  throw cms::Exception("FatalError") << "Unable to find GlobalTrackingGeometryRecord in event!\n";
316 
317  // switch off embedding (in unschedules mode)
318  if (iEvent.isRealData()) {
319  addGenMatch_ = false;
320  embedGenMatch_ = false;
321  }
322 
324  iEvent.getByToken(muonToken_, muons);
325 
328  iEvent.getByToken(pcToken_, pc);
329 
330  // get the ESHandle for the transient track builder,
331  // if needed for high level selection embedding
333 
334  if (isolator_.enabled())
335  isolator_.beginEvent(iEvent, iSetup);
340 
342  for (size_t j = 0; j < isoDepositTokens_.size(); ++j) {
343  iEvent.getByToken(isoDepositTokens_[j], deposits[j]);
344  }
345 
347  for (size_t j = 0; j < isolationValueTokens_.size(); ++j) {
349  }
350 
351  //value maps for puppi isolation
352  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_charged_hadrons;
353  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_neutral_hadrons;
354  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_photons;
355  //value maps for puppiNoLeptons isolation
356  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_charged_hadrons;
357  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_neutral_hadrons;
358  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_photons;
359  if (addPuppiIsolation_) {
360  //puppi
361  iEvent.getByToken(PUPPIIsolation_charged_hadrons_, PUPPIIsolation_charged_hadrons);
362  iEvent.getByToken(PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_neutral_hadrons);
363  iEvent.getByToken(PUPPIIsolation_photons_, PUPPIIsolation_photons);
364  //puppiNoLeptons
365  iEvent.getByToken(PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_charged_hadrons);
366  iEvent.getByToken(PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons);
367  iEvent.getByToken(PUPPINoLeptonsIsolation_photons_, PUPPINoLeptonsIsolation_photons);
368  }
369 
370  // inputs for muon mva
371  edm::Handle<reco::JetTagCollection> mvaBTagCollectionTag;
374  if (computeMuonMVA_) {
375  iEvent.getByToken(mvaBTagCollectionTag_, mvaBTagCollectionTag);
378  }
379 
380  // prepare the MC genMatchTokens_
381  GenAssociations genMatches(genMatchTokens_.size());
382  if (addGenMatch_) {
383  for (size_t j = 0, nd = genMatchTokens_.size(); j < nd; ++j) {
384  iEvent.getByToken(genMatchTokens_[j], genMatches[j]);
385  }
386  }
387 
388  // prepare the high level selection: needs beamline
389  // OR primary vertex, depending on user selection
392  bool beamSpotIsValid = false;
393  bool primaryVertexIsValid = false;
395  // get the beamspot
396  edm::Handle<reco::BeamSpot> beamSpotHandle;
397  iEvent.getByToken(beamLineToken_, beamSpotHandle);
398 
399  // get the primary vertex
401  iEvent.getByToken(pvToken_, pvHandle);
402 
403  if (beamSpotHandle.isValid()) {
404  beamSpot = *beamSpotHandle;
405  beamSpotIsValid = true;
406  } else {
407  edm::LogError("DataNotAvailable") << "No beam spot available from EventSetup, not adding high level selection \n";
408  }
409  if (pvHandle.isValid() && !pvHandle->empty()) {
410  primaryVertex = pvHandle->at(0);
411  primaryVertexIsValid = true;
412  } else {
413  edm::LogError("DataNotAvailable")
414  << "No primary vertex available from EventSetup, not adding high level selection \n";
415  }
416  // this is needed by the IPTools methods from the tracking group
417  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", trackBuilder);
418  }
419 
420  // MC info
422  bool simInfoIsAvailalbe = iEvent.getByToken(simInfo_, simInfo);
423 
424  // this will be the new object collection
425  std::vector<Muon>* patMuons = new std::vector<Muon>();
426 
428  if (useParticleFlow_) {
429  // get the PFCandidates of type muons
430  iEvent.getByToken(pfMuonToken_, pfMuons);
431 
432  unsigned index = 0;
433  for (reco::PFCandidateConstIterator i = pfMuons->begin(); i != pfMuons->end(); ++i, ++index) {
434  const reco::PFCandidate& pfmu = *i;
435  //const reco::IsolaPFCandidate& pfmu = *i;
436  const reco::MuonRef& muonRef = pfmu.muonRef();
437  assert(muonRef.isNonnull());
438 
439  MuonBaseRef muonBaseRef(muonRef);
440  Muon aMuon(muonBaseRef);
441 
442  if (useUserData_) {
443  userDataHelper_.add(aMuon, iEvent, iSetup);
444  }
445 
446  // embed high level selection
448  // get the tracks
449  reco::TrackRef innerTrack = muonBaseRef->innerTrack();
450  reco::TrackRef globalTrack = muonBaseRef->globalTrack();
451  reco::TrackRef bestTrack = muonBaseRef->muonBestTrack();
452  reco::TrackRef chosenTrack = innerTrack;
453  // Make sure the collection it points to is there
454  if (bestTrack.isNonnull() && bestTrack.isAvailable())
455  chosenTrack = bestTrack;
456 
457  if (chosenTrack.isNonnull() && chosenTrack.isAvailable()) {
458  unsigned int nhits = chosenTrack->numberOfValidHits(); // ????
459  aMuon.setNumberOfValidHits(nhits);
460 
461  reco::TransientTrack tt = trackBuilder->build(chosenTrack);
462  embedHighLevel(aMuon, chosenTrack, tt, primaryVertex, primaryVertexIsValid, beamSpot, beamSpotIsValid);
463  }
464 
465  if (globalTrack.isNonnull() && globalTrack.isAvailable() && !embedCombinedMuon_) {
466  double norm_chi2 = globalTrack->chi2() / globalTrack->ndof();
467  aMuon.setNormChi2(norm_chi2);
468  }
469  }
470  reco::PFCandidateRef pfRef(pfMuons, index);
471  //reco::PFCandidatePtr ptrToMother(pfMuons,index);
472  reco::CandidateBaseRef pfBaseRef(pfRef);
473 
474  aMuon.setPFCandidateRef(pfRef);
475  if (embedPFCandidate_)
476  aMuon.embedPFCandidate();
477  fillMuon(aMuon, muonBaseRef, pfBaseRef, genMatches, deposits, isolationValues);
478 
479  if (computeMiniIso_)
480  setMuonMiniIso(aMuon, pc.product());
481 
482  if (addPuppiIsolation_) {
483  aMuon.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[muonBaseRef],
484  (*PUPPIIsolation_neutral_hadrons)[muonBaseRef],
485  (*PUPPIIsolation_photons)[muonBaseRef]);
486 
487  aMuon.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[muonBaseRef],
488  (*PUPPINoLeptonsIsolation_neutral_hadrons)[muonBaseRef],
489  (*PUPPINoLeptonsIsolation_photons)[muonBaseRef]);
490  } else {
491  aMuon.setIsolationPUPPI(-999., -999., -999.);
492  aMuon.setIsolationPUPPINoLeptons(-999., -999., -999.);
493  }
494 
495  if (embedPfEcalEnergy_) {
496  aMuon.setPfEcalEnergy(pfmu.ecalEnergy());
497  }
498 
499  patMuons->push_back(aMuon);
500  }
501  } else {
503  iEvent.getByToken(muonToken_, muons);
504 
505  // embedding of muon MET corrections
507  //edm::ValueMap<reco::MuonMETCorrectionData> caloMETmuCorValueMap;
510  //caloMETmuCorValueMap = *caloMETmuCorValueMap_h;
511  }
513  //edm::ValueMap<reco::MuonMETCorrectionData> tcMETmuCorValueMap;
514  if (embedTcMETMuonCorrs_) {
516  //tcMETmuCorValueMap = *tcMETmuCorValueMap_h;
517  }
518 
520  // get the PFCandidates of type muons
521  iEvent.getByToken(pfMuonToken_, pfMuons);
522  }
523 
525  if (addInverseBeta_) {
526  // get MuonTimerExtra value map
527  iEvent.getByToken(muonTimeExtraToken_, muonsTimeExtra);
528  }
529 
530  for (edm::View<reco::Muon>::const_iterator itMuon = muons->begin(); itMuon != muons->end(); ++itMuon) {
531  // construct the Muon from the ref -> save ref to original object
532  unsigned int idx = itMuon - muons->begin();
533  MuonBaseRef muonRef = muons->refAt(idx);
534  reco::CandidateBaseRef muonBaseRef(muonRef);
535 
536  Muon aMuon(muonRef);
537  fillMuon(aMuon, muonRef, muonBaseRef, genMatches, deposits, isolationValues);
538  if (computeMiniIso_)
539  setMuonMiniIso(aMuon, pc.product());
540  if (addPuppiIsolation_) {
541  aMuon.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[muonRef],
542  (*PUPPIIsolation_neutral_hadrons)[muonRef],
543  (*PUPPIIsolation_photons)[muonRef]);
544  aMuon.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[muonRef],
545  (*PUPPINoLeptonsIsolation_neutral_hadrons)[muonRef],
546  (*PUPPINoLeptonsIsolation_photons)[muonRef]);
547  } else {
548  aMuon.setIsolationPUPPI(-999., -999., -999.);
549  aMuon.setIsolationPUPPINoLeptons(-999., -999., -999.);
550  }
551 
552  // Isolation
553  if (isolator_.enabled()) {
554  //reco::CandidatePtr mother = ptrToMother->sourceCandidatePtr(0);
556  typedef pat::helper::MultiIsolator::IsolationValuePairs IsolationValuePairs;
557  // better to loop backwards, so the vector is resized less times
558  for (IsolationValuePairs::const_reverse_iterator it = isolatorTmpStorage_.rbegin(),
559  ed = isolatorTmpStorage_.rend();
560  it != ed;
561  ++it) {
562  aMuon.setIsolation(it->first, it->second);
563  }
564  }
565 
566  // for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
567  // aMuon.setIsoDeposit(isoDepositLabels_[j].first,
568  // (*deposits[j])[muonRef]);
569  // }
570 
571  // add sel to selected
572  edm::Ptr<reco::Muon> muonsPtr = muons->ptrAt(idx);
573  if (useUserData_) {
574  userDataHelper_.add(aMuon, iEvent, iSetup);
575  }
576 
577  // embed high level selection
579  // get the tracks
580  reco::TrackRef innerTrack = itMuon->innerTrack();
581  reco::TrackRef globalTrack = itMuon->globalTrack();
582  reco::TrackRef bestTrack = itMuon->muonBestTrack();
583  reco::TrackRef chosenTrack = innerTrack;
584  // Make sure the collection it points to is there
585  if (bestTrack.isNonnull() && bestTrack.isAvailable())
586  chosenTrack = bestTrack;
587  if (chosenTrack.isNonnull() && chosenTrack.isAvailable()) {
588  unsigned int nhits = chosenTrack->numberOfValidHits(); // ????
589  aMuon.setNumberOfValidHits(nhits);
590 
591  reco::TransientTrack tt = trackBuilder->build(chosenTrack);
592  embedHighLevel(aMuon, chosenTrack, tt, primaryVertex, primaryVertexIsValid, beamSpot, beamSpotIsValid);
593  }
594 
595  if (globalTrack.isNonnull() && globalTrack.isAvailable()) {
596  double norm_chi2 = globalTrack->chi2() / globalTrack->ndof();
597  aMuon.setNormChi2(norm_chi2);
598  }
599  }
600 
601  // embed MET muon corrections
603  aMuon.embedCaloMETMuonCorrs((*caloMETMuonCorrs)[muonRef]);
605  aMuon.embedTcMETMuonCorrs((*tcMETMuonCorrs)[muonRef]);
606 
608  if (embedPfEcalEnergy_)
609  aMuon.setPfEcalEnergy(-99.0);
610  unsigned index = 0;
611  for (const reco::PFCandidate& pfmu : *pfMuons) {
612  if (pfmu.muonRef().isNonnull()) {
613  if (pfmu.muonRef().id() != muonRef.id())
614  throw cms::Exception("Configuration")
615  << "Muon reference within PF candidates does not point to the muon collection." << std::endl;
616  if (pfmu.muonRef().key() == muonRef.key()) {
617  reco::PFCandidateRef pfRef(pfMuons, index);
618  aMuon.setPFCandidateRef(pfRef);
619  if (embedPfEcalEnergy_)
620  aMuon.setPfEcalEnergy(pfmu.ecalEnergy());
621  if (embedPFCandidate_)
622  aMuon.embedPFCandidate();
623  break;
624  }
625  }
626  index++;
627  }
628  }
629 
630  if (addInverseBeta_) {
631  aMuon.readTimeExtra((*muonsTimeExtra)[muonRef]);
632  }
633  // MC info
634  aMuon.initSimInfo();
635  if (simInfoIsAvailalbe) {
636  const auto& msi = (*simInfo)[muonBaseRef];
637  aMuon.setSimType(msi.primaryClass);
638  aMuon.setExtSimType(msi.extendedClass);
639  aMuon.setSimFlavour(msi.flavour);
640  aMuon.setSimHeaviestMotherFlavour(msi.heaviestMotherFlavour);
641  aMuon.setSimPdgId(msi.pdgId);
642  aMuon.setSimMotherPdgId(msi.motherPdgId);
643  aMuon.setSimBX(msi.tpBX);
644  aMuon.setSimTpEvent(msi.tpEvent);
645  aMuon.setSimProdRho(msi.vertex.Rho());
646  aMuon.setSimProdZ(msi.vertex.Z());
647  aMuon.setSimPt(msi.p4.pt());
648  aMuon.setSimEta(msi.p4.eta());
649  aMuon.setSimPhi(msi.p4.phi());
650  aMuon.setSimMatchQuality(msi.tpAssoQuality);
651  }
652  patMuons->push_back(aMuon);
653  }
654  }
655 
656  // sort muons in pt
657  std::sort(patMuons->begin(), patMuons->end(), pTComparator_);
658 
659  // Store standard muon selection decisions and jet related
660  // quantaties.
661  // Need a separate loop over muons to have all inputs properly
662  // computed and stored in the object.
664  if (computeMuonMVA_)
665  iEvent.getByToken(rho_, rho);
666  const reco::Vertex* pv(nullptr);
667  if (primaryVertexIsValid)
668  pv = &primaryVertex;
669 
672  bool triggerObjectsAvailable = false;
673  bool triggerResultsAvailable = false;
674  if (addTriggerMatching_) {
675  triggerObjectsAvailable = iEvent.getByToken(triggerObjects_, triggerObjects);
676  triggerResultsAvailable = iEvent.getByToken(triggerResults_, triggerResults);
677  }
678 
679  for (auto& muon : *patMuons) {
680  // trigger info
681  if (addTriggerMatching_ and triggerObjectsAvailable and triggerResultsAvailable) {
682  const edm::TriggerNames& triggerNames(iEvent.triggerNames(*triggerResults));
685  }
686 
688  muon.setSelectors(0);
689  bool isRun2016BCDEF = (272728 <= iEvent.run() && iEvent.run() <= 278808);
690  muon.setSelectors(muon::makeSelectorBitset(muon, pv, isRun2016BCDEF));
691  }
692  float miniIsoValue = -1;
693  if (computeMiniIso_) {
694  // MiniIsolation working points
695 
697 
698  muon.setSelector(reco::Muon::MiniIsoLoose, miniIsoValue < 0.40);
699  muon.setSelector(reco::Muon::MiniIsoMedium, miniIsoValue < 0.20);
700  muon.setSelector(reco::Muon::MiniIsoTight, miniIsoValue < 0.10);
701  muon.setSelector(reco::Muon::MiniIsoVeryTight, miniIsoValue < 0.05);
702  }
703 
704  double puppiCombinedIsolationPAT = -1;
706  puppiCombinedIsolationPAT = puppiCombinedIsolation(muon, pc.product());
707  muon.setSelector(reco::Muon::PuppiIsoLoose, puppiCombinedIsolationPAT < 0.27);
708  muon.setSelector(reco::Muon::PuppiIsoMedium, puppiCombinedIsolationPAT < 0.22);
709  muon.setSelector(reco::Muon::PuppiIsoTight, puppiCombinedIsolationPAT < 0.12);
710  }
711 
712  float jetPtRatio = 0.0;
713  float jetPtRel = 0.0;
714  float mva = 0.0;
715  float mva_lowpt = 0.0;
716  if (computeMuonMVA_ && primaryVertexIsValid && computeMiniIso_) {
717  if (mvaUseJec_) {
718  mva = globalCache()->muonMvaEstimator()->computeMva(muon,
720  *(mvaBTagCollectionTag.product()),
721  jetPtRatio,
722  jetPtRel,
723  miniIsoValue,
724  &*mvaL1Corrector,
726  mva_lowpt = globalCache()->muonLowPtMvaEstimator()->computeMva(muon,
728  *(mvaBTagCollectionTag.product()),
729  jetPtRatio,
730  jetPtRel,
731  miniIsoValue,
732  &*mvaL1Corrector,
734 
735  } else {
736  mva = globalCache()->muonMvaEstimator()->computeMva(
737  muon, primaryVertex, *(mvaBTagCollectionTag.product()), jetPtRatio, jetPtRel, miniIsoValue);
738  mva_lowpt = globalCache()->muonLowPtMvaEstimator()->computeMva(
739  muon, primaryVertex, *(mvaBTagCollectionTag.product()), jetPtRatio, jetPtRel, miniIsoValue);
740  }
741 
742  muon.setMvaValue(mva);
743  muon.setLowPtMvaValue(mva_lowpt);
744  muon.setJetPtRatio(jetPtRatio);
745  muon.setJetPtRel(jetPtRel);
746 
747  // multi-isolation
748  if (computeMiniIso_) {
749  muon.setSelector(reco::Muon::MultiIsoMedium,
750  miniIsoValue < 0.11 && (muon.jetPtRatio() > 0.74 || muon.jetPtRel() > 6.8));
751  }
752 
753  // MVA working points
754  // https://twiki.cern.ch/twiki/bin/viewauth/CMS/LeptonMVA
755  double dB2D = fabs(muon.dB(pat::Muon::PV2D));
756  double dB3D = fabs(muon.dB(pat::Muon::PV3D));
757  double edB3D = fabs(muon.edB(pat::Muon::PV3D));
758  double sip3D = edB3D > 0 ? dB3D / edB3D : 0.0;
759  double dz = fabs(muon.muonBestTrack()->dz(primaryVertex.position()));
760 
761  // muon preselection
762  if (muon.pt() > 5 and muon.isLooseMuon() and muon.passed(reco::Muon::MiniIsoLoose) and sip3D < 8.0 and
763  dB2D < 0.05 and dz < 0.1) {
764  muon.setSelector(reco::Muon::MvaLoose, muon.mvaValue() > -0.60);
765  muon.setSelector(reco::Muon::MvaMedium, muon.mvaValue() > -0.20);
766  muon.setSelector(reco::Muon::MvaTight, muon.mvaValue() > 0.15);
767  muon.setSelector(reco::Muon::MvaVTight, muon.mvaValue() > 0.45);
768  muon.setSelector(reco::Muon::MvaVVTight, muon.mvaValue() > 0.9);
769  }
770  if (muon.pt() > 5 and muon.isLooseMuon() and sip3D < 4 and dB2D < 0.5 and dz < 1) {
771  muon.setSelector(reco::Muon::LowPtMvaLoose, muon.lowptMvaValue() > -0.60);
772  muon.setSelector(reco::Muon::LowPtMvaMedium, muon.lowptMvaValue() > -0.20);
773  }
774  }
775 
776  //SOFT MVA
777  if (computeSoftMuonMVA_) {
778  float mva = globalCache()->softMuonMvaEstimator()->computeMva(muon);
779  muon.setSoftMvaValue(mva);
780  //preselection in SoftMuonMvaEstimator.cc
781  muon.setSelector(reco::Muon::SoftMvaId, muon.softMvaValue() > 0.58); //WP choose for bmm4
782  }
783  }
784 
785  // put products in Event
786  std::unique_ptr<std::vector<Muon>> ptr(patMuons);
787  iEvent.put(std::move(ptr));
788 
789  if (isolator_.enabled())
791 }

References pat::PATUserDataHelper< ObjectType >::add(), addGenMatch_, addInverseBeta_, addPuppiIsolation_, addTriggerMatching_, cms::cuda::assert(), beamLineToken_, pwdgSkimBPark_cfi::beamSpot, pat::helper::MultiIsolator::beginEvent(), TransientTrackBuilder::build(), muonProducer_cfi::caloMETMuonCorrs, caloMETMuonCorrsToken_, computeMiniIso_, 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_, relativeConstraints::geometry, edm::EventSetup::get(), get, 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, hemisphereProducer_cfi::patMuons, pcToken_, pfMuonToken_, BeamMonitor_cff::primaryVertex, edm::Handle< T >::product(), pTComparator_, 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, muonProducer_cfi::tcMETMuonCorrs, tcMETMuonCorrsToken_, 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 900 of file PATMuonProducer.cc.

900  {
901  double dR_threshold = 0.4;
902  double dR2_threshold = dR_threshold * dR_threshold;
903  double mix_fraction = 0.5;
904  enum particleType { CH = 0, NH = 1, PH = 2, OTHER = 100000 };
905  double val_PuppiWithLep = 0.0;
906  double val_PuppiWithoutLep = 0.0;
907 
908  for (const auto& cand : *pc) { //pat::pat::PackedCandidate loop start
909 
910  const particleType pType =
911  isChargedHadron(cand.pdgId()) ? CH : isNeutralHadron(cand.pdgId()) ? NH : isPhoton(cand.pdgId()) ? PH : OTHER;
912  if (pType == OTHER) {
913  if (cand.pdgId() != 1 && cand.pdgId() != 2 && abs(cand.pdgId()) != 11 && abs(cand.pdgId()) != 13) {
914  LogTrace("PATMuonProducer") << "candidate with PDGID = " << cand.pdgId()
915  << " is not CH/NH/PH/e/mu or 1/2 (and this is removed from isolation calculation)"
916  << std::endl;
917  }
918  continue;
919  }
920  double d_eta = std::abs(cand.eta() - muon.eta());
921  if (d_eta > dR_threshold)
922  continue;
923 
924  double d_phi = std::abs(reco::deltaPhi(cand.phi(), muon.phi()));
925  if (d_phi > dR_threshold)
926  continue;
927 
928  double dR2 = reco::deltaR2(cand, muon);
929  if (dR2 > dR2_threshold)
930  continue;
931  if (pType == CH && dR2 < 0.0001 * 0.0001)
932  continue;
933  if (pType == NH && dR2 < 0.01 * 0.01)
934  continue;
935  if (pType == PH && dR2 < 0.01 * 0.01)
936  continue;
937  val_PuppiWithLep += cand.pt() * cand.puppiWeight();
938  val_PuppiWithoutLep += cand.pt() * cand.puppiWeightNoLep();
939 
940  } //pat::pat::PackedCandidate loop end
941 
942  double reliso_Puppi_withLep = val_PuppiWithLep / muon.pt();
943  double reliso_Puppi_withoutlep = val_PuppiWithoutLep / muon.pt();
944  double reliso_Puppi_combined = mix_fraction * reliso_Puppi_withLep + (1.0 - mix_fraction) * reliso_Puppi_withoutlep;
945  return reliso_Puppi_combined;
946 }

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 259 of file PATMuonProducer.h.

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

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().

Referenced by PATMuonProducer().

◆ 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 877 of file PATMuonProducer.cc.

877  {
879  aMuon.polarP4(),
880  miniIsoParams_[0],
881  miniIsoParams_[1],
882  miniIsoParams_[2],
883  miniIsoParams_[3],
884  miniIsoParams_[4],
885  miniIsoParams_[5],
886  miniIsoParams_[6],
887  miniIsoParams_[7],
888  miniIsoParams_[8]);
889  aMuon.setMiniPFIsolation(miniiso);
890 }

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 209 of file PATMuonProducer.h.

Referenced by PATMuonProducer().

◆ addGenMatch_

bool pat::PATMuonProducer::addGenMatch_
private

add generator match information

Definition at line 181 of file PATMuonProducer.h.

Referenced by fillMuon(), PATMuonProducer(), and produce().

◆ addInverseBeta_

bool pat::PATMuonProducer::addInverseBeta_
private

add combined inverse beta measurement into the muon

Definition at line 177 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ addPuppiIsolation_

bool pat::PATMuonProducer::addPuppiIsolation_
private

add puppi isolation

Definition at line 215 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and 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 187 of file PATMuonProducer.h.

Referenced by PATMuonProducer().

◆ addTriggerMatching_

bool pat::PATMuonProducer::addTriggerMatching_
private

Trigger.

Definition at line 250 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ beamLineToken_

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

input source of the primary vertex/beamspot

Definition at line 199 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ caloMETMuonCorrsToken_

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

source of caloMET muon corrections

Definition at line 165 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ computeMiniIso_

bool pat::PATMuonProducer::computeMiniIso_
private

Definition at line 144 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ computeMuonMVA_

bool pat::PATMuonProducer::computeMuonMVA_
private

standard muon selectors

Definition at line 225 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ computePuppiCombinedIso_

bool pat::PATMuonProducer::computePuppiCombinedIso_
private

Definition at line 145 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ computeSoftMuonMVA_

bool pat::PATMuonProducer::computeSoftMuonMVA_
private

Definition at line 226 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ effectiveAreaVec_

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

Definition at line 146 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ efficiencyLoader_

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

helper class to add efficiencies to the muon

Definition at line 242 of file PATMuonProducer.h.

Referenced by fillMuon(), PATMuonProducer(), and produce().

◆ embedBestTrack_

bool pat::PATMuonProducer::embedBestTrack_
private

embed the track from best muon measurement (global pflow)

Definition at line 151 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ embedCaloMETMuonCorrs_

bool pat::PATMuonProducer::embedCaloMETMuonCorrs_
private

embed muon MET correction info for caloMET into the muon

Definition at line 163 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ embedCombinedMuon_

bool pat::PATMuonProducer::embedCombinedMuon_
private

embed track of the combined fit into the muon

Definition at line 161 of file PATMuonProducer.h.

Referenced by fillMuon(), PATMuonProducer(), and produce().

◆ embedDytMuon_

bool pat::PATMuonProducer::embedDytMuon_
private

embed track from DYT muon fit into the muon

Definition at line 175 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ embedGenMatch_

bool pat::PATMuonProducer::embedGenMatch_
private

embed the gen match information into the muon

Definition at line 185 of file PATMuonProducer.h.

Referenced by fillMuon(), PATMuonProducer(), and produce().

◆ embedHighLevelSelection_

bool pat::PATMuonProducer::embedHighLevelSelection_
private

embed high level selection variables

Definition at line 197 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ embedPFCandidate_

bool pat::PATMuonProducer::embedPFCandidate_
private

embed pfCandidates into the muon

Definition at line 195 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ embedPfEcalEnergy_

bool pat::PATMuonProducer::embedPfEcalEnergy_
private

add ecal PF energy

Definition at line 213 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ embedPickyMuon_

bool pat::PATMuonProducer::embedPickyMuon_
private

embed track from picky muon fit into the muon

Definition at line 171 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ embedStandAloneMuon_

bool pat::PATMuonProducer::embedStandAloneMuon_
private

embed track from muon system into the muon

Definition at line 159 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ embedTcMETMuonCorrs_

bool pat::PATMuonProducer::embedTcMETMuonCorrs_
private

embed muon MET correction info for tcMET into the muon

Definition at line 167 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ embedTpfmsMuon_

bool pat::PATMuonProducer::embedTpfmsMuon_
private

embed track from tpfms muon fit into the muon

Definition at line 173 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ embedTrack_

bool pat::PATMuonProducer::embedTrack_
private

embed the track from inner tracker into the muon

Definition at line 157 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ embedTunePBestTrack_

bool pat::PATMuonProducer::embedTunePBestTrack_
private

embed the track from best muon measurement (muon only)

Definition at line 153 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ forceEmbedBestTrack_

bool pat::PATMuonProducer::forceEmbedBestTrack_
private

force separate embed of the best track even if already embedded

Definition at line 155 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ genMatchTokens_

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

input tags for generator match information

Definition at line 183 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ hltCollectionFilters_

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

Definition at line 253 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ isoDepositLabels_

IsolationLabels pat::PATMuonProducer::isoDepositLabels_
private

input source for isoDeposits

Definition at line 203 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ isoDepositTokens_

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

Definition at line 204 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ isolationValueLabels_

IsolationLabels pat::PATMuonProducer::isolationValueLabels_
private

input source isolation value maps

Definition at line 206 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

◆ isolationValueTokens_

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

Definition at line 207 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ isolator_

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

helper class to add userdefined isolation values to the muon

Definition at line 238 of file PATMuonProducer.h.

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 240 of file PATMuonProducer.h.

Referenced by produce().

◆ miniIsoParams_

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

Definition at line 147 of file PATMuonProducer.h.

Referenced by getRelMiniIsoPUCorrected(), PATMuonProducer(), and setMuonMiniIso().

◆ muonTimeExtraToken_

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

input tag for reading inverse beta

Definition at line 179 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ muonToken_

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

input source

Definition at line 140 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ mvaBTagCollectionTag_

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

Definition at line 229 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ mvaL1Corrector_

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

Definition at line 230 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ mvaL1L2L3ResCorrector_

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

Definition at line 231 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ mvaUseJec_

bool pat::PATMuonProducer::mvaUseJec_
private

Definition at line 228 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ pcToken_

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

Definition at line 143 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and 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 193 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ pTComparator_

GreaterByPt<Muon> pat::PATMuonProducer::pTComparator_
private

— tools — comparator for pt ordering

Definition at line 236 of file PATMuonProducer.h.

Referenced by produce().

◆ PUPPIIsolation_charged_hadrons_

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

Definition at line 217 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ PUPPIIsolation_neutral_hadrons_

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

Definition at line 218 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ PUPPIIsolation_photons_

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

Definition at line 219 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ PUPPINoLeptonsIsolation_charged_hadrons_

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

Definition at line 221 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ PUPPINoLeptonsIsolation_neutral_hadrons_

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

Definition at line 222 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ PUPPINoLeptonsIsolation_photons_

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

Definition at line 223 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ pvToken_

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

input source of the primary vertex

Definition at line 201 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ recomputeBasicSelectors_

bool pat::PATMuonProducer::recomputeBasicSelectors_
private

Definition at line 227 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ relMiniIsoPUCorrected_

double pat::PATMuonProducer::relMiniIsoPUCorrected_
private

Definition at line 148 of file PATMuonProducer.h.

◆ resolutionLoader_

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

helper class to add resolutions to the muon

Definition at line 189 of file PATMuonProducer.h.

Referenced by fillMuon(), PATMuonProducer(), and produce().

◆ rho_

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

Definition at line 232 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ simInfo_

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

MC info.

Definition at line 247 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ tcMETMuonCorrsToken_

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

source of tcMET muon corrections

Definition at line 169 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ triggerObjects_

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

Definition at line 251 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ triggerResults_

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

Definition at line 252 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

◆ useParticleFlow_

bool pat::PATMuonProducer::useParticleFlow_
private

switch to use particle flow (PF2PAT) or not

Definition at line 191 of file PATMuonProducer.h.

Referenced by fillMuon(), PATMuonProducer(), and produce().

◆ userDataHelper_

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

helper class to add userData to the muon

Definition at line 244 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and 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 211 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

pat::PATMuonProducer::addInverseBeta_
bool addInverseBeta_
add combined inverse beta measurement into the muon
Definition: PATMuonProducer.h:177
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
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:793
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:892
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::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
pat::PATMuonProducer::pTComparator_
GreaterByPt< Muon > pTComparator_
Definition: PATMuonProducer.h:236
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
pat::PATMuonProducer::embedTrack_
bool embedTrack_
embed the track from inner tracker into the muon
Definition: PATMuonProducer.h:157
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
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.h:213
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
pat::PATMuonProducer::IsolationLabel
std::pair< pat::IsolationKeys, edm::InputTag > IsolationLabel
Definition: PATMuonProducer.h:90
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.h:153
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.h:171
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:89285
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.h:240
pat::Muon::embedDytMuon
void embedDytMuon()
embed reference to the above dyt Track
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
pat::PATMuonProducer::triggerObjects_
edm::EDGetTokenT< std::vector< pat::TriggerObjectStandAlone > > triggerObjects_
Definition: PATMuonProducer.h:251
relativeConstraints.geometry
geometry
Definition: relativeConstraints.py:39
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.h:87
pat::PATMuonProducer::mvaL1L2L3ResCorrector_
edm::EDGetTokenT< reco::JetCorrector > mvaL1L2L3ResCorrector_
Definition: PATMuonProducer.h:231
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.h:175
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:126
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:284
pat::PATMuonProducer::recomputeBasicSelectors_
bool recomputeBasicSelectors_
Definition: PATMuonProducer.h:227
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.h:207
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.h:161
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:952
edm::Ref< GenParticleCollection >
pat::PATMuonProducer::embedGenMatch_
bool embedGenMatch_
embed the gen match information into the muon
Definition: PATMuonProducer.h:185
pat::PATMuonProducer::PUPPIIsolation_neutral_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
Definition: PATMuonProducer.h:218
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.h:206
pat::PATMuonProducer::IsolationValueMaps
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
Definition: PATMuonProducer.h:89
pat::PATMuonProducer::efficiencyLoader_
pat::helper::EfficiencyLoader efficiencyLoader_
helper class to add efficiencies to the muon
Definition: PATMuonProducer.h:242
reco::PFCandidate::muonRef
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:421
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.h:211
pat::PATMuonProducer::PUPPIIsolation_charged_hadrons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
Definition: PATMuonProducer.h:217
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
pat::PATMuonProducer::MuonBaseRef
edm::RefToBase< reco::Muon > MuonBaseRef
typedefs for convenience
Definition: PATMuonProducer.h:86
pat::PATMuonProducer::forceEmbedBestTrack_
bool forceEmbedBestTrack_
force separate embed of the best track even if already embedded
Definition: PATMuonProducer.h:155
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
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
pat::PfChargedHadronIso
Definition: Isolation.h:14
pat::PATMuonProducer::addPuppiIsolation_
bool addPuppiIsolation_
add puppi isolation
Definition: PATMuonProducer.h:215
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:11710
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.h:183
pat::PATMuonProducer::isNeutralHadron
bool isNeutralHadron(long pdgid)
Definition: PATMuonProducer.cc:948
reco::BeamSpot
Definition: BeamSpot.h:21
TransientTrackRecord
Definition: TransientTrackRecord.h:11
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
edm::ESHandle< GlobalTrackingGeometry >
beamspot
Definition: BeamSpotWrite2Txt.h:8
pat::PATMuonProducer::embedHighLevelSelection_
bool embedHighLevelSelection_
embed high level selection variables
Definition: PATMuonProducer.h:197
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:112
reco::Muon::Picky
Definition: Muon.h:36
pat::PATMuonProducer::resolutionLoader_
pat::helper::KinResolutionsLoader resolutionLoader_
helper class to add resolutions to the muon
Definition: PATMuonProducer.h:189
muonProducer_cfi.tcMETMuonCorrs
tcMETMuonCorrs
Definition: muonProducer_cfi.py:51
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
pat::PATMuonProducer::computeMiniIso_
bool computeMiniIso_
Definition: PATMuonProducer.h:144
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.h:203
pat::PATMuonProducer::getMuonDirection
std::optional< GlobalPoint > getMuonDirection(const reco::MuonChamberMatch &chamberMatch, const edm::ESHandle< GlobalTrackingGeometry > &geometry, const DetId &chamberId)
Definition: PATMuonProducer.cc:221
dqm::qstatus::OTHER
static const int OTHER
Definition: MonitorElement.h:47
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.h:167
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:950
pat::PATMuonProducer::readIsolationLabels
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T >>> &tokens)
Definition: PATMuonProducer.h:259
pat::PATMuonProducer::mvaUseJec_
bool mvaUseJec_
Definition: PATMuonProducer.h:228
pat::PfGammaIso
Definition: Isolation.h:16
pat::PATMuonProducer::embedPFCandidate_
bool embedPFCandidate_
embed pfCandidates into the muon
Definition: PATMuonProducer.h:195
pat::PATMuonProducer::PUPPIIsolation_photons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
Definition: PATMuonProducer.h:219
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.h:225
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.h:230
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.h:165
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.h:221
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.h:201
pat::PATMuonProducer::embedCaloMETMuonCorrs_
bool embedCaloMETMuonCorrs_
embed muon MET correction info for caloMET into the muon
Definition: PATMuonProducer.h:163
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.h:173
pat::Lepton::setMiniPFIsolation
void setMiniPFIsolation(PFIsolation const &iso)
Definition: Lepton.h:217
pat::PATMuonProducer::computePuppiCombinedIso_
bool computePuppiCombinedIso_
Definition: PATMuonProducer.h:145
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.h:179
pat::PATMuonProducer::PUPPINoLeptonsIsolation_photons_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
Definition: PATMuonProducer.h:223
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.h:209
pat::PATMuonProducer::muonToken_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
input source
Definition: PATMuonProducer.h:140
get
#define get
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::pfMuonToken_
edm::EDGetTokenT< reco::PFCandidateCollection > pfMuonToken_
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT
Definition: PATMuonProducer.h:193
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
pat::PATMuonProducer::addResolutions_
bool addResolutions_
add resolutions to the muon (this will be data members of th muon even w/o embedding)
Definition: PATMuonProducer.h:187
pat::PATMuonProducer::tcMETMuonCorrsToken_
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcMETMuonCorrsToken_
source of tcMET muon corrections
Definition: PATMuonProducer.h:169
pat::PFIsolation
Definition: PFIsolation.h:12
pat::PATMuonProducer::beamLineToken_
edm::EDGetTokenT< reco::BeamSpot > beamLineToken_
input source of the primary vertex/beamspot
Definition: PATMuonProducer.h:199
pat::PATMuonProducer::IsoDepositMaps
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps
Definition: PATMuonProducer.h:88
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.h:247
eostools.move
def move(src, dest)
Definition: eostools.py:511
pat::PATMuonProducer::computeSoftMuonMVA_
bool computeSoftMuonMVA_
Definition: PATMuonProducer.h:226
pat::PATMuonProducer::setMuonMiniIso
void setMuonMiniIso(pat::Muon &aMuon, const pat::PackedCandidateCollection *pc)
Definition: PATMuonProducer.cc:877
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.h:250
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.h:232
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.h:222
PVValHelper::dz
Definition: PVValidationHelpers.h:51
pat::PATMuonProducer::addGenMatch_
bool addGenMatch_
add generator match information
Definition: PATMuonProducer.h:181
pat::PATMuonProducer::mvaBTagCollectionTag_
edm::EDGetTokenT< reco::JetTagCollection > mvaBTagCollectionTag_
Definition: PATMuonProducer.h:229
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:232
Exception
Definition: hltDiff.cc:245
pat::PATMuonProducer::isoDepositTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
Definition: PATMuonProducer.h:204
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.h:191
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.h:244
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.h:252
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:1100
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.h:151
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
PbPb_ZMuSkimMuonDPG_cff.particleType
particleType
Definition: PbPb_ZMuSkimMuonDPG_cff.py:27
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
pat::PATObject::embedGenParticle
void embedGenParticle()
Definition: PATObject.h:768
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
pat::PATMuonProducer::miniIsoParams_
std::vector< double > miniIsoParams_
Definition: PATMuonProducer.h:147
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:30
crabWrapper.key
key
Definition: crabWrapper.py:19
pat::PATMuonProducer::embedStandAloneMuon_
bool embedStandAloneMuon_
embed track from muon system into the muon
Definition: PATMuonProducer.h:159
pat::PATMuonProducer::puppiCombinedIsolation
double puppiCombinedIsolation(const pat::Muon &muon, const pat::PackedCandidateCollection *pc)
Definition: PATMuonProducer.cc:900
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.h:253
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.h:146
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.h:148
pat::PATMuonProducer::pcToken_
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
Definition: PATMuonProducer.h:143
pat::PATMuonProducer::isolator_
pat::helper::MultiIsolator isolator_
helper class to add userdefined isolation values to the muon
Definition: PATMuonProducer.h:238
edm::ProductID::id
ProductIndex id() const
Definition: ProductID.h:35