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) |
everything that needs to be done during the event loop More... | |
~PATMuonProducer () | |
default destructur More... | |
Public Member Functions inherited from edm::EDProducer | |
EDProducer () | |
virtual | ~EDProducer () |
Public Member Functions inherited from edm::ProducerBase | |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
boost::function< void(const BranchDescription &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
virtual | ~ProducerBase () |
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... | |
void | readIsolationLabels (const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels) |
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::InputTag | beamLineSrc_ |
input source of the primary vertex/beamspot More... | |
edm::InputTag | caloMETMuonCorrs_ |
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 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 | embedImprovedBestTrack_ |
embed the track from best muon measurement, new tuneP, 53X option only 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... | |
std::vector< edm::InputTag > | genMatchSrc_ |
input tags for generator match information More... | |
IsolationLabels | isoDepositLabels_ |
input source for isoDeposits More... | |
IsolationLabels | isolationValueLabels_ |
input source isolation value maps More... | |
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::InputTag | muonSrc_ |
input source More... | |
edm::InputTag | pfMuonSrc_ |
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT More... | |
GreaterByPt< Muon > | pTComparator_ |
edm::InputTag | pvSrc_ |
input source of the primary vertex More... | |
pat::helper::KinResolutionsLoader | resolutionLoader_ |
helper class to add resolutions to the muon More... | |
edm::InputTag | tcMETMuonCorrs_ |
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 |
typedef WorkerT< EDProducer > | WorkerType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Protected Member Functions inherited from edm::EDProducer | |
CurrentProcessingContext const * | currentContext () const |
Protected Member Functions inherited from edm::ProducerBase | |
template<class TProducer , class TMethod > | |
void | callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod) |
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 43 of file PATMuonProducer.h.
|
private |
Definition at line 58 of file PATMuonProducer.h.
|
private |
Definition at line 59 of file PATMuonProducer.h.
|
private |
Definition at line 61 of file PATMuonProducer.h.
|
private |
Definition at line 62 of file PATMuonProducer.h.
|
private |
Definition at line 60 of file PATMuonProducer.h.
|
private |
typedefs for convenience
Definition at line 57 of file PATMuonProducer.h.
|
explicit |
default constructir
Definition at line 48 of file PATMuonProducer.cc.
References addEfficiencies_, addGenMatch_, addResolutions_, beamLineSrc_, caloMETMuonCorrs_, efficiencyLoader_, embedBestTrack_, embedCaloMETMuonCorrs_, embedCombinedMuon_, embedDytMuon_, embedGenMatch_, embedHighLevelSelection_, embedImprovedBestTrack_, embedPFCandidate_, embedPickyMuon_, embedStandAloneMuon_, embedTcMETMuonCorrs_, embedTpfmsMuon_, embedTrack_, edm::ParameterSet::existsAs(), genMatchSrc_, edm::ParameterSet::getParameter(), isoDepositLabels_, isolationValueLabels_, muonSrc_, pfMuonSrc_, pvSrc_, readIsolationLabels(), resolutionLoader_, tcMETMuonCorrs_, useParticleFlow_, usePV_, userDataHelper_, and useUserData_.
PATMuonProducer::~PATMuonProducer | ( | ) |
|
private |
Definition at line 582 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 444 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 365 of file PATMuonProducer.cc.
References addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), edm::contains(), reco::defaultTuneP, reco::Muon::DYT, efficiencyLoader_, embedBestTrack_, pat::Muon::embedCombinedMuon(), embedCombinedMuon_, pat::Muon::embedDytMuon(), embedDytMuon_, embedGenMatch_, pat::PATObject< ObjectType >::embedGenParticle(), embedImprovedBestTrack_, pat::Muon::embedImprovedMuonBestTrack(), pat::Muon::embedMuonBestTrack(), pat::Muon::embedPickyMuon(), embedPickyMuon_, pat::Muon::embedStandAloneMuon(), embedStandAloneMuon_, pat::Muon::embedTpfmsMuon(), embedTpfmsMuon_, pat::Muon::embedTrack(), embedTrack_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), first, i, edm::RefToBase< T >::id(), reco::improvedTuneP, reco::Muon::isAValidMuonTrack(), reco::Muon::isGlobalMuon(), isoDepositLabels_, isolationValueLabels_, j, muon::muonBestTrack(), n, pat::Muon::pfCandidateRef(), reco::Muon::Picky, resolutionLoader_, reco::Muon::setBestTrack(), pat::helper::EfficiencyLoader::setEfficiencies(), pat::Muon::setImprovedBestTrack(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), reco::LeafCandidate::setP4(), pat::helper::KinResolutionsLoader::setResolutions(), LaserTracksInput_cfi::source, reco::Muon::TPFMS, and useParticleFlow_.
Referenced by produce().
|
virtual |
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_, beamLineSrc_, SiPixelRawToDigiRegional_cfi::beamSpot, pat::helper::MultiIsolator::beginEvent(), caloMETMuonCorrs_, reco::defaultTuneP, 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(), genMatchSrc_, edm::EventSetup::get(), edm::Event::getByLabel(), i, getHLTprescales::index, susybsm::HSCParticleType::innerTrack, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), isoDepositLabels_, isolationValueLabels_, isolator_, isolatorTmpStorage_, edm::EventBase::isRealData(), edm::HandleBase::isValid(), j, muon::muonBestTrack(), reco::PFCandidate::muonRef(), patZpeak::muons, muonSrc_, pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), muonProducer_cfi::patMuons, pfMuons_cff::pfMuons, pfMuonSrc_, pTComparator_, edm::Event::put(), pvSrc_, resolutionLoader_, query::result, edm::second(), pat::Muon::setDB(), pat::Lepton< LeptonType >::setIsolation(), pat::Muon::setNormChi2(), pat::Muon::setNumberOfValidHits(), pat::Muon::setPFCandidateRef(), python.multivaluedict::sort(), tcMETMuonCorrs_, 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 539 of file PATMuonProducer.cc.
References pat::EcalIso, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), pat::HcalIso, combine::key, pat::PfAllParticleIso, pat::PfChargedAllIso, pat::PfChargedHadronIso, pat::PfGammaIso, pat::PfNeutralHadronIso, pat::PfPUChargedHadronIso, pat::TrackIso, and pat::UserBaseIso.
Referenced by PATMuonProducer().
|
private |
add efficiencies to the muon (this will be data members of th muon even w/o embedding)
Definition at line 140 of file PATMuonProducer.h.
Referenced by PATMuonProducer().
|
private |
add generator match information
Definition at line 112 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 118 of file PATMuonProducer.h.
Referenced by PATMuonProducer().
|
private |
input source of the primary vertex/beamspot
Definition at line 130 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
source of caloMET muon corrections
Definition at line 100 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
helper class to add efficiencies to the muon
Definition at line 152 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
embed the track from best muon measurement
Definition at line 88 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed muon MET correction info for caloMET into the muon
Definition at line 98 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed track of the combined fit into the muon
Definition at line 96 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed track from DYT muon fit into the muon
Definition at line 110 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed the gen match information into the muon
Definition at line 116 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
embed high level selection variables
Definition at line 128 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed the track from best muon measurement, new tuneP, 53X option only
Definition at line 90 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed pfCandidates into the muon
Definition at line 126 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed track from picky muon fit into the muon
Definition at line 106 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed track from muon system into the muon
Definition at line 94 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed muon MET correction info for tcMET into the muon
Definition at line 102 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
embed track from tpfms muon fit into the muon
Definition at line 108 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
embed the track from inner tracker into the muon
Definition at line 92 of file PATMuonProducer.h.
Referenced by fillMuon(), and PATMuonProducer().
|
private |
input tags for generator match information
Definition at line 114 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
input source for isoDeposits
Definition at line 136 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
input source isolation value maps
Definition at line 138 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
helper class to add userdefined isolation values to the muon
Definition at line 148 of file PATMuonProducer.h.
Referenced by produce().
|
private |
isolation value pair for temporary storage before being folded into the muon
Definition at line 150 of file PATMuonProducer.h.
Referenced by produce().
|
private |
input source
Definition at line 85 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 124 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
— tools — comparator for pt ordering
Definition at line 146 of file PATMuonProducer.h.
Referenced by produce().
|
private |
input source of the primary vertex
Definition at line 134 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
helper class to add resolutions to the muon
Definition at line 120 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
source of tcMET muon corrections
Definition at line 104 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
switch to use particle flow (PF2PAT) or not
Definition at line 122 of file PATMuonProducer.h.
Referenced by fillMuon(), PATMuonProducer(), and produce().
|
private |
use the primary vertex or the beamspot
Definition at line 132 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
helper class to add userData to the muon
Definition at line 154 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().
|
private |
add user data to the muon (this will be data members of th muon even w/o embedding)
Definition at line 142 of file PATMuonProducer.h.
Referenced by PATMuonProducer(), and produce().