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::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PATMuonProducer (const edm::ParameterSet &iConfig)
 default constructir More...
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 everything that needs to be done during the event loop More...
 
 ~PATMuonProducer () override
 default destructur More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 description of config file parameters More...
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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 fillMuon (Muon &aMuon, const MuonBaseRef &muonRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const
 common muon filling, for both the standard and PF2PAT case More...
 
double getRelMiniIsoPUCorrected (const pat::Muon &muon, float rho)
 
template<typename T >
void readIsolationLabels (const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens)
 
double relMiniIsoPUCorrected (const pat::Muon &aMuon, double rho)
 
void setMuonMiniIso (pat::Muon &aMuon, const pat::PackedCandidateCollection *pc)
 

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 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...
 
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...
 
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...
 
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::View< reco::Muon > > muonToken_
 input source More...
 
edm::EDGetTokenT< reco::JetTagCollectionmvaBTagCollectionTag_
 
double mvaDrMax_
 
pat::MuonMvaEstimator mvaEstimator_
 
edm::EDGetTokenT< reco::JetCorrectormvaL1Corrector_
 
edm::EDGetTokenT< reco::JetCorrectormvaL1L2L3ResCorrector_
 
std::string mvaTrainingFile_
 
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...
 
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<>
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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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

Member Typedef Documentation

Definition at line 58 of file PATMuonProducer.h.

Definition at line 59 of file PATMuonProducer.h.

Definition at line 61 of file PATMuonProducer.h.

Definition at line 62 of file PATMuonProducer.h.

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

Definition at line 60 of file PATMuonProducer.h.

typedefs for convenience

Definition at line 57 of file PATMuonProducer.h.

Constructor & Destructor Documentation

PATMuonProducer::PATMuonProducer ( const edm::ParameterSet iConfig)
explicit

default constructir

Definition at line 54 of file PATMuonProducer.cc.

References addEfficiencies_, addGenMatch_, addPuppiIsolation_, addResolutions_, beamLineToken_, caloMETMuonCorrsToken_, computeMiniIso_, computeMuonMVA_, edm::EDConsumerBase::consumes(), edm::EDConsumerBase::consumesCollector(), efficiencyLoader_, embedBestTrack_, embedCaloMETMuonCorrs_, embedCombinedMuon_, embedDytMuon_, embedGenMatch_, embedHighLevelSelection_, embedPFCandidate_, embedPfEcalEnergy_, embedPickyMuon_, embedStandAloneMuon_, embedTcMETMuonCorrs_, embedTpfmsMuon_, embedTrack_, embedTunePBestTrack_, Exception, edm::ParameterSet::existsAs(), forceEmbedBestTrack_, genMatchTokens_, edm::ParameterSet::getParameter(), pat::MuonMvaEstimator::initialize(), isoDepositLabels_, isoDepositTokens_, isolationValueLabels_, isolationValueTokens_, miniIsoParams_, muonToken_, mvaBTagCollectionTag_, mvaDrMax_, mvaEstimator_, mvaL1Corrector_, mvaL1L2L3ResCorrector_, mvaTrainingFile_, mvaUseJec_, pcToken_, pfMuonToken_, PUPPIIsolation_charged_hadrons_, PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_photons_, PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_photons_, pvToken_, readIsolationLabels(), recomputeBasicSelectors_, resolutionLoader_, rho_, simInfo_, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, tcMETMuonCorrsToken_, useParticleFlow_, userDataHelper_, useUserData_, and edm::vector_transform().

54  :
56  useUserData_(iConfig.exists("userData")),
57  computeMuonMVA_(false),
59  mvaDrMax_(0),
60  mvaUseJec_(false),
61  isolator_(iConfig.exists("userIsolation") ? iConfig.getParameter<edm::ParameterSet>("userIsolation") : edm::ParameterSet(), consumesCollector(), false)
62 {
63  // input source
64  muonToken_ = consumes<edm::View<reco::Muon> >(iConfig.getParameter<edm::InputTag>( "muonSource" ));
65  // embedding of tracks
66  embedBestTrack_ = iConfig.getParameter<bool>( "embedMuonBestTrack" );
67  embedTunePBestTrack_ = iConfig.getParameter<bool>( "embedTunePMuonBestTrack" );
68  forceEmbedBestTrack_ = iConfig.getParameter<bool>( "forceBestTrackEmbedding" );
69  embedTrack_ = iConfig.getParameter<bool>( "embedTrack" );
70  embedCombinedMuon_ = iConfig.getParameter<bool>( "embedCombinedMuon" );
71  embedStandAloneMuon_ = iConfig.getParameter<bool>( "embedStandAloneMuon" );
72  // embedding of muon MET correction information
73  embedCaloMETMuonCorrs_ = iConfig.getParameter<bool>("embedCaloMETMuonCorrs" );
74  embedTcMETMuonCorrs_ = iConfig.getParameter<bool>("embedTcMETMuonCorrs" );
75  caloMETMuonCorrsToken_ = mayConsume<edm::ValueMap<reco::MuonMETCorrectionData> >(iConfig.getParameter<edm::InputTag>("caloMETMuonCorrs" ));
76  tcMETMuonCorrsToken_ = mayConsume<edm::ValueMap<reco::MuonMETCorrectionData> >(iConfig.getParameter<edm::InputTag>("tcMETMuonCorrs" ));
77  // pflow specific configurables
78  useParticleFlow_ = iConfig.getParameter<bool>( "useParticleFlow" );
79  embedPFCandidate_ = iConfig.getParameter<bool>( "embedPFCandidate" );
80  pfMuonToken_ = mayConsume<reco::PFCandidateCollection>(iConfig.getParameter<edm::InputTag>( "pfMuonSource" ));
81  embedPfEcalEnergy_ = iConfig.getParameter<bool>( "embedPfEcalEnergy" );
82  // embedding of tracks from TeV refit
83  embedPickyMuon_ = iConfig.getParameter<bool>( "embedPickyMuon" );
84  embedTpfmsMuon_ = iConfig.getParameter<bool>( "embedTpfmsMuon" );
85  embedDytMuon_ = iConfig.getParameter<bool>( "embedDytMuon" );
86  // Monte Carlo matching
87  addGenMatch_ = iConfig.getParameter<bool>( "addGenMatch" );
88  if (addGenMatch_) {
89  embedGenMatch_ = iConfig.getParameter<bool>( "embedGenMatch" );
90  if (iConfig.existsAs<edm::InputTag>("genParticleMatch")) {
92  }
93  else {
94  genMatchTokens_ = edm::vector_transform(iConfig.getParameter<std::vector<edm::InputTag> >( "genParticleMatch" ), [this](edm::InputTag const & tag){return consumes<edm::Association<reco::GenParticleCollection> >(tag);});
95  }
96  }
97  // efficiencies
98  addEfficiencies_ = iConfig.getParameter<bool>("addEfficiencies");
99  if(addEfficiencies_){
101  }
102  // resolutions
103  addResolutions_ = iConfig.getParameter<bool>("addResolutions");
104  if (addResolutions_) {
106  }
107  // puppi
108  addPuppiIsolation_ = iConfig.getParameter<bool>("addPuppiIsolation");
109  if(addPuppiIsolation_){
110  PUPPIIsolation_charged_hadrons_ = consumes<edm::ValueMap<float> >(iConfig.getParameter<edm::InputTag>("puppiIsolationChargedHadrons"));
111  PUPPIIsolation_neutral_hadrons_ = consumes<edm::ValueMap<float> >(iConfig.getParameter<edm::InputTag>("puppiIsolationNeutralHadrons"));
112  PUPPIIsolation_photons_ = consumes<edm::ValueMap<float> >(iConfig.getParameter<edm::InputTag>("puppiIsolationPhotons"));
113  //puppiNoLeptons
114  PUPPINoLeptonsIsolation_charged_hadrons_ = consumes<edm::ValueMap<float> >(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationChargedHadrons"));
115  PUPPINoLeptonsIsolation_neutral_hadrons_ = consumes<edm::ValueMap<float> >(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationNeutralHadrons"));
116  PUPPINoLeptonsIsolation_photons_ = consumes<edm::ValueMap<float> >(iConfig.getParameter<edm::InputTag>("puppiNoLeptonsIsolationPhotons"));
117  }
118  // read isoDeposit labels, for direct embedding
119  readIsolationLabels(iConfig, "isoDeposits", isoDepositLabels_, isoDepositTokens_);
120  // read isolation value labels, for direct embedding
122  // check to see if the user wants to add user data
123  if( useUserData_ ){
125  }
126  // embed high level selection variables
127  embedHighLevelSelection_ = iConfig.getParameter<bool>("embedHighLevelSelection");
128  if ( embedHighLevelSelection_ ) {
129  beamLineToken_ = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamLineSrc"));
130  pvToken_ = consumes<std::vector<reco::Vertex> >(iConfig.getParameter<edm::InputTag>("pvSrc"));
131  }
132 
133  //for mini-isolation calculation
134  computeMiniIso_ = iConfig.getParameter<bool>("computeMiniIso");
135 
136  miniIsoParams_ = iConfig.getParameter<std::vector<double> >("miniIsoParams");
137  if(computeMiniIso_ && miniIsoParams_.size() != 9){
138  throw cms::Exception("ParameterError") << "miniIsoParams must have exactly 9 elements.\n";
139  }
140  if(computeMiniIso_)
141  pcToken_ = consumes<pat::PackedCandidateCollection >(iConfig.getParameter<edm::InputTag>("pfCandsForMiniIso"));
142 
143  // standard selectors
144  recomputeBasicSelectors_ = iConfig.getParameter<bool>("recomputeBasicSelectors");
145  computeMuonMVA_ = iConfig.getParameter<bool>("computeMuonMVA");
146  mvaTrainingFile_ = iConfig.getParameter<std::string>("mvaTrainingFile");
147  if (computeMuonMVA_ and not computeMiniIso_)
148  throw cms::Exception("ConfigurationError") << "MiniIso is needed for Muon MVA calculation.\n";
149 
150  if (computeMuonMVA_) {
151  // pfCombinedInclusiveSecondaryVertexV2BJetTags
152  mvaBTagCollectionTag_ = consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("mvaJetTag"));
153  mvaL1Corrector_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("mvaL1Corrector"));
154  mvaL1L2L3ResCorrector_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("mvaL1L2L3ResCorrector"));
155  rho_ = consumes<double>(iConfig.getParameter<edm::InputTag>("rho"));
156  mvaUseJec_ = iConfig.getParameter<bool>("mvaUseJec");
157  mvaDrMax_ = iConfig.getParameter<double>("mvaDrMax");
158 
159  // xml training file
161  mvaEstimator_.initialize(fip.fullPath(),mvaDrMax_);
162  }
163 
164  // MC info
165  simInfo_ = consumes<edm::ValueMap<reco::MuonSimInfo> >(iConfig.getParameter<edm::InputTag>("muonSimInfo"));
166 
167  // produces vector of muons
168  produces<std::vector<Muon> >();
169 }
bool embedTpfmsMuon_
embed track from tpfms muon fit into the muon
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
bool useUserData_
add user data to the muon (this will be data members of th muon even w/o embedding) ...
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
T getParameter(std::string const &) const
Assists in assimilating all pat::UserData into pat objects.
pat::MuonMvaEstimator mvaEstimator_
bool addPuppiIsolation_
add puppi isolation
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcMETMuonCorrsToken_
source of tcMET muon corrections
bool embedTcMETMuonCorrs_
embed muon MET correction info for tcMET into the muon
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
input source of the primary vertex
std::string mvaTrainingFile_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
edm::EDGetTokenT< double > rho_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
input source
bool addEfficiencies_
add efficiencies to the muon (this will be data members of th muon even w/o embedding) ...
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > caloMETMuonCorrsToken_
source of caloMET muon corrections
bool embedCaloMETMuonCorrs_
embed muon MET correction info for caloMET into the muon
edm::EDGetTokenT< edm::ValueMap< reco::MuonSimInfo > > simInfo_
MC info.
bool exists(std::string const &parameterName) const
checks if a parameter exists
bool embedBestTrack_
embed the track from best muon measurement (global pflow)
edm::EDGetTokenT< reco::JetCorrector > mvaL1Corrector_
bool addResolutions_
add resolutions to the muon (this will be data members of th muon even w/o embedding) ...
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
std::vector< double > miniIsoParams_
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
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
edm::EDGetTokenT< reco::JetTagCollection > mvaBTagCollectionTag_
edm::EDGetTokenT< reco::PFCandidateCollection > pfMuonToken_
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT ...
pat::helper::MultiIsolator isolator_
helper class to add userdefined isolation values to the muon
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< reco::BeamSpot > beamLineToken_
input source of the primary vertex/beamspot
bool useParticleFlow_
switch to use particle flow (PF2PAT) or not
pat::PATUserDataHelper< pat::Muon > userDataHelper_
helper class to add userData to the muon
bool embedStandAloneMuon_
embed track from muon system into the muon
bool embedTrack_
embed the track from inner tracker into the muon
bool addGenMatch_
add generator match information
bool embedPfEcalEnergy_
add ecal PF energy
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
void initialize(std::string weightsfile, float dRmax)
bool embedTunePBestTrack_
embed the track from best muon measurement (muon only)
edm::EDGetTokenT< reco::JetCorrector > mvaL1L2L3ResCorrector_
pat::helper::EfficiencyLoader efficiencyLoader_
helper class to add efficiencies to the muon
bool embedPickyMuon_
embed track from picky muon fit into the muon
bool embedDytMuon_
embed track from DYT muon fit into the muon
bool embedGenMatch_
embed the gen match information into the muon
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens)
IsolationLabels isoDepositLabels_
input source for isoDeposits
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
input tags for generator match information
IsolationLabels isolationValueLabels_
input source isolation value maps
bool forceEmbedBestTrack_
force separate embed of the best track even if already embedded
bool embedPFCandidate_
embed pfCandidates into the muon
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
bool computeMuonMVA_
standard muon selectors
bool embedCombinedMuon_
embed track of the combined fit into the muon
pat::helper::KinResolutionsLoader resolutionLoader_
helper class to add resolutions to the muon
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
bool embedHighLevelSelection_
embed high level selection variables
PATMuonProducer::~PATMuonProducer ( )
override

default destructur

Definition at line 172 of file PATMuonProducer.cc.

173 {
174 }

Member Function Documentation

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

References pat::Muon::BS2D, pat::Muon::BS3D, DEFINE_FWK_MODULE, reco::BeamSpot::position(), reco::Vertex::position(), pat::Muon::PV2D, pat::Muon::PV3D, pat::Muon::PVDZ, mps_fire::result, reco::BeamSpot::rotatedCovariance3D(), pat::Muon::setDB(), IPTools::signedImpactParameter3D(), IPTools::signedTransverseImpactParameter(), and reco::Vertex::zError().

Referenced by produce().

783 {
784  // Correct to PV
785 
786  // PV2D
787  std::pair<bool,Measurement1D> result =
789  GlobalVector(track->px(),
790  track->py(),
791  track->pz()),
792  primaryVertex);
793  double d0_corr = result.second.value();
794  double d0_err = primaryVertexIsValid ? result.second.error() : -1.0;
795  aMuon.setDB( d0_corr, d0_err, pat::Muon::PV2D);
796 
797 
798  // PV3D
799  result =
801  GlobalVector(track->px(),
802  track->py(),
803  track->pz()),
804  primaryVertex);
805  d0_corr = result.second.value();
806  d0_err = primaryVertexIsValid ? result.second.error() : -1.0;
807  aMuon.setDB( d0_corr, d0_err, pat::Muon::PV3D);
808 
809 
810  // Correct to beam spot
811  // make a fake vertex out of beam spot
812  reco::Vertex vBeamspot(beamspot.position(), beamspot.rotatedCovariance3D());
813 
814  // BS2D
815  result =
817  GlobalVector(track->px(),
818  track->py(),
819  track->pz()),
820  vBeamspot);
821  d0_corr = result.second.value();
822  d0_err = beamspotIsValid ? result.second.error() : -1.0;
823  aMuon.setDB( d0_corr, d0_err, pat::Muon::BS2D);
824 
825  // BS3D
826  result =
828  GlobalVector(track->px(),
829  track->py(),
830  track->pz()),
831  vBeamspot);
832  d0_corr = result.second.value();
833  d0_err = beamspotIsValid ? result.second.error() : -1.0;
834  aMuon.setDB( d0_corr, d0_err, pat::Muon::BS3D);
835 
836 
837  // PVDZ
838  aMuon.setDB( track->dz(primaryVertex.position()), std::hypot(track->dzError(), primaryVertex.zError()), pat::Muon::PVDZ );
839 }
double zError() const
error on z
Definition: Vertex.h:123
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:50
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:71
const Point & position() const
position
Definition: Vertex.h:109
void setDB(double dB, double edB, IPTYPE type=PV2D)
Definition: Muon.h:244
const Point & position() const
position
Definition: BeamSpot.h:62
Covariance3DMatrix rotatedCovariance3D() const
Definition: BeamSpot.cc:78
Global3DVector GlobalVector
Definition: GlobalVector.h:10
void PATMuonProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

description of config file parameters

Definition at line 663 of file PATMuonProducer.cc.

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

664 {
666  iDesc.setComment("PAT muon producer module");
667 
668  // input source
669  iDesc.add<edm::InputTag>("muonSource", edm::InputTag("no default"))->setComment("input collection");
670 
671  // embedding
672  iDesc.add<bool>("embedMuonBestTrack", true)->setComment("embed muon best track (global pflow)");
673  iDesc.add<bool>("embedTunePMuonBestTrack", true)->setComment("embed muon best track (muon only)");
674  iDesc.add<bool>("forceBestTrackEmbedding", true)->setComment("force embedding separately the best tracks even if they're already embedded e.g. as tracker or global tracks");
675  iDesc.add<bool>("embedTrack", true)->setComment("embed external track");
676  iDesc.add<bool>("embedStandAloneMuon", true)->setComment("embed external stand-alone muon");
677  iDesc.add<bool>("embedCombinedMuon", false)->setComment("embed external combined muon");
678  iDesc.add<bool>("embedPickyMuon", false)->setComment("embed external picky track");
679  iDesc.add<bool>("embedTpfmsMuon", false)->setComment("embed external tpfms track");
680  iDesc.add<bool>("embedDytMuon", false)->setComment("embed external dyt track ");
681 
682  // embedding of MET muon corrections
683  iDesc.add<bool>("embedCaloMETMuonCorrs", true)->setComment("whether to add MET muon correction for caloMET or not");
684  iDesc.add<edm::InputTag>("caloMETMuonCorrs", edm::InputTag("muonMETValueMapProducer" , "muCorrData"))->setComment("source of MET muon corrections for caloMET");
685  iDesc.add<bool>("embedTcMETMuonCorrs", true)->setComment("whether to add MET muon correction for tcMET or not");
686  iDesc.add<edm::InputTag>("tcMETMuonCorrs", edm::InputTag("muonTCMETValueMapProducer" , "muCorrData"))->setComment("source of MET muon corrections for tcMET");
687 
688  // pf specific parameters
689  iDesc.add<edm::InputTag>("pfMuonSource", edm::InputTag("pfMuons"))->setComment("particle flow input collection");
690  iDesc.add<bool>("useParticleFlow", false)->setComment("whether to use particle flow or not");
691  iDesc.add<bool>("embedPFCandidate", false)->setComment("embed external particle flow object");
692  iDesc.add<bool>("embedPfEcalEnergy", true)->setComment("add ecal energy as reconstructed by PF");
693 
694  // MC matching configurables
695  iDesc.add<bool>("addGenMatch", true)->setComment("add MC matching");
696  iDesc.add<bool>("embedGenMatch", false)->setComment("embed MC matched MC information");
697  std::vector<edm::InputTag> emptySourceVector;
698  iDesc.addNode( edm::ParameterDescription<edm::InputTag>("genParticleMatch", edm::InputTag(), true) xor
699  edm::ParameterDescription<std::vector<edm::InputTag> >("genParticleMatch", emptySourceVector, true)
700  )->setComment("input with MC match information");
701 
702  // mini-iso
703  iDesc.add<bool>("computeMiniIso", false)->setComment("whether or not to compute and store electron mini-isolation");
704  iDesc.add<edm::InputTag>("pfCandsForMiniIso", edm::InputTag("packedPFCandidates"))->setComment("collection to use to compute mini-iso");
705  iDesc.add<std::vector<double> >("miniIsoParams", std::vector<double>())->setComment("mini-iso parameters to use for muons");
706 
708 
709  // IsoDeposit configurables
710  edm::ParameterSetDescription isoDepositsPSet;
711  isoDepositsPSet.addOptional<edm::InputTag>("tracker");
712  isoDepositsPSet.addOptional<edm::InputTag>("ecal");
713  isoDepositsPSet.addOptional<edm::InputTag>("hcal");
714  isoDepositsPSet.addOptional<edm::InputTag>("particle");
715  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedHadrons");
716  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedAll");
717  isoDepositsPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
718  isoDepositsPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
719  isoDepositsPSet.addOptional<edm::InputTag>("pfPhotons");
720  isoDepositsPSet.addOptional<std::vector<edm::InputTag> >("user");
721  iDesc.addOptional("isoDeposits", isoDepositsPSet);
722 
723  // isolation values configurables
724  edm::ParameterSetDescription isolationValuesPSet;
725  isolationValuesPSet.addOptional<edm::InputTag>("tracker");
726  isolationValuesPSet.addOptional<edm::InputTag>("ecal");
727  isolationValuesPSet.addOptional<edm::InputTag>("hcal");
728  isolationValuesPSet.addOptional<edm::InputTag>("particle");
729  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedHadrons");
730  isolationValuesPSet.addOptional<edm::InputTag>("pfChargedAll");
731  isolationValuesPSet.addOptional<edm::InputTag>("pfPUChargedHadrons");
732  isolationValuesPSet.addOptional<edm::InputTag>("pfNeutralHadrons");
733  isolationValuesPSet.addOptional<edm::InputTag>("pfPhotons");
734  iDesc.addOptional("isolationValues", isolationValuesPSet);
735 
736  iDesc.ifValue(edm::ParameterDescription<bool>("addPuppiIsolation", false, true),
737  true >> (edm::ParameterDescription<edm::InputTag>("puppiIsolationChargedHadrons", edm::InputTag("muonPUPPIIsolation","h+-DR030-ThresholdVeto000-ConeVeto000"), true) and
738  edm::ParameterDescription<edm::InputTag>("puppiIsolationNeutralHadrons", edm::InputTag("muonPUPPIIsolation","h0-DR030-ThresholdVeto000-ConeVeto001"), true) and
739  edm::ParameterDescription<edm::InputTag>("puppiIsolationPhotons", edm::InputTag("muonPUPPIIsolation","gamma-DR030-ThresholdVeto000-ConeVeto001"), true) and
740  edm::ParameterDescription<edm::InputTag>("puppiNoLeptonsIsolationChargedHadrons", edm::InputTag("muonPUPPINoLeptonsIsolation","h+-DR030-ThresholdVeto000-ConeVeto000"), true) and
741  edm::ParameterDescription<edm::InputTag>("puppiNoLeptonsIsolationNeutralHadrons", edm::InputTag("muonPUPPINoLeptonsIsolation","h0-DR030-ThresholdVeto000-ConeVeto001"), true) and
742  edm::ParameterDescription<edm::InputTag>("puppiNoLeptonsIsolationPhotons", edm::InputTag("muonPUPPINoLeptonsIsolation","gamma-DR030-ThresholdVeto000-ConeVeto001"), true)) or
743  false >> edm::EmptyGroupDescription());
744 
745  // Efficiency configurables
746  edm::ParameterSetDescription efficienciesPSet;
747  efficienciesPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
748  iDesc.add("efficiencies", efficienciesPSet);
749  iDesc.add<bool>("addEfficiencies", false);
750 
751  // Check to see if the user wants to add user data
752  edm::ParameterSetDescription userDataPSet;
754  iDesc.addOptional("userData", userDataPSet);
755 
756  edm::ParameterSetDescription isolationPSet;
757  isolationPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
758  iDesc.add("userIsolation", isolationPSet);
759 
760  iDesc.add<bool>("embedHighLevelSelection", true)->setComment("embed high level selection");
761  edm::ParameterSetDescription highLevelPSet;
762  highLevelPSet.setAllowAnything();
763  iDesc.addNode( edm::ParameterDescription<edm::InputTag>("beamLineSrc", edm::InputTag(), true)
764  )->setComment("input with high level selection");
766  )->setComment("input with high level selection");
767 
768  //descriptions.add("PATMuonProducer", iDesc);
769 }
void setComment(std::string const &value)
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
void setAllowAnything()
allow any parameter label/value pairs
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
static void fillDescription(edm::ParameterSetDescription &iDesc)
void setComment(std::string const &value)
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
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T > > cases)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
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 568 of file PATMuonProducer.cc.

References addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), edm::contains(), reco::Muon::DYT, efficiencyLoader_, embedBestTrack_, pat::Muon::embedCombinedMuon(), embedCombinedMuon_, pat::Muon::embedDytMuon(), embedDytMuon_, embedGenMatch_, pat::PATObject< ObjectType >::embedGenParticle(), pat::Muon::embedMuonBestTrack(), pat::Muon::embedPickyMuon(), embedPickyMuon_, pat::Muon::embedStandAloneMuon(), embedStandAloneMuon_, pat::Muon::embedTpfmsMuon(), embedTpfmsMuon_, pat::Muon::embedTrack(), embedTrack_, embedTunePBestTrack_, pat::Muon::embedTunePMuonBestTrack(), pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), plotBeamSpotDB::first, forceEmbedBestTrack_, mps_fire::i, edm::RefToBase< T >::id(), reco::Muon::isAValidMuonTrack(), reco::Muon::isGlobalMuon(), isoDepositLabels_, isolationValueLabels_, gen::n, pat::Muon::pfCandidateRef(), reco::Muon::Picky, resolutionLoader_, pat::helper::EfficiencyLoader::setEfficiencies(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), reco::LeafCandidate::setP4(), pat::helper::KinResolutionsLoader::setResolutions(), source, reco::Muon::TPFMS, and useParticleFlow_.

Referenced by produce().

569 {
570  // in the particle flow algorithm,
571  // the muon momentum is recomputed.
572  // the new value is stored as the momentum of the
573  // resulting PFCandidate of type Muon, and choosen
574  // as the pat::Muon momentum
575  if (useParticleFlow_)
576  aMuon.setP4( aMuon.pfCandidateRef()->p4() );
577  if (embedTrack_) aMuon.embedTrack();
580 
581  // embed the TeV refit track refs (only available for globalMuons)
582  if (aMuon.isGlobalMuon()) {
584  aMuon.embedPickyMuon();
586  aMuon.embedTpfmsMuon();
588  aMuon.embedDytMuon();
589  }
590 
591  // embed best tracks (at the end, so unless forceEmbedBestTrack_ is true we can save some space not embedding them twice)
594 
595  // store the match to the generated final state muons
596  if (addGenMatch_) {
597  for(size_t i = 0, n = genMatches.size(); i < n; ++i) {
598  reco::GenParticleRef genMuon = (*genMatches[i])[baseRef];
599  aMuon.addGenParticleRef(genMuon);
600  }
601  if (embedGenMatch_) aMuon.embedGenParticle();
602  }
603  if (efficiencyLoader_.enabled()) {
604  efficiencyLoader_.setEfficiencies( aMuon, muonRef );
605  }
606 
607  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
608  if(useParticleFlow_) {
609  if (deposits[j]->contains(baseRef.id())) {
610  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[baseRef]);
611  } else if (deposits[j]->contains(muonRef.id())){
612  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[muonRef]);
613  } else {
614  reco::CandidatePtr source = aMuon.pfCandidateRef()->sourceCandidatePtr(0);
615  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[source]);
616  }
617  }
618  else{
619  aMuon.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[muonRef]);
620  }
621  }
622 
623  for (size_t j = 0; j<isolationValues.size(); ++j) {
624  if(useParticleFlow_) {
625  if (isolationValues[j]->contains(baseRef.id())) {
626  aMuon.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[baseRef]);
627  } else if (isolationValues[j]->contains(muonRef.id())) {
628  aMuon.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[muonRef]);
629  } else {
630  reco::CandidatePtr source = aMuon.pfCandidateRef()->sourceCandidatePtr(0);
631  aMuon.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[source]);
632  }
633  }
634  else{
635  aMuon.setIsolation(isolationValueLabels_[j].first, (*isolationValues[j])[muonRef]);
636  }
637  }
638 
639  if (resolutionLoader_.enabled()) {
641  }
642 }
bool embedTpfmsMuon_
embed track from tpfms muon fit into the muon
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
void embedDytMuon()
embed reference to the above dyt Track
void embedTpfmsMuon()
embed reference to the above tpfms Track
void setIsolation(IsolationKeys key, float value)
Definition: Lepton.h:99
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
void embedCombinedMuon()
set reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon...
void embedTunePMuonBestTrack(bool force=false)
void embedMuonBestTrack(bool force=false)
bool embedBestTrack_
embed the track from best muon measurement (global pflow)
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
ProductID id() const
Definition: RefToBase.h:242
void embedStandAloneMuon()
set reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon) ...
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
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:176
void embedTrack()
set reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
bool useParticleFlow_
switch to use particle flow (PF2PAT) or not
bool embedStandAloneMuon_
embed track from muon system into the muon
bool embedTrack_
embed the track from inner tracker into the muon
bool addGenMatch_
add generator match information
bool isGlobalMuon() const override
Definition: Muon.h:268
void embedGenParticle()
Definition: PATObject.h:694
reco::PFCandidateRef pfCandidateRef() const
bool isAValidMuonTrack(const MuonTrackType &type) const
void addGenParticleRef(const reco::GenParticleRef &ref)
Definition: PATObject.h:678
bool embedTunePBestTrack_
embed the track from best muon measurement (muon only)
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
pat::helper::EfficiencyLoader efficiencyLoader_
helper class to add efficiencies to the muon
bool embedPickyMuon_
embed track from picky muon fit into the muon
bool embedDytMuon_
embed track from DYT muon fit into the muon
bool embedGenMatch_
embed the gen match information into the muon
IsolationLabels isoDepositLabels_
input source for isoDeposits
IsolationLabels isolationValueLabels_
input source isolation value maps
void embedPickyMuon()
embed reference to the above picky Track
bool forceEmbedBestTrack_
force separate embed of the best track even if already embedded
bool embedCombinedMuon_
embed track of the combined fit into the muon
pat::helper::KinResolutionsLoader resolutionLoader_
helper class to add resolutions to the muon
static std::string const source
Definition: EdmProvDump.cc:43
void setP4(const LorentzVector &p4) final
set 4-momentum
double PATMuonProducer::getRelMiniIsoPUCorrected ( const pat::Muon muon,
float  rho 
)
private

Definition at line 653 of file PATMuonProducer.cc.

References MTVHistoProducerAlgoForTrackerBlock_cfi::maxdr, MTVHistoProducerAlgoForTrackerBlock_cfi::mindr, pat::miniIsoDr(), miniIsoParams_, pat::Lepton< LeptonType >::miniPFIsolation(), pat::muonRelMiniIsoPUCorrected(), and reco::LeafCandidate::p4().

Referenced by produce().

654 {
655  float mindr(miniIsoParams_[0]);
656  float maxdr(miniIsoParams_[1]);
657  float kt_scale(miniIsoParams_[2]);
658  float drcut = pat::miniIsoDr(muon.p4(),mindr,maxdr,kt_scale);
659  return pat::muonRelMiniIsoPUCorrected(muon.miniPFIsolation(), muon.p4(), drcut, rho);
660 }
float muonRelMiniIsoPUCorrected(const PFIsolation &iso, const math::XYZTLorentzVector &p4, float dr, float rho)
std::vector< double > miniIsoParams_
const PFIsolation & miniPFIsolation() const
Definition: Lepton.h:196
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
float miniIsoDr(const math::XYZTLorentzVector &p4, float mindr, float maxdr, float kt_scale)
void PATMuonProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

everything that needs to be done during the event loop

Definition at line 176 of file PATMuonProducer.cc.

References addGenMatch_, addPuppiIsolation_, beamLineToken_, ecalDrivenElectronSeedsParameters_cff::beamSpot, pat::helper::MultiIsolator::beginEvent(), pat::Muon::BS2D, TransientTrackBuilder::build(), muonProducer_cfi::caloMETMuonCorrs, caloMETMuonCorrsToken_, computeMiniIso_, computeMuonMVA_, pat::MuonMvaEstimator::computeMva(), CandIsolatorFromDeposits_cfi::deposits, PVValHelper::dz, reco::PFCandidate::ecalEnergy(), efficiencyLoader_, pat::Muon::embedCaloMETMuonCorrs(), embedCaloMETMuonCorrs_, embedCombinedMuon_, embedGenMatch_, embedHighLevel(), embedHighLevelSelection_, pat::Muon::embedPFCandidate(), embedPFCandidate_, embedPfEcalEnergy_, pat::Muon::embedTcMETMuonCorrs(), embedTcMETMuonCorrs_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), pat::helper::MultiIsolator::enabled(), pat::helper::MultiIsolator::endEvent(), pat::helper::MultiIsolator::fill(), fillMuon(), genMatchTokens_, edm::EventSetup::get(), edm::Event::getByToken(), getRelMiniIsoPUCorrected(), cutBasedMuonId_MuonPOG_V0_cff::globalTrack, mps_fire::i, training_settings::idx, diffTreeTool::index, pat::Muon::initSimInfo(), susybsm::HSCParticleType::innerTrack, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), isoDepositTokens_, electronProducer_cff::isolationValues, isolationValueTokens_, isolator_, isolatorTmpStorage_, edm::EventBase::isRealData(), edm::HandleBase::isValid(), pat::MuonMvaEstimator::jetPtRatio(), pat::MuonMvaEstimator::jetPtRel(), reco::Muon::MiniIsoLoose, reco::Muon::MiniIsoMedium, reco::Muon::MiniIsoTight, reco::Muon::MiniIsoVeryTight, eostools::move(), reco::PFCandidate::muonRef(), nano_cff::muons, muonToken_, pat::MuonMvaEstimator::mva(), mvaBTagCollectionTag_, mvaEstimator_, muonProducer_cfi::mvaL1Corrector, mvaL1Corrector_, muonProducer_cfi::mvaL1L2L3ResCorrector, mvaL1L2L3ResCorrector_, reco::Muon::MvaLoose, reco::Muon::MvaMedium, reco::Muon::MvaTight, mvaUseJec_, pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), nhits, hemisphereProducer_cfi::patMuons, pcToken_, pfMuonToken_, reco::Vertex::position(), impactParameterTagInfos_cfi::primaryVertex, edm::Handle< T >::product(), pTComparator_, PUPPIIsolation_charged_hadrons_, PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_photons_, PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_photons_, edm::Event::put(), MetAnalyzer::pv(), pat::Muon::PV3D, pvToken_, recomputeBasicSelectors_, resolutionLoader_, rho_, edm::Event::run(), muon::setCutBasedSelectorFlags(), pat::Muon::setExtSimType(), pat::Lepton< LeptonType >::setIsolation(), pat::Muon::setIsolationPUPPI(), pat::Muon::setIsolationPUPPINoLeptons(), setMuonMiniIso(), pat::Muon::setNormChi2(), pat::Muon::setNumberOfValidHits(), pat::Muon::setPFCandidateRef(), pat::Muon::setPfEcalEnergy(), pat::Muon::setSimBX(), pat::Muon::setSimEta(), pat::Muon::setSimFlavour(), pat::Muon::setSimHeaviestMotherFlavour(), pat::Muon::setSimMotherPdgId(), pat::Muon::setSimPdgId(), pat::Muon::setSimPhi(), pat::Muon::setSimProdRho(), pat::Muon::setSimProdZ(), pat::Muon::setSimPt(), pat::Muon::setSimType(), simInfo_, muonProducer_cfi::tcMETMuonCorrs, tcMETMuonCorrsToken_, groupFilesInBlocks::tt, useParticleFlow_, userDataHelper_, and useUserData_.

177 {
178  // switch off embedding (in unschedules mode)
179  if (iEvent.isRealData()){
180  addGenMatch_ = false;
181  embedGenMatch_ = false;
182  }
183 
185  iEvent.getByToken(muonToken_, muons);
186 
187 
189  if(computeMiniIso_)
190  iEvent.getByToken(pcToken_, pc);
191 
192  // get the ESHandle for the transient track builder,
193  // if needed for high level selection embedding
195 
196  if(isolator_.enabled()) isolator_.beginEvent(iEvent,iSetup);
198  if(resolutionLoader_.enabled()) resolutionLoader_.newEvent(iEvent, iSetup);
199 
201  for (size_t j = 0; j<isoDepositTokens_.size(); ++j) {
202  iEvent.getByToken(isoDepositTokens_[j], deposits[j]);
203  }
204 
206  for (size_t j = 0; j<isolationValueTokens_.size(); ++j) {
208  }
209 
210  //value maps for puppi isolation
211  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_charged_hadrons;
212  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_neutral_hadrons;
213  edm::Handle<edm::ValueMap<float>> PUPPIIsolation_photons;
214  //value maps for puppiNoLeptons isolation
215  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_charged_hadrons;
216  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_neutral_hadrons;
217  edm::Handle<edm::ValueMap<float>> PUPPINoLeptonsIsolation_photons;
218  if(addPuppiIsolation_){
219  //puppi
220  iEvent.getByToken(PUPPIIsolation_charged_hadrons_, PUPPIIsolation_charged_hadrons);
221  iEvent.getByToken(PUPPIIsolation_neutral_hadrons_, PUPPIIsolation_neutral_hadrons);
222  iEvent.getByToken(PUPPIIsolation_photons_, PUPPIIsolation_photons);
223  //puppiNoLeptons
224  iEvent.getByToken(PUPPINoLeptonsIsolation_charged_hadrons_, PUPPINoLeptonsIsolation_charged_hadrons);
225  iEvent.getByToken(PUPPINoLeptonsIsolation_neutral_hadrons_, PUPPINoLeptonsIsolation_neutral_hadrons);
226  iEvent.getByToken(PUPPINoLeptonsIsolation_photons_, PUPPINoLeptonsIsolation_photons);
227  }
228 
229  // inputs for muon mva
230  edm::Handle<reco::JetTagCollection> mvaBTagCollectionTag;
233  if (computeMuonMVA_) {
234  iEvent.getByToken(mvaBTagCollectionTag_,mvaBTagCollectionTag);
235  iEvent.getByToken(mvaL1Corrector_,mvaL1Corrector);
236  iEvent.getByToken(mvaL1L2L3ResCorrector_,mvaL1L2L3ResCorrector);
237  }
238 
239  // prepare the MC genMatchTokens_
240  GenAssociations genMatches(genMatchTokens_.size());
241  if (addGenMatch_) {
242  for (size_t j = 0, nd = genMatchTokens_.size(); j < nd; ++j) {
243  iEvent.getByToken(genMatchTokens_[j], genMatches[j]);
244  }
245  }
246 
247  // prepare the high level selection: needs beamline
248  // OR primary vertex, depending on user selection
251  bool beamSpotIsValid = false;
252  bool primaryVertexIsValid = false;
253  if ( embedHighLevelSelection_ ) {
254  // get the beamspot
255  edm::Handle<reco::BeamSpot> beamSpotHandle;
256  iEvent.getByToken(beamLineToken_, beamSpotHandle);
257 
258  // get the primary vertex
260  iEvent.getByToken( pvToken_, pvHandle );
261 
262  if( beamSpotHandle.isValid() ){
263  beamSpot = *beamSpotHandle;
264  beamSpotIsValid = true;
265  } else{
266  edm::LogError("DataNotAvailable")
267  << "No beam spot available from EventSetup, not adding high level selection \n";
268  }
269  if( pvHandle.isValid() && !pvHandle->empty() ) {
270  primaryVertex = pvHandle->at(0);
271  primaryVertexIsValid = true;
272  } else {
273  edm::LogError("DataNotAvailable")
274  << "No primary vertex available from EventSetup, not adding high level selection \n";
275  }
276  // this is needed by the IPTools methods from the tracking group
277  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", trackBuilder);
278  }
279 
280  // MC info
282  bool simInfoIsAvailalbe = iEvent.getByToken(simInfo_,simInfo);
283 
284  // this will be the new object collection
285  std::vector<Muon> * patMuons = new std::vector<Muon>();
286 
288  if( useParticleFlow_ ){
289  // get the PFCandidates of type muons
290  iEvent.getByToken(pfMuonToken_, pfMuons);
291 
292  unsigned index=0;
293  for( reco::PFCandidateConstIterator i = pfMuons->begin(); i != pfMuons->end(); ++i, ++index) {
294  const reco::PFCandidate& pfmu = *i;
295  //const reco::IsolaPFCandidate& pfmu = *i;
296  const reco::MuonRef& muonRef = pfmu.muonRef();
297  assert( muonRef.isNonnull() );
298 
299  MuonBaseRef muonBaseRef(muonRef);
300  Muon aMuon(muonBaseRef);
301 
302  if ( useUserData_ ) {
303  userDataHelper_.add( aMuon, iEvent, iSetup );
304  }
305 
306  // embed high level selection
307  if ( embedHighLevelSelection_ ) {
308  // get the tracks
309  reco::TrackRef innerTrack = muonBaseRef->innerTrack();
310  reco::TrackRef globalTrack= muonBaseRef->globalTrack();
311  reco::TrackRef bestTrack = muonBaseRef->muonBestTrack();
312  reco::TrackRef chosenTrack = innerTrack;
313  // Make sure the collection it points to is there
314  if ( bestTrack.isNonnull() && bestTrack.isAvailable() )
315  chosenTrack = bestTrack;
316 
317  if ( chosenTrack.isNonnull() && chosenTrack.isAvailable() ) {
318  unsigned int nhits = chosenTrack->numberOfValidHits(); // ????
319  aMuon.setNumberOfValidHits( nhits );
320 
321  reco::TransientTrack tt = trackBuilder->build(chosenTrack);
322  embedHighLevel( aMuon,
323  chosenTrack,
324  tt,
325  primaryVertex,
326  primaryVertexIsValid,
327  beamSpot,
328  beamSpotIsValid );
329 
330  }
331 
332  if ( globalTrack.isNonnull() && globalTrack.isAvailable() && !embedCombinedMuon_) {
333  double norm_chi2 = globalTrack->chi2() / globalTrack->ndof();
334  aMuon.setNormChi2( norm_chi2 );
335  }
336  }
337  reco::PFCandidateRef pfRef(pfMuons,index);
338  //reco::PFCandidatePtr ptrToMother(pfMuons,index);
339  reco::CandidateBaseRef pfBaseRef( pfRef );
340 
341  aMuon.setPFCandidateRef( pfRef );
342  if( embedPFCandidate_ ) aMuon.embedPFCandidate();
343  fillMuon( aMuon, muonBaseRef, pfBaseRef, genMatches, deposits, isolationValues );
344 
345  if(computeMiniIso_)
346  setMuonMiniIso(aMuon, pc.product());
347 
348  if (addPuppiIsolation_) {
349  aMuon.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[muonBaseRef],
350  (*PUPPIIsolation_neutral_hadrons)[muonBaseRef],
351  (*PUPPIIsolation_photons)[muonBaseRef]);
352 
353  aMuon.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[muonBaseRef],
354  (*PUPPINoLeptonsIsolation_neutral_hadrons)[muonBaseRef],
355  (*PUPPINoLeptonsIsolation_photons)[muonBaseRef]);
356  }
357  else {
358  aMuon.setIsolationPUPPI(-999., -999.,-999.);
359  aMuon.setIsolationPUPPINoLeptons(-999., -999.,-999.);
360  }
361 
362  if (embedPfEcalEnergy_) {
363  aMuon.setPfEcalEnergy(pfmu.ecalEnergy());
364  }
365 
366  patMuons->push_back(aMuon);
367  }
368  }
369  else {
371  iEvent.getByToken(muonToken_, muons);
372 
373  // embedding of muon MET corrections
375  //edm::ValueMap<reco::MuonMETCorrectionData> caloMETmuCorValueMap;
377  iEvent.getByToken(caloMETMuonCorrsToken_, caloMETMuonCorrs);
378  //caloMETmuCorValueMap = *caloMETmuCorValueMap_h;
379  }
381  //edm::ValueMap<reco::MuonMETCorrectionData> tcMETmuCorValueMap;
383  iEvent.getByToken(tcMETMuonCorrsToken_, tcMETMuonCorrs);
384  //tcMETmuCorValueMap = *tcMETmuCorValueMap_h;
385  }
386 
387  if (embedPfEcalEnergy_) {
388  // get the PFCandidates of type muons
389  iEvent.getByToken(pfMuonToken_, pfMuons);
390  }
391 
392  for (edm::View<reco::Muon>::const_iterator itMuon = muons->begin(); itMuon != muons->end(); ++itMuon) {
393  // construct the Muon from the ref -> save ref to original object
394  unsigned int idx = itMuon - muons->begin();
395  MuonBaseRef muonRef = muons->refAt(idx);
396  reco::CandidateBaseRef muonBaseRef( muonRef );
397 
398  Muon aMuon(muonRef);
399  fillMuon( aMuon, muonRef, muonBaseRef, genMatches, deposits, isolationValues);
400  if(computeMiniIso_)
401  setMuonMiniIso(aMuon, pc.product());
402  if (addPuppiIsolation_) {
403  aMuon.setIsolationPUPPI((*PUPPIIsolation_charged_hadrons)[muonRef], (*PUPPIIsolation_neutral_hadrons)[muonRef], (*PUPPIIsolation_photons)[muonRef]);
404  aMuon.setIsolationPUPPINoLeptons((*PUPPINoLeptonsIsolation_charged_hadrons)[muonRef], (*PUPPINoLeptonsIsolation_neutral_hadrons)[muonRef], (*PUPPINoLeptonsIsolation_photons)[muonRef]);
405  }
406  else {
407  aMuon.setIsolationPUPPI(-999., -999.,-999.);
408  aMuon.setIsolationPUPPINoLeptons(-999., -999.,-999.);
409  }
410 
411  // Isolation
412  if (isolator_.enabled()) {
413  //reco::CandidatePtr mother = ptrToMother->sourceCandidatePtr(0);
414  isolator_.fill(*muons, idx, isolatorTmpStorage_);
415  typedef pat::helper::MultiIsolator::IsolationValuePairs IsolationValuePairs;
416  // better to loop backwards, so the vector is resized less times
417  for (IsolationValuePairs::const_reverse_iterator it = isolatorTmpStorage_.rbegin(), ed = isolatorTmpStorage_.rend(); it != ed; ++it) {
418  aMuon.setIsolation(it->first, it->second);
419  }
420  }
421 
422  // for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
423  // aMuon.setIsoDeposit(isoDepositLabels_[j].first,
424  // (*deposits[j])[muonRef]);
425  // }
426 
427  // add sel to selected
428  edm::Ptr<reco::Muon> muonsPtr = muons->ptrAt(idx);
429  if ( useUserData_ ) {
430  userDataHelper_.add( aMuon, iEvent, iSetup );
431  }
432 
433  // embed high level selection
434  if ( embedHighLevelSelection_ ) {
435  // get the tracks
436  reco::TrackRef innerTrack = itMuon->innerTrack();
437  reco::TrackRef globalTrack= itMuon->globalTrack();
438  reco::TrackRef bestTrack = itMuon->muonBestTrack();
439  reco::TrackRef chosenTrack = innerTrack;
440  // Make sure the collection it points to is there
441  if ( bestTrack.isNonnull() && bestTrack.isAvailable() )
442  chosenTrack = bestTrack;
443  if ( chosenTrack.isNonnull() && chosenTrack.isAvailable() ) {
444  unsigned int nhits = chosenTrack->numberOfValidHits(); // ????
445  aMuon.setNumberOfValidHits( nhits );
446 
447  reco::TransientTrack tt = trackBuilder->build(chosenTrack);
448  embedHighLevel( aMuon,
449  chosenTrack,
450  tt,
451  primaryVertex,
452  primaryVertexIsValid,
453  beamSpot,
454  beamSpotIsValid );
455 
456  }
457 
458  if ( globalTrack.isNonnull() && globalTrack.isAvailable() ) {
459  double norm_chi2 = globalTrack->chi2() / globalTrack->ndof();
460  aMuon.setNormChi2( norm_chi2 );
461  }
462  }
463 
464  // embed MET muon corrections
465  if( embedCaloMETMuonCorrs_ ) aMuon.embedCaloMETMuonCorrs((*caloMETMuonCorrs)[muonRef]);
466  if( embedTcMETMuonCorrs_ ) aMuon.embedTcMETMuonCorrs((*tcMETMuonCorrs )[muonRef]);
467 
468  if (embedPfEcalEnergy_) {
469  aMuon.setPfEcalEnergy(-99.0);
470  for (const reco::PFCandidate &pfmu : *pfMuons) {
471  if (pfmu.muonRef().isNonnull()) {
472  if (pfmu.muonRef().id() != muonRef.id()) throw cms::Exception("Configuration") << "Muon reference within PF candidates does not point to the muon collection." << std::endl;
473  if (pfmu.muonRef().key() == muonRef.key()) {
474  aMuon.setPfEcalEnergy(pfmu.ecalEnergy());
475  }
476  }
477  }
478  }
479  // MC info
480  aMuon.initSimInfo();
481  if (simInfoIsAvailalbe){
482  const auto& msi = (*simInfo)[muonBaseRef];
483  aMuon.setSimType(msi.primaryClass);
484  aMuon.setExtSimType(msi.extendedClass);
485  aMuon.setSimFlavour(msi.flavour);
486  aMuon.setSimHeaviestMotherFlavour(msi.heaviestMotherFlavour);
487  aMuon.setSimPdgId(msi.pdgId);
488  aMuon.setSimMotherPdgId(msi.motherPdgId);
489  aMuon.setSimBX(msi.tpBX);
490  aMuon.setSimProdRho(msi.vertex.Rho());
491  aMuon.setSimProdZ(msi.vertex.Z());
492  aMuon.setSimPt(msi.p4.pt());
493  aMuon.setSimEta(msi.p4.eta());
494  aMuon.setSimPhi(msi.p4.phi());
495  }
496  patMuons->push_back(aMuon);
497  }
498  }
499 
500  // sort muons in pt
501  std::sort(patMuons->begin(), patMuons->end(), pTComparator_);
502 
503  // Store standard muon selection decisions and jet related
504  // quantaties.
505  // Need a separate loop over muons to have all inputs properly
506  // computed and stored in the object.
508  if (computeMuonMVA_) iEvent.getByToken(rho_,rho);
509  const reco::Vertex* pv(nullptr);
510  if (primaryVertexIsValid) pv = &primaryVertex;
511  for(auto& muon: *patMuons){
513  muon.setSelectors(0);
514  bool isRun2016BCDEF = (272728 <= iEvent.run() && iEvent.run() <= 278808);
515  muon::setCutBasedSelectorFlags(muon, pv, isRun2016BCDEF);
516  }
517  if (computeMiniIso_){
518  // MiniIsolation working points
519  double iso = getRelMiniIsoPUCorrected(muon,*rho);
520  muon.setSelector(reco::Muon::MiniIsoLoose, iso<0.40);
521  muon.setSelector(reco::Muon::MiniIsoMedium, iso<0.20);
522  muon.setSelector(reco::Muon::MiniIsoTight, iso<0.10);
523  muon.setSelector(reco::Muon::MiniIsoVeryTight, iso<0.05);
524  }
525  if (computeMuonMVA_ && primaryVertexIsValid){
526  if (mvaUseJec_)
528  primaryVertex,
529  *(mvaBTagCollectionTag.product()),
530  &*mvaL1Corrector,
531  &*mvaL1L2L3ResCorrector);
532  else
534  primaryVertex,
535  *(mvaBTagCollectionTag.product()));
536 
537  muon.setMvaValue(mvaEstimator_.mva());
538  muon.setJetPtRatio(mvaEstimator_.jetPtRatio());
539  muon.setJetPtRel(mvaEstimator_.jetPtRel());
540 
541  // MVA working points
542  // https://twiki.cern.ch/twiki/bin/viewauth/CMS/LeptonMVA
543  double dB2D = fabs(muon.dB(pat::Muon::BS2D));
544  double dB3D = fabs(muon.dB(pat::Muon::PV3D));
545  double edB3D = fabs(muon.edB(pat::Muon::PV3D));
546  double sip3D = edB3D>0?dB3D/edB3D:0.0;
547  double dz = fabs(muon.muonBestTrack()->dz(primaryVertex.position()));
548 
549  // muon preselection
550  if (muon.pt()>5 and muon.isLooseMuon() and
551  muon.passed(reco::Muon::MiniIsoLoose) and
552  sip3D<8.0 and dB2D<0.05 and dz<0.1){
553  muon.setSelector(reco::Muon::MvaLoose, muon.mvaValue()>-0.60);
554  muon.setSelector(reco::Muon::MvaMedium, muon.mvaValue()>-0.20);
555  muon.setSelector(reco::Muon::MvaTight, muon.mvaValue()> 0.15);
556  }
557  }
558  }
559 
560  // put products in Event
561  std::unique_ptr<std::vector<Muon> > ptr(patMuons);
562  iEvent.put(std::move(ptr));
563 
565 }
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
bool useUserData_
add user data to the muon (this will be data members of th muon even w/o embedding) ...
bool isAvailable() const
Definition: Ref.h:577
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:222
pat::MuonMvaEstimator mvaEstimator_
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
bool addPuppiIsolation_
add puppi isolation
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcMETMuonCorrsToken_
source of tcMET muon corrections
bool embedTcMETMuonCorrs_
embed muon MET correction info for tcMET into the muon
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
input source of the primary vertex
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
edm::EDGetTokenT< double > rho_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
input source
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > caloMETMuonCorrsToken_
source of caloMET muon corrections
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
bool embedCaloMETMuonCorrs_
embed muon MET correction info for caloMET into the muon
edm::EDGetTokenT< edm::ValueMap< reco::MuonSimInfo > > simInfo_
MC info.
void setMuonMiniIso(pat::Muon &aMuon, const pat::PackedCandidateCollection *pc)
reco::TransientTrack build(const reco::Track *p) const
edm::EDGetTokenT< reco::JetCorrector > mvaL1Corrector_
void setCutBasedSelectorFlags(reco::Muon &muon, const reco::Vertex *vertex=0, bool run2016_hip_mitigation=false)
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
key_type key() const
Accessor for product key.
Definition: Ref.h:265
PFCandidateCollection::const_iterator PFCandidateConstIterator
iterator
bool isRealData() const
Definition: EventBase.h:64
const Point & position() const
position
Definition: Vertex.h:109
void embedHighLevel(pat::Muon &aMuon, reco::TrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid)
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
ProductID id() const
Accessor for product ID.
Definition: Ref.h:259
edm::EDGetTokenT< reco::JetTagCollection > mvaBTagCollectionTag_
edm::EDGetTokenT< reco::PFCandidateCollection > pfMuonToken_
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT ...
pat::helper::MultiIsolator isolator_
helper class to add userdefined isolation values to the muon
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
edm::EDGetTokenT< reco::BeamSpot > beamLineToken_
input source of the primary vertex/beamspot
bool useParticleFlow_
switch to use particle flow (PF2PAT) or not
pat::PATUserDataHelper< pat::Muon > userDataHelper_
helper class to add userData to the muon
bool enabled() const
True if it has a non null configuration.
Definition: MultiIsolator.h:50
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
GreaterByPt< Muon > pTComparator_
bool addGenMatch_
add generator match information
Definition: Muon.py:1
bool embedPfEcalEnergy_
add ecal PF energy
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
RunNumber_t run() const
Definition: Event.h:108
def pv(vc)
Definition: MetAnalyzer.py:6
double getRelMiniIsoPUCorrected(const pat::Muon &muon, float rho)
float jetPtRatio() const
bool isValid() const
Definition: HandleBase.h:74
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:459
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:58
std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
edm::EDGetTokenT< reco::JetCorrector > mvaL1L2L3ResCorrector_
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
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
Definition: MultiIsolator.h:16
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
void computeMva(const pat::Muon &imuon, const reco::Vertex &vertex, const reco::JetTagCollection &bTags, const reco::JetCorrector *correctorL1=0, const reco::JetCorrector *correctorL1L2L3Res=0)
pat::helper::EfficiencyLoader efficiencyLoader_
helper class to add efficiencies to the muon
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
isolation value pair for temporary storage before being folded into the muon
bool embedGenMatch_
embed the gen match information into the muon
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
input tags for generator match information
float jetPtRel() const
ProductIndex id() const
Definition: ProductID.h:38
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
edm::RefToBase< reco::Muon > MuonBaseRef
typedefs for convenience
bool embedPFCandidate_
embed pfCandidates into the muon
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
bool computeMuonMVA_
standard muon selectors
bool embedCombinedMuon_
embed track of the combined fit into the muon
pat::helper::KinResolutionsLoader resolutionLoader_
helper class to add resolutions to the muon
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
def move(src, dest)
Definition: eostools.py:510
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
Definition: MultiIsolator.h:82
bool embedHighLevelSelection_
embed high level selection variables
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 200 of file PATMuonProducer.h.

References pat::EcalIso, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), pat::HcalIso, crabWrapper::key, diffTwoXMLs::label, pat::PfAllParticleIso, pat::PfChargedAllIso, pat::PfChargedHadronIso, pat::PfGammaIso, pat::PfNeutralHadronIso, pat::PfPUChargedHadronIso, pat::TrackIso, pat::UserBaseIso, and edm::vector_transform().

Referenced by PATMuonProducer().

201 {
202  labels.clear();
203 
204  if (iConfig.exists( psetName )) {
205  edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>(psetName);
206 
207  if (depconf.exists("tracker")) labels.push_back(std::make_pair(pat::TrackIso, depconf.getParameter<edm::InputTag>("tracker")));
208  if (depconf.exists("ecal")) labels.push_back(std::make_pair(pat::EcalIso, depconf.getParameter<edm::InputTag>("ecal")));
209  if (depconf.exists("hcal")) labels.push_back(std::make_pair(pat::HcalIso, depconf.getParameter<edm::InputTag>("hcal")));
210  if (depconf.exists("pfAllParticles")) {
211  labels.push_back(std::make_pair(pat::PfAllParticleIso, depconf.getParameter<edm::InputTag>("pfAllParticles")));
212  }
213  if (depconf.exists("pfChargedHadrons")) {
214  labels.push_back(std::make_pair(pat::PfChargedHadronIso, depconf.getParameter<edm::InputTag>("pfChargedHadrons")));
215  }
216  if (depconf.exists("pfChargedAll")) {
217  labels.push_back(std::make_pair(pat::PfChargedAllIso, depconf.getParameter<edm::InputTag>("pfChargedAll")));
218  }
219  if (depconf.exists("pfPUChargedHadrons")) {
220  labels.push_back(std::make_pair(pat::PfPUChargedHadronIso, depconf.getParameter<edm::InputTag>("pfPUChargedHadrons")));
221  }
222  if (depconf.exists("pfNeutralHadrons")) {
223  labels.push_back(std::make_pair(pat::PfNeutralHadronIso, depconf.getParameter<edm::InputTag>("pfNeutralHadrons")));
224  }
225  if (depconf.exists("pfPhotons")) {
226  labels.push_back(std::make_pair(pat::PfGammaIso, depconf.getParameter<edm::InputTag>("pfPhotons")));
227  }
228  if (depconf.exists("user")) {
229  std::vector<edm::InputTag> userdeps = depconf.getParameter<std::vector<edm::InputTag> >("user");
230  std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
232  for ( ; it != ed; ++it, ++key) {
233  labels.push_back(std::make_pair(pat::IsolationKeys(key), *it));
234  }
235  tokens = edm::vector_transform(labels, [this](IsolationLabel const & label){return consumes<edm::ValueMap<T> >(label.second);});
236  }
237  }
238  tokens = edm::vector_transform(labels, [this](pat::PATMuonProducer::IsolationLabel const & label){return consumes<edm::ValueMap<T> >(label.second);});
239 }
T getParameter(std::string const &) const
std::pair< pat::IsolationKeys, edm::InputTag > IsolationLabel
bool exists(std::string const &parameterName) const
checks if a parameter exists
IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
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
double pat::PATMuonProducer::relMiniIsoPUCorrected ( const pat::Muon aMuon,
double  rho 
)
private
void PATMuonProducer::setMuonMiniIso ( pat::Muon aMuon,
const pat::PackedCandidateCollection pc 
)
private

Definition at line 644 of file PATMuonProducer.cc.

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

Referenced by produce().

645 {
646  pat::PFIsolation miniiso = pat::getMiniPFIsolation(pc, aMuon.p4(),
647  miniIsoParams_[0], miniIsoParams_[1], miniIsoParams_[2],
648  miniIsoParams_[3], miniIsoParams_[4], miniIsoParams_[5],
649  miniIsoParams_[6], miniIsoParams_[7], miniIsoParams_[8]);
650  aMuon.setMiniPFIsolation(miniiso);
651 }
std::vector< double > miniIsoParams_
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
void setMiniPFIsolation(PFIsolation const &iso)
Definition: Lepton.h:197
PFIsolation getMiniPFIsolation(const pat::PackedCandidateCollection *pfcands, const math::XYZTLorentzVector &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)

Member Data Documentation

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

Referenced by PATMuonProducer().

bool pat::PATMuonProducer::addGenMatch_
private

add generator match information

Definition at line 123 of file PATMuonProducer.h.

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

bool pat::PATMuonProducer::addPuppiIsolation_
private

add puppi isolation

Definition at line 157 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Referenced by PATMuonProducer().

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

input source of the primary vertex/beamspot

Definition at line 141 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

source of caloMET muon corrections

Definition at line 111 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

bool pat::PATMuonProducer::computeMiniIso_
private

Definition at line 92 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

bool pat::PATMuonProducer::computeMuonMVA_
private

standard muon selectors

Definition at line 167 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

helper class to add efficiencies to the muon

Definition at line 186 of file PATMuonProducer.h.

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

bool pat::PATMuonProducer::embedBestTrack_
private

embed the track from best muon measurement (global pflow)

Definition at line 97 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

bool pat::PATMuonProducer::embedCaloMETMuonCorrs_
private

embed muon MET correction info for caloMET into the muon

Definition at line 109 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

bool pat::PATMuonProducer::embedCombinedMuon_
private

embed track of the combined fit into the muon

Definition at line 107 of file PATMuonProducer.h.

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

bool pat::PATMuonProducer::embedDytMuon_
private

embed track from DYT muon fit into the muon

Definition at line 121 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

bool pat::PATMuonProducer::embedGenMatch_
private

embed the gen match information into the muon

Definition at line 127 of file PATMuonProducer.h.

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

bool pat::PATMuonProducer::embedHighLevelSelection_
private

embed high level selection variables

Definition at line 139 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

bool pat::PATMuonProducer::embedPFCandidate_
private

embed pfCandidates into the muon

Definition at line 137 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

bool pat::PATMuonProducer::embedPfEcalEnergy_
private

add ecal PF energy

Definition at line 155 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

bool pat::PATMuonProducer::embedPickyMuon_
private

embed track from picky muon fit into the muon

Definition at line 117 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

bool pat::PATMuonProducer::embedStandAloneMuon_
private

embed track from muon system into the muon

Definition at line 105 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

bool pat::PATMuonProducer::embedTcMETMuonCorrs_
private

embed muon MET correction info for tcMET into the muon

Definition at line 113 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

bool pat::PATMuonProducer::embedTpfmsMuon_
private

embed track from tpfms muon fit into the muon

Definition at line 119 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

bool pat::PATMuonProducer::embedTrack_
private

embed the track from inner tracker into the muon

Definition at line 103 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

bool pat::PATMuonProducer::embedTunePBestTrack_
private

embed the track from best muon measurement (muon only)

Definition at line 99 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

bool pat::PATMuonProducer::forceEmbedBestTrack_
private

force separate embed of the best track even if already embedded

Definition at line 101 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

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

input tags for generator match information

Definition at line 125 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

IsolationLabels pat::PATMuonProducer::isoDepositLabels_
private

input source for isoDeposits

Definition at line 145 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

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

Definition at line 146 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

IsolationLabels pat::PATMuonProducer::isolationValueLabels_
private

input source isolation value maps

Definition at line 148 of file PATMuonProducer.h.

Referenced by fillMuon(), and PATMuonProducer().

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

Definition at line 149 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

helper class to add userdefined isolation values to the muon

Definition at line 182 of file PATMuonProducer.h.

Referenced by produce().

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

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

Definition at line 184 of file PATMuonProducer.h.

Referenced by produce().

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

Definition at line 93 of file PATMuonProducer.h.

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

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

input source

Definition at line 88 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Definition at line 171 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

double pat::PATMuonProducer::mvaDrMax_
private

Definition at line 169 of file PATMuonProducer.h.

Referenced by PATMuonProducer().

pat::MuonMvaEstimator pat::PATMuonProducer::mvaEstimator_
private

Definition at line 175 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Definition at line 172 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Definition at line 173 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

std::string pat::PATMuonProducer::mvaTrainingFile_
private

Definition at line 176 of file PATMuonProducer.h.

Referenced by PATMuonProducer().

bool pat::PATMuonProducer::mvaUseJec_
private

Definition at line 170 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Definition at line 91 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Referenced by PATMuonProducer(), and produce().

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

— tools — comparator for pt ordering

Definition at line 180 of file PATMuonProducer.h.

Referenced by produce().

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

Definition at line 159 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Definition at line 160 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Definition at line 161 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Definition at line 163 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Definition at line 164 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Definition at line 165 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

input source of the primary vertex

Definition at line 143 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

bool pat::PATMuonProducer::recomputeBasicSelectors_
private

Definition at line 168 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

double pat::PATMuonProducer::relMiniIsoPUCorrected_
private

Definition at line 94 of file PATMuonProducer.h.

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

helper class to add resolutions to the muon

Definition at line 131 of file PATMuonProducer.h.

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

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

Definition at line 174 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

MC info.

Definition at line 191 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

source of tcMET muon corrections

Definition at line 115 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

bool pat::PATMuonProducer::useParticleFlow_
private

switch to use particle flow (PF2PAT) or not

Definition at line 133 of file PATMuonProducer.h.

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

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

helper class to add userData to the muon

Definition at line 188 of file PATMuonProducer.h.

Referenced by PATMuonProducer(), and produce().

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

Referenced by PATMuonProducer(), and produce().