CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EgammaTowerIsolationProducer Class Reference
Inheritance diagram for EgammaTowerIsolationProducer:
edm::stream::EDProducer<>

Public Member Functions

 EgammaTowerIsolationProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
- Public Member Functions inherited from edm::stream::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
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Attributes

const signed int egHcalDepth_
 
const double egHcalIsoConeSizeIn_
 
const double egHcalIsoConeSizeOut_
 
const double egHcalIsoPtMin_
 
const edm::EDGetTokenT< edm::View< reco::Candidate > > emObjectProducer_
 
const edm::EDPutTokenT< edm::ValueMap< double > > putToken_
 
const edm::EDGetTokenT< CaloTowerCollectiontowerProducer_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 18 of file EgammaTowerIsolationProducer.cc.

Constructor & Destructor Documentation

◆ EgammaTowerIsolationProducer()

EgammaTowerIsolationProducer::EgammaTowerIsolationProducer ( const edm::ParameterSet config)
explicit

Definition at line 41 of file EgammaTowerIsolationProducer.cc.

42  : emObjectProducer_{consumes(config.getParameter<edm::InputTag>("emObjectProducer"))},
43  towerProducer_{consumes(config.getParameter<edm::InputTag>("towerProducer"))},
44  putToken_{produces<edm::ValueMap<double>>()},
45  egHcalIsoPtMin_{config.getParameter<double>("etMin")},
46  egHcalIsoConeSizeOut_{config.getParameter<double>("extRadius")},
47  egHcalIsoConeSizeIn_{config.getParameter<double>("intRadius")},
48  egHcalDepth_{config.getParameter<int>("Depth")} {}
Definition: config.py:1
const edm::EDGetTokenT< edm::View< reco::Candidate > > emObjectProducer_
const edm::EDPutTokenT< edm::ValueMap< double > > putToken_
const edm::EDGetTokenT< CaloTowerCollection > towerProducer_

Member Function Documentation

◆ produce()

void EgammaTowerIsolationProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 50 of file EgammaTowerIsolationProducer.cc.

References egHcalDepth_, egHcalIsoConeSizeIn_, egHcalIsoConeSizeOut_, egHcalIsoPtMin_, emObjectProducer_, trigObjTnPSource_cfi::filler, mps_fire::i, iEvent, eostools::move(), putToken_, towerProducer_, and HLT_2024v11_cff::towers.

50  {
51  // Get the filtered objects
52  auto emObjectHandle = iEvent.getHandle(emObjectProducer_);
53 
54  // Get the barrel hcal hits
55  auto const& towers = iEvent.get(towerProducer_);
56 
57  edm::ValueMap<double> isoMap;
59  std::vector<double> retV(emObjectHandle->size(), 0);
60 
61  EgammaTowerIsolation myHadIsolation(
63 
64  for (size_t i = 0; i < emObjectHandle->size(); ++i) {
65  double isoValue = myHadIsolation.getTowerEtSum(&(emObjectHandle->at(i)));
66  retV[i] = isoValue;
67  }
68 
69  filler.insert(emObjectHandle, retV.begin(), retV.end());
70  filler.fill();
71  iEvent.emplace(putToken_, std::move(isoMap));
72 }
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< edm::View< reco::Candidate > > emObjectProducer_
const edm::EDPutTokenT< edm::ValueMap< double > > putToken_
const edm::EDGetTokenT< CaloTowerCollection > towerProducer_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ egHcalDepth_

const signed int EgammaTowerIsolationProducer::egHcalDepth_
private

Definition at line 35 of file EgammaTowerIsolationProducer.cc.

Referenced by produce().

◆ egHcalIsoConeSizeIn_

const double EgammaTowerIsolationProducer::egHcalIsoConeSizeIn_
private

Definition at line 34 of file EgammaTowerIsolationProducer.cc.

Referenced by produce().

◆ egHcalIsoConeSizeOut_

const double EgammaTowerIsolationProducer::egHcalIsoConeSizeOut_
private

Definition at line 33 of file EgammaTowerIsolationProducer.cc.

Referenced by produce().

◆ egHcalIsoPtMin_

const double EgammaTowerIsolationProducer::egHcalIsoPtMin_
private

Definition at line 32 of file EgammaTowerIsolationProducer.cc.

Referenced by produce().

◆ emObjectProducer_

const edm::EDGetTokenT<edm::View<reco::Candidate> > EgammaTowerIsolationProducer::emObjectProducer_
private

Definition at line 27 of file EgammaTowerIsolationProducer.cc.

Referenced by produce().

◆ putToken_

const edm::EDPutTokenT<edm::ValueMap<double> > EgammaTowerIsolationProducer::putToken_
private

Definition at line 30 of file EgammaTowerIsolationProducer.cc.

Referenced by produce().

◆ towerProducer_

const edm::EDGetTokenT<CaloTowerCollection> EgammaTowerIsolationProducer::towerProducer_
private

Definition at line 28 of file EgammaTowerIsolationProducer.cc.

Referenced by produce().