CMS 3D CMS Logo

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

#include <EgammaHcalPFClusterIsolationProducer.h>

Inheritance diagram for EgammaHcalPFClusterIsolationProducer< 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

 EgammaHcalPFClusterIsolationProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~EgammaHcalPFClusterIsolationProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () 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::PFClusterCollectionpfClusterProducerHCAL_
 
const edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducerHFEM_
 
const edm::EDGetTokenT< reco::PFClusterCollectionpfClusterProducerHFHAD_
 
const double useEt_
 
const bool useHF_
 

Detailed Description

template<typename T1>
class EgammaHcalPFClusterIsolationProducer< T1 >

Definition at line 21 of file EgammaHcalPFClusterIsolationProducer.h.

Member Typedef Documentation

◆ T1Collection

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

Definition at line 23 of file EgammaHcalPFClusterIsolationProducer.h.

◆ T1Ref

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

Definition at line 24 of file EgammaHcalPFClusterIsolationProducer.h.

Constructor & Destructor Documentation

◆ EgammaHcalPFClusterIsolationProducer()

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

Definition at line 23 of file EgammaHcalPFClusterIsolationProducer.cc.

24  :
25 
26  emObjectProducer_(consumes<T1Collection>(config.getParameter<edm::InputTag>("candidateProducer"))),
28  consumes<reco::PFClusterCollection>(config.getParameter<edm::InputTag>("pfClusterProducerHCAL"))),
30  consumes<reco::PFClusterCollection>(config.getParameter<edm::InputTag>("pfClusterProducerHFEM"))),
32  consumes<reco::PFClusterCollection>(config.getParameter<edm::InputTag>("pfClusterProducerHFHAD"))),
33  useHF_(config.getParameter<bool>("useHF")),
34  drMax_(config.getParameter<double>("drMax")),
35  drVetoBarrel_(config.getParameter<double>("drVetoBarrel")),
36  drVetoEndcap_(config.getParameter<double>("drVetoEndcap")),
37  etaStripBarrel_(config.getParameter<double>("etaStripBarrel")),
38  etaStripEndcap_(config.getParameter<double>("etaStripEndcap")),
39  energyBarrel_(config.getParameter<double>("energyBarrel")),
40  energyEndcap_(config.getParameter<double>("energyEndcap")),
41  useEt_(config.getParameter<bool>("useEt")) {
42  produces<edm::ValueMap<float>>();
43 }

◆ ~EgammaHcalPFClusterIsolationProducer()

Definition at line 46 of file EgammaHcalPFClusterIsolationProducer.cc.

46 {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 49 of file EgammaHcalPFClusterIsolationProducer.cc.

49  {
51  desc.add<edm::InputTag>("candidateProducer", edm::InputTag("gedGsfElectrons"));
52  desc.add<edm::InputTag>("pfClusterProducerHCAL", edm::InputTag("particleFlowClusterHCAL"));
53  desc.ifValue(
54  edm::ParameterDescription<bool>("useHF", false, true),
56  "pfClusterProducerHFEM", edm::InputTag("hltParticleFlowClusterHFEM"), true) and
58  "pfClusterProducerHFHAD", edm::InputTag("hltParticleFlowClusterHFHAD"), true)) or
59  false >> (edm::ParameterDescription<edm::InputTag>("pfClusterProducerHFEM", edm::InputTag(""), true) and
60  edm::ParameterDescription<edm::InputTag>("pfClusterProducerHFHAD", edm::InputTag(""), true)));
61  desc.add<double>("drMax", 0.3);
62  desc.add<double>("drVetoBarrel", 0.0);
63  desc.add<double>("drVetoEndcap", 0.0);
64  desc.add<double>("etaStripBarrel", 0.0);
65  desc.add<double>("etaStripEndcap", 0.0);
66  desc.add<double>("energyBarrel", 0.0);
67  desc.add<double>("energyEndcap", 0.0);
68  desc.add<bool>("useEt", true);
70 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), defaultModuleLabel(), edm::ParameterSetDescription::ifValue(), HLT_2018_cff::InputTag, and or.

◆ produce()

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

Definition at line 73 of file EgammaHcalPFClusterIsolationProducer.cc.

73  {
74  edm::Handle<T1Collection> emObjectHandle;
75  iEvent.getByToken(emObjectProducer_, emObjectHandle);
76 
77  auto isoMap = std::make_unique<edm::ValueMap<float>>();
79  std::vector<float> retV(emObjectHandle->size(), 0);
80 
81  std::vector<edm::Handle<reco::PFClusterCollection>> clusterHandles;
83  iEvent.getByToken(pfClusterProducerHCAL_, clusterHandle);
84  clusterHandles.push_back(clusterHandle);
85 
86  if (useHF_) {
88  iEvent.getByToken(pfClusterProducerHFEM_, clusterHandle);
89  clusterHandles.push_back(clusterHandle);
90 
91  iEvent.getByToken(pfClusterProducerHFHAD_, clusterHandle);
92  clusterHandles.push_back(clusterHandle);
93  }
94 
97 
98  for (unsigned int iReco = 0; iReco < emObjectHandle->size(); iReco++) {
99  T1Ref candRef(emObjectHandle, iReco);
100  retV[iReco] = isoAlgo.getSum(candRef, clusterHandles);
101  }
102 
103  filler.insert(emObjectHandle, retV.begin(), retV.end());
104  filler.fill();
105 
106  iEvent.put(std::move(isoMap));
107 }

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 38 of file EgammaHcalPFClusterIsolationProducer.h.

◆ drVetoBarrel_

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

Definition at line 39 of file EgammaHcalPFClusterIsolationProducer.h.

◆ drVetoEndcap_

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

Definition at line 40 of file EgammaHcalPFClusterIsolationProducer.h.

◆ emObjectProducer_

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

Definition at line 32 of file EgammaHcalPFClusterIsolationProducer.h.

◆ energyBarrel_

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

Definition at line 43 of file EgammaHcalPFClusterIsolationProducer.h.

◆ energyEndcap_

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

Definition at line 44 of file EgammaHcalPFClusterIsolationProducer.h.

◆ etaStripBarrel_

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

Definition at line 41 of file EgammaHcalPFClusterIsolationProducer.h.

◆ etaStripEndcap_

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

Definition at line 42 of file EgammaHcalPFClusterIsolationProducer.h.

◆ pfClusterProducerHCAL_

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

Definition at line 33 of file EgammaHcalPFClusterIsolationProducer.h.

◆ pfClusterProducerHFEM_

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

Definition at line 34 of file EgammaHcalPFClusterIsolationProducer.h.

◆ pfClusterProducerHFHAD_

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

Definition at line 35 of file EgammaHcalPFClusterIsolationProducer.h.

◆ useEt_

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

Definition at line 45 of file EgammaHcalPFClusterIsolationProducer.h.

◆ useHF_

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

Definition at line 37 of file EgammaHcalPFClusterIsolationProducer.h.

edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
EgammaHcalPFClusterIsolationProducer::pfClusterProducerHFEM_
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFEM_
Definition: EgammaHcalPFClusterIsolationProducer.h:34
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle
Definition: AssociativeIterator.h:50
config
Definition: config.py:1
EgammaHcalPFClusterIsolationProducer::drVetoEndcap_
const double drVetoEndcap_
Definition: EgammaHcalPFClusterIsolationProducer.h:40
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
EgammaHcalPFClusterIsolationProducer::energyEndcap_
const double energyEndcap_
Definition: EgammaHcalPFClusterIsolationProducer.h:44
EgammaHcalPFClusterIsolationProducer
Definition: EgammaHcalPFClusterIsolationProducer.h:21
EgammaHcalPFClusterIsolationProducer::drVetoBarrel_
const double drVetoBarrel_
Definition: EgammaHcalPFClusterIsolationProducer.h:39
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
defaultModuleLabel
std::string defaultModuleLabel()
Definition: defaultModuleLabel.h:16
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
edm::ParameterSetDescription::ifValue
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases)
Definition: ParameterSetDescription.h:220
iEvent
int iEvent
Definition: GenABIO.cc:224
EgammaHcalPFClusterIsolationProducer::T1Ref
edm::Ref< T1Collection > T1Ref
Definition: EgammaHcalPFClusterIsolationProducer.h:24
EgammaHcalPFClusterIsolationProducer::etaStripBarrel_
const double etaStripBarrel_
Definition: EgammaHcalPFClusterIsolationProducer.h:41
EgammaHcalPFClusterIsolationProducer::useEt_
const double useEt_
Definition: EgammaHcalPFClusterIsolationProducer.h:45
EgammaHcalPFClusterIsolationProducer::emObjectProducer_
const edm::EDGetTokenT< T1Collection > emObjectProducer_
Definition: EgammaHcalPFClusterIsolationProducer.h:32
eostools.move
def move(src, dest)
Definition: eostools.py:511
EgammaHcalPFClusterIsolationProducer::energyBarrel_
const double energyBarrel_
Definition: EgammaHcalPFClusterIsolationProducer.h:43
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.h:33
edm::helper::Filler
Definition: ValueMap.h:22
EgammaHcalPFClusterIsolationProducer::etaStripEndcap_
const double etaStripEndcap_
Definition: EgammaHcalPFClusterIsolationProducer.h:42
EgammaHcalPFClusterIsolationProducer::drMax_
const double drMax_
Definition: EgammaHcalPFClusterIsolationProducer.h:38
HcalPFClusterIsolation
Definition: HcalPFClusterIsolation.h:17
EgammaHcalPFClusterIsolationProducer::pfClusterProducerHFHAD_
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFHAD_
Definition: EgammaHcalPFClusterIsolationProducer.h:35
edm::ParameterDescription
Definition: ParameterDescription.h:110
edm::InputTag
Definition: InputTag.h:15
EgammaHcalPFClusterIsolationProducer::useHF_
const bool useHF_
Definition: EgammaHcalPFClusterIsolationProducer.h:37