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
 
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 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, const edm::View< reco::GsfElectron > &eles, const std::vector< edm::Handle< pat::PackedCandidateCollection > > &handles, const std::vector< EleTkIsolFromCands::PIDVeto > &pidVetos, const EleTkIsolFromCands &trkIsoCalc)
 
template<typename T >
static edm::Handle< TgetHandle (const edm::Event &iEvent, const edm::EDGetTokenT< T > &token)
 
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_
 
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 trkIso04Calc_
 
EleTkIsolFromCands trkIsoCalc_
 

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<>
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
 

Detailed Description

Definition at line 31 of file ElectronHEEPIDValueMapProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 198 of file ElectronHEEPIDValueMapProducer.cc.

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

Referenced by ElectronHEEPIDValueMapProducer::DataFormat::operator()().

199  : trkIsoCalc_(iConfig.getParameter<edm::ParameterSet>("trkIsoConfig")),
200  trkIso04Calc_(iConfig.getParameter<edm::ParameterSet>("trkIso04Config")),
201  makeTrkIso04_(iConfig.getParameter<bool>("makeTrkIso04")),
202  dataFormat_(iConfig.getParameter<int>("dataFormat")) {
203  setToken(ebRecHitToken_, iConfig, "ebRecHitsAOD", "ebRecHitsMiniAOD", dataFormat_);
204  setToken(eeRecHitToken_, iConfig, "eeRecHitsAOD", "eeRecHitsMiniAOD", dataFormat_);
205  setToken(eleToken_, iConfig, "elesAOD", "elesMiniAOD", dataFormat_);
206  setToken(candTokens_, iConfig, "candsAOD", "candsMiniAOD", dataFormat_);
207  setToken(beamSpotToken_, iConfig, "beamSpot");
208 
209  auto fillVetos = [](const auto& in, auto& out) {
210  std::transform(in.begin(), in.end(), std::back_inserter(out), EleTkIsolFromCands::pidVetoFromStr);
211  };
212 
213  fillVetos(iConfig.getParameter<std::vector<std::string> >("candVetosAOD"), candVetosAOD_);
214  if (candVetosAOD_.size() != iConfig.getParameter<std::vector<edm::InputTag> >("candsAOD").size()) {
215  throw cms::Exception("ConfigError") << " Error candVetosAOD should be the same size as candsAOD " << std::endl;
216  }
217 
218  fillVetos(iConfig.getParameter<std::vector<std::string> >("candVetosMiniAOD"), candVetosMiniAOD_);
219  if (candVetosMiniAOD_.size() != iConfig.getParameter<std::vector<edm::InputTag> >("candsMiniAOD").size()) {
220  throw cms::Exception("ConfigError") << " Error candVetosMiniAOD should be the same size as candsMiniAOD "
221  << std::endl;
222  }
223 
224  produces<edm::ValueMap<float> >(eleTrkPtIsoLabel_);
225  if (makeTrkIso04_)
226  produces<edm::ValueMap<float> >(eleTrkPtIso04Label_);
227  produces<edm::ValueMap<int> >(eleNrSaturateIn5x5Label_);
228 }
size
Write out results.
T getParameter(std::string const &) const
DualToken< EcalRecHitCollection > ebRecHitToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::vector< DualToken< pat::PackedCandidateCollection > > candTokens_
std::vector< EleTkIsolFromCands::PIDVeto > candVetosMiniAOD_
DualToken< edm::View< reco::GsfElectron > > eleToken_
DualToken< EcalRecHitCollection > eeRecHitToken_
static PIDVeto pidVetoFromStr(const std::string &vetoStr)
std::vector< EleTkIsolFromCands::PIDVeto > candVetosAOD_
void setToken(edm::EDGetTokenT< T > &token, edm::InputTag tag)
unsigned transform(const HcalDetId &id, unsigned transformCode)
ElectronHEEPIDValueMapProducer::~ElectronHEEPIDValueMapProducer ( )
override

Member Function Documentation

float ElectronHEEPIDValueMapProducer::calTrkIso ( const reco::GsfElectron ele,
const edm::View< reco::GsfElectron > &  eles,
const std::vector< edm::Handle< pat::PackedCandidateCollection > > &  handles,
const std::vector< EleTkIsolFromCands::PIDVeto > &  pidVetos,
const EleTkIsolFromCands trkIsoCalc 
)
staticprivate

Definition at line 271 of file ElectronHEEPIDValueMapProducer.cc.

References EleTkIsolFromCands::calIsolPt(), Exception, reco::GsfElectron::gsfTrack(), patZpeak::handle, edm::Ref< C, T, F >::isNull(), SiStripPI::max, and ZMuMuCategoriesSequences_cff::trkIso.

Referenced by ElectronHEEPIDValueMapProducer::DataFormat::operator()(), and produce().

275  {
276  if (ele.gsfTrack().isNull())
278  else {
279  float trkIso = 0.;
280  for (size_t handleNr = 0; handleNr < handles.size(); handleNr++) {
281  auto& handle = handles[handleNr];
282  if (handle.isValid()) {
283  if (handleNr < pidVetos.size()) {
284  trkIso += trkIsoCalc.calIsolPt(*ele.gsfTrack(), *handle, pidVetos[handleNr]);
285  } else {
286  throw cms::Exception("LogicError") << " somehow the pidVetos and handles do not much, given this is checked "
287  "at construction time, something has gone wrong in the code handle nr "
288  << handleNr << " size of vetos " << pidVetos.size();
289  }
290  }
291  }
292  return trkIso;
293  }
294 }
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:156
std::vector< BaseVolumeHandle * > handles
double calIsolPt(Args &&...args) const
bool isNull() const
Checks for null.
Definition: Ref.h:235
void ElectronHEEPIDValueMapProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 308 of file ElectronHEEPIDValueMapProducer.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addDefault(), DEFINE_FWK_MODULE, HLT_2018_cff::InputTag, and EleTkIsolFromCands::pSetDescript().

Referenced by ElectronHEEPIDValueMapProducer::DataFormat::operator()().

308  {
310  desc.add<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot"));
311  desc.add<edm::InputTag>("ebRecHitsAOD", edm::InputTag("reducedEcalRecHitsEB"));
312  desc.add<edm::InputTag>("eeRecHitsAOD", edm::InputTag("reducedEcalRecHitsEE"));
313  desc.add<std::vector<edm::InputTag> >("candsAOD", {edm::InputTag("packedCandidates")});
314  desc.add<std::vector<std::string> >("candVetosAOD", {"none"});
315  desc.add<edm::InputTag>("elesAOD", edm::InputTag("gedGsfElectrons"));
316 
317  desc.add<edm::InputTag>("ebRecHitsMiniAOD", edm::InputTag("reducedEcalRecHitsEB"));
318  desc.add<edm::InputTag>("eeRecHitsMiniAOD", edm::InputTag("reducedEcalRecHitsEE"));
319  desc.add<std::vector<edm::InputTag> >("candsMiniAOD", {edm::InputTag("packedCandidates")});
320  desc.add<std::vector<std::string> >("candVetosMiniAOD", {"none"});
321  desc.add<edm::InputTag>("elesMiniAOD", edm::InputTag("gedGsfElectrons"));
322  desc.add<int>("dataFormat", 0);
323  desc.add<bool>("makeTrkIso04", false);
324  desc.add("trkIsoConfig", EleTkIsolFromCands::pSetDescript());
325  desc.add("trkIso04Config", EleTkIsolFromCands::pSetDescript());
326 
327  descriptions.addDefault(desc);
328 }
void addDefault(ParameterSetDescription const &psetDescription)
static edm::ParameterSetDescription pSetDescript()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
template<typename T >
static edm::Handle<T> ElectronHEEPIDValueMapProducer::getHandle ( const edm::Event iEvent,
const edm::EDGetTokenT< T > &  token 
)
inlinestaticprivate

Definition at line 131 of file ElectronHEEPIDValueMapProducer.cc.

References edm::Event::getByToken(), and patZpeak::handle.

Referenced by produce().

131  {
133  iEvent.getByToken(token, handle);
134  return handle;
135  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
template<typename T >
static edm::Handle<T> ElectronHEEPIDValueMapProducer::getHandle ( const edm::Event iEvent,
const DualToken< T > &  token 
)
inlinestaticprivate

Definition at line 137 of file ElectronHEEPIDValueMapProducer.cc.

References ElectronHEEPIDValueMapProducer::DualToken< T >::aod, edm::Event::getByToken(), patZpeak::handle, edm::HandleBase::isValid(), and ElectronHEEPIDValueMapProducer::DualToken< T >::miniAOD.

137  {
139  if (!token.aod.isUninitialized())
140  iEvent.getByToken(token.aod, handle);
141  if (!handle.isValid() && !token.miniAOD.isUninitialized())
142  iEvent.getByToken(token.miniAOD, handle);
143  return handle;
144  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
bool isValid() const
Definition: HandleBase.h:70
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 147 of file ElectronHEEPIDValueMapProducer.cc.

References ElectronHEEPIDValueMapProducer::DualToken< T >::aod, edm::Event::getByToken(), HLTEGTnPMonitor_cfi::isAOD, ElectronHEEPIDValueMapProducer::DualToken< T >::miniAOD, and unpackBuffers-CaloStage2::token.

Referenced by produce().

147  {
148  std::vector<edm::Handle<T> > handles(tokens.size());
149  if (tokens.empty())
150  return handles;
151  if (!tokens[0].aod.isUninitialized())
152  iEvent.getByToken(tokens[0].aod, handles[0]);
153  bool isAOD = handles[0].isValid();
154  if (!isAOD && !tokens[0].miniAOD.isUninitialized())
155  iEvent.getByToken(tokens[0].miniAOD, handles[0]);
156 
157  for (size_t tokenNr = 1; tokenNr < tokens.size(); tokenNr++) {
158  auto token = isAOD ? tokens[tokenNr].aod : tokens[tokenNr].miniAOD;
159  if (!token.isUninitialized())
160  iEvent.getByToken(token, handles[tokenNr]);
161  }
162  return handles;
163  }
miniAOD
Definition: PAT_cff.py:15
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
std::vector< BaseVolumeHandle * > handles
template<typename T >
static bool ElectronHEEPIDValueMapProducer::isEventAOD ( const edm::Event iEvent,
const DualToken< T > &  token 
)
inlinestaticprivate

Definition at line 166 of file ElectronHEEPIDValueMapProducer.cc.

References ElectronHEEPIDValueMapProducer::DualToken< T >::aod, edm::Event::getByToken(), patZpeak::handle, and edm::HandleBase::isValid().

Referenced by produce().

166  {
168  if (!token.aod.isUninitialized())
169  iEvent.getByToken(token.aod, handle);
170  if (handle.isValid())
171  return true;
172  else
173  return false;
174  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
bool isValid() const
Definition: HandleBase.h:70
int ElectronHEEPIDValueMapProducer::nrSaturatedCrysIn5x5 ( const reco::GsfElectron ele,
edm::Handle< EcalRecHitCollection > &  ebHits,
edm::Handle< EcalRecHitCollection > &  eeHits,
edm::ESHandle< CaloTopology > &  caloTopo 
)
staticprivate

Definition at line 262 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 ElectronHEEPIDValueMapProducer::DataFormat::operator()(), and produce().

265  {
266  DetId id = ele.superCluster()->seed()->seed();
267  auto recHits = id.subdetId() == EcalBarrel ? ebHits.product() : eeHits.product();
269 }
static int nrSaturatedCrysIn5x5(const DetId &id, const EcalRecHitCollection *recHits, const CaloTopology *topology)
Definition: DetId.h:17
T const * product() const
Definition: Handle.h:69
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155
T const * product() const
Definition: ESHandle.h:86
void ElectronHEEPIDValueMapProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 232 of file ElectronHEEPIDValueMapProducer.cc.

References beamSpotToken_, calTrkIso(), candTokens_, candVetosAOD_, candVetosMiniAOD_, ebRecHitToken_, eeRecHitToken_, eleNrSaturateIn5x5Label_, eleToken_, eleTrkPtIso04Label_, eleTrkPtIsoLabel_, edm::EventSetup::get(), getHandle(), getHandles(), HLTEGTnPMonitor_cfi::isAOD, isEventAOD(), makeTrkIso04_, nrSaturatedCrysIn5x5(), trkIso04Calc_, trkIsoCalc_, and writeValueMap().

Referenced by ElectronHEEPIDValueMapProducer::DataFormat::operator()().

232  {
233  auto eleHandle = getHandle(iEvent, eleToken_);
234  auto ebRecHitHandle = getHandle(iEvent, ebRecHitToken_);
235  auto eeRecHitHandle = getHandle(iEvent, eeRecHitToken_);
236  auto beamSpotHandle = getHandle(iEvent, beamSpotToken_);
237  auto candHandles = getHandles(iEvent, candTokens_);
238 
239  bool isAOD = isEventAOD(iEvent, eleToken_);
240  const auto& candVetos = isAOD ? candVetosAOD_ : candVetosMiniAOD_;
241 
242  edm::ESHandle<CaloTopology> caloTopoHandle;
243  iSetup.get<CaloTopologyRecord>().get(caloTopoHandle);
244 
245  std::vector<float> eleTrkPtIso;
246  std::vector<float> eleTrkPtIso04;
247  std::vector<int> eleNrSaturateIn5x5;
248  for (auto const& ele : *eleHandle) {
249  eleTrkPtIso.push_back(calTrkIso(ele, *eleHandle, candHandles, candVetos, trkIsoCalc_));
250  if (makeTrkIso04_) {
251  eleTrkPtIso04.push_back(calTrkIso(ele, *eleHandle, candHandles, candVetos, trkIso04Calc_));
252  }
253  eleNrSaturateIn5x5.push_back(nrSaturatedCrysIn5x5(ele, ebRecHitHandle, eeRecHitHandle, caloTopoHandle));
254  }
255 
256  writeValueMap(iEvent, eleHandle, eleTrkPtIso, eleTrkPtIsoLabel_);
257  if (makeTrkIso04_)
258  writeValueMap(iEvent, eleHandle, eleTrkPtIso04, eleTrkPtIso04Label_);
259  writeValueMap(iEvent, eleHandle, eleNrSaturateIn5x5, eleNrSaturateIn5x5Label_);
260 }
DualToken< EcalRecHitCollection > ebRecHitToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
static void writeValueMap(edm::Event &iEvent, const edm::Handle< edm::View< reco::GsfElectron > > &handle, const std::vector< T > &values, const std::string &label)
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_
std::vector< EleTkIsolFromCands::PIDVeto > candVetosMiniAOD_
DualToken< edm::View< reco::GsfElectron > > eleToken_
DualToken< EcalRecHitCollection > eeRecHitToken_
static edm::Handle< T > getHandle(const edm::Event &iEvent, const edm::EDGetTokenT< T > &token)
static std::vector< edm::Handle< T > > getHandles(const edm::Event &iEvent, const std::vector< DualToken< T > > &tokens)
std::vector< EleTkIsolFromCands::PIDVeto > candVetosAOD_
T get() const
Definition: EventSetup.h:73
static float calTrkIso(const reco::GsfElectron &ele, const edm::View< reco::GsfElectron > &eles, const std::vector< edm::Handle< pat::PackedCandidateCollection > > &handles, const std::vector< EleTkIsolFromCands::PIDVeto > &pidVetos, const EleTkIsolFromCands &trkIsoCalc)
static bool isEventAOD(const edm::Event &iEvent, const DualToken< T > &token)
template<typename T >
void ElectronHEEPIDValueMapProducer::setToken ( edm::EDGetTokenT< T > &  token,
edm::InputTag  tag 
)
inlineprivate
template<typename T >
void ElectronHEEPIDValueMapProducer::setToken ( edm::EDGetTokenT< T > &  token,
const edm::ParameterSet iPara,
const std::string &  tag 
)
inlineprivate
template<typename T >
void ElectronHEEPIDValueMapProducer::setToken ( std::vector< edm::EDGetTokenT< T > > &  tokens,
const edm::ParameterSet iPara,
const std::string &  tagName 
)
inlineprivate
template<typename T >
void ElectronHEEPIDValueMapProducer::setToken ( DualToken< T > &  token,
const edm::ParameterSet iPara,
const std::string &  tagAOD,
const std::string &  tagMiniAOD,
DataFormat  format 
)
inlineprivate
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 108 of file ElectronHEEPIDValueMapProducer.cc.

References ElectronHEEPIDValueMapProducer::DualToken< T >::aod, edm::ParameterSet::getParameter(), SiStripPI::max, reco_skim_cfg_mod::maxSize, ElectronHEEPIDValueMapProducer::DualToken< T >::miniAOD, setToken(), ElectronHEEPIDValueMapProducer::DataFormat::tryAOD(), and ElectronHEEPIDValueMapProducer::DataFormat::tryMiniAOD().

112  {
113  auto tagsAOD = iPara.getParameter<std::vector<edm::InputTag> >(tagAOD);
114  auto tagsMiniAOD = iPara.getParameter<std::vector<edm::InputTag> >(tagMiniAOD);
115  size_t maxSize = std::max(tagsAOD.size(), tagsMiniAOD.size());
116  tokens.clear();
117  tokens.resize(maxSize);
118  if (format.tryAOD()) {
119  for (size_t tagNr = 0; tagNr < tagsAOD.size(); tagNr++) {
120  setToken(tokens[tagNr].aod, tagsAOD[tagNr]);
121  }
122  }
123  if (format.tryMiniAOD()) {
124  for (size_t tagNr = 0; tagNr < tagsMiniAOD.size(); tagNr++) {
125  setToken(tokens[tagNr].miniAOD, tagsMiniAOD[tagNr]);
126  }
127  }
128  }
T getParameter(std::string const &) const
miniAOD
Definition: PAT_cff.py:15
void setToken(edm::EDGetTokenT< T > &token, edm::InputTag tag)
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 297 of file ElectronHEEPIDValueMapProducer.cc.

References edm::helper::Filler< Map >::fill(), trigObjTnPSource_cfi::filler, patZpeak::handle, edm::helper::Filler< Map >::insert(), eostools::move(), and edm::Event::put().

Referenced by ElectronHEEPIDValueMapProducer::DataFormat::operator()(), and produce().

300  {
301  std::unique_ptr<edm::ValueMap<T> > valMap(new edm::ValueMap<T>());
302  typename edm::ValueMap<T>::Filler filler(*valMap);
303  filler.insert(handle, values.begin(), values.end());
304  filler.fill();
305  iEvent.put(std::move(valMap), label);
306 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
char const * label
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

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

Definition at line 180 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 179 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 186 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 187 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

DataFormat ElectronHEEPIDValueMapProducer::dataFormat_
private

Definition at line 185 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer().

DualToken<EcalRecHitCollection> ElectronHEEPIDValueMapProducer::ebRecHitToken_
private

Definition at line 176 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

DualToken<EcalRecHitCollection> ElectronHEEPIDValueMapProducer::eeRecHitToken_
private

Definition at line 177 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 191 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 178 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 190 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 189 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

bool ElectronHEEPIDValueMapProducer::makeTrkIso04_
private

Definition at line 184 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

EleTkIsolFromCands ElectronHEEPIDValueMapProducer::trkIso04Calc_
private

Definition at line 183 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by produce().

EleTkIsolFromCands ElectronHEEPIDValueMapProducer::trkIsoCalc_
private

Definition at line 182 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by produce().