CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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...
 
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::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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::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::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::BeamSpotbeamLineToken_
 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 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...
 
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< MuonpTComparator_
 
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...
 
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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
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 42 of file PATMuonProducer.h.

Member Typedef Documentation

Definition at line 57 of file PATMuonProducer.h.

Definition at line 58 of file PATMuonProducer.h.

Definition at line 60 of file PATMuonProducer.h.

Definition at line 61 of file PATMuonProducer.h.

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

Definition at line 59 of file PATMuonProducer.h.

typedefs for convenience

Definition at line 56 of file PATMuonProducer.h.

Constructor & Destructor Documentation

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

default constructir

Definition at line 46 of file PATMuonProducer.cc.

PATMuonProducer::~PATMuonProducer ( )

default destructur

Definition at line 112 of file PATMuonProducer.cc.

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

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

description of config file parameters

Definition at line 447 of file PATMuonProducer.cc.

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

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

everything that needs to be done during the event loop

Implements edm::stream::EDProducerBase.

Definition at line 116 of file PATMuonProducer.cc.

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

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

bool pat::PATMuonProducer::addGenMatch_
private

add generator match information

Definition at line 113 of file PATMuonProducer.h.

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

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

input source of the primary vertex/beamspot

Definition at line 131 of file PATMuonProducer.h.

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

source of caloMET muon corrections

Definition at line 101 of file PATMuonProducer.h.

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

helper class to add efficiencies to the muon

Definition at line 155 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedBestTrack_
private

embed the track from best muon measurement (global pflow)

Definition at line 87 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedCaloMETMuonCorrs_
private

embed muon MET correction info for caloMET into the muon

Definition at line 99 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedCombinedMuon_
private

embed track of the combined fit into the muon

Definition at line 97 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedDytMuon_
private

embed track from DYT muon fit into the muon

Definition at line 111 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedGenMatch_
private

embed the gen match information into the muon

Definition at line 117 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedHighLevelSelection_
private

embed high level selection variables

Definition at line 129 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedPFCandidate_
private

embed pfCandidates into the muon

Definition at line 127 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedPfEcalEnergy_
private

add ecal PF energy

Definition at line 145 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedPickyMuon_
private

embed track from picky muon fit into the muon

Definition at line 107 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedStandAloneMuon_
private

embed track from muon system into the muon

Definition at line 95 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedTcMETMuonCorrs_
private

embed muon MET correction info for tcMET into the muon

Definition at line 103 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedTpfmsMuon_
private

embed track from tpfms muon fit into the muon

Definition at line 109 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedTrack_
private

embed the track from inner tracker into the muon

Definition at line 93 of file PATMuonProducer.h.

bool pat::PATMuonProducer::embedTunePBestTrack_
private

embed the track from best muon measurement (muon only)

Definition at line 89 of file PATMuonProducer.h.

bool pat::PATMuonProducer::forceEmbedBestTrack_
private

force separate embed of the best track even if already embedded

Definition at line 91 of file PATMuonProducer.h.

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

input tags for generator match information

Definition at line 115 of file PATMuonProducer.h.

IsolationLabels pat::PATMuonProducer::isoDepositLabels_
private

input source for isoDeposits

Definition at line 135 of file PATMuonProducer.h.

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

Definition at line 136 of file PATMuonProducer.h.

IsolationLabels pat::PATMuonProducer::isolationValueLabels_
private

input source isolation value maps

Definition at line 138 of file PATMuonProducer.h.

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

Definition at line 139 of file PATMuonProducer.h.

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

helper class to add userdefined isolation values to the muon

Definition at line 151 of file PATMuonProducer.h.

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

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

Definition at line 153 of file PATMuonProducer.h.

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

input source

Definition at line 84 of file PATMuonProducer.h.

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

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

— tools — comparator for pt ordering

Definition at line 149 of file PATMuonProducer.h.

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

input source of the primary vertex

Definition at line 133 of file PATMuonProducer.h.

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

helper class to add resolutions to the muon

Definition at line 121 of file PATMuonProducer.h.

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

source of tcMET muon corrections

Definition at line 105 of file PATMuonProducer.h.

bool pat::PATMuonProducer::useParticleFlow_
private

switch to use particle flow (PF2PAT) or not

Definition at line 123 of file PATMuonProducer.h.

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

helper class to add userData to the muon

Definition at line 157 of file PATMuonProducer.h.

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