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::PATElectronProducer Class Reference

Produces pat::Electron's. More...

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

Inheritance diagram for pat::PATElectronProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PATElectronProducer (const edm::ParameterSet &iConfig)
 
virtual void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 ~PATElectronProducer ()
 
- 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)
 
- 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 edm::RefToBase
< reco::GsfElectron
ElectronBaseRef
 
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 std::pair< std::string,
edm::InputTag
NameTag
 

Private Member Functions

void embedHighLevel (pat::Electron &anElectron, reco::GsfTrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid)
 
void fillElectron (Electron &aElectron, const ElectronBaseRef &electronRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const bool pfId, const IsolationValueMaps &isolationValues, const IsolationValueMaps &isolationValuesNoPFId) const
 common electron filling, for both the standard and PF2PAT case More...
 
void fillElectron2 (Electron &anElectron, const reco::CandidatePtr &candPtrForIsolation, const reco::CandidatePtr &candPtrForGenMatch, const reco::CandidatePtr &candPtrForLoader, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const
 
template<typename T >
void readIsolationLabels (const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens)
 

Private Attributes

const bool addEfficiencies_
 
const bool addElecID_
 
bool addGenMatch_
 
const bool addPFClusterIso_
 
const bool addResolutions_
 
const edm::EDGetTokenT
< reco::BeamSpot
beamLineToken_
 
const edm::EDGetTokenT
< edm::ValueMap< float > > 
ecalPFClusterIsoT_
 
const CaloTopologyecalTopology_
 
pat::helper::EfficiencyLoader efficiencyLoader_
 
std::vector< NameTagelecIDSrcs_
 
std::vector< edm::EDGetTokenT
< edm::ValueMap< float > > > 
elecIDTokens_
 
const edm::EDGetTokenT
< edm::View< reco::GsfElectron > > 
electronToken_
 
const bool embedBasicClusters_
 
bool embedGenMatch_
 
const bool embedGsfElectronCore_
 
const bool embedGsfTrack_
 
const bool embedHighLevelSelection_
 embed high level selection variables? More...
 
const bool embedPFCandidate_
 
const bool embedPflowBasicClusters_
 
const bool embedPflowPreshowerClusters_
 
const bool embedPflowSuperCluster_
 
const bool embedPreshowerClusters_
 
const bool embedRecHits_
 
const bool embedSeedCluster_
 
const bool embedSuperCluster_
 
const bool embedTrack_
 
std::vector< edm::EDGetTokenT
< edm::Association
< reco::GenParticleCollection > > > 
genMatchTokens_
 
const edm::EDGetTokenT
< edm::ValueMap< float > > 
hcalPFClusterIsoT_
 
const edm::EDGetTokenT
< reco::ConversionCollection
hConversionsToken_
 
IsolationLabels isoDepositLabels_
 
std::vector< edm::EDGetTokenT
< edm::ValueMap< IsoDeposit > > > 
isoDepositTokens_
 
IsolationLabels isolationValueLabels_
 
IsolationLabels isolationValueLabelsNoPFId_
 
std::vector< edm::EDGetTokenT
< edm::ValueMap< double > > > 
isolationValueNoPFIdTokens_
 
std::vector< edm::EDGetTokenT
< edm::ValueMap< double > > > 
isolationValueTokens_
 
pat::helper::MultiIsolator isolator_
 
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
 
const edm::EDGetTokenT
< edm::ValueMap
< reco::PFCandidatePtr > > 
pfCandidateMapToken_
 
const edm::EDGetTokenT
< reco::PFCandidateCollection
pfElecToken_
 
const GreaterByPt< ElectronpTComparator_
 
const edm::EDGetTokenT
< std::vector< reco::Vertex > > 
pvToken_
 
const edm::InputTag reducedBarrelRecHitCollection_
 mva input variables More...
 
const edm::EDGetTokenT
< EcalRecHitCollection
reducedBarrelRecHitCollectionToken_
 
const edm::InputTag reducedEndcapRecHitCollection_
 
const edm::EDGetTokenT
< EcalRecHitCollection
reducedEndcapRecHitCollectionToken_
 
pat::helper::KinResolutionsLoader resolutionLoader_
 
const bool useParticleFlow_
 pflow specific More...
 
pat::PATUserDataHelper
< pat::Electron
userDataHelper_
 
const bool useUserData_
 

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

Produces pat::Electron's.

The PATElectronProducer produces analysis-level pat::Electron's starting from a collection of objects of reco::GsfElectron.

Author
Steven Lowette, James Lamb\
Version
Id:
PATElectronProducer.h,v 1.31 2013/02/27 23:26:56 wmtan Exp

Definition at line 54 of file PATElectronProducer.h.

Member Typedef Documentation

Definition at line 109 of file PATElectronProducer.h.

Definition at line 84 of file PATElectronProducer.h.

Definition at line 110 of file PATElectronProducer.h.

Definition at line 142 of file PATElectronProducer.h.

Definition at line 143 of file PATElectronProducer.h.

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

Definition at line 111 of file PATElectronProducer.h.

typedef std::pair<std::string, edm::InputTag> pat::PATElectronProducer::NameTag
private

Definition at line 153 of file PATElectronProducer.h.

Constructor & Destructor Documentation

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

Definition at line 50 of file PATElectronProducer.cc.

PATElectronProducer::~PATElectronProducer ( )

Definition at line 178 of file PATElectronProducer.cc.

Member Function Documentation

void PATElectronProducer::embedHighLevel ( pat::Electron anElectron,
reco::GsfTrackRef  track,
reco::TransientTrack tt,
reco::Vertex primaryVertex,
bool  primaryVertexIsValid,
reco::BeamSpot beamspot,
bool  beamspotIsValid 
)
private

Definition at line 1010 of file PATElectronProducer.cc.

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

Definition at line 880 of file PATElectronProducer.cc.

void PATElectronProducer::fillElectron ( Electron aElectron,
const ElectronBaseRef electronRef,
const reco::CandidateBaseRef baseRef,
const GenAssociations genMatches,
const IsoDepositMaps deposits,
const bool  pfId,
const IsolationValueMaps isolationValues,
const IsolationValueMaps isolationValuesNoPFId 
) const
private

common electron filling, for both the standard and PF2PAT case

Definition at line 699 of file PATElectronProducer.cc.

void PATElectronProducer::fillElectron2 ( Electron anElectron,
const reco::CandidatePtr candPtrForIsolation,
const reco::CandidatePtr candPtrForGenMatch,
const reco::CandidatePtr candPtrForLoader,
const GenAssociations genMatches,
const IsoDepositMaps deposits,
const IsolationValueMaps isolationValues 
) const
private

Definition at line 795 of file PATElectronProducer.cc.

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

Implements edm::stream::EDProducerBase.

Definition at line 183 of file PATElectronProducer.cc.

template<typename T >
void pat::PATElectronProducer::readIsolationLabels ( const edm::ParameterSet iConfig,
const char *  psetName,
IsolationLabels labels,
std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &  tokens 
)
private

fill the labels vector from the contents of the parameter set, for the isodeposit or isolation values embedding

Definition at line 184 of file PATElectronProducer.h.

Member Data Documentation

const bool pat::PATElectronProducer::addEfficiencies_
private

Definition at line 169 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::addElecID_
private

Definition at line 152 of file PATElectronProducer.h.

bool pat::PATElectronProducer::addGenMatch_
private

Definition at line 80 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::addPFClusterIso_
private

Definition at line 100 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::addResolutions_
private

Definition at line 172 of file PATElectronProducer.h.

const edm::EDGetTokenT<reco::BeamSpot> pat::PATElectronProducer::beamLineToken_
private

Definition at line 106 of file PATElectronProducer.h.

const edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::ecalPFClusterIsoT_
private

Definition at line 101 of file PATElectronProducer.h.

const CaloTopology* pat::PATElectronProducer::ecalTopology_
private

Definition at line 178 of file PATElectronProducer.h.

pat::helper::EfficiencyLoader pat::PATElectronProducer::efficiencyLoader_
private

Definition at line 170 of file PATElectronProducer.h.

std::vector<NameTag> pat::PATElectronProducer::elecIDSrcs_
private

Definition at line 154 of file PATElectronProducer.h.

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > pat::PATElectronProducer::elecIDTokens_
private

Definition at line 155 of file PATElectronProducer.h.

const edm::EDGetTokenT<edm::View<reco::GsfElectron> > pat::PATElectronProducer::electronToken_
private

Definition at line 68 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedBasicClusters_
private

Definition at line 75 of file PATElectronProducer.h.

bool pat::PATElectronProducer::embedGenMatch_
private

Definition at line 81 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedGsfElectronCore_
private

Definition at line 70 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedGsfTrack_
private

Definition at line 71 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedHighLevelSelection_
private

embed high level selection variables?

Definition at line 105 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedPFCandidate_
private

Definition at line 92 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedPflowBasicClusters_
private

Definition at line 77 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedPflowPreshowerClusters_
private

Definition at line 78 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedPflowSuperCluster_
private

Definition at line 73 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedPreshowerClusters_
private

Definition at line 76 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedRecHits_
private

Definition at line 82 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedSeedCluster_
private

Definition at line 74 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedSuperCluster_
private

Definition at line 72 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::embedTrack_
private

Definition at line 79 of file PATElectronProducer.h.

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

Definition at line 86 of file PATElectronProducer.h.

const edm::EDGetTokenT<edm::ValueMap<float> > pat::PATElectronProducer::hcalPFClusterIsoT_
private

Definition at line 102 of file PATElectronProducer.h.

const edm::EDGetTokenT<reco::ConversionCollection> pat::PATElectronProducer::hConversionsToken_
private

Definition at line 69 of file PATElectronProducer.h.

IsolationLabels pat::PATElectronProducer::isoDepositLabels_
private

Definition at line 162 of file PATElectronProducer.h.

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

Definition at line 163 of file PATElectronProducer.h.

IsolationLabels pat::PATElectronProducer::isolationValueLabels_
private

Definition at line 164 of file PATElectronProducer.h.

IsolationLabels pat::PATElectronProducer::isolationValueLabelsNoPFId_
private

Definition at line 166 of file PATElectronProducer.h.

std::vector<edm::EDGetTokenT<edm::ValueMap<double> > > pat::PATElectronProducer::isolationValueNoPFIdTokens_
private

Definition at line 167 of file PATElectronProducer.h.

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

Definition at line 165 of file PATElectronProducer.h.

pat::helper::MultiIsolator pat::PATElectronProducer::isolator_
private

Definition at line 160 of file PATElectronProducer.h.

pat::helper::MultiIsolator::IsolationValuePairs pat::PATElectronProducer::isolatorTmpStorage_
private

Definition at line 161 of file PATElectronProducer.h.

const edm::EDGetTokenT<edm::ValueMap<reco::PFCandidatePtr> > pat::PATElectronProducer::pfCandidateMapToken_
private

Definition at line 91 of file PATElectronProducer.h.

const edm::EDGetTokenT<reco::PFCandidateCollection> pat::PATElectronProducer::pfElecToken_
private

Definition at line 90 of file PATElectronProducer.h.

const GreaterByPt<Electron> pat::PATElectronProducer::pTComparator_
private

Definition at line 158 of file PATElectronProducer.h.

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

Definition at line 107 of file PATElectronProducer.h.

const edm::InputTag pat::PATElectronProducer::reducedBarrelRecHitCollection_
private

mva input variables

Definition at line 95 of file PATElectronProducer.h.

const edm::EDGetTokenT<EcalRecHitCollection> pat::PATElectronProducer::reducedBarrelRecHitCollectionToken_
private

Definition at line 96 of file PATElectronProducer.h.

const edm::InputTag pat::PATElectronProducer::reducedEndcapRecHitCollection_
private

Definition at line 97 of file PATElectronProducer.h.

const edm::EDGetTokenT<EcalRecHitCollection> pat::PATElectronProducer::reducedEndcapRecHitCollectionToken_
private

Definition at line 98 of file PATElectronProducer.h.

pat::helper::KinResolutionsLoader pat::PATElectronProducer::resolutionLoader_
private

Definition at line 173 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::useParticleFlow_
private

pflow specific

Definition at line 89 of file PATElectronProducer.h.

pat::PATUserDataHelper<pat::Electron> pat::PATElectronProducer::userDataHelper_
private

Definition at line 176 of file PATElectronProducer.h.

const bool pat::PATElectronProducer::useUserData_
private

Definition at line 175 of file PATElectronProducer.h.