CMS 3D CMS Logo

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

Classes

class  DataFormat
 
struct  DualToken
 

Public Member Functions

 ElectronHEEPIDValueMapProducer (const edm::ParameterSet &)
 
 ~ElectronHEEPIDValueMapProducer () 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
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 
template<typename T >
void setToken (edm::EDGetTokenT< T > &token, edm::InputTag tag)
 
template<typename T >
void setToken (edm::EDGetTokenT< T > &token, const edm::ParameterSet &iPara, const std::string &tag)
 
template<typename T >
void setToken (std::vector< edm::EDGetTokenT< T >> &tokens, const edm::ParameterSet &iPara, const std::string &tagName)
 
template<typename T >
void setToken (DualToken< T > &token, const edm::ParameterSet &iPara, const std::string &tagAOD, const std::string &tagMiniAOD, DataFormat format)
 
template<typename T >
void setToken (std::vector< DualToken< T >> &tokens, const edm::ParameterSet &iPara, const std::string &tagAOD, const std::string &tagMiniAOD, DataFormat format)
 

Static Private Member Functions

static float calTrkIso (const reco::GsfElectron &ele, IsolationCalculators const &isolationCalculators)
 
template<typename T >
static edm::Handle< TgetHandle (const edm::Event &iEvent, const DualToken< T > &token)
 
template<typename T >
static std::vector< edm::Handle< T > > getHandles (const edm::Event &iEvent, const std::vector< DualToken< T >> &tokens)
 
template<typename T >
static bool isEventAOD (const edm::Event &iEvent, const DualToken< T > &token)
 
static int nrSaturatedCrysIn5x5 (const reco::GsfElectron &ele, edm::Handle< EcalRecHitCollection > &ebHits, edm::Handle< EcalRecHitCollection > &eeHits, edm::ESHandle< CaloTopology > &caloTopo)
 
template<typename T >
static void writeValueMap (edm::Event &iEvent, const edm::Handle< edm::View< reco::GsfElectron >> &handle, const std::vector< T > &values, const std::string &label)
 

Private Attributes

edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordcaloTopoToken_
 
std::vector< DualToken< pat::PackedCandidateCollection > > candTokens_
 
std::vector< EleTkIsolFromCands::PIDVetocandVetosAOD_
 
std::vector< EleTkIsolFromCands::PIDVetocandVetosMiniAOD_
 
DataFormat dataFormat_
 
DualToken< EcalRecHitCollectionebRecHitToken_
 
DualToken< EcalRecHitCollectioneeRecHitToken_
 
DualToken< edm::View< reco::GsfElectron > > eleToken_
 
bool makeTrkIso04_
 
EleTkIsolFromCands::Configuration trkIso04CalcCfg_
 
EleTkIsolFromCands::Configuration trkIsoCalcCfg_
 

Static Private Attributes

static const std::string eleNrSaturateIn5x5Label_ = "eleNrSaturateIn5x5"
 
static const std::string eleTrkPtIso04Label_ = "eleTrkPtIso04"
 
static const std::string eleTrkPtIsoLabel_ = "eleTrkPtIso"
 

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 33 of file ElectronHEEPIDValueMapProducer.cc.

Constructor & Destructor Documentation

◆ ElectronHEEPIDValueMapProducer()

ElectronHEEPIDValueMapProducer::ElectronHEEPIDValueMapProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 191 of file ElectronHEEPIDValueMapProducer.cc.

References beamSpotToken_, caloTopoToken_, candTokens_, candVetosAOD_, candVetosMiniAOD_, dataFormat_, ebRecHitToken_, eeRecHitToken_, eleNrSaturateIn5x5Label_, eleToken_, eleTrkPtIso04Label_, eleTrkPtIsoLabel_, deDxTools::esConsumes(), Exception, edm::ParameterSet::getParameter(), recoMuon::in, makeTrkIso04_, MillePedeFileConverter_cfg::out, EleTkIsolFromCands::pidVetoFromStr(), setToken(), findQualityFiles::size, and HcalDetIdTransform::transform().

192  : trkIsoCalcCfg_(iConfig.getParameter<edm::ParameterSet>("trkIsoConfig")),
193  trkIso04CalcCfg_(iConfig.getParameter<edm::ParameterSet>("trkIso04Config")),
194  makeTrkIso04_(iConfig.getParameter<bool>("makeTrkIso04")),
195  dataFormat_(iConfig.getParameter<int>("dataFormat")) {
196  setToken(ebRecHitToken_, iConfig, "ebRecHitsAOD", "ebRecHitsMiniAOD", dataFormat_);
197  setToken(eeRecHitToken_, iConfig, "eeRecHitsAOD", "eeRecHitsMiniAOD", dataFormat_);
198  setToken(eleToken_, iConfig, "elesAOD", "elesMiniAOD", dataFormat_);
199  setToken(candTokens_, iConfig, "candsAOD", "candsMiniAOD", dataFormat_);
200  setToken(beamSpotToken_, iConfig, "beamSpot");
202 
203  auto fillVetos = [](const auto& in, auto& out) {
204  std::transform(in.begin(), in.end(), std::back_inserter(out), EleTkIsolFromCands::pidVetoFromStr);
205  };
206 
207  fillVetos(iConfig.getParameter<std::vector<std::string>>("candVetosAOD"), candVetosAOD_);
208  if (candVetosAOD_.size() != iConfig.getParameter<std::vector<edm::InputTag>>("candsAOD").size()) {
209  throw cms::Exception("ConfigError") << " Error candVetosAOD should be the same size as candsAOD " << std::endl;
210  }
211 
212  fillVetos(iConfig.getParameter<std::vector<std::string>>("candVetosMiniAOD"), candVetosMiniAOD_);
213  if (candVetosMiniAOD_.size() != iConfig.getParameter<std::vector<edm::InputTag>>("candsMiniAOD").size()) {
214  throw cms::Exception("ConfigError") << " Error candVetosMiniAOD should be the same size as candsMiniAOD "
215  << std::endl;
216  }
217 
218  produces<edm::ValueMap<float>>(eleTrkPtIsoLabel_);
219  if (makeTrkIso04_)
220  produces<edm::ValueMap<float>>(eleTrkPtIso04Label_);
221  produces<edm::ValueMap<int>>(eleNrSaturateIn5x5Label_);
222 }
size
Write out results.
DualToken< EcalRecHitCollection > ebRecHitToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::vector< DualToken< pat::PackedCandidateCollection > > candTokens_
std::vector< EleTkIsolFromCands::PIDVeto > candVetosMiniAOD_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopoToken_
DualToken< edm::View< reco::GsfElectron > > eleToken_
DualToken< EcalRecHitCollection > eeRecHitToken_
static PIDVeto pidVetoFromStr(const std::string &vetoStr)
std::vector< EleTkIsolFromCands::PIDVeto > candVetosAOD_
EleTkIsolFromCands::Configuration trkIso04CalcCfg_
void setToken(edm::EDGetTokenT< T > &token, edm::InputTag tag)
EleTkIsolFromCands::Configuration trkIsoCalcCfg_
unsigned transform(const HcalDetId &id, unsigned transformCode)

◆ ~ElectronHEEPIDValueMapProducer()

ElectronHEEPIDValueMapProducer::~ElectronHEEPIDValueMapProducer ( )
override

Definition at line 224 of file ElectronHEEPIDValueMapProducer.cc.

224 {}

Member Function Documentation

◆ calTrkIso()

float ElectronHEEPIDValueMapProducer::calTrkIso ( const reco::GsfElectron ele,
IsolationCalculators const &  isolationCalculators 
)
staticprivate

Definition at line 280 of file ElectronHEEPIDValueMapProducer.cc.

References reco::GsfElectron::gsfTrack(), edm::Ref< C, T, F >::isNull(), and SiStripPI::max.

Referenced by produce().

281  {
282  if (ele.gsfTrack().isNull()) {
284  }
285 
286  float trkIso = 0.;
287  for (auto& calculator : isolationCalculators) {
288  trkIso += (*calculator)(*ele.gsfTrack()).ptSum;
289  }
290  return trkIso;
291 }
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:156
bool isNull() const
Checks for null.
Definition: Ref.h:235

◆ fillDescriptions()

void ElectronHEEPIDValueMapProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 305 of file ElectronHEEPIDValueMapProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), submitPVResolutionJobs::desc, HLT_2022v15_cff::InputTag, and EleTkIsolFromCands::pSetDescript().

305  {
307  desc.add<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot"));
308  desc.add<edm::InputTag>("ebRecHitsAOD", edm::InputTag("reducedEcalRecHitsEB"));
309  desc.add<edm::InputTag>("eeRecHitsAOD", edm::InputTag("reducedEcalRecHitsEE"));
310  desc.add<std::vector<edm::InputTag>>("candsAOD", {edm::InputTag("packedCandidates")});
311  desc.add<std::vector<std::string>>("candVetosAOD", {"none"});
312  desc.add<edm::InputTag>("elesAOD", edm::InputTag("gedGsfElectrons"));
313 
314  desc.add<edm::InputTag>("ebRecHitsMiniAOD", edm::InputTag("reducedEcalRecHitsEB"));
315  desc.add<edm::InputTag>("eeRecHitsMiniAOD", edm::InputTag("reducedEcalRecHitsEE"));
316  desc.add<std::vector<edm::InputTag>>("candsMiniAOD", {edm::InputTag("packedCandidates")});
317  desc.add<std::vector<std::string>>("candVetosMiniAOD", {"none"});
318  desc.add<edm::InputTag>("elesMiniAOD", edm::InputTag("gedGsfElectrons"));
319  desc.add<int>("dataFormat", 0);
320  desc.add<bool>("makeTrkIso04", false);
321  desc.add("trkIsoConfig", EleTkIsolFromCands::pSetDescript());
322  desc.add("trkIso04Config", EleTkIsolFromCands::pSetDescript());
323 
324  descriptions.addDefault(desc);
325 }
void addDefault(ParameterSetDescription const &psetDescription)
static edm::ParameterSetDescription pSetDescript()

◆ getHandle()

template<typename T >
static edm::Handle<T> ElectronHEEPIDValueMapProducer::getHandle ( const edm::Event iEvent,
const DualToken< T > &  token 
)
inlinestaticprivate

Definition at line 129 of file ElectronHEEPIDValueMapProducer.cc.

References patZpeak::handle, iEvent, and unpackBuffers-CaloStage2::token.

Referenced by produce().

129  {
131  if (!token.aod.isUninitialized())
132  iEvent.getByToken(token.aod, handle);
133  if (!handle.isValid() && !token.miniAOD.isUninitialized())
134  iEvent.getByToken(token.miniAOD, handle);
135  return handle;
136  }
int iEvent
Definition: GenABIO.cc:224

◆ getHandles()

template<typename T >
static std::vector<edm::Handle<T> > ElectronHEEPIDValueMapProducer::getHandles ( const edm::Event iEvent,
const std::vector< DualToken< T >> &  tokens 
)
inlinestaticprivate

Definition at line 139 of file ElectronHEEPIDValueMapProducer.cc.

References iEvent, HLTEGTnPMonitor_cfi::isAOD, PAT_cff::miniAOD, and unpackBuffers-CaloStage2::token.

Referenced by produce().

139  {
140  std::vector<edm::Handle<T>> handles(tokens.size());
141  if (tokens.empty())
142  return handles;
143  if (!tokens[0].aod.isUninitialized())
144  iEvent.getByToken(tokens[0].aod, handles[0]);
145  bool isAOD = handles[0].isValid();
146  if (!isAOD && !tokens[0].miniAOD.isUninitialized())
147  iEvent.getByToken(tokens[0].miniAOD, handles[0]);
148 
149  for (size_t tokenNr = 1; tokenNr < tokens.size(); tokenNr++) {
150  auto token = isAOD ? tokens[tokenNr].aod : tokens[tokenNr].miniAOD;
151  if (!token.isUninitialized())
152  iEvent.getByToken(token, handles[tokenNr]);
153  }
154  return handles;
155  }
miniAOD
Definition: PAT_cff.py:15
int iEvent
Definition: GenABIO.cc:224
std::vector< BaseVolumeHandle * > handles

◆ isEventAOD()

template<typename T >
static bool ElectronHEEPIDValueMapProducer::isEventAOD ( const edm::Event iEvent,
const DualToken< T > &  token 
)
inlinestaticprivate

Definition at line 158 of file ElectronHEEPIDValueMapProducer.cc.

References patZpeak::handle, iEvent, and unpackBuffers-CaloStage2::token.

Referenced by produce().

158  {
160  if (!token.aod.isUninitialized())
161  iEvent.getByToken(token.aod, handle);
162  if (handle.isValid())
163  return true;
164  else
165  return false;
166  }
int iEvent
Definition: GenABIO.cc:224

◆ nrSaturatedCrysIn5x5()

int ElectronHEEPIDValueMapProducer::nrSaturatedCrysIn5x5 ( const reco::GsfElectron ele,
edm::Handle< EcalRecHitCollection > &  ebHits,
edm::Handle< EcalRecHitCollection > &  eeHits,
edm::ESHandle< CaloTopology > &  caloTopo 
)
staticprivate

Definition at line 271 of file ElectronHEEPIDValueMapProducer.cc.

References EcalBarrel, EcalClusterToolsT< noZS >::nrSaturatedCrysIn5x5(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), FastTrackerRecHitMaskProducer_cfi::recHits, and reco::GsfElectron::superCluster().

Referenced by produce().

274  {
275  DetId id = ele.superCluster()->seed()->seed();
276  auto recHits = id.subdetId() == EcalBarrel ? ebHits.product() : eeHits.product();
278 }
static int nrSaturatedCrysIn5x5(const DetId &id, const EcalRecHitCollection *recHits, const CaloTopology *topology)
T const * product() const
Definition: Handle.h:70
T const * product() const
Definition: ESHandle.h:86
Definition: DetId.h:17
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155

◆ produce()

void ElectronHEEPIDValueMapProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 226 of file ElectronHEEPIDValueMapProducer.cc.

References beamSpotToken_, caloTopoToken_, calTrkIso(), candTokens_, candVetosAOD_, candVetosMiniAOD_, ebRecHitToken_, eeRecHitToken_, eleNrSaturateIn5x5Label_, eleToken_, eleTrkPtIso04Label_, eleTrkPtIsoLabel_, getHandle(), edm::EventSetup::getHandle(), getHandles(), patZpeak::handle, iEvent, HLTEGTnPMonitor_cfi::isAOD, isEventAOD(), makeTrkIso04_, nrSaturatedCrysIn5x5(), trkIso04CalcCfg_, trkIsoCalcCfg_, and writeValueMap().

226  {
227  auto eleHandle = getHandle(iEvent, eleToken_);
228  auto ebRecHitHandle = getHandle(iEvent, ebRecHitToken_);
229  auto eeRecHitHandle = getHandle(iEvent, eeRecHitToken_);
230  auto beamSpotHandle = iEvent.getHandle(beamSpotToken_);
231 
232  bool isAOD = isEventAOD(iEvent, eleToken_);
233  const auto& candVetos = isAOD ? candVetosAOD_ : candVetosMiniAOD_;
234 
235  IsolationCalculators trkIsoCalcs;
236  IsolationCalculators trkIso04Calcs;
237 
238  {
239  int handleNr = 0;
240  for (auto const& handle : getHandles(iEvent, candTokens_)) {
241  if (handle.isValid()) {
242  trkIsoCalcs.emplace_back(std::make_unique<EleTkIsolFromCands>(trkIsoCalcCfg_, *handle, candVetos[handleNr]));
243  if (makeTrkIso04_) {
244  trkIso04Calcs.emplace_back(
245  std::make_unique<EleTkIsolFromCands>(trkIso04CalcCfg_, *handle, candVetos[handleNr]));
246  }
247  }
248  ++handleNr;
249  }
250  }
251 
252  edm::ESHandle<CaloTopology> caloTopoHandle = iSetup.getHandle(caloTopoToken_);
253 
254  std::vector<float> eleTrkPtIso;
255  std::vector<float> eleTrkPtIso04;
256  std::vector<int> eleNrSaturateIn5x5;
257  for (auto const& ele : *eleHandle) {
258  eleTrkPtIso.push_back(calTrkIso(ele, trkIsoCalcs));
259  if (makeTrkIso04_) {
260  eleTrkPtIso04.push_back(calTrkIso(ele, trkIso04Calcs));
261  }
262  eleNrSaturateIn5x5.push_back(nrSaturatedCrysIn5x5(ele, ebRecHitHandle, eeRecHitHandle, caloTopoHandle));
263  }
264 
265  writeValueMap(iEvent, eleHandle, eleTrkPtIso, eleTrkPtIsoLabel_);
266  if (makeTrkIso04_)
267  writeValueMap(iEvent, eleHandle, eleTrkPtIso04, eleTrkPtIso04Label_);
268  writeValueMap(iEvent, eleHandle, eleNrSaturateIn5x5, eleNrSaturateIn5x5Label_);
269 }
DualToken< EcalRecHitCollection > ebRecHitToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
static int nrSaturatedCrysIn5x5(const reco::GsfElectron &ele, edm::Handle< EcalRecHitCollection > &ebHits, edm::Handle< EcalRecHitCollection > &eeHits, edm::ESHandle< CaloTopology > &caloTopo)
std::vector< DualToken< pat::PackedCandidateCollection > > candTokens_
static edm::Handle< T > getHandle(const edm::Event &iEvent, const DualToken< T > &token)
std::vector< std::unique_ptr< EleTkIsolFromCands > > IsolationCalculators
static float calTrkIso(const reco::GsfElectron &ele, IsolationCalculators const &isolationCalculators)
int iEvent
Definition: GenABIO.cc:224
std::vector< EleTkIsolFromCands::PIDVeto > candVetosMiniAOD_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopoToken_
static std::vector< edm::Handle< T > > getHandles(const edm::Event &iEvent, const std::vector< DualToken< T >> &tokens)
DualToken< edm::View< reco::GsfElectron > > eleToken_
DualToken< EcalRecHitCollection > eeRecHitToken_
static void writeValueMap(edm::Event &iEvent, const edm::Handle< edm::View< reco::GsfElectron >> &handle, const std::vector< T > &values, const std::string &label)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
std::vector< EleTkIsolFromCands::PIDVeto > candVetosAOD_
EleTkIsolFromCands::Configuration trkIso04CalcCfg_
static bool isEventAOD(const edm::Event &iEvent, const DualToken< T > &token)
EleTkIsolFromCands::Configuration trkIsoCalcCfg_

◆ setToken() [1/5]

template<typename T >
void ElectronHEEPIDValueMapProducer::setToken ( edm::EDGetTokenT< T > &  token,
edm::InputTag  tag 
)
inlineprivate

◆ setToken() [2/5]

template<typename T >
void ElectronHEEPIDValueMapProducer::setToken ( edm::EDGetTokenT< T > &  token,
const edm::ParameterSet iPara,
const std::string &  tag 
)
inlineprivate

◆ setToken() [3/5]

template<typename T >
void ElectronHEEPIDValueMapProducer::setToken ( std::vector< edm::EDGetTokenT< T >> &  tokens,
const edm::ParameterSet iPara,
const std::string &  tagName 
)
inlineprivate

◆ setToken() [4/5]

template<typename T >
void ElectronHEEPIDValueMapProducer::setToken ( DualToken< T > &  token,
const edm::ParameterSet iPara,
const std::string &  tagAOD,
const std::string &  tagMiniAOD,
DataFormat  format 
)
inlineprivate

Definition at line 95 of file ElectronHEEPIDValueMapProducer.cc.

References edm::ParameterSet::getParameter(), and unpackBuffers-CaloStage2::token.

99  {
100  if (format.tryAOD())
101  token.aod = consumes<T>(iPara.getParameter<edm::InputTag>(tagAOD));
102  if (format.tryMiniAOD())
103  token.miniAOD = consumes<T>(iPara.getParameter<edm::InputTag>(tagMiniAOD));
104  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

◆ setToken() [5/5]

template<typename T >
void ElectronHEEPIDValueMapProducer::setToken ( std::vector< DualToken< T >> &  tokens,
const edm::ParameterSet iPara,
const std::string &  tagAOD,
const std::string &  tagMiniAOD,
DataFormat  format 
)
inlineprivate

Definition at line 106 of file ElectronHEEPIDValueMapProducer.cc.

References edm::ParameterSet::getParameter(), SiStripPI::max, reco_skim_cfg_mod::maxSize, PAT_cff::miniAOD, and setToken().

110  {
111  auto tagsAOD = iPara.getParameter<std::vector<edm::InputTag>>(tagAOD);
112  auto tagsMiniAOD = iPara.getParameter<std::vector<edm::InputTag>>(tagMiniAOD);
113  size_t maxSize = std::max(tagsAOD.size(), tagsMiniAOD.size());
114  tokens.clear();
115  tokens.resize(maxSize);
116  if (format.tryAOD()) {
117  for (size_t tagNr = 0; tagNr < tagsAOD.size(); tagNr++) {
118  setToken(tokens[tagNr].aod, tagsAOD[tagNr]);
119  }
120  }
121  if (format.tryMiniAOD()) {
122  for (size_t tagNr = 0; tagNr < tagsMiniAOD.size(); tagNr++) {
123  setToken(tokens[tagNr].miniAOD, tagsMiniAOD[tagNr]);
124  }
125  }
126  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
miniAOD
Definition: PAT_cff.py:15
void setToken(edm::EDGetTokenT< T > &token, edm::InputTag tag)

◆ writeValueMap()

template<typename T >
void ElectronHEEPIDValueMapProducer::writeValueMap ( edm::Event iEvent,
const edm::Handle< edm::View< reco::GsfElectron >> &  handle,
const std::vector< T > &  values,
const std::string &  label 
)
staticprivate

Definition at line 294 of file ElectronHEEPIDValueMapProducer.cc.

References trigObjTnPSource_cfi::filler, patZpeak::handle, iEvent, label, eostools::move(), and contentValuesCheck::values.

Referenced by produce().

297  {
298  std::unique_ptr<edm::ValueMap<T>> valMap(new edm::ValueMap<T>());
299  typename edm::ValueMap<T>::Filler filler(*valMap);
300  filler.insert(handle, values.begin(), values.end());
301  filler.fill();
302  iEvent.put(std::move(valMap), label);
303 }
char const * label
int iEvent
Definition: GenABIO.cc:224
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ beamSpotToken_

edm::EDGetTokenT<reco::BeamSpot> ElectronHEEPIDValueMapProducer::beamSpotToken_
private

Definition at line 172 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ caloTopoToken_

edm::ESGetToken<CaloTopology, CaloTopologyRecord> ElectronHEEPIDValueMapProducer::caloTopoToken_
private

Definition at line 173 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ candTokens_

std::vector<DualToken<pat::PackedCandidateCollection> > ElectronHEEPIDValueMapProducer::candTokens_
private

Definition at line 171 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ candVetosAOD_

std::vector<EleTkIsolFromCands::PIDVeto> ElectronHEEPIDValueMapProducer::candVetosAOD_
private

Definition at line 179 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ candVetosMiniAOD_

std::vector<EleTkIsolFromCands::PIDVeto> ElectronHEEPIDValueMapProducer::candVetosMiniAOD_
private

Definition at line 180 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ dataFormat_

DataFormat ElectronHEEPIDValueMapProducer::dataFormat_
private

Definition at line 178 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer().

◆ ebRecHitToken_

DualToken<EcalRecHitCollection> ElectronHEEPIDValueMapProducer::ebRecHitToken_
private

Definition at line 168 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ eeRecHitToken_

DualToken<EcalRecHitCollection> ElectronHEEPIDValueMapProducer::eeRecHitToken_
private

Definition at line 169 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ eleNrSaturateIn5x5Label_

const std::string ElectronHEEPIDValueMapProducer::eleNrSaturateIn5x5Label_ = "eleNrSaturateIn5x5"
staticprivate

Definition at line 184 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ eleToken_

DualToken<edm::View<reco::GsfElectron> > ElectronHEEPIDValueMapProducer::eleToken_
private

Definition at line 170 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ eleTrkPtIso04Label_

const std::string ElectronHEEPIDValueMapProducer::eleTrkPtIso04Label_ = "eleTrkPtIso04"
staticprivate

Definition at line 183 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ eleTrkPtIsoLabel_

const std::string ElectronHEEPIDValueMapProducer::eleTrkPtIsoLabel_ = "eleTrkPtIso"
staticprivate

Definition at line 182 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ makeTrkIso04_

bool ElectronHEEPIDValueMapProducer::makeTrkIso04_
private

Definition at line 177 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

◆ trkIso04CalcCfg_

EleTkIsolFromCands::Configuration ElectronHEEPIDValueMapProducer::trkIso04CalcCfg_
private

Definition at line 176 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by produce().

◆ trkIsoCalcCfg_

EleTkIsolFromCands::Configuration ElectronHEEPIDValueMapProducer::trkIsoCalcCfg_
private

Definition at line 175 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by produce().