CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
EgammaHcalPFClusterIsolationProducer< T1 > Class Template Reference
Inheritance diagram for EgammaHcalPFClusterIsolationProducer< 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
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

 EgammaHcalPFClusterIsolationProducer (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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
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::PFClusterCollectionpfClusterProducerHCAL_
 
const edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducerHFEM_
 
const edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducerHFHAD_
 
const double useEt_
 
const bool useHF_
 

Additional Inherited Members

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

Detailed Description

template<typename T1>
class EgammaHcalPFClusterIsolationProducer< T1 >

Definition at line 28 of file EgammaHcalPFClusterIsolationProducer.cc.

Member Typedef Documentation

◆ T1Collection

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

Definition at line 30 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ T1Ref

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

Definition at line 31 of file EgammaHcalPFClusterIsolationProducer.cc.

Constructor & Destructor Documentation

◆ EgammaHcalPFClusterIsolationProducer()

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

Definition at line 55 of file EgammaHcalPFClusterIsolationProducer.cc.

56  :
57 
58  emObjectProducer_(consumes(config.getParameter<edm::InputTag>("candidateProducer"))),
59  pfClusterProducerHCAL_(consumes(config.getParameter<edm::InputTag>("pfClusterProducerHCAL"))),
60  pfClusterProducerHFEM_(consumes(config.getParameter<edm::InputTag>("pfClusterProducerHFEM"))),
61  pfClusterProducerHFHAD_(consumes(config.getParameter<edm::InputTag>("pfClusterProducerHFHAD"))),
62  useHF_(config.getParameter<bool>("useHF")),
63  drMax_(config.getParameter<double>("drMax")),
64  drVetoBarrel_(config.getParameter<double>("drVetoBarrel")),
65  drVetoEndcap_(config.getParameter<double>("drVetoEndcap")),
66  etaStripBarrel_(config.getParameter<double>("etaStripBarrel")),
67  etaStripEndcap_(config.getParameter<double>("etaStripEndcap")),
68  energyBarrel_(config.getParameter<double>("energyBarrel")),
69  energyEndcap_(config.getParameter<double>("energyEndcap")),
70  useEt_(config.getParameter<bool>("useEt")) {
71  produces<edm::ValueMap<float>>();
72 }

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 75 of file EgammaHcalPFClusterIsolationProducer.cc.

75  {
77  desc.add<edm::InputTag>("candidateProducer", edm::InputTag("gedGsfElectrons"));
78  desc.add<edm::InputTag>("pfClusterProducerHCAL", edm::InputTag("particleFlowClusterHCAL"));
79  desc.ifValue(edm::ParameterDescription<bool>("useHF", false, true),
81  "pfClusterProducerHFEM", {"hltParticleFlowClusterHFEM"}, true) and
83  "pfClusterProducerHFHAD", {"hltParticleFlowClusterHFHAD"}, true)) or
84  false >> (edm::ParameterDescription<edm::InputTag>("pfClusterProducerHFEM", {""}, true) and
85  edm::ParameterDescription<edm::InputTag>("pfClusterProducerHFHAD", {""}, true)));
86  desc.add<double>("drMax", 0.3);
87  desc.add<double>("drVetoBarrel", 0.0);
88  desc.add<double>("drVetoEndcap", 0.0);
89  desc.add<double>("etaStripBarrel", 0.0);
90  desc.add<double>("etaStripEndcap", 0.0);
91  desc.add<double>("energyBarrel", 0.0);
92  desc.add<double>("energyEndcap", 0.0);
93  desc.add<bool>("useEt", true);
95 }

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

◆ produce()

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

Implements edm::global::EDProducerBase.

Definition at line 98 of file EgammaHcalPFClusterIsolationProducer.cc.

100  {
101  auto emObjectHandle = iEvent.getHandle(emObjectProducer_);
102 
103  auto isoMap = std::make_unique<edm::ValueMap<float>>();
105  std::vector<float> retV(emObjectHandle->size(), 0);
106 
107  std::vector<edm::Handle<reco::PFClusterCollection>> clusterHandles{iEvent.getHandle(pfClusterProducerHCAL_)};
108 
109  if (useHF_) {
110  clusterHandles.push_back(iEvent.getHandle(pfClusterProducerHFEM_));
111  clusterHandles.push_back(iEvent.getHandle(pfClusterProducerHFHAD_));
112  }
113 
116 
117  for (unsigned int iReco = 0; iReco < emObjectHandle->size(); iReco++) {
118  T1Ref candRef(emObjectHandle, iReco);
119  retV[iReco] = isoAlgo.getSum(candRef, clusterHandles);
120  }
121 
122  filler.insert(emObjectHandle, retV.begin(), retV.end());
123  filler.fill();
124 
125  iEvent.put(std::move(isoMap));
126 }

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

Member Data Documentation

◆ drMax_

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

Definition at line 44 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ drVetoBarrel_

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

Definition at line 45 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ drVetoEndcap_

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

Definition at line 46 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ emObjectProducer_

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

Definition at line 38 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ energyBarrel_

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

Definition at line 49 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ energyEndcap_

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

Definition at line 50 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ etaStripBarrel_

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

Definition at line 47 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ etaStripEndcap_

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

Definition at line 48 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ pfClusterProducerHCAL_

template<typename T1 >
const edm::EDGetTokenT<reco::PFClusterCollection> EgammaHcalPFClusterIsolationProducer< T1 >::pfClusterProducerHCAL_
private

Definition at line 39 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ pfClusterProducerHFEM_

template<typename T1 >
const edm::EDGetTokenT<reco::PFClusterCollection> EgammaHcalPFClusterIsolationProducer< T1 >::pfClusterProducerHFEM_
private

Definition at line 40 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ pfClusterProducerHFHAD_

template<typename T1 >
const edm::EDGetTokenT<reco::PFClusterCollection> EgammaHcalPFClusterIsolationProducer< T1 >::pfClusterProducerHFHAD_
private

Definition at line 41 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ useEt_

template<typename T1 >
const double EgammaHcalPFClusterIsolationProducer< T1 >::useEt_
private

Definition at line 51 of file EgammaHcalPFClusterIsolationProducer.cc.

◆ useHF_

template<typename T1 >
const bool EgammaHcalPFClusterIsolationProducer< T1 >::useHF_
private

Definition at line 43 of file EgammaHcalPFClusterIsolationProducer.cc.

EgammaHcalPFClusterIsolationProducer::pfClusterProducerHFEM_
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFEM_
Definition: EgammaHcalPFClusterIsolationProducer.cc:40
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
config
Definition: config.py:1
EgammaHcalPFClusterIsolationProducer::drVetoEndcap_
const double drVetoEndcap_
Definition: EgammaHcalPFClusterIsolationProducer.cc:46
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
EgammaHcalPFClusterIsolationProducer::energyEndcap_
const double energyEndcap_
Definition: EgammaHcalPFClusterIsolationProducer.cc:50
EgammaHcalPFClusterIsolationProducer
Definition: EgammaHcalPFClusterIsolationProducer.cc:28
EgammaHcalPFClusterIsolationProducer::drVetoBarrel_
const double drVetoBarrel_
Definition: EgammaHcalPFClusterIsolationProducer.cc:45
defaultModuleLabel
std::string defaultModuleLabel()
Definition: defaultModuleLabel.h:16
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
iEvent
int iEvent
Definition: GenABIO.cc:224
EgammaHcalPFClusterIsolationProducer::T1Ref
edm::Ref< T1Collection > T1Ref
Definition: EgammaHcalPFClusterIsolationProducer.cc:31
EgammaHcalPFClusterIsolationProducer::etaStripBarrel_
const double etaStripBarrel_
Definition: EgammaHcalPFClusterIsolationProducer.cc:47
EgammaHcalPFClusterIsolationProducer::useEt_
const double useEt_
Definition: EgammaHcalPFClusterIsolationProducer.cc:51
EgammaHcalPFClusterIsolationProducer::emObjectProducer_
const edm::EDGetTokenT< T1Collection > emObjectProducer_
Definition: EgammaHcalPFClusterIsolationProducer.cc:38
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
EgammaHcalPFClusterIsolationProducer::energyBarrel_
const double energyBarrel_
Definition: EgammaHcalPFClusterIsolationProducer.cc:49
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
EgammaHcalPFClusterIsolationProducer::pfClusterProducerHCAL_
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHCAL_
Definition: EgammaHcalPFClusterIsolationProducer.cc:39
edm::helper::Filler
Definition: ValueMap.h:22
EgammaHcalPFClusterIsolationProducer::etaStripEndcap_
const double etaStripEndcap_
Definition: EgammaHcalPFClusterIsolationProducer.cc:48
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:155
EgammaHcalPFClusterIsolationProducer::drMax_
const double drMax_
Definition: EgammaHcalPFClusterIsolationProducer.cc:44
HcalPFClusterIsolation
Definition: HcalPFClusterIsolation.h:17
EgammaHcalPFClusterIsolationProducer::pfClusterProducerHFHAD_
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFHAD_
Definition: EgammaHcalPFClusterIsolationProducer.cc:41
edm::ParameterDescription
Definition: ParameterDescription.h:110
edm::InputTag
Definition: InputTag.h:15
EgammaHcalPFClusterIsolationProducer::useHF_
const bool useHF_
Definition: EgammaHcalPFClusterIsolationProducer.cc:43