CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
EgammaEcalPFClusterIsolationProducer< T1 > Class Template Reference

#include <EgammaEcalPFClusterIsolationProducer.h>

Inheritance diagram for EgammaEcalPFClusterIsolationProducer< T1 >:
edm::stream::EDProducer<>

Public Types

typedef std::vector< T1 > T1Collection
 
typedef edm::Ref< T1CollectionT1Ref
 
- 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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Public Member Functions

 EgammaEcalPFClusterIsolationProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~EgammaEcalPFClusterIsolationProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::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_
 

Detailed Description

template<typename T1>
class EgammaEcalPFClusterIsolationProducer< T1 >

Definition at line 21 of file EgammaEcalPFClusterIsolationProducer.h.

Member Typedef Documentation

◆ T1Collection

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

Definition at line 23 of file EgammaEcalPFClusterIsolationProducer.h.

◆ T1Ref

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

Definition at line 24 of file EgammaEcalPFClusterIsolationProducer.h.

Constructor & Destructor Documentation

◆ EgammaEcalPFClusterIsolationProducer()

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

Definition at line 19 of file EgammaEcalPFClusterIsolationProducer.cc.

20  :
21 
22  emObjectProducer_(consumes<T1Collection>(config.getParameter<edm::InputTag>("candidateProducer"))),
23  pfClusterProducer_(consumes<reco::PFClusterCollection>(config.getParameter<edm::InputTag>("pfClusterProducer"))),
24  drMax_(config.getParameter<double>("drMax")),
25  drVetoBarrel_(config.getParameter<double>("drVetoBarrel")),
26  drVetoEndcap_(config.getParameter<double>("drVetoEndcap")),
27  etaStripBarrel_(config.getParameter<double>("etaStripBarrel")),
28  etaStripEndcap_(config.getParameter<double>("etaStripEndcap")),
29  energyBarrel_(config.getParameter<double>("energyBarrel")),
30  energyEndcap_(config.getParameter<double>("energyEndcap")) {
31  produces<edm::ValueMap<float>>();
32 }

◆ ~EgammaEcalPFClusterIsolationProducer()

Definition at line 35 of file EgammaEcalPFClusterIsolationProducer.cc.

35 {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 38 of file EgammaEcalPFClusterIsolationProducer.cc.

38  {
40  desc.add<edm::InputTag>("candidateProducer", edm::InputTag("gedGsfElectrons"));
41  desc.add<edm::InputTag>("pfClusterProducer", edm::InputTag("particleFlowClusterECAL"));
42  desc.add<double>("drMax", 0.3);
43  desc.add<double>("drVetoBarrel", 0.0);
44  desc.add<double>("drVetoEndcap", 0.0);
45  desc.add<double>("etaStripBarrel", 0.0);
46  desc.add<double>("etaStripEndcap", 0.0);
47  desc.add<double>("energyBarrel", 0.0);
48  desc.add<double>("energyEndcap", 0.0);
50 }

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

◆ produce()

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

Definition at line 53 of file EgammaEcalPFClusterIsolationProducer.cc.

53  {
54  edm::Handle<T1Collection> emObjectHandle;
55  iEvent.getByToken(emObjectProducer_, emObjectHandle);
56 
57  auto isoMap = std::make_unique<edm::ValueMap<float>>();
59  std::vector<float> retV(emObjectHandle->size(), 0);
60 
62  iEvent.getByToken(pfClusterProducer_, clusterHandle);
63 
66 
67  for (unsigned int iReco = 0; iReco < emObjectHandle->size(); iReco++) {
68  T1Ref candRef(emObjectHandle, iReco);
69  retV[iReco] = isoAlgo.getSum(candRef, clusterHandle);
70  }
71 
72  filler.insert(emObjectHandle, retV.begin(), retV.end());
73  filler.fill();
74 
75  iEvent.put(std::move(isoMap));
76 }

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

Member Data Documentation

◆ drMax_

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

Definition at line 35 of file EgammaEcalPFClusterIsolationProducer.h.

◆ drVetoBarrel_

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

Definition at line 36 of file EgammaEcalPFClusterIsolationProducer.h.

◆ drVetoEndcap_

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

Definition at line 37 of file EgammaEcalPFClusterIsolationProducer.h.

◆ emObjectProducer_

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

Definition at line 32 of file EgammaEcalPFClusterIsolationProducer.h.

◆ energyBarrel_

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

Definition at line 40 of file EgammaEcalPFClusterIsolationProducer.h.

◆ energyEndcap_

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

Definition at line 41 of file EgammaEcalPFClusterIsolationProducer.h.

◆ etaStripBarrel_

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

Definition at line 38 of file EgammaEcalPFClusterIsolationProducer.h.

◆ etaStripEndcap_

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

Definition at line 39 of file EgammaEcalPFClusterIsolationProducer.h.

◆ pfClusterProducer_

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

Definition at line 33 of file EgammaEcalPFClusterIsolationProducer.h.

HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EgammaEcalPFClusterIsolationProducer::pfClusterProducer_
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducer_
Definition: EgammaEcalPFClusterIsolationProducer.h:33
edm::Handle
Definition: AssociativeIterator.h:50
EgammaEcalPFClusterIsolationProducer::emObjectProducer_
const edm::EDGetTokenT< T1Collection > emObjectProducer_
Definition: EgammaEcalPFClusterIsolationProducer.h:32
config
Definition: config.py:1
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
EgammaEcalPFClusterIsolationProducer::drVetoBarrel_
const double drVetoBarrel_
Definition: EgammaEcalPFClusterIsolationProducer.h:36
EgammaEcalPFClusterIsolationProducer::drVetoEndcap_
const double drVetoEndcap_
Definition: EgammaEcalPFClusterIsolationProducer.h:37
defaultModuleLabel
std::string defaultModuleLabel()
Definition: defaultModuleLabel.h:16
EgammaEcalPFClusterIsolationProducer::etaStripBarrel_
const double etaStripBarrel_
Definition: EgammaEcalPFClusterIsolationProducer.h:38
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
iEvent
int iEvent
Definition: GenABIO.cc:224
EgammaEcalPFClusterIsolationProducer::drMax_
const double drMax_
Definition: EgammaEcalPFClusterIsolationProducer.h:35
EgammaEcalPFClusterIsolationProducer::T1Ref
edm::Ref< T1Collection > T1Ref
Definition: EgammaEcalPFClusterIsolationProducer.h:24
EgammaEcalPFClusterIsolationProducer::energyEndcap_
const double energyEndcap_
Definition: EgammaEcalPFClusterIsolationProducer.h:41
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
EgammaEcalPFClusterIsolationProducer::etaStripEndcap_
const double etaStripEndcap_
Definition: EgammaEcalPFClusterIsolationProducer.h:39
EcalPFClusterIsolation
Definition: EcalPFClusterIsolation.h:17
edm::helper::Filler
Definition: ValueMap.h:22
EgammaEcalPFClusterIsolationProducer
Definition: EgammaEcalPFClusterIsolationProducer.h:21
edm::InputTag
Definition: InputTag.h:15
EgammaEcalPFClusterIsolationProducer::energyBarrel_
const double energyBarrel_
Definition: EgammaEcalPFClusterIsolationProducer.h:40