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<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

class  DataFormat
 
struct  DualToken
 

Public Member Functions

 ElectronHEEPIDValueMapProducer (const edm::ParameterSet &)
 
 ~ElectronHEEPIDValueMapProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

float calTrkIso (const reco::GsfElectron &ele, const edm::View< reco::GsfElectron > &eles, const std::vector< edm::Handle< pat::PackedCandidateCollection > > &handles)
 
template<typename T >
edm::Handle< TgetHandle (const edm::Event &iEvent, const edm::EDGetTokenT< T > &token)
 
template<typename T >
edm::Handle< TgetHandle (const edm::Event &iEvent, const DualToken< T > &token)
 
template<typename T >
std::vector< edm::Handle< T > > getHandles (const edm::Event &iEvent, const std::vector< DualToken< T > > &tokens)
 
virtual 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 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_
 
DataFormat dataFormat_
 
DualToken< EcalRecHitCollectionebRecHitToken_
 
DualToken< EcalRecHitCollectioneeRecHitToken_
 
DualToken< edm::View< reco::GsfElectron > > eleToken_
 
EleTkIsolFromCands trkIsoCalc_
 

Static Private Attributes

static const std::string eleNrSaturateIn5x5Label_ ="eleNrSaturateIn5x5"
 
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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 32 of file ElectronHEEPIDValueMapProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 153 of file ElectronHEEPIDValueMapProducer.cc.

References beamSpotToken_, candTokens_, dataFormat_, ebRecHitToken_, eeRecHitToken_, eleNrSaturateIn5x5Label_, eleToken_, eleTrkPtIsoLabel_, and setToken().

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

153  :
154  trkIsoCalc_(iConfig.getParameter<edm::ParameterSet>("trkIsoConfig")),
155  dataFormat_(iConfig.getParameter<int>("dataFormat"))
156 {
157  setToken(ebRecHitToken_,iConfig,"ebRecHitsAOD","ebRecHitsMiniAOD",dataFormat_);
158  setToken(eeRecHitToken_,iConfig,"eeRecHitsAOD","eeRecHitsMiniAOD",dataFormat_);
159  setToken(eleToken_,iConfig,"elesAOD","elesMiniAOD",dataFormat_);
160  setToken(candTokens_,iConfig,"candsAOD","candsMiniAOD",dataFormat_);
161  setToken(beamSpotToken_,iConfig,"beamSpot");
162 
163  produces<edm::ValueMap<float> >(eleTrkPtIsoLabel_);
164  produces<edm::ValueMap<int> >(eleNrSaturateIn5x5Label_);
165 }
T getParameter(std::string const &) const
DualToken< EcalRecHitCollection > ebRecHitToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::vector< DualToken< pat::PackedCandidateCollection > > candTokens_
DualToken< edm::View< reco::GsfElectron > > eleToken_
DualToken< EcalRecHitCollection > eeRecHitToken_
void setToken(edm::EDGetTokenT< T > &token, edm::InputTag tag)
ElectronHEEPIDValueMapProducer::~ElectronHEEPIDValueMapProducer ( )

Definition at line 167 of file ElectronHEEPIDValueMapProducer.cc.

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

168 {
169 
170 }

Member Function Documentation

float ElectronHEEPIDValueMapProducer::calTrkIso ( const reco::GsfElectron ele,
const edm::View< reco::GsfElectron > &  eles,
const std::vector< edm::Handle< pat::PackedCandidateCollection > > &  handles 
)
private

Definition at line 207 of file ElectronHEEPIDValueMapProducer.cc.

References EleTkIsolFromCands::calIsolPt(), reco::GsfElectron::gsfTrack(), cmsBatch::handle, edm::Ref< C, T, F >::isNull(), hpstanc_transforms::max, and trkIsoCalc_.

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

210 {
211  if(ele.gsfTrack().isNull()) return std::numeric_limits<float>::max();
212  else{
213  float trkIso=0.;
214  for(auto& handle: handles){
215  if(handle.isValid()){
216  trkIso+= trkIsoCalc_.calIsolPt(*ele.gsfTrack(),*handle,eles);
217  }
218  }
219  return trkIso;
220  }
221 }
double calIsolPt(const reco::TrackBase &trk, const pat::PackedCandidateCollection &cands, const edm::View< reco::GsfElectron > &eles)
bool isNull() const
Checks for null.
Definition: Ref.h:250
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:185
void ElectronHEEPIDValueMapProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 236 of file ElectronHEEPIDValueMapProducer.cc.

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

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

236  {
237 
239  desc.add<edm::InputTag>("beamSpot",edm::InputTag("offlineBeamSpot"));
240  desc.add<edm::InputTag>("ebRecHitsAOD",edm::InputTag("reducedEcalRecHitsEB"));
241  desc.add<edm::InputTag>("eeRecHitsAOD",edm::InputTag("reducedEcalRecHitsEE"));
242  desc.add<std::vector<edm::InputTag> >("candsAOD",{edm::InputTag("packedCandidates")});
243  desc.add<edm::InputTag>("elesAOD",edm::InputTag("gedGsfElectrons"));
244 
245  desc.add<edm::InputTag>("ebRecHitsMiniAOD",edm::InputTag("reducedEcalRecHitsEB"));
246  desc.add<edm::InputTag>("eeRecHitsMiniAOD",edm::InputTag("reducedEcalRecHitsEE"));
247  desc.add<std::vector<edm::InputTag> >("candsMiniAOD",{edm::InputTag("packedCandidates")});
248  desc.add<edm::InputTag>("elesMiniAOD",edm::InputTag("gedGsfElectrons"));
249  desc.add<int>("dataFormat",0);
250 
251  desc.add("trkIsoConfig",EleTkIsolFromCands::pSetDescript());
252 
253  descriptions.addDefault(desc);
254 }
void addDefault(ParameterSetDescription const &psetDescription)
static edm::ParameterSetDescription pSetDescript()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
template<typename T >
edm::Handle<T> ElectronHEEPIDValueMapProducer::getHandle ( const edm::Event iEvent,
const edm::EDGetTokenT< T > &  token 
)
inlineprivate

Definition at line 107 of file ElectronHEEPIDValueMapProducer.cc.

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

Referenced by produce().

107  {
109  iEvent.getByToken(token,handle);
110  return handle;
111  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
template<typename T >
edm::Handle<T> ElectronHEEPIDValueMapProducer::getHandle ( const edm::Event iEvent,
const DualToken< T > &  token 
)
inlineprivate

Definition at line 112 of file ElectronHEEPIDValueMapProducer.cc.

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

112  {
114  if(!token.aod.isUninitialized()) iEvent.getByToken(token.aod,handle);
115  if(!handle.isValid() && !token.miniAOD.isUninitialized()) iEvent.getByToken(token.miniAOD,handle);
116  return handle;
117  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
bool isValid() const
Definition: HandleBase.h:74
template<typename T >
std::vector<edm::Handle<T> > ElectronHEEPIDValueMapProducer::getHandles ( const edm::Event iEvent,
const std::vector< DualToken< T > > &  tokens 
)
inlineprivate

Definition at line 119 of file ElectronHEEPIDValueMapProducer.cc.

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

Referenced by produce().

119  {
120  std::vector<edm::Handle<T> > handles(tokens.size());
121  if(tokens.empty()) return handles;
122  if(!tokens[0].aod.isUninitialized()) iEvent.getByToken(tokens[0].aod,handles[0]);
123  bool isAOD = handles[0].isValid();
124  if(!isAOD && !tokens[0].miniAOD.isUninitialized() ) iEvent.getByToken(tokens[0].miniAOD,handles[0]);
125 
126  for(size_t tokenNr=1;tokenNr<tokens.size();tokenNr++){
127  auto token = isAOD ? tokens[tokenNr].aod : tokens[tokenNr].miniAOD;
128  if(!token.isUninitialized()) iEvent.getByToken(token,handles[tokenNr]);
129  }
130  return handles;
131  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
int ElectronHEEPIDValueMapProducer::nrSaturatedCrysIn5x5 ( const reco::GsfElectron ele,
edm::Handle< EcalRecHitCollection > &  ebHits,
edm::Handle< EcalRecHitCollection > &  eeHits,
edm::ESHandle< CaloTopology > &  caloTopo 
)
staticprivate

Definition at line 196 of file ElectronHEEPIDValueMapProducer.cc.

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

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

200 {
201  DetId id = ele.superCluster()->seed()->seed();
202  auto recHits = id.subdetId()==EcalBarrel ? ebHits.product() : eeHits.product();
203  return noZS::EcalClusterTools::nrSaturatedCrysIn5x5(id,recHits,caloTopo.product());
204 
205 }
static int nrSaturatedCrysIn5x5(const DetId &id, const EcalRecHitCollection *recHits, const CaloTopology *topology)
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:184
Definition: DetId.h:18
T const * product() const
Definition: Handle.h:81
T const * product() const
Definition: ESHandle.h:86
void ElectronHEEPIDValueMapProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Definition at line 172 of file ElectronHEEPIDValueMapProducer.cc.

References beamSpotToken_, calTrkIso(), candTokens_, ebRecHitToken_, eeRecHitToken_, eleNrSaturateIn5x5Label_, eleToken_, eleTrkPtIsoLabel_, edm::EventSetup::get(), getHandle(), getHandles(), nrSaturatedCrysIn5x5(), and writeValueMap().

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

173 {
174  auto eleHandle = getHandle(iEvent,eleToken_);
175  auto ebRecHitHandle = getHandle(iEvent,ebRecHitToken_);
176  auto eeRecHitHandle = getHandle(iEvent,eeRecHitToken_);
177  auto beamSpotHandle = getHandle(iEvent,beamSpotToken_);
178  auto candHandles = getHandles(iEvent,candTokens_);
179 
180 
181  edm::ESHandle<CaloTopology> caloTopoHandle;
182  iSetup.get<CaloTopologyRecord>().get(caloTopoHandle);
183 
184  std::vector<float> eleTrkPtIso;
185  std::vector<int> eleNrSaturateIn5x5;
186  for(size_t eleNr=0;eleNr<eleHandle->size();eleNr++){
187  auto elePtr = eleHandle->ptrAt(eleNr);
188  eleTrkPtIso.push_back(calTrkIso(*elePtr,*eleHandle,candHandles));
189  eleNrSaturateIn5x5.push_back(nrSaturatedCrysIn5x5(*elePtr,ebRecHitHandle,eeRecHitHandle,caloTopoHandle));
190  }
191 
192  writeValueMap(iEvent,eleHandle,eleTrkPtIso,eleTrkPtIsoLabel_);
193  writeValueMap(iEvent,eleHandle,eleNrSaturateIn5x5,eleNrSaturateIn5x5Label_);
194 }
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< edm::Handle< T > > getHandles(const edm::Event &iEvent, const std::vector< DualToken< T > > &tokens)
DualToken< edm::View< reco::GsfElectron > > eleToken_
DualToken< EcalRecHitCollection > eeRecHitToken_
float calTrkIso(const reco::GsfElectron &ele, const edm::View< reco::GsfElectron > &eles, const std::vector< edm::Handle< pat::PackedCandidateCollection > > &handles)
const T & get() const
Definition: EventSetup.h:55
edm::Handle< T > getHandle(const edm::Event &iEvent, const edm::EDGetTokenT< 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

Definition at line 77 of file ElectronHEEPIDValueMapProducer.cc.

References edm::ParameterSet::getParameter(), setToken(), GlobalPosition_Frontier_DevDB_cff::tag, and JetPlusTrackCorrections_cff::tagName.

77  {
78  auto tags =iPara.getParameter<std::vector<edm::InputTag> >(tagName);
79  for(auto& tag : tags) {
80  edm::EDGetTokenT<T> token;
81  setToken(token,tag);
82  tokens.push_back(token);
83  }
84  }
T getParameter(std::string const &) const
void setToken(edm::EDGetTokenT< T > &token, edm::InputTag tag)
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 89 of file ElectronHEEPIDValueMapProducer.cc.

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

89  {
90  auto tagsAOD =iPara.getParameter<std::vector<edm::InputTag> >(tagAOD);
91  auto tagsMiniAOD =iPara.getParameter<std::vector<edm::InputTag> >(tagMiniAOD);
92  size_t maxSize = std::max(tagsAOD.size(),tagsMiniAOD.size());
93  tokens.clear();
94  tokens.resize(maxSize);
95  if(format.tryAOD()){
96  for(size_t tagNr=0;tagNr<tagsAOD.size();tagNr++) {
97  setToken(tokens[tagNr].aod,tagsAOD[tagNr]);
98  }
99  }
100  if(format.tryMiniAOD()){
101  for(size_t tagNr=0;tagNr<tagsMiniAOD.size();tagNr++) {
102  setToken(tokens[tagNr].miniAOD,tagsMiniAOD[tagNr]);
103  }
104  }
105  }
T getParameter(std::string const &) const
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 224 of file ElectronHEEPIDValueMapProducer.cc.

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

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

228 {
229  std::unique_ptr<edm::ValueMap<T> > valMap(new edm::ValueMap<T>());
230  typename edm::ValueMap<T>::Filler filler(*valMap);
231  filler.insert(handle, values.begin(), values.end());
232  filler.fill();
233  iEvent.put(std::move(valMap),label);
234 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

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

Definition at line 139 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 138 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

DataFormat ElectronHEEPIDValueMapProducer::dataFormat_
private

Definition at line 142 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer().

DualToken<EcalRecHitCollection> ElectronHEEPIDValueMapProducer::ebRecHitToken_
private

Definition at line 135 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

DualToken<EcalRecHitCollection> ElectronHEEPIDValueMapProducer::eeRecHitToken_
private

Definition at line 136 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 145 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 137 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

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

Definition at line 144 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by ElectronHEEPIDValueMapProducer(), and produce().

EleTkIsolFromCands ElectronHEEPIDValueMapProducer::trkIsoCalc_
private

Definition at line 141 of file ElectronHEEPIDValueMapProducer.cc.

Referenced by calTrkIso().