CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
EgammaEcalPFClusterIsolationProducer< T1 > Class Template Reference
Inheritance diagram for EgammaEcalPFClusterIsolationProducer< T1 >:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef std::vector< T1 > T1Collection
 
typedef edm::Ref< T1CollectionT1Ref
 
- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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
 

Public Member Functions

 EgammaEcalPFClusterIsolationProducer (const edm::ParameterSet &)
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

const double drMax_
 
const double drVetoBarrel_
 
const double drVetoEndcap_
 
const edm::EDGetTokenT< T1CollectionemObjectProducer_
 
const double energyBarrel_
 
const double energyEndcap_
 
const double etaStripBarrel_
 
const double etaStripEndcap_
 
const edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducer_
 

Additional Inherited Members

- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

template<typename T1>
class EgammaEcalPFClusterIsolationProducer< T1 >

Definition at line 24 of file EgammaEcalPFClusterIsolationProducer.cc.

Member Typedef Documentation

◆ T1Collection

template<typename T1 >
typedef std::vector<T1> EgammaEcalPFClusterIsolationProducer< T1 >::T1Collection

Definition at line 26 of file EgammaEcalPFClusterIsolationProducer.cc.

◆ T1Ref

template<typename T1 >
typedef edm::Ref<T1Collection> EgammaEcalPFClusterIsolationProducer< T1 >::T1Ref

Definition at line 27 of file EgammaEcalPFClusterIsolationProducer.cc.

Constructor & Destructor Documentation

◆ EgammaEcalPFClusterIsolationProducer()

template<typename T1 >
EgammaEcalPFClusterIsolationProducer< T1 >::EgammaEcalPFClusterIsolationProducer ( const edm::ParameterSet config)
explicit

Definition at line 47 of file EgammaEcalPFClusterIsolationProducer.cc.

48  :
49 
50  emObjectProducer_(consumes<T1Collection>(config.getParameter<edm::InputTag>("candidateProducer"))),
51  pfClusterProducer_(consumes<reco::PFClusterCollection>(config.getParameter<edm::InputTag>("pfClusterProducer"))),
52  drMax_(config.getParameter<double>("drMax")),
53  drVetoBarrel_(config.getParameter<double>("drVetoBarrel")),
54  drVetoEndcap_(config.getParameter<double>("drVetoEndcap")),
55  etaStripBarrel_(config.getParameter<double>("etaStripBarrel")),
56  etaStripEndcap_(config.getParameter<double>("etaStripEndcap")),
57  energyBarrel_(config.getParameter<double>("energyBarrel")),
58  energyEndcap_(config.getParameter<double>("energyEndcap")) {
59  produces<edm::ValueMap<float>>();
60 }
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducer_
Definition: config.py:1
const edm::EDGetTokenT< T1Collection > emObjectProducer_

Member Function Documentation

◆ fillDescriptions()

template<typename T1 >
void EgammaEcalPFClusterIsolationProducer< T1 >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 63 of file EgammaEcalPFClusterIsolationProducer.cc.

References edm::ConfigurationDescriptions::add(), defaultModuleLabel(), submitPVResolutionJobs::desc, and HLT_2022v15_cff::InputTag.

63  {
65  desc.add<edm::InputTag>("candidateProducer", edm::InputTag("gedGsfElectrons"));
66  desc.add<edm::InputTag>("pfClusterProducer", edm::InputTag("particleFlowClusterECAL"));
67  desc.add<double>("drMax", 0.3);
68  desc.add<double>("drVetoBarrel", 0.0);
69  desc.add<double>("drVetoEndcap", 0.0);
70  desc.add<double>("etaStripBarrel", 0.0);
71  desc.add<double>("etaStripEndcap", 0.0);
72  desc.add<double>("energyBarrel", 0.0);
73  desc.add<double>("energyEndcap", 0.0);
75 }
std::string defaultModuleLabel()
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

template<typename T1 >
void EgammaEcalPFClusterIsolationProducer< T1 >::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup  
) const
overridevirtual

Implements edm::global::EDProducerBase.

Definition at line 78 of file EgammaEcalPFClusterIsolationProducer.cc.

References trigObjTnPSource_cfi::filler, EcalPFClusterIsolation< T1 >::getSum(), iEvent, and eostools::move().

80  {
81  auto emObjectHandle = iEvent.getHandle(emObjectProducer_);
82 
83  auto isoMap = std::make_unique<edm::ValueMap<float>>();
85  std::vector<float> retV(emObjectHandle->size(), 0);
86 
87  auto clusterHandle = iEvent.getHandle(pfClusterProducer_);
88 
91 
92  for (unsigned int iReco = 0; iReco < emObjectHandle->size(); iReco++) {
93  T1Ref candRef(emObjectHandle, iReco);
94  retV[iReco] = isoAlgo.getSum(candRef, clusterHandle);
95  }
96 
97  filler.insert(emObjectHandle, retV.begin(), retV.end());
98  filler.fill();
99 
100  iEvent.put(std::move(isoMap));
101 }
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducer_
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< T1Collection > emObjectProducer_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ drMax_

template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::drMax_
private

Definition at line 37 of file EgammaEcalPFClusterIsolationProducer.cc.

◆ drVetoBarrel_

template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::drVetoBarrel_
private

Definition at line 38 of file EgammaEcalPFClusterIsolationProducer.cc.

◆ drVetoEndcap_

template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::drVetoEndcap_
private

Definition at line 39 of file EgammaEcalPFClusterIsolationProducer.cc.

◆ emObjectProducer_

template<typename T1 >
const edm::EDGetTokenT<T1Collection> EgammaEcalPFClusterIsolationProducer< T1 >::emObjectProducer_
private

Definition at line 34 of file EgammaEcalPFClusterIsolationProducer.cc.

◆ energyBarrel_

template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::energyBarrel_
private

Definition at line 42 of file EgammaEcalPFClusterIsolationProducer.cc.

◆ energyEndcap_

template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::energyEndcap_
private

Definition at line 43 of file EgammaEcalPFClusterIsolationProducer.cc.

◆ etaStripBarrel_

template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::etaStripBarrel_
private

Definition at line 40 of file EgammaEcalPFClusterIsolationProducer.cc.

◆ etaStripEndcap_

template<typename T1 >
const double EgammaEcalPFClusterIsolationProducer< T1 >::etaStripEndcap_
private

Definition at line 41 of file EgammaEcalPFClusterIsolationProducer.cc.

◆ pfClusterProducer_

template<typename T1 >
const edm::EDGetTokenT<reco::PFClusterCollection> EgammaEcalPFClusterIsolationProducer< T1 >::pfClusterProducer_
private

Definition at line 35 of file EgammaEcalPFClusterIsolationProducer.cc.