class definition More...
#include "PhysicsTools/PatAlgos/interface/PATMuonProducer.h"
Public Member Functions | |
PATMuonProducer (const edm::ParameterSet &iConfig) | |
default constructir More... | |
virtual void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override |
everything that needs to be done during the event loop More... | |
~PATMuonProducer () | |
default destructur More... | |
Public Member Functions inherited from edm::EDProducer | |
EDProducer () | |
ModuleDescription const & | moduleDescription () const |
virtual | ~EDProducer () |
Public Member Functions inherited from edm::ProducerBase | |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
virtual | ~ProducerBase () |
Public Member Functions inherited from edm::EDConsumerBase | |
EDConsumerBase () | |
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
std::vector < ProductHolderIndexAndSkipBit > const & | itemsToGetFromEvent () const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const |
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
virtual | ~EDConsumerBase () |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
description of config file parameters More... | |
Static Public Member Functions inherited from edm::EDProducer | |
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::InputTag > | IsolationLabel |
typedef std::vector < IsolationLabel > | IsolationLabels |
typedef std::vector < edm::Handle< edm::ValueMap < double > > > | IsolationValueMaps |
typedef edm::RefToBase < reco::Muon > | MuonBaseRef |
typedefs for convenience More... | |
Private Member Functions | |
void | embedHighLevel (pat::Muon &aMuon, reco::TrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid) |
void | fillMuon (Muon &aMuon, const MuonBaseRef &muonRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const |
common muon filling, for both the standard and PF2PAT case More... | |
template<typename T > | |
void | readIsolationLabels (const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens) |
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 | addResolutions_ |
add resolutions to the muon (this will be data members of th muon even w/o embedding) More... | |
edm::EDGetTokenT< reco::BeamSpot > | beamLineToken_ |
input source of the primary vertex/beamspot More... | |
edm::EDGetTokenT < edm::ValueMap < reco::MuonMETCorrectionData > > | caloMETMuonCorrsToken_ |
source of caloMET muon corrections 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 | 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... | |
edm::EDGetTokenT< edm::View < reco::Muon > > | muonToken_ |
input source More... | |
edm::EDGetTokenT < reco::PFCandidateCollection > | pfMuonToken_ |
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT More... | |
GreaterByPt< Muon > | pTComparator_ |
edm::EDGetTokenT< std::vector < reco::Vertex > > | pvToken_ |
input source of the primary vertex More... | |
pat::helper::KinResolutionsLoader | resolutionLoader_ |
helper class to add resolutions to the muon 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... | |
bool | usePV_ |
use the primary vertex or the beamspot More... | |
pat::PATUserDataHelper< pat::Muon > | userDataHelper_ |
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::EDProducer | |
typedef EDProducer | ModuleType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Protected Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
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) |
class definition
Produces pat::Muon's.
The PATMuonProducer produces analysis-level pat::Muon's starting from a collection of objects of reco::Muon.
Definition at line 42 of file PATMuonProducer.h.
|
private |
Definition at line 57 of file PATMuonProducer.h.
|
private |
Definition at line 58 of file PATMuonProducer.h.
|
private |
Definition at line 60 of file PATMuonProducer.h.
|
private |
Definition at line 61 of file PATMuonProducer.h.
|
private |
Definition at line 59 of file PATMuonProducer.h.
|
private |
typedefs for convenience
Definition at line 56 of file PATMuonProducer.h.
|
explicit |
default constructir
Definition at line 46 of file PATMuonProducer.cc.
References addGenMatch_, caloMETMuonCorrsToken_, edm::EDConsumerBase::consumes(), embedBestTrack_, embedCaloMETMuonCorrs_, embedCombinedMuon_, embedDytMuon_, embedGenMatch_, embedPFCandidate_, embedPickyMuon_, embedStandAloneMuon_, embedTcMETMuonCorrs_, embedTpfmsMuon_, embedTrack_, embedTunePBestTrack_, edm::ParameterSet::existsAs(), forceEmbedBestTrack_, genMatchTokens_, edm::ParameterSet::getParameter(), muonToken_, pfMuonToken_, GlobalPosition_Frontier_DevDB_cff::tag, tcMETMuonCorrsToken_, useParticleFlow_, and edm::vector_transform().
PATMuonProducer::~PATMuonProducer | ( | ) |
|
private |
Definition at line 546 of file PATMuonProducer.cc.
References pat::Muon::BS2D, pat::Muon::BS3D, reco::BeamSpot::position(), pat::Muon::PV2D, pat::Muon::PV3D, query::result, reco::BeamSpot::rotatedCovariance3D(), pat::Muon::setDB(), IPTools::signedImpactParameter3D(), and IPTools::signedTransverseImpactParameter().
Referenced by produce().
|
static |
description of config file parameters
Definition at line 447 of file PATMuonProducer.cc.
References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addNode(), edm::ParameterSetDescription::addOptional(), pat::helper::KinResolutionsLoader::fillDescription(), pat::PATUserDataHelper< ObjectType >::fillDescription(), edm::ParameterSetDescription::setAllowAnything(), edm::ParameterSetDescription::setComment(), and edm::ParameterDescriptionNode::setComment().
|
private |
common muon filling, for both the standard and PF2PAT case
Definition at line 370 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(), first, forceEmbedBestTrack_, i, edm::RefToBase< T >::id(), reco::Muon::isAValidMuonTrack(), reco::Muon::isGlobalMuon(), isoDepositLabels_, isolationValueLabels_, j, 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().
|
overridevirtual |
everything that needs to be done during the event loop
Implements edm::EDProducer.
Definition at line 117 of file PATMuonProducer.cc.
References IPTools::absoluteTransverseImpactParameter(), addGenMatch_, beamLineToken_, SiPixelRawToDigiRegional_cfi::beamSpot, pat::helper::MultiIsolator::beginEvent(), caloMETMuonCorrsToken_, efficiencyLoader_, pat::Muon::embedCaloMETMuonCorrs(), embedCaloMETMuonCorrs_, embedGenMatch_, embedHighLevel(), embedHighLevelSelection_, pat::Muon::embedPFCandidate(), embedPFCandidate_, 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(), i, customizeTrackingMonitorSeedNumber::idx, cmsHarvester::index, susybsm::HSCParticleType::innerTrack, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), isoDepositTokens_, isolationValueTokens_, isolator_, isolatorTmpStorage_, edm::EventBase::isRealData(), edm::HandleBase::isValid(), j, reco::PFCandidate::muonRef(), patZpeak::muons, muonToken_, pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), muonProducer_cfi::patMuons, pfMuons_cff::pfMuons, pfMuonToken_, HWWFunctions::primaryVertex(), pTComparator_, edm::Event::put(), pvToken_, resolutionLoader_, query::result, pat::Muon::setDB(), pat::Lepton< LeptonType >::setIsolation(), pat::Muon::setNormChi2(), pat::Muon::setNumberOfValidHits(), pat::Muon::setPFCandidateRef(), python.multivaluedict::sort(), tcMETMuonCorrsToken_, groupFilesInBlocks::tt, useParticleFlow_, usePV_, userDataHelper_, useUserData_, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().
|
private |
fill label vector from the contents of the parameter set, for the embedding of isoDeposits or userIsolation values
Definition at line 167 of file PATMuonProducer.h.
References pat::EcalIso, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), pat::HcalIso, combine::key, diffTwoXMLs::label, pat::PfAllParticleIso, pat::PfChargedAllIso, pat::PfChargedHadronIso, pat::PfGammaIso, pat::PfNeutralHadronIso, pat::PfPUChargedHadronIso, pat::TrackIso, pat::UserBaseIso, and edm::vector_transform().
|
private |
add efficiencies to the muon (this will be data members of th muon even w/o embedding)
Definition at line 143 of file PATMuonProducer.h.
|
private |
add generator match information
Definition at line 113 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
add resolutions to the muon (this will be data members of th muon even w/o embedding)
Definition at line 119 of file PATMuonProducer.h.
|
private |
input source of the primary vertex/beamspot
Definition at line 131 of file PATMuonProducer.h.
Referenced by produce().
|
private |
source of caloMET muon corrections
Definition at line 101 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
helper class to add efficiencies to the muon
Definition at line 155 of file PATMuonProducer.h.
Referenced by fillMuon(), and produce().
|
private |
embed the track from best muon measurement (global pflow)
Definition at line 87 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed muon MET correction info for caloMET into the muon
Definition at line 99 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed track of the combined fit into the muon
Definition at line 97 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed track from DYT muon fit into the muon
Definition at line 111 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed the gen match information into the muon
Definition at line 117 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
embed high level selection variables
Definition at line 129 of file PATMuonProducer.h.
Referenced by produce().
|
private |
embed pfCandidates into the muon
Definition at line 127 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed track from picky muon fit into the muon
Definition at line 107 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed track from muon system into the muon
Definition at line 95 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed muon MET correction info for tcMET into the muon
Definition at line 103 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed track from tpfms muon fit into the muon
Definition at line 109 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed the track from inner tracker into the muon
Definition at line 93 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed the track from best muon measurement (muon only)
Definition at line 89 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
force separate embed of the best track even if already embedded
Definition at line 91 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
input tags for generator match information
Definition at line 115 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
input source for isoDeposits
Definition at line 137 of file PATMuonProducer.h.
Referenced by fillMuon().
|
private |
Definition at line 138 of file PATMuonProducer.h.
Referenced by produce().
|
private |
input source isolation value maps
Definition at line 140 of file PATMuonProducer.h.
Referenced by fillMuon().
|
private |
Definition at line 141 of file PATMuonProducer.h.
Referenced by produce().
|
private |
helper class to add userdefined isolation values to the muon
Definition at line 151 of file PATMuonProducer.h.
Referenced by produce().
|
private |
isolation value pair for temporary storage before being folded into the muon
Definition at line 153 of file PATMuonProducer.h.
Referenced by produce().
|
private |
input source
Definition at line 84 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT
Definition at line 125 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
— tools — comparator for pt ordering
Definition at line 149 of file PATMuonProducer.h.
Referenced by produce().
|
private |
input source of the primary vertex
Definition at line 135 of file PATMuonProducer.h.
Referenced by produce().
|
private |
helper class to add resolutions to the muon
Definition at line 121 of file PATMuonProducer.h.
Referenced by fillMuon(), and produce().
|
private |
source of tcMET muon corrections
Definition at line 105 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
switch to use particle flow (PF2PAT) or not
Definition at line 123 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
use the primary vertex or the beamspot
Definition at line 133 of file PATMuonProducer.h.
Referenced by produce().
|
private |
helper class to add userData to the muon
Definition at line 157 of file PATMuonProducer.h.
Referenced by produce().
|
private |
add user data to the muon (this will be data members of th muon even w/o embedding)
Definition at line 145 of file PATMuonProducer.h.
Referenced by produce().