CMS 3D CMS Logo

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

Public Member Functions

void beginRun (edm::Run const &, const edm::EventSetup &) final
 
void produce (edm::Event &evt, const edm::EventSetup &es) final
 
 ReducedEGProducer (const edm::ParameterSet &ps)
 
- 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 Member Functions

void linkCaloCluster (const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
 
void linkCaloClusters (const reco::SuperCluster &superCluster, reco::CaloClusterCollection &ebeeClusters, std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, std::unordered_set< DetId > &rechitMap, const edm::Handle< EcalRecHitCollection > &barrelHitHandle, const edm::Handle< EcalRecHitCollection > &endcapHitHandle, CaloTopology const &caloTopology, reco::CaloClusterCollection &esClusters, std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap)
 
void linkConversion (const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
 
void linkConversions (const reco::ConversionRefVector &convrefs, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
 
void linkConversionsByTrackRef (const edm::Handle< reco::ConversionCollection > &conversionHandle, const reco::GsfElectron &gsfElectron, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
 
void linkConversionsByTrackRef (const edm::Handle< reco::ConversionCollection > &conversionHandle, const reco::SuperCluster &superCluster, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
 
template<typename T , typename U >
void linkCore (const T &core, U &cores, std::map< T, unsigned int > &coreMap)
 
void linkHcalHits (const reco::SuperCluster &superClus, const HBHERecHitCollection &recHits, std::unordered_set< DetId > &hcalDetIds)
 
void linkSuperCluster (const reco::SuperClusterRef &superCluster, std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, reco::SuperClusterCollection &superClusters, const bool relink, std::unordered_set< unsigned int > &superClusterFullRelinkMap)
 
void relinkCaloClusters (reco::SuperCluster &superCluster, const std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, const std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap, const edm::OrphanHandle< reco::CaloClusterCollection > &outEBEEClusterHandle, const edm::OrphanHandle< reco::CaloClusterCollection > &outESClusterHandle)
 
void relinkConversions (reco::PhotonCore &photonCore, const reco::ConversionRefVector &convrefs, const std::map< reco::ConversionRef, unsigned int > &conversionMap, const edm::OrphanHandle< reco::ConversionCollection > &outConversionHandle)
 
void relinkGsfElectronCore (reco::GsfElectron &gsfElectron, const std::map< reco::GsfElectronCoreRef, unsigned int > &gsfElectronCoreMap, const edm::OrphanHandle< reco::GsfElectronCoreCollection > &outGsfElectronCoreHandle)
 
void relinkGsfTrack (reco::GsfElectronCore &electroncore, const std::map< reco::GsfTrackRef, unsigned int > &gsfTrackMap, const edm::OrphanHandle< reco::GsfTrackCollection > &outGsfTrackHandle)
 
void relinkPhotonCore (reco::Photon &photon, const std::map< reco::PhotonCoreRef, unsigned int > &photonCoreMap, const edm::OrphanHandle< reco::PhotonCoreCollection > &outPhotonCoreHandle)
 
template<typename T >
void relinkSuperCluster (T &core, const std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, const edm::OrphanHandle< reco::SuperClusterCollection > &outSuperClusterHandle)
 
template<typename T >
void setToken (edm::EDGetTokenT< T > &token, const edm::ParameterSet &config, const std::string &name)
 
template<class T >
std::vector< edm::EDPutTokenT< T > > vproduces (std::vector< std::string > const &labels)
 

Static Private Member Functions

static void calibrateElectron (reco::GsfElectron &gsfElectron, const reco::GsfElectronRef &oldEleRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap, const edm::ValueMap< float > &ecalEnergyMap, const edm::ValueMap< float > &ecalEnergyErrMap)
 
static void calibratePhoton (reco::Photon &photon, const reco::PhotonRef &oldPhoRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap)
 

Private Attributes

const bool applyGsfElectronCalibOnData_
 
const bool applyGsfElectronCalibOnMC_
 
const bool applyPhotonCalibOnData_
 
const bool applyPhotonCalibOnMC_
 
const edm::EDGetTokenT< EcalRecHitCollectionbarrelEcalHits_
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordcaloTopology_
 
const edm::EDGetTokenT< reco::ConversionCollectionconversionT_
 
const bool doPreshowerEcalHits_
 
const edm::EDGetTokenT< EcalRecHitCollectionendcapEcalHits_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyErrT_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyT_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyErrT_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyT_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronFloatValueMapTs_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
 
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
 
const edm::EDGetTokenT< reco::GsfElectronCollectiongsfElectronT_
 
const edm::EDGetTokenT< HBHERecHitCollectionhbheHits_
 
EGHcalRecHitSelector hcalHitSel_
 
const StringCutObjectSelector< reco::GsfElectronkeepGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonkeepOOTPhotonSel_
 
const StringCutObjectSelector< reco::PhotonkeepPhotonSel_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonFloatValueMapTs_
 
edm::EDGetTokenT< reco::PhotonCollectionootPhotonT_
 
const edm::EDPutTokenT< reco::ConversionCollectionoutConversions_
 
const edm::EDPutTokenT< reco::CaloClusterCollectionoutEBEEClusters_
 
const edm::EDPutTokenT< EcalRecHitCollectionoutEBRecHits_
 
const edm::EDPutTokenT< EcalRecHitCollectionoutEERecHits_
 
const edm::EDPutTokenT< reco::CaloClusterCollectionoutESClusters_
 
edm::EDPutTokenT< EcalRecHitCollectionoutESRecHits_
 
const edm::EDPutTokenT< reco::GsfElectronCoreCollectionoutGsfElectronCores_
 
const std::vector< edm::EDPutTokenT< edm::ValueMap< float > > > outGsfElectronFloatValueMaps_
 
const std::vector< edm::EDPutTokenT< edm::ValueMap< float > > > outGsfElectronIds_
 
const edm::EDPutTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > outGsfElectronPfCandMap_
 
const edm::EDPutTokenT< reco::GsfElectronCollectionoutGsfElectrons_
 
const edm::EDPutTokenT< reco::GsfTrackCollectionoutGsfTracks_
 
const edm::EDPutTokenT< HBHERecHitCollectionoutHBHERecHits_
 
edm::EDPutTokenT< reco::CaloClusterCollectionoutOOTEBEEClusters_
 
edm::EDPutTokenT< reco::CaloClusterCollectionoutOOTESClusters_
 
edm::EDPutTokenT< reco::PhotonCoreCollectionoutOOTPhotonCores_
 
std::vector< edm::EDPutTokenT< edm::ValueMap< float > > > outOOTPhotonFloatValueMaps_
 
edm::EDPutTokenT< reco::PhotonCollectionoutOOTPhotons_
 
edm::EDPutTokenT< reco::SuperClusterCollectionoutOOTSuperClusters_
 
const edm::EDPutTokenT< reco::PhotonCoreCollectionoutPhotonCores_
 
const std::vector< edm::EDPutTokenT< edm::ValueMap< float > > > outPhotonFloatValueMaps_
 
const std::vector< edm::EDPutTokenT< edm::ValueMap< bool > > > outPhotonIds_
 
const edm::EDPutTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > outPhotonPfCandMap_
 
const edm::EDPutTokenT< reco::PhotonCollectionoutPhotons_
 
const edm::EDPutTokenT< reco::ConversionCollectionoutSingleConversions_
 
const edm::EDPutTokenT< reco::SuperClusterCollectionoutSuperClusters_
 
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyErrT_
 
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyT_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonFloatValueMapTs_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
 
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
 
const edm::EDGetTokenT< reco::PhotonCollectionphotonT_
 
const edm::EDGetTokenT< EcalRecHitCollectionpreshowerEcalHits_
 
const edm::EDGetTokenT< reco::HIPhotonIsolationMaprecoHIPhotonIsolationMapInputToken_
 
edm::EDPutTokenT< reco::HIPhotonIsolationMaprecoHIPhotonIsolationMapOutputName_
 
const StringCutObjectSelector< reco::GsfElectronrelinkGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonrelinkOOTPhotonSel_
 
const StringCutObjectSelector< reco::PhotonrelinkPhotonSel_
 
const double relinkSuperclusterPtMin_
 
const double scAbsetaMax_
 
const double scPtMin_
 
const edm::EDGetTokenT< reco::ConversionCollectionsingleConversionT_
 
const StringCutObjectSelector< reco::GsfElectronslimRelinkGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonslimRelinkOOTPhotonSel_
 
const StringCutObjectSelector< reco::PhotonslimRelinkPhotonSel_
 
const edm::EDGetTokenT< reco::SuperClusterCollectionsuperclusterT_
 

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

Select subset of electrons and photons from input collections and produced consistently relinked output collections including associated SuperClusters, CaloClusters and ecal RecHits

Author
J.Bendavid (CERN) : K. McDermott(Cornell) : refactored code + out of time photons

Definition at line 47 of file ReducedEGProducer.cc.

Constructor & Destructor Documentation

◆ ReducedEGProducer()

ReducedEGProducer::ReducedEGProducer ( const edm::ParameterSet ps)

Definition at line 270 of file ReducedEGProducer.cc.

References label.

271  : superclusterT_(consumes(config.getParameter<edm::InputTag>("pflowSuperclusters"))),
272  photonT_(consumes(config.getParameter<edm::InputTag>("photons"))),
273  gsfElectronT_(consumes(config.getParameter<edm::InputTag>("gsfElectrons"))),
274  conversionT_(consumes(config.getParameter<edm::InputTag>("conversions"))),
275  singleConversionT_(consumes(config.getParameter<edm::InputTag>("singleConversions"))),
276  barrelEcalHits_(consumes(config.getParameter<edm::InputTag>("barrelEcalHits"))),
277  endcapEcalHits_(consumes(config.getParameter<edm::InputTag>("endcapEcalHits"))),
278  doPreshowerEcalHits_(!config.getParameter<edm::InputTag>("preshowerEcalHits").label().empty()),
280  ? consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("preshowerEcalHits"))
281  : edm::EDGetTokenT<EcalRecHitCollection>()),
282  hbheHits_(consumes<HBHERecHitCollection>(config.getParameter<edm::InputTag>("hbheHits"))),
283  photonPfCandMapT_(consumes(config.getParameter<edm::InputTag>("photonsPFValMap"))),
284  gsfElectronPfCandMapT_(consumes(config.getParameter<edm::InputTag>("gsfElectronsPFValMap"))),
286  !config.getParameter<edm::InputTag>("hiPhotonIsolationMapInput").label().empty()
287  ? consumes<reco::HIPhotonIsolationMap>(config.getParameter<edm::InputTag>("hiPhotonIsolationMapInput"))
288  : edm::EDGetTokenT<reco::HIPhotonIsolationMap>{}},
289  scPtMin_(config.getParameter<double>("keepPfSuperclusterPtMin")),
290  scAbsetaMax_(config.getParameter<double>("keepPfSuperclusterAbsetaMax")),
291  relinkSuperclusterPtMin_(config.getParameter<double>("relinkSuperclusterPtMin")),
292  //calibration flags
293  applyPhotonCalibOnData_(config.getParameter<bool>("applyPhotonCalibOnData")),
294  applyPhotonCalibOnMC_(config.getParameter<bool>("applyPhotonCalibOnMC")),
295  applyGsfElectronCalibOnData_(config.getParameter<bool>("applyGsfElectronCalibOnData")),
296  applyGsfElectronCalibOnMC_(config.getParameter<bool>("applyGsfElectronCalibOnMC")),
297  //output collections
298  outPhotons_{produces<reco::PhotonCollection>("reducedGedPhotons")},
299  outPhotonCores_{produces<reco::PhotonCoreCollection>("reducedGedPhotonCores")},
300  outGsfElectrons_{produces<reco::GsfElectronCollection>("reducedGedGsfElectrons")},
301  outGsfElectronCores_{produces<reco::GsfElectronCoreCollection>("reducedGedGsfElectronCores")},
302  outGsfTracks_{produces<reco::GsfTrackCollection>("reducedGsfTracks")},
303  outConversions_{produces<reco::ConversionCollection>("reducedConversions")},
304  outSingleConversions_{produces<reco::ConversionCollection>("reducedSingleLegConversions")},
305  outSuperClusters_{produces<reco::SuperClusterCollection>("reducedSuperClusters")},
306  outEBEEClusters_{produces<reco::CaloClusterCollection>("reducedEBEEClusters")},
307  outESClusters_{produces<reco::CaloClusterCollection>("reducedESClusters")},
308  outEBRecHits_{produces<EcalRecHitCollection>("reducedEBRecHits")},
309  outEERecHits_{produces<EcalRecHitCollection>("reducedEERecHits")},
310  outHBHERecHits_{produces<HBHERecHitCollection>("reducedHBHEHits")},
311  outPhotonPfCandMap_{produces<edm::ValueMap<std::vector<reco::PFCandidateRef>>>("reducedPhotonPfCandMap")},
312  outGsfElectronPfCandMap_{
313  produces<edm::ValueMap<std::vector<reco::PFCandidateRef>>>("reducedGsfElectronPfCandMap")},
314  outPhotonIds_{vproduces<edm::ValueMap<bool>>(config.getParameter<std::vector<std::string>>("photonIDOutput"))},
315  outGsfElectronIds_{
316  vproduces<edm::ValueMap<float>>(config.getParameter<std::vector<std::string>>("gsfElectronIDOutput"))},
317  outPhotonFloatValueMaps_{
318  vproduces<edm::ValueMap<float>>(config.getParameter<std::vector<std::string>>("photonFloatValueMapOutput"))},
319  outGsfElectronFloatValueMaps_{vproduces<edm::ValueMap<float>>(
320  config.getParameter<std::vector<std::string>>("gsfElectronFloatValueMapOutput"))},
321  keepPhotonSel_(config.getParameter<std::string>("keepPhotons")),
322  slimRelinkPhotonSel_(config.getParameter<std::string>("slimRelinkPhotons")),
323  relinkPhotonSel_(config.getParameter<std::string>("relinkPhotons")),
324  keepOOTPhotonSel_(config.getParameter<std::string>("keepOOTPhotons")),
325  slimRelinkOOTPhotonSel_(config.getParameter<std::string>("slimRelinkOOTPhotons")),
326  relinkOOTPhotonSel_(config.getParameter<std::string>("relinkOOTPhotons")),
327  keepGsfElectronSel_(config.getParameter<std::string>("keepGsfElectrons")),
328  slimRelinkGsfElectronSel_(config.getParameter<std::string>("slimRelinkGsfElectrons")),
329  relinkGsfElectronSel_(config.getParameter<std::string>("relinkGsfElectrons")),
330  hcalHitSel_(config.getParameter<edm::ParameterSet>("hcalHitSel"), consumesCollector()) {
331  const auto& aTag = config.getParameter<edm::InputTag>("ootPhotons");
332  caloTopology_ = esConsumes();
333  if (not aTag.label().empty())
334  ootPhotonT_ = consumes<reco::PhotonCollection>(aTag);
335 
336  for (const edm::InputTag& tag : config.getParameter<std::vector<edm::InputTag>>("photonIDSources")) {
337  photonIdTs_.emplace_back(consumes<edm::ValueMap<bool>>(tag));
338  }
339 
340  for (const edm::InputTag& tag : config.getParameter<std::vector<edm::InputTag>>("gsfElectronIDSources")) {
341  gsfElectronIdTs_.emplace_back(consumes<edm::ValueMap<float>>(tag));
342  }
343 
344  for (const edm::InputTag& tag : config.getParameter<std::vector<edm::InputTag>>("photonFloatValueMapSources")) {
345  photonFloatValueMapTs_.emplace_back(consumes<edm::ValueMap<float>>(tag));
346  }
347 
348  for (const edm::InputTag& tag : config.getParameter<std::vector<edm::InputTag>>("ootPhotonFloatValueMapSources")) {
349  ootPhotonFloatValueMapTs_.emplace_back(consumes<edm::ValueMap<float>>(tag));
350  }
351 
352  for (const edm::InputTag& tag : config.getParameter<std::vector<edm::InputTag>>("gsfElectronFloatValueMapSources")) {
353  gsfElectronFloatValueMapTs_.emplace_back(consumes<edm::ValueMap<float>>(tag));
354  }
355 
356  if (applyPhotonCalibOnData_ || applyPhotonCalibOnMC_) {
357  setToken(photonCalibEnergyT_, config, "photonCalibEnergySource");
358  setToken(photonCalibEnergyErrT_, config, "photonCalibEnergyErrSource");
359  }
360  if (applyGsfElectronCalibOnData_ || applyGsfElectronCalibOnMC_) {
361  setToken(gsfElectronCalibEnergyT_, config, "gsfElectronCalibEnergySource");
362  setToken(gsfElectronCalibEnergyErrT_, config, "gsfElectronCalibEnergyErrSource");
363  setToken(gsfElectronCalibEcalEnergyT_, config, "gsfElectronCalibEcalEnergySource");
364  setToken(gsfElectronCalibEcalEnergyErrT_, config, "gsfElectronCalibEcalEnergyErrSource");
365  }
366 
367  if (!ootPhotonT_.isUninitialized()) {
368  outOOTPhotons_ = produces<reco::PhotonCollection>("reducedOOTPhotons");
369  outOOTPhotonCores_ = produces<reco::PhotonCoreCollection>("reducedOOTPhotonCores");
370  outOOTSuperClusters_ = produces<reco::SuperClusterCollection>("reducedOOTSuperClusters");
371  outOOTEBEEClusters_ = produces<reco::CaloClusterCollection>("reducedOOTEBEEClusters");
372  outOOTESClusters_ = produces<reco::CaloClusterCollection>("reducedOOTESClusters");
373  }
374  if (doPreshowerEcalHits_) {
375  outESRecHits_ = produces<EcalRecHitCollection>("reducedESRecHits");
376  }
377  if (!ootPhotonT_.isUninitialized()) {
378  outOOTPhotonFloatValueMaps_ =
379  vproduces<edm::ValueMap<float>>(config.getParameter<std::vector<std::string>>("ootPhotonFloatValueMapOutput"));
380  }
381  if (!recoHIPhotonIsolationMapInputToken_.isUninitialized()) {
382  recoHIPhotonIsolationMapOutputName_ =
383  produces<reco::HIPhotonIsolationMap>(config.getParameter<std::string>("hiPhotonIsolationMapOutput"));
384  }
385 }
const bool doPreshowerEcalHits_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
const edm::EDGetTokenT< reco::HIPhotonIsolationMap > recoHIPhotonIsolationMapInputToken_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronT_
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
Definition: config.py:1
std::string const & label() const
Definition: InputTag.h:36
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
const edm::EDGetTokenT< EcalRecHitCollection > preshowerEcalHits_
char const * label
const edm::EDGetTokenT< reco::SuperClusterCollection > superclusterT_
const edm::EDGetTokenT< HBHERecHitCollection > hbheHits_
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
fixed size matrix
HLT enums.
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
edm::ValueMap< reco::HIPhotonIsolation > HIPhotonIsolationMap
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_

Member Function Documentation

◆ beginRun()

void ReducedEGProducer::beginRun ( edm::Run const &  run,
const edm::EventSetup iSetup 
)
final

Definition at line 387 of file ReducedEGProducer.cc.

References hcalHitSel_, and EGHcalRecHitSelector::setup().

387 { hcalHitSel_.setup(iSetup); }
EGHcalRecHitSelector hcalHitSel_
void setup(const edm::EventSetup &iSetup)

◆ calibrateElectron()

void ReducedEGProducer::calibrateElectron ( reco::GsfElectron gsfElectron,
const reco::GsfElectronRef oldEleRef,
const edm::ValueMap< float > &  energyMap,
const edm::ValueMap< float > &  energyErrMap,
const edm::ValueMap< float > &  ecalEnergyMap,
const edm::ValueMap< float > &  ecalEnergyErrMap 
)
staticprivate

Definition at line 1233 of file ReducedEGProducer.cc.

References alignCSCRings::corr, and HPSPFTauProducerPuppi_cfi::electron.

Referenced by produce().

1238  {
1239  const float newEnergy = energyMap[oldEleRef];
1240  const float newEnergyErr = energyErrMap[oldEleRef];
1241  const float newEcalEnergy = ecalEnergyMap[oldEleRef];
1242  const float newEcalEnergyErr = ecalEnergyErrMap[oldEleRef];
1243 
1244  //make a copy of this as the setCorrectedEcalEnergy call with modifiy the electrons p4
1245  const math::XYZTLorentzVector oldP4 = electron.p4();
1246  const float corr = newEnergy / oldP4.E();
1247 
1248  electron.setCorrectedEcalEnergy(newEcalEnergy);
1249  electron.setCorrectedEcalEnergyError(newEcalEnergyErr);
1250 
1251  math::XYZTLorentzVector newP4{oldP4.x() * corr, oldP4.y() * corr, oldP4.z() * corr, newEnergy};
1252  electron.correctMomentum(newP4, electron.trackMomentumError(), newEnergyErr);
1253 }
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
dictionary corr

◆ calibratePhoton()

void ReducedEGProducer::calibratePhoton ( reco::Photon photon,
const reco::PhotonRef oldPhoRef,
const edm::ValueMap< float > &  energyMap,
const edm::ValueMap< float > &  energyErrMap 
)
staticprivate

Definition at line 1224 of file ReducedEGProducer.cc.

References displacedMuons_cfi::photon.

Referenced by produce().

1227  {
1228  float newEnergy = energyMap[oldPhoRef];
1229  float newEnergyErr = energyErrMap[oldPhoRef];
1230  photon.setCorrectedEnergy(reco::Photon::P4type::regression2, newEnergy, newEnergyErr, true);
1231 }

◆ linkCaloCluster()

void ReducedEGProducer::linkCaloCluster ( const reco::CaloClusterPtr caloCluster,
reco::CaloClusterCollection caloClusters,
std::map< reco::CaloClusterPtr, unsigned int > &  caloClusterMap 
)
private

Definition at line 1057 of file ReducedEGProducer.cc.

Referenced by linkCaloClusters(), and produce().

1059  {
1060  if (!caloClusterMap.count(caloCluster)) {
1061  caloClusters.push_back(*caloCluster);
1062  caloClusterMap[caloCluster] = caloClusters.size() - 1;
1063  }
1064 }

◆ linkCaloClusters()

void ReducedEGProducer::linkCaloClusters ( const reco::SuperCluster superCluster,
reco::CaloClusterCollection ebeeClusters,
std::map< reco::CaloClusterPtr, unsigned int > &  ebeeClusterMap,
std::unordered_set< DetId > &  rechitMap,
const edm::Handle< EcalRecHitCollection > &  barrelHitHandle,
const edm::Handle< EcalRecHitCollection > &  endcapHitHandle,
CaloTopology const &  caloTopology,
reco::CaloClusterCollection esClusters,
std::map< reco::CaloClusterPtr, unsigned int > &  esClusterMap 
)
private

Definition at line 1066 of file ReducedEGProducer.cc.

References Reference_intrackfit_cff::barrel, reco::SuperCluster::clusters(), DetId::Ecal, EcalBarrel, EcalEndcap, SiStripPI::getMaximum(), CaloTopology::getSubdetectorTopology(), CaloSubdetectorTopology::getWindow(), linkCaloCluster(), reco::SuperCluster::preshowerClusters(), edm::Handle< T >::product(), and fileCollector::seed.

Referenced by produce().

1074  {
1075  for (const auto& cluster : superCluster.clusters()) {
1076  linkCaloCluster(cluster, ebeeClusters, ebeeClusterMap);
1077 
1078  for (const auto& hitfrac : cluster->hitsAndFractions()) {
1079  rechitMap.insert(hitfrac.first);
1080  }
1081  //make sure to also take all hits in the 5x5 around the max energy xtal
1082  bool barrel = cluster->hitsAndFractions().front().first.subdetId() == EcalBarrel;
1083  const EcalRecHitCollection* rhcol = barrel ? barrelHitHandle.product() : endcapHitHandle.product();
1084  DetId seed = EcalClusterTools::getMaximum(*cluster, rhcol).first;
1085 
1086  std::vector<DetId> dets5x5 =
1087  caloTopology.getSubdetectorTopology(DetId::Ecal, barrel ? EcalBarrel : EcalEndcap)->getWindow(seed, 5, 5);
1088  for (const auto& detid : dets5x5) {
1089  rechitMap.insert(detid);
1090  }
1091  }
1092  for (const auto& cluster : superCluster.preshowerClusters()) {
1093  linkCaloCluster(cluster, esClusters, esClusterMap);
1094 
1095  for (const auto& hitfrac : cluster->hitsAndFractions()) {
1096  rechitMap.insert(hitfrac.first);
1097  }
1098  }
1099 }
T const * product() const
Definition: Handle.h:70
double getMaximum(TObjArray *array)
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:85
Definition: DetId.h:17
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:82
void linkCaloCluster(const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)

◆ linkConversion()

void ReducedEGProducer::linkConversion ( const reco::ConversionRef convref,
reco::ConversionCollection conversions,
std::map< reco::ConversionRef, unsigned int > &  conversionMap 
)
private

Definition at line 1048 of file ReducedEGProducer.cc.

References pwdgSkimBPark_cfi::conversions.

Referenced by linkConversions(), and linkConversionsByTrackRef().

1050  {
1051  if (!conversionMap.count(convref)) {
1052  conversions.push_back(*convref);
1053  conversionMap[convref] = conversions.size() - 1;
1054  }
1055 }

◆ linkConversions()

void ReducedEGProducer::linkConversions ( const reco::ConversionRefVector convrefs,
reco::ConversionCollection conversions,
std::map< reco::ConversionRef, unsigned int > &  conversionMap 
)
private

Definition at line 1008 of file ReducedEGProducer.cc.

References pwdgSkimBPark_cfi::conversions, and linkConversion().

Referenced by produce().

1010  {
1011  for (const auto& convref : convrefs) {
1012  linkConversion(convref, conversions, conversionMap);
1013  }
1014 }
void linkConversion(const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)

◆ linkConversionsByTrackRef() [1/2]

void ReducedEGProducer::linkConversionsByTrackRef ( const edm::Handle< reco::ConversionCollection > &  conversionHandle,
const reco::GsfElectron gsfElectron,
reco::ConversionCollection conversions,
std::map< reco::ConversionRef, unsigned int > &  conversionMap 
)
private

Definition at line 1016 of file ReducedEGProducer.cc.

References edm::conversion(), printConversionInfo::conversionHandle, pwdgSkimBPark_cfi::conversions, linkConversion(), muonTagProbeFilters_cff::matched, and ConversionTools::matchesConversion().

Referenced by produce().

1019  {
1020  int index = 0;
1021  for (const auto& conversion : *conversionHandle) {
1023 
1024  bool matched = ConversionTools::matchesConversion(gsfElectron, conversion, true, true);
1025  if (!matched)
1026  continue;
1027 
1028  linkConversion(convref, conversions, conversionMap);
1029  }
1030 }
static bool matchesConversion(const reco::GsfElectron &ele, const reco::Conversion &conv, bool allowCkfMatch=true, bool allowAmbiguousGsfMatch=false)
void linkConversion(const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
void conversion(EventAux const &from, EventAuxiliary &to)
Definition: EventAux.cc:9

◆ linkConversionsByTrackRef() [2/2]

void ReducedEGProducer::linkConversionsByTrackRef ( const edm::Handle< reco::ConversionCollection > &  conversionHandle,
const reco::SuperCluster superCluster,
reco::ConversionCollection conversions,
std::map< reco::ConversionRef, unsigned int > &  conversionMap 
)
private

Definition at line 1032 of file ReducedEGProducer.cc.

References edm::conversion(), printConversionInfo::conversionHandle, pwdgSkimBPark_cfi::conversions, linkConversion(), muonTagProbeFilters_cff::matched, and ConversionTools::matchesConversion().

1035  {
1036  int index = 0;
1037  for (const auto& conversion : *conversionHandle) {
1039 
1040  bool matched = ConversionTools::matchesConversion(superCluster, conversion, 0.2);
1041  if (!matched)
1042  continue;
1043 
1044  linkConversion(convref, conversions, conversionMap);
1045  }
1046 }
static bool matchesConversion(const reco::GsfElectron &ele, const reco::Conversion &conv, bool allowCkfMatch=true, bool allowAmbiguousGsfMatch=false)
void linkConversion(const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
void conversion(EventAux const &from, EventAuxiliary &to)
Definition: EventAux.cc:9

◆ linkCore()

template<typename T , typename U >
void ReducedEGProducer::linkCore ( const T core,
U &  cores,
std::map< T, unsigned int > &  coreMap 
)
private

Definition at line 979 of file ReducedEGProducer.cc.

References HLT_FULL_cff::cores.

Referenced by produce().

979  {
980  if (!coreMap.count(core)) {
981  cores.push_back(*core);
982  coreMap[core] = cores.size() - 1;
983  }
984 }
Definition: __init__.py:1

◆ linkHcalHits()

void ReducedEGProducer::linkHcalHits ( const reco::SuperCluster superClus,
const HBHERecHitCollection recHits,
std::unordered_set< DetId > &  hcalDetIds 
)
private

Definition at line 1101 of file ReducedEGProducer.cc.

References EGHcalRecHitSelector::addDetIds(), hcalHitSel_, and FastTrackerRecHitMaskProducer_cfi::recHits.

Referenced by produce().

1103  {
1104  hcalHitSel_.addDetIds(superClus, recHits, hcalDetIds);
1105 }
EGHcalRecHitSelector hcalHitSel_
void addDetIds(const reco::SuperCluster &superClus, const HBHERecHitCollection &recHits, CollType &detIdsToStore) const

◆ linkSuperCluster()

void ReducedEGProducer::linkSuperCluster ( const reco::SuperClusterRef superCluster,
std::map< reco::SuperClusterRef, unsigned int > &  superClusterMap,
reco::SuperClusterCollection superClusters,
const bool  relink,
std::unordered_set< unsigned int > &  superClusterFullRelinkMap 
)
private

Definition at line 986 of file ReducedEGProducer.cc.

References HLT_2024v14_cff::superClusters.

Referenced by produce().

990  {
991  const auto& mappedsc = superClusterMap.find(superCluster);
992  //get index in output collection in order to keep track whether superCluster
993  //will be subject to full relinking
994  unsigned int mappedscidx = 0;
995  if (mappedsc == superClusterMap.end()) {
996  superClusters.push_back(*superCluster);
997  mappedscidx = superClusters.size() - 1;
998  superClusterMap[superCluster] = mappedscidx;
999  } else {
1000  mappedscidx = mappedsc->second;
1001  }
1002 
1003  //additionally mark supercluster for full relinking
1004  if (relink)
1005  superClusterFullRelinkMap.insert(mappedscidx);
1006 }

◆ produce()

void ReducedEGProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
final

Definition at line 389 of file ReducedEGProducer.cc.

References funct::abs(), applyGsfElectronCalibOnData_, applyGsfElectronCalibOnMC_, applyPhotonCalibOnData_, applyPhotonCalibOnMC_, barrelEcalHits_, calibrateElectron(), calibratePhoton(), caloTopology_, printConversionInfo::conversionHandle, pwdgSkimBPark_cfi::conversions, conversionT_, doPreshowerEcalHits_, endcapEcalHits_, options_cfi::eventSetup, Exception, gsfElectronCalibEcalEnergyErrT_, gsfElectronCalibEcalEnergyT_, gsfElectronCalibEnergyErrT_, gsfElectronCalibEnergyT_, gsfElectronFloatValueMapTs_, gsfElectronIdTs_, gsfElectronPfCandMapT_, electronIsolatorFromEffectiveArea_cfi::gsfElectrons, gsfElectronT_, ecalDrivenGsfElectronCoresHGC_cff::gsfTracks, hbheHits_, ecalDrivenElectronSeeds_cfi::hbheRecHits, edm::EDGetTokenT< T >::isUninitialized(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, runTheMatrix::keep, keepGsfElectronSel_, keepOOTPhotonSel_, keepPhotonSel_, linkCaloCluster(), linkCaloClusters(), linkConversions(), linkConversionsByTrackRef(), linkCore(), linkHcalHits(), linkSuperCluster(), eostools::move(), ootPhotonCore_cff::ootPhotonCore, ootPhotonFloatValueMapTs_, ootPhotons_cff::ootPhotons, ootPhotonT_, outConversions_, outEBEEClusters_, outEBRecHits_, outEERecHits_, outESClusters_, outESRecHits_, outGsfElectronCores_, outGsfElectronFloatValueMaps_, outGsfElectronIds_, outGsfElectronPfCandMap_, outGsfElectrons_, outGsfTracks_, outHBHERecHits_, outOOTEBEEClusters_, outOOTESClusters_, outOOTPhotonCores_, outOOTPhotonFloatValueMaps_, outOOTPhotons_, outOOTSuperClusters_, outPhotonCores_, outPhotonFloatValueMaps_, outPhotonIds_, outPhotonPfCandMap_, outPhotons_, outSingleConversions_, outSuperClusters_, displacedMuons_cfi::photon, photonCalibEnergyErrT_, photonCalibEnergyT_, photonCore_cfi::photonCore, photonFloatValueMapTs_, photonIdTs_, photonPfCandMapT_, BPHMonitor_cfi::photons, photonT_, preshowerEcalHits_, edm::SortedCollection< T, SORT >::push_back(), recoHIPhotonIsolationMapInputToken_, recoHIPhotonIsolationMapOutputName_, relinkCaloClusters(), relinkConversions(), relinkGsfElectronCore(), relinkGsfElectronSel_, relinkGsfTrack(), relinkOOTPhotonSel_, relinkPhotonCore(), relinkPhotonSel_, relinkSuperCluster(), relinkSuperclusterPtMin_, scAbsetaMax_, scPtMin_, reducedEgamma_cfi::singleConversions, singleConversionT_, slimRelinkGsfElectronSel_, slimRelinkOOTPhotonSel_, slimRelinkPhotonSel_, HLT_2024v14_cff::superClusters, and superclusterT_.

389  {
390  //get input collections
391 
392  auto scHandle = event.getHandle(superclusterT_);
393  auto photonHandle = event.getHandle(photonT_);
394 
395  auto ootPhotonHandle =
397 
398  auto gsfElectronHandle = event.getHandle(gsfElectronT_);
399  auto conversionHandle = event.getHandle(conversionT_);
400  auto singleConversionHandle = event.getHandle(singleConversionT_);
401  auto barrelHitHandle = event.getHandle(barrelEcalHits_);
402  auto endcapHitHandle = event.getHandle(endcapEcalHits_);
403 
404  auto preshowerHitHandle =
406 
407  auto hbheHitHandle = event.getHandle(hbheHits_);
408  auto photonPfCandMapHandle = event.getHandle(photonPfCandMapT_);
409  auto gsfElectronPfCandMapHandle = event.getHandle(gsfElectronPfCandMapT_);
410 
411  auto photonIdHandles = getHandles(event, photonIdTs_);
412  auto gsfElectronIdHandles = getHandles(event, gsfElectronIdTs_);
413  auto photonFloatValueMapHandles = getHandles(event, photonFloatValueMapTs_);
414 
415  auto ootPhotonFloatValueMapHandles = !ootPhotonT_.isUninitialized()
416  ? getHandles(event, ootPhotonFloatValueMapTs_)
417  : std::vector<edm::Handle<edm::ValueMap<float>>>{};
418 
419  auto gsfElectronFloatValueMapHandles = getHandles(event, gsfElectronFloatValueMapTs_);
420 
421  edm::Handle<edm::ValueMap<float>> gsfElectronCalibEnergyHandle;
422  edm::Handle<edm::ValueMap<float>> gsfElectronCalibEnergyErrHandle;
423  edm::Handle<edm::ValueMap<float>> gsfElectronCalibEcalEnergyHandle;
424  edm::Handle<edm::ValueMap<float>> gsfElectronCalibEcalEnergyErrHandle;
426  event.getByToken(gsfElectronCalibEnergyT_, gsfElectronCalibEnergyHandle);
427  event.getByToken(gsfElectronCalibEnergyErrT_, gsfElectronCalibEnergyErrHandle);
428  event.getByToken(gsfElectronCalibEcalEnergyT_, gsfElectronCalibEcalEnergyHandle);
429  event.getByToken(gsfElectronCalibEcalEnergyErrT_, gsfElectronCalibEcalEnergyErrHandle);
430  }
431  edm::Handle<edm::ValueMap<float>> photonCalibEnergyHandle;
432  edm::Handle<edm::ValueMap<float>> photonCalibEnergyErrHandle;
434  event.getByToken(photonCalibEnergyT_, photonCalibEnergyHandle);
435  event.getByToken(photonCalibEnergyErrT_, photonCalibEnergyErrHandle);
436  }
437 
438  auto const& caloTopology = eventSetup.getData(caloTopology_);
439 
440  //initialize output collections
442  reco::PhotonCoreCollection photonCores;
444  reco::PhotonCoreCollection ootPhotonCores;
446  reco::GsfElectronCoreCollection gsfElectronCores;
451  reco::CaloClusterCollection ebeeClusters;
452  reco::CaloClusterCollection esClusters;
453  reco::SuperClusterCollection ootSuperClusters;
454  reco::CaloClusterCollection ootEbeeClusters;
455  reco::CaloClusterCollection ootEsClusters;
456  EcalRecHitCollection ebRecHits;
457  EcalRecHitCollection eeRecHits;
458  EcalRecHitCollection esRecHits;
462 
463  //maps to collection indices of output objects
464  std::map<reco::PhotonCoreRef, unsigned int> photonCoreMap;
465  std::map<reco::PhotonCoreRef, unsigned int> ootPhotonCoreMap;
466  std::map<reco::GsfElectronCoreRef, unsigned int> gsfElectronCoreMap;
467  std::map<reco::GsfTrackRef, unsigned int> gsfTrackMap;
468  std::map<reco::ConversionRef, unsigned int> conversionMap;
469  std::map<reco::ConversionRef, unsigned int> singleConversionMap;
470  std::map<reco::SuperClusterRef, unsigned int> superClusterMap;
471  std::map<reco::CaloClusterPtr, unsigned int> ebeeClusterMap;
472  std::map<reco::CaloClusterPtr, unsigned int> esClusterMap;
473  std::map<reco::SuperClusterRef, unsigned int> ootSuperClusterMap;
474  std::map<reco::CaloClusterPtr, unsigned int> ootEbeeClusterMap;
475  std::map<reco::CaloClusterPtr, unsigned int> ootEsClusterMap;
476  std::unordered_set<DetId> rechitMap;
477  std::unordered_set<DetId> hcalRechitMap;
478 
479  std::unordered_set<unsigned int> superClusterFullRelinkMap;
480  std::unordered_set<unsigned int> ootSuperClusterFullRelinkMap;
481 
482  //vectors for pfcandidate valuemaps
483  std::vector<std::vector<reco::PFCandidateRef>> pfCandIsoPairVecPho;
484  std::vector<std::vector<reco::PFCandidateRef>> pfCandIsoPairVecEle;
485 
486  //vectors for id valuemaps
487  std::vector<std::vector<bool>> photonIdVals(photonIdHandles.size());
488  std::vector<std::vector<float>> gsfElectronIdVals(gsfElectronIdHandles.size());
489  std::vector<std::vector<float>> photonFloatValueMapVals(photonFloatValueMapHandles.size());
490  std::vector<std::vector<float>> ootPhotonFloatValueMapVals(ootPhotonFloatValueMapHandles.size());
491  std::vector<std::vector<float>> gsfElectronFloatValueMapVals(gsfElectronFloatValueMapHandles.size());
492 
493  // HI photon iso value maps
494  reco::HIPhotonIsolationMap const* recoHIPhotonIsolationMapInputValueMap =
496  : nullptr;
497  std::vector<reco::HIPhotonIsolation> recoHIPhotonIsolationMapInputVals;
498 
499  //loop over photons and fill maps
500  int index = -1;
501  for (const auto& photon : *photonHandle) {
502  index++;
503 
504  reco::PhotonRef photonref(photonHandle, index);
505  photons.push_back(photon);
506  auto& newPhoton = photons.back();
507 
508  if ((applyPhotonCalibOnData_ && event.isRealData()) || (applyPhotonCalibOnMC_ && !event.isRealData())) {
509  calibratePhoton(newPhoton, photonref, *photonCalibEnergyHandle, *photonCalibEnergyErrHandle);
510  }
511 
512  //we do this after calibration
513  bool keep = keepPhotonSel_(newPhoton);
514  if (!keep) {
515  photons.pop_back();
516  continue;
517  }
518 
519  //fill pf candidate value map vector
520  pfCandIsoPairVecPho.push_back((*photonPfCandMapHandle)[photonref]);
521 
522  //fill photon id valuemap vectors
523  int subindex = 0;
524  for (const auto& photonIdHandle : photonIdHandles) {
525  photonIdVals[subindex++].push_back((*photonIdHandle)[photonref]);
526  }
527 
528  subindex = 0;
529  for (const auto& photonFloatValueMapHandle : photonFloatValueMapHandles) {
530  photonFloatValueMapVals[subindex++].push_back((*photonFloatValueMapHandle)[photonref]);
531  }
532 
533  // HI photon isolation
534  if (!recoHIPhotonIsolationMapInputToken_.isUninitialized()) {
535  recoHIPhotonIsolationMapInputVals.push_back((*recoHIPhotonIsolationMapInputValueMap)[photonref]);
536  }
537 
538  //link photon core
539  const reco::PhotonCoreRef& photonCore = photon.photonCore();
540  linkCore(photonCore, photonCores, photonCoreMap);
541 
542  bool slimRelink = slimRelinkPhotonSel_(newPhoton);
543  //no supercluster relinking unless slimRelink selection is satisfied
544  if (!slimRelink)
545  continue;
546 
547  bool relink = relinkPhotonSel_(newPhoton);
548 
549  //link supercluster
550  const reco::SuperClusterRef& superCluster = photon.superCluster();
551  linkSuperCluster(superCluster, superClusterMap, superClusters, relink, superClusterFullRelinkMap);
552 
553  //conversions only for full relinking
554  if (!relink)
555  continue;
556 
557  const reco::ConversionRefVector& convrefs = photon.conversions();
558  linkConversions(convrefs, conversions, conversionMap);
559 
560  //explicitly references conversions
561  const reco::ConversionRefVector& singleconvrefs = photon.conversionsOneLeg();
562  linkConversions(singleconvrefs, singleConversions, singleConversionMap);
563 
564  //hcal hits
565  linkHcalHits(*photon.superCluster(), *hbheHitHandle, hcalRechitMap);
566  }
567 
568  //loop over oot photons and fill maps
569  //special note1: since not PFCand --> no PF isolation, IDs (but we do have FloatValueMap!)
570  //special note2: conversion sequence not run over bcs from oot phos, so skip relinking of oot phos
571  //special note3: clusters and superclusters in own collections!
572  if (!ootPhotonT_.isUninitialized()) {
573  index = -1;
574  for (const auto& ootPhoton : *ootPhotonHandle) {
575  index++;
576 
577  bool keep = keepOOTPhotonSel_(ootPhoton);
578  if (!keep)
579  continue;
580 
581  reco::PhotonRef ootPhotonref(ootPhotonHandle, index);
582 
583  ootPhotons.push_back(ootPhoton);
584 
585  //fill photon pfclusteriso valuemap vectors
586  int subindex = 0;
587  for (const auto& ootPhotonFloatValueMapHandle : ootPhotonFloatValueMapHandles) {
588  ootPhotonFloatValueMapVals[subindex++].push_back((*ootPhotonFloatValueMapHandle)[ootPhotonref]);
589  }
590 
591  //link photon core
592  const reco::PhotonCoreRef& ootPhotonCore = ootPhoton.photonCore();
593  linkCore(ootPhotonCore, ootPhotonCores, ootPhotonCoreMap);
594 
595  bool slimRelink = slimRelinkOOTPhotonSel_(ootPhoton);
596  //no supercluster relinking unless slimRelink selection is satisfied
597  if (!slimRelink)
598  continue;
599 
600  bool relink = relinkOOTPhotonSel_(ootPhoton);
601 
602  const reco::SuperClusterRef& ootSuperCluster = ootPhoton.superCluster();
603  linkSuperCluster(ootSuperCluster, ootSuperClusterMap, ootSuperClusters, relink, ootSuperClusterFullRelinkMap);
604  //hcal hits
605  linkHcalHits(*ootPhoton.superCluster(), *hbheHitHandle, hcalRechitMap);
606  }
607  }
608 
609  //loop over electrons and fill maps
610  index = -1;
611  for (const auto& gsfElectron : *gsfElectronHandle) {
612  index++;
613 
614  reco::GsfElectronRef gsfElectronref(gsfElectronHandle, index);
615  gsfElectrons.push_back(gsfElectron);
616  auto& newGsfElectron = gsfElectrons.back();
617  if ((applyGsfElectronCalibOnData_ && event.isRealData()) || (applyGsfElectronCalibOnMC_ && !event.isRealData())) {
618  calibrateElectron(newGsfElectron,
619  gsfElectronref,
620  *gsfElectronCalibEnergyHandle,
621  *gsfElectronCalibEnergyErrHandle,
622  *gsfElectronCalibEcalEnergyHandle,
623  *gsfElectronCalibEcalEnergyErrHandle);
624  }
625 
626  bool keep = keepGsfElectronSel_(newGsfElectron);
627  if (!keep) {
628  gsfElectrons.pop_back();
629  continue;
630  }
631 
632  pfCandIsoPairVecEle.push_back((*gsfElectronPfCandMapHandle)[gsfElectronref]);
633 
634  //fill electron id valuemap vectors
635  int subindex = 0;
636  for (const auto& gsfElectronIdHandle : gsfElectronIdHandles) {
637  gsfElectronIdVals[subindex++].push_back((*gsfElectronIdHandle)[gsfElectronref]);
638  }
639 
640  subindex = 0;
641  for (const auto& gsfElectronFloatValueMapHandle : gsfElectronFloatValueMapHandles) {
642  gsfElectronFloatValueMapVals[subindex++].push_back((*gsfElectronFloatValueMapHandle)[gsfElectronref]);
643  }
644 
645  const reco::GsfElectronCoreRef& gsfElectronCore = gsfElectron.core();
646  linkCore(gsfElectronCore, gsfElectronCores, gsfElectronCoreMap);
647 
648  const reco::GsfTrackRef& gsfTrack = gsfElectron.gsfTrack();
649 
650  // Save the main gsfTrack
651  if (!gsfTrackMap.count(gsfTrack)) {
652  gsfTracks.push_back(*gsfTrack);
653  gsfTrackMap[gsfTrack] = gsfTracks.size() - 1;
654  }
655 
656  // Save additional ambiguous gsf tracks in a map:
657  for (auto const& ambigGsfTrack : gsfElectron.ambiguousGsfTracks()) {
658  if (!gsfTrackMap.count(ambigGsfTrack)) {
659  gsfTracks.push_back(*ambigGsfTrack);
660  gsfTrackMap[ambigGsfTrack] = gsfTracks.size() - 1;
661  }
662  }
663 
664  bool slimRelink = slimRelinkGsfElectronSel_(newGsfElectron);
665  //no supercluster relinking unless slimRelink selection is satisfied
666  if (!slimRelink)
667  continue;
668 
669  bool relink = relinkGsfElectronSel_(newGsfElectron);
670 
671  const reco::SuperClusterRef& superCluster = gsfElectron.superCluster();
672  linkSuperCluster(superCluster, superClusterMap, superClusters, relink, superClusterFullRelinkMap);
673 
674  //conversions only for full relinking
675  if (!relink)
676  continue;
677 
678  const reco::ConversionRefVector& convrefs = gsfElectron.core()->conversions();
679  linkConversions(convrefs, conversions, conversionMap);
680 
681  //explicitly references conversions
682  const reco::ConversionRefVector& singleconvrefs = gsfElectron.core()->conversionsOneLeg();
683  linkConversions(singleconvrefs, singleConversions, singleConversionMap);
684 
685  //conversions matched by trackrefs
686  linkConversionsByTrackRef(conversionHandle, gsfElectron, conversions, conversionMap);
687 
688  //single leg conversions matched by trackrefs
689  linkConversionsByTrackRef(singleConversionHandle, gsfElectron, singleConversions, singleConversionMap);
690 
691  //hcal hits
692  linkHcalHits(*gsfElectron.superCluster(), *hbheHitHandle, hcalRechitMap);
693  }
694 
695  //loop over input SuperClusters
696  index = -1;
697  for (const auto& superCluster : *scHandle) {
698  index++;
699 
700  const double superclusPt = superCluster.energy() / std::cosh(superCluster.eta());
701 
702  if (superclusPt < scPtMin_)
703  continue;
704 
705  if (std::abs(superCluster.eta()) > scAbsetaMax_)
706  continue;
707 
708  bool relinkSupercluster = superclusPt > relinkSuperclusterPtMin_;
709 
710  reco::SuperClusterRef superClusterRef(scHandle, index);
711  linkSuperCluster(superClusterRef, superClusterMap, superClusters, relinkSupercluster, superClusterFullRelinkMap);
712  }
713 
714  //loop over output SuperClusters and fill maps
715  index = 0;
716  for (auto& superCluster : superClusters) {
717  //link seed cluster no matter what
718  const reco::CaloClusterPtr& seedCluster = superCluster.seed();
719  linkCaloCluster(seedCluster, ebeeClusters, ebeeClusterMap);
720 
721  //only proceed if superCluster is marked for full relinking
722  bool fullrelink = superClusterFullRelinkMap.count(index++);
723  if (!fullrelink) {
724  //zero detid vector which is anyways not useful without stored rechits
725  superCluster.clearHitsAndFractions();
726  continue;
727  }
728 
729  // link calo clusters
730  linkCaloClusters(superCluster,
731  ebeeClusters,
732  ebeeClusterMap,
733  rechitMap,
734  barrelHitHandle,
735  endcapHitHandle,
736  caloTopology,
737  esClusters,
738  esClusterMap);
739 
740  //conversions matched geometrically
741  linkConversionsByTrackRef(conversionHandle, superCluster, conversions, conversionMap);
742 
743  //single leg conversions matched by trackrefs
744  linkConversionsByTrackRef(singleConversionHandle, superCluster, singleConversions, singleConversionMap);
745  }
746 
747  //loop over output OOTSuperClusters and fill maps
748  if (!ootPhotonT_.isUninitialized()) {
749  index = 0;
750  for (auto& ootSuperCluster : ootSuperClusters) {
751  //link seed cluster no matter what
752  const reco::CaloClusterPtr& ootSeedCluster = ootSuperCluster.seed();
753  linkCaloCluster(ootSeedCluster, ootEbeeClusters, ootEbeeClusterMap);
754 
755  //only proceed if ootSuperCluster is marked for full relinking
756  bool fullrelink = ootSuperClusterFullRelinkMap.count(index++);
757  if (!fullrelink) {
758  //zero detid vector which is anyways not useful without stored rechits
759  ootSuperCluster.clearHitsAndFractions();
760  continue;
761  }
762 
763  // link calo clusters
764  linkCaloClusters(ootSuperCluster,
765  ootEbeeClusters,
766  ootEbeeClusterMap,
767  rechitMap,
768  barrelHitHandle,
769  endcapHitHandle,
770  caloTopology,
771  ootEsClusters,
772  ootEsClusterMap);
773  }
774  }
775  //now finalize and add to the event collections in "reverse" order
776 
777  //rechits (fill output collections of rechits to be stored)
778  for (const EcalRecHit& rechit : *barrelHitHandle) {
779  if (rechitMap.count(rechit.detid())) {
780  ebRecHits.push_back(rechit);
781  }
782  }
783 
784  for (const EcalRecHit& rechit : *endcapHitHandle) {
785  if (rechitMap.count(rechit.detid())) {
786  eeRecHits.push_back(rechit);
787  }
788  }
789 
790  event.emplace(outEBRecHits_, std::move(ebRecHits));
791  event.emplace(outEERecHits_, std::move(eeRecHits));
792 
793  if (doPreshowerEcalHits_) {
794  for (const EcalRecHit& rechit : *preshowerHitHandle) {
795  if (rechitMap.count(rechit.detid())) {
796  esRecHits.push_back(rechit);
797  }
798  }
799  event.emplace(outESRecHits_, std::move(esRecHits));
800  }
801 
802  for (const HBHERecHit& rechit : *hbheHitHandle) {
803  if (hcalRechitMap.count(rechit.detid())) {
804  hbheRecHits.push_back(rechit);
805  }
806  }
807  event.emplace(outHBHERecHits_, std::move(hbheRecHits));
808 
809  //CaloClusters
810  //put calocluster output collections in event and get orphan handles to create ptrs
811  const auto& outEBEEClusterHandle = event.emplace(outEBEEClusters_, std::move(ebeeClusters));
812  const auto& outESClusterHandle = event.emplace(outESClusters_, std::move(esClusters));
813  ;
814 
815  //Loop over SuperClusters and relink GEDPhoton + GSFElectron CaloClusters
816  for (reco::SuperCluster& superCluster : superClusters) {
817  relinkCaloClusters(superCluster, ebeeClusterMap, esClusterMap, outEBEEClusterHandle, outESClusterHandle);
818  }
819 
820  //OOTCaloClusters
821  //put ootcalocluster output collections in event and get orphan handles to create ptrs
822  edm::OrphanHandle<reco::CaloClusterCollection> outOOTEBEEClusterHandle;
824  //Loop over OOTSuperClusters and relink OOTPhoton CaloClusters
825  if (!ootPhotonT_.isUninitialized()) {
826  outOOTEBEEClusterHandle = event.emplace(outOOTEBEEClusters_, std::move(ootEbeeClusters));
827  outOOTESClusterHandle = event.emplace(outOOTESClusters_, std::move(ootEsClusters));
828  for (reco::SuperCluster& ootSuperCluster : ootSuperClusters) {
830  ootSuperCluster, ootEbeeClusterMap, ootEsClusterMap, outOOTEBEEClusterHandle, outOOTESClusterHandle);
831  }
832  }
833  //put superclusters and conversions in the event
834  const auto& outSuperClusterHandle = event.emplace(outSuperClusters_, std::move(superClusters));
835  const auto& outConversionHandle = event.emplace(outConversions_, std::move(conversions));
836  const auto& outSingleConversionHandle = event.emplace(outSingleConversions_, std::move(singleConversions));
837  const auto& outGsfTrackHandle = event.emplace(outGsfTracks_, std::move(gsfTracks));
838 
839  //Loop over PhotonCores and relink GEDPhoton SuperClusters (and conversions)
840  for (reco::PhotonCore& photonCore : photonCores) {
841  // superclusters
842  relinkSuperCluster(photonCore, superClusterMap, outSuperClusterHandle);
843 
844  //conversions
845  const reco::ConversionRefVector& convrefs = photonCore.conversions();
846  relinkConversions(photonCore, convrefs, conversionMap, outConversionHandle);
847 
848  //single leg conversions
849  const reco::ConversionRefVector& singleconvrefs = photonCore.conversionsOneLeg();
850  relinkConversions(photonCore, singleconvrefs, singleConversionMap, outSingleConversionHandle);
851  }
852 
853  //Relink GSFElectron SuperClusters and main GSF Tracks
854  for (reco::GsfElectronCore& gsfElectronCore : gsfElectronCores) {
855  relinkSuperCluster(gsfElectronCore, superClusterMap, outSuperClusterHandle);
856  relinkGsfTrack(gsfElectronCore, gsfTrackMap, outGsfTrackHandle);
857  }
858 
859  //put ootsuperclusters in the event
860  edm::OrphanHandle<reco::SuperClusterCollection> outOOTSuperClusterHandle;
862  outOOTSuperClusterHandle = event.emplace(outOOTSuperClusters_, std::move(ootSuperClusters));
863 
864  //Relink OOTPhoton SuperClusters
865  for (reco::PhotonCore& ootPhotonCore : ootPhotonCores) {
866  relinkSuperCluster(ootPhotonCore, ootSuperClusterMap, outOOTSuperClusterHandle);
867  }
868 
869  //put photoncores and gsfelectroncores into the event
870  const auto& outPhotonCoreHandle = event.emplace(outPhotonCores_, std::move(photonCores));
871  edm::OrphanHandle<reco::PhotonCoreCollection> outOOTPhotonCoreHandle;
873  outOOTPhotonCoreHandle = event.emplace(outOOTPhotonCores_, std::move(ootPhotonCores));
874  const auto& outgsfElectronCoreHandle = event.emplace(outGsfElectronCores_, std::move(gsfElectronCores));
875 
876  //loop over photons, oot photons, and electrons and relink the cores
877  for (reco::Photon& photon : photons) {
878  relinkPhotonCore(photon, photonCoreMap, outPhotonCoreHandle);
879  }
880 
881  if (!ootPhotonT_.isUninitialized()) {
882  for (reco::Photon& ootPhoton : ootPhotons) {
883  relinkPhotonCore(ootPhoton, ootPhotonCoreMap, outOOTPhotonCoreHandle);
884  }
885  }
886 
887  for (reco::GsfElectron& gsfElectron : gsfElectrons) {
888  relinkGsfElectronCore(gsfElectron, gsfElectronCoreMap, outgsfElectronCoreHandle);
889 
890  // -----
891  // Also in this loop let's relink ambiguous tracks
892  std::vector<reco::GsfTrackRef> ambigTracksInThisElectron;
893  // Here we loop over the ambiguous tracks and save them in a vector
894  for (auto const& igsf : gsfElectron.ambiguousGsfTracks()) {
895  ambigTracksInThisElectron.push_back(igsf);
896  }
897 
898  // Now we need to clear them (they are the refs to original collection):
899  gsfElectron.clearAmbiguousGsfTracks();
900 
901  // And here we add them back, now from a new reduced collection:
902  for (const auto& it : ambigTracksInThisElectron) {
903  const auto& gsftkmapped = gsfTrackMap.find(it);
904 
905  if (gsftkmapped != gsfTrackMap.end()) {
906  reco::GsfTrackRef gsftkref(outGsfTrackHandle, gsftkmapped->second);
907  gsfElectron.addAmbiguousGsfTrack(gsftkref);
908  } else
909  throw cms::Exception("There must be a problem with linking and mapping of ambiguous gsf tracks...");
910  }
911 
912  if (gsfElectron.ambiguousGsfTracksSize() > 0)
913  gsfElectron.setAmbiguous(true); // Set the flag
914 
915  ambigTracksInThisElectron.clear();
916  }
917 
918  //(finally) store the output photon and electron collections
919  const auto& outPhotonHandle = event.emplace(outPhotons_, std::move(photons));
922  outOOTPhotonHandle = event.emplace(outOOTPhotons_, std::move(ootPhotons));
923  const auto& outGsfElectronHandle = event.emplace(outGsfElectrons_, std::move(gsfElectrons));
924 
925  //still need to output relinked valuemaps
926 
927  //photon pfcand isolation valuemap
928  edm::ValueMap<std::vector<reco::PFCandidateRef>>::Filler fillerPhotons(photonPfCandMap);
929  fillerPhotons.insert(outPhotonHandle, pfCandIsoPairVecPho.begin(), pfCandIsoPairVecPho.end());
930  fillerPhotons.fill();
931 
932  //electron pfcand isolation valuemap
933  edm::ValueMap<std::vector<reco::PFCandidateRef>>::Filler fillerGsfElectrons(gsfElectronPfCandMap);
934  fillerGsfElectrons.insert(outGsfElectronHandle, pfCandIsoPairVecEle.begin(), pfCandIsoPairVecEle.end());
935  fillerGsfElectrons.fill();
936 
937  event.emplace(outPhotonPfCandMap_, std::move(photonPfCandMap));
938  event.emplace(outGsfElectronPfCandMap_, std::move(gsfElectronPfCandMap));
939 
940  //photon id value maps
941  index = 0;
942  for (auto const& vals : photonIdVals) {
943  emplaceValueMap(outPhotonHandle, vals, event, outPhotonIds_[index++]);
944  }
945 
946  //electron id value maps
947  index = 0;
948  for (auto const& vals : gsfElectronIdVals) {
949  emplaceValueMap(outGsfElectronHandle, vals, event, outGsfElectronIds_[index++]);
950  }
951 
952  // photon iso value maps
953  index = 0;
954  for (auto const& vals : photonFloatValueMapVals) {
955  emplaceValueMap(outPhotonHandle, vals, event, outPhotonFloatValueMaps_[index++]);
956  }
957 
958  if (!ootPhotonT_.isUninitialized()) {
959  //oot photon iso value maps
960  index = 0;
961  for (auto const& vals : ootPhotonFloatValueMapVals) {
962  emplaceValueMap(outOOTPhotonHandle, vals, event, outOOTPhotonFloatValueMaps_[index++]);
963  }
964  }
965 
966  // HI photon iso value maps
967  if (!recoHIPhotonIsolationMapInputToken_.isUninitialized()) {
968  emplaceValueMap(outPhotonHandle, recoHIPhotonIsolationMapInputVals, event, recoHIPhotonIsolationMapOutputName_);
969  }
970 
971  //electron iso value maps
972  index = 0;
973  for (auto const& vals : gsfElectronFloatValueMapVals) {
974  emplaceValueMap(outGsfElectronHandle, vals, event, outGsfElectronFloatValueMaps_[index++]);
975  }
976 }
const bool doPreshowerEcalHits_
edm::EDPutTokenT< EcalRecHitCollection > outESRecHits_
void relinkGsfTrack(reco::GsfElectronCore &electroncore, const std::map< reco::GsfTrackRef, unsigned int > &gsfTrackMap, const edm::OrphanHandle< reco::GsfTrackCollection > &outGsfTrackHandle)
const StringCutObjectSelector< reco::Photon > relinkOOTPhotonSel_
edm::EDPutTokenT< reco::PhotonCollection > outOOTPhotons_
const edm::EDGetTokenT< reco::HIPhotonIsolationMap > recoHIPhotonIsolationMapInputToken_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronT_
const edm::EDPutTokenT< EcalRecHitCollection > outEERecHits_
const edm::EDPutTokenT< EcalRecHitCollection > outEBRecHits_
const bool applyPhotonCalibOnData_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyT_
const edm::EDPutTokenT< reco::GsfTrackCollection > outGsfTracks_
const StringCutObjectSelector< reco::Photon > slimRelinkPhotonSel_
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
const std::vector< edm::EDPutTokenT< edm::ValueMap< float > > > outGsfElectronFloatValueMaps_
static void calibratePhoton(reco::Photon &photon, const reco::PhotonRef &oldPhoRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap)
edm::EDPutTokenT< reco::PhotonCoreCollection > outOOTPhotonCores_
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyT_
const std::vector< edm::EDPutTokenT< edm::ValueMap< bool > > > outPhotonIds_
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:98
const edm::EDPutTokenT< reco::ConversionCollection > outConversions_
void push_back(T const &t)
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
void linkHcalHits(const reco::SuperCluster &superClus, const HBHERecHitCollection &recHits, std::unordered_set< DetId > &hcalDetIds)
const double relinkSuperclusterPtMin_
const StringCutObjectSelector< reco::Photon > keepPhotonSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
const bool applyGsfElectronCalibOnData_
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyErrT_
edm::EDPutTokenT< reco::SuperClusterCollection > outOOTSuperClusters_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
const StringCutObjectSelector< reco::GsfElectron > relinkGsfElectronSel_
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
void relinkConversions(reco::PhotonCore &photonCore, const reco::ConversionRefVector &convrefs, const std::map< reco::ConversionRef, unsigned int > &conversionMap, const edm::OrphanHandle< reco::ConversionCollection > &outConversionHandle)
const edm::EDGetTokenT< EcalRecHitCollection > preshowerEcalHits_
void linkConversions(const reco::ConversionRefVector &convrefs, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
const edm::EDGetTokenT< reco::SuperClusterCollection > superclusterT_
edm::EDPutTokenT< reco::CaloClusterCollection > outOOTESClusters_
const edm::EDPutTokenT< reco::GsfElectronCollection > outGsfElectrons_
const edm::EDPutTokenT< reco::CaloClusterCollection > outEBEEClusters_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
const StringCutObjectSelector< reco::Photon > keepOOTPhotonSel_
edm::EDPutTokenT< reco::CaloClusterCollection > outOOTEBEEClusters_
const edm::EDPutTokenT< reco::CaloClusterCollection > outESClusters_
const edm::EDPutTokenT< reco::GsfElectronCoreCollection > outGsfElectronCores_
const edm::EDPutTokenT< reco::PhotonCoreCollection > outPhotonCores_
std::vector< GsfElectronCore > GsfElectronCoreCollection
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
Definition: GsfTrackFwd.h:9
static void calibrateElectron(reco::GsfElectron &gsfElectron, const reco::GsfElectronRef &oldEleRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap, const edm::ValueMap< float > &ecalEnergyMap, const edm::ValueMap< float > &ecalEnergyErrMap)
const edm::EDPutTokenT< HBHERecHitCollection > outHBHERecHits_
std::vector< edm::EDPutTokenT< edm::ValueMap< float > > > outOOTPhotonFloatValueMaps_
void relinkGsfElectronCore(reco::GsfElectron &gsfElectron, const std::map< reco::GsfElectronCoreRef, unsigned int > &gsfElectronCoreMap, const edm::OrphanHandle< reco::GsfElectronCoreCollection > &outGsfElectronCoreHandle)
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronFloatValueMapTs_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void linkConversionsByTrackRef(const edm::Handle< reco::ConversionCollection > &conversionHandle, const reco::GsfElectron &gsfElectron, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
edm::EDGetTokenT< reco::PhotonCollection > ootPhotonT_
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
void linkSuperCluster(const reco::SuperClusterRef &superCluster, std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, reco::SuperClusterCollection &superClusters, const bool relink, std::unordered_set< unsigned int > &superClusterFullRelinkMap)
void linkCore(const T &core, U &cores, std::map< T, unsigned int > &coreMap)
const StringCutObjectSelector< reco::Photon > relinkPhotonSel_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyErrT_
const edm::EDPutTokenT< reco::SuperClusterCollection > outSuperClusters_
const edm::EDGetTokenT< HBHERecHitCollection > hbheHits_
const bool applyPhotonCalibOnMC_
void relinkCaloClusters(reco::SuperCluster &superCluster, const std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, const std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap, const edm::OrphanHandle< reco::CaloClusterCollection > &outEBEEClusterHandle, const edm::OrphanHandle< reco::CaloClusterCollection > &outESClusterHandle)
const std::vector< edm::EDPutTokenT< edm::ValueMap< float > > > outGsfElectronIds_
void relinkSuperCluster(T &core, const std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, const edm::OrphanHandle< reco::SuperClusterCollection > &outSuperClusterHandle)
const edm::EDPutTokenT< reco::PhotonCollection > outPhotons_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonFloatValueMapTs_
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
void relinkPhotonCore(reco::Photon &photon, const std::map< reco::PhotonCoreRef, unsigned int > &photonCoreMap, const edm::OrphanHandle< reco::PhotonCoreCollection > &outPhotonCoreHandle)
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
const edm::EDPutTokenT< reco::ConversionCollection > outSingleConversions_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonFloatValueMapTs_
const StringCutObjectSelector< reco::GsfElectron > slimRelinkGsfElectronSel_
const edm::EDPutTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > outGsfElectronPfCandMap_
edm::EDPutTokenT< reco::HIPhotonIsolationMap > recoHIPhotonIsolationMapOutputName_
std::vector< PhotonCore > PhotonCoreCollection
collectin of PhotonCore objects
Definition: PhotonCoreFwd.h:9
const double scAbsetaMax_
const std::vector< edm::EDPutTokenT< edm::ValueMap< float > > > outPhotonFloatValueMaps_
HLT enums.
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyErrT_
void linkCaloCluster(const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
const StringCutObjectSelector< reco::Photon > slimRelinkOOTPhotonSel_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopology_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyT_
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
def move(src, dest)
Definition: eostools.py:511
const bool applyGsfElectronCalibOnMC_
Definition: event.py:1
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_
const edm::EDPutTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > outPhotonPfCandMap_
void linkCaloClusters(const reco::SuperCluster &superCluster, reco::CaloClusterCollection &ebeeClusters, std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, std::unordered_set< DetId > &rechitMap, const edm::Handle< EcalRecHitCollection > &barrelHitHandle, const edm::Handle< EcalRecHitCollection > &endcapHitHandle, CaloTopology const &caloTopology, reco::CaloClusterCollection &esClusters, std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap)

◆ relinkCaloClusters()

void ReducedEGProducer::relinkCaloClusters ( reco::SuperCluster superCluster,
const std::map< reco::CaloClusterPtr, unsigned int > &  ebeeClusterMap,
const std::map< reco::CaloClusterPtr, unsigned int > &  esClusterMap,
const edm::OrphanHandle< reco::CaloClusterCollection > &  outEBEEClusterHandle,
const edm::OrphanHandle< reco::CaloClusterCollection > &  outESClusterHandle 
)
private

Definition at line 1107 of file ReducedEGProducer.cc.

References edm::PtrVectorBase::clear(), bsc_activity_cfg::clusters, reco::SuperCluster::clusters(), edm::PtrVectorBase::empty(), reco::SuperCluster::preshowerClusters(), edm::PtrVector< T >::push_back(), reco::SuperCluster::seed(), reco::SuperCluster::setClusters(), reco::SuperCluster::setPreshowerClusters(), and reco::SuperCluster::setSeed().

Referenced by produce().

1111  {
1112  //remap seed cluster
1113  const auto& seedmapped = ebeeClusterMap.find(superCluster.seed());
1114  if (seedmapped != ebeeClusterMap.end()) {
1115  //make new ptr
1116  reco::CaloClusterPtr clusptr(outEBEEClusterHandle, seedmapped->second);
1117  superCluster.setSeed(clusptr);
1118  }
1119 
1120  //remap all clusters
1122  for (const auto& cluster : superCluster.clusters()) {
1123  const auto& clustermapped = ebeeClusterMap.find(cluster);
1124  if (clustermapped != ebeeClusterMap.end()) {
1125  //make new ptr
1126  reco::CaloClusterPtr clusptr(outEBEEClusterHandle, clustermapped->second);
1127  clusters.push_back(clusptr);
1128  } else {
1129  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
1130  clusters.clear();
1131  break;
1132  }
1133  }
1134  if (!clusters.empty()) {
1135  superCluster.setClusters(clusters);
1136  }
1137 
1138  //remap preshower clusters
1139  reco::CaloClusterPtrVector esclusters;
1140  for (const auto& cluster : superCluster.preshowerClusters()) {
1141  const auto& clustermapped = esClusterMap.find(cluster);
1142  if (clustermapped != esClusterMap.end()) {
1143  //make new ptr
1144  reco::CaloClusterPtr clusptr(outESClusterHandle, clustermapped->second);
1145  esclusters.push_back(clusptr);
1146  } else {
1147  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
1148  esclusters.clear();
1149  break;
1150  }
1151  }
1152  if (!esclusters.empty()) {
1153  superCluster.setPreshowerClusters(esclusters);
1154  }
1155 }
void setPreshowerClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:118
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:152
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:109
void setClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:112
bool empty() const
Is the RefVector empty.
Definition: PtrVectorBase.h:72
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:85
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:82
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:79
void clear()
Clear the PtrVector.
Definition: PtrVectorBase.h:81

◆ relinkConversions()

void ReducedEGProducer::relinkConversions ( reco::PhotonCore photonCore,
const reco::ConversionRefVector convrefs,
const std::map< reco::ConversionRef, unsigned int > &  conversionMap,
const edm::OrphanHandle< reco::ConversionCollection > &  outConversionHandle 
)
private

Definition at line 1180 of file ReducedEGProducer.cc.

References edm::RefVector< C, T, F >::clear(), edm::RefVector< C, T, F >::empty(), and photonCore_cfi::photonCore.

Referenced by produce().

1183  {
1184  reco::ConversionRefVector outconvrefs;
1185  for (const auto& convref : convrefs) {
1186  const auto& convmapped = conversionMap.find(convref);
1187  if (convmapped != conversionMap.end()) {
1188  //make new ref
1189  reco::ConversionRef outref(outConversionHandle, convmapped->second);
1190  } else {
1191  //can only relink if all conversions are being relinked, so if one is missing, then skip the relinking completely
1192  outconvrefs.clear();
1193  break;
1194  }
1195  }
1196  if (!outconvrefs.empty()) {
1197  photonCore.setConversions(outconvrefs);
1198  }
1199 }
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:99
void clear()
Clear the vector.
Definition: RefVector.h:142

◆ relinkGsfElectronCore()

void ReducedEGProducer::relinkGsfElectronCore ( reco::GsfElectron gsfElectron,
const std::map< reco::GsfElectronCoreRef, unsigned int > &  gsfElectronCoreMap,
const edm::OrphanHandle< reco::GsfElectronCoreCollection > &  outGsfElectronCoreHandle 
)
private

Definition at line 1212 of file ReducedEGProducer.cc.

References reco::GsfElectron::core(), and reco::GsfElectron::setCore().

Referenced by produce().

1215  {
1216  const auto& coremapped = gsfElectronCoreMap.find(gsfElectron.core());
1217  if (coremapped != gsfElectronCoreMap.end()) {
1218  //make new ref
1219  reco::GsfElectronCoreRef coreref(outgsfElectronCoreHandle, coremapped->second);
1220  gsfElectron.setCore(coreref);
1221  }
1222 }
void setCore(const reco::GsfElectronCoreRef &core)
Definition: GsfElectron.h:152
virtual GsfElectronCoreRef core() const
Definition: GsfElectron.cc:8

◆ relinkGsfTrack()

void ReducedEGProducer::relinkGsfTrack ( reco::GsfElectronCore electroncore,
const std::map< reco::GsfTrackRef, unsigned int > &  gsfTrackMap,
const edm::OrphanHandle< reco::GsfTrackCollection > &  outGsfTrackHandle 
)
private

Definition at line 1170 of file ReducedEGProducer.cc.

References reco::GsfElectronCore::gsfTrack(), and reco::GsfElectronCore::setGsfTrack().

Referenced by produce().

1172  {
1173  const auto& gsftkmapped = gsfTrackMap.find(gsfElectronCore.gsfTrack());
1174  if (gsftkmapped != gsfTrackMap.end()) {
1175  reco::GsfTrackRef gsftkref(outGsfTrackHandle, gsftkmapped->second);
1176  gsfElectronCore.setGsfTrack(gsftkref);
1177  }
1178 }

◆ relinkPhotonCore()

void ReducedEGProducer::relinkPhotonCore ( reco::Photon photon,
const std::map< reco::PhotonCoreRef, unsigned int > &  photonCoreMap,
const edm::OrphanHandle< reco::PhotonCoreCollection > &  outPhotonCoreHandle 
)
private

Definition at line 1201 of file ReducedEGProducer.cc.

References displacedMuons_cfi::photon.

Referenced by produce().

1203  {
1204  const auto& coremapped = photonCoreMap.find(photon.photonCore());
1205  if (coremapped != photonCoreMap.end()) {
1206  //make new ref
1207  reco::PhotonCoreRef coreref(outPhotonCoreHandle, coremapped->second);
1208  photon.setPhotonCore(coreref);
1209  }
1210 }

◆ relinkSuperCluster()

template<typename T >
void ReducedEGProducer::relinkSuperCluster ( T core,
const std::map< reco::SuperClusterRef, unsigned int > &  superClusterMap,
const edm::OrphanHandle< reco::SuperClusterCollection > &  outSuperClusterHandle 
)
private

Definition at line 1158 of file ReducedEGProducer.cc.

Referenced by produce().

1161  {
1162  const auto& scmapped = superClusterMap.find(core.superCluster());
1163  if (scmapped != superClusterMap.end()) {
1164  //make new ref
1165  reco::SuperClusterRef scref(outSuperClusterHandle, scmapped->second);
1166  core.setSuperCluster(scref);
1167  }
1168 }
Definition: __init__.py:1

◆ setToken()

template<typename T >
void ReducedEGProducer::setToken ( edm::EDGetTokenT< T > &  token,
const edm::ParameterSet config,
const std::string &  name 
)
inlineprivate

Definition at line 151 of file ReducedEGProducer.cc.

References Skims_PA_cff::name, and unpackBuffers-CaloStage2::token.

151  {
152  token = consumes<T>(config.getParameter<edm::InputTag>(name));
153  }
Definition: config.py:1

◆ vproduces()

template<class T >
std::vector<edm::EDPutTokenT<T> > ReducedEGProducer::vproduces ( std::vector< std::string > const &  labels)
inlineprivate

Definition at line 56 of file ReducedEGProducer.cc.

References label, and SummaryClient_cfi::labels.

56  {
57  std::vector<edm::EDPutTokenT<T>> putTokens{};
58  putTokens.reserve(labels.size());
59  for (const auto& label : labels) {
60  putTokens.push_back(produces<T>(label));
61  }
62  return putTokens;
63  }
char const * label

Member Data Documentation

◆ applyGsfElectronCalibOnData_

const bool ReducedEGProducer::applyGsfElectronCalibOnData_
private

Definition at line 188 of file ReducedEGProducer.cc.

Referenced by produce().

◆ applyGsfElectronCalibOnMC_

const bool ReducedEGProducer::applyGsfElectronCalibOnMC_
private

Definition at line 189 of file ReducedEGProducer.cc.

Referenced by produce().

◆ applyPhotonCalibOnData_

const bool ReducedEGProducer::applyPhotonCalibOnData_
private

Definition at line 186 of file ReducedEGProducer.cc.

Referenced by produce().

◆ applyPhotonCalibOnMC_

const bool ReducedEGProducer::applyPhotonCalibOnMC_
private

Definition at line 187 of file ReducedEGProducer.cc.

Referenced by produce().

◆ barrelEcalHits_

const edm::EDGetTokenT<EcalRecHitCollection> ReducedEGProducer::barrelEcalHits_
private

Definition at line 163 of file ReducedEGProducer.cc.

Referenced by produce().

◆ caloTopology_

edm::ESGetToken<CaloTopology, CaloTopologyRecord> ReducedEGProducer::caloTopology_
private

Definition at line 197 of file ReducedEGProducer.cc.

Referenced by produce().

◆ conversionT_

const edm::EDGetTokenT<reco::ConversionCollection> ReducedEGProducer::conversionT_
private

Definition at line 160 of file ReducedEGProducer.cc.

Referenced by produce().

◆ doPreshowerEcalHits_

const bool ReducedEGProducer::doPreshowerEcalHits_
private

Definition at line 165 of file ReducedEGProducer.cc.

Referenced by produce().

◆ endcapEcalHits_

const edm::EDGetTokenT<EcalRecHitCollection> ReducedEGProducer::endcapEcalHits_
private

Definition at line 164 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronCalibEcalEnergyErrT_

edm::EDGetTokenT<edm::ValueMap<float> > ReducedEGProducer::gsfElectronCalibEcalEnergyErrT_
private

Definition at line 195 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronCalibEcalEnergyT_

edm::EDGetTokenT<edm::ValueMap<float> > ReducedEGProducer::gsfElectronCalibEcalEnergyT_
private

Definition at line 194 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronCalibEnergyErrT_

edm::EDGetTokenT<edm::ValueMap<float> > ReducedEGProducer::gsfElectronCalibEnergyErrT_
private

Definition at line 193 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronCalibEnergyT_

edm::EDGetTokenT<edm::ValueMap<float> > ReducedEGProducer::gsfElectronCalibEnergyT_
private

Definition at line 192 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronFloatValueMapTs_

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > ReducedEGProducer::gsfElectronFloatValueMapTs_
private

Definition at line 177 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronIdTs_

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > ReducedEGProducer::gsfElectronIdTs_
private

Definition at line 173 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronPfCandMapT_

const edm::EDGetTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef> > > ReducedEGProducer::gsfElectronPfCandMapT_
private

Definition at line 170 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronT_

const edm::EDGetTokenT<reco::GsfElectronCollection> ReducedEGProducer::gsfElectronT_
private

Definition at line 159 of file ReducedEGProducer.cc.

Referenced by produce().

◆ hbheHits_

const edm::EDGetTokenT<HBHERecHitCollection> ReducedEGProducer::hbheHits_
private

Definition at line 167 of file ReducedEGProducer.cc.

Referenced by produce().

◆ hcalHitSel_

EGHcalRecHitSelector ReducedEGProducer::hcalHitSel_
private

Definition at line 236 of file ReducedEGProducer.cc.

Referenced by beginRun(), and linkHcalHits().

◆ keepGsfElectronSel_

const StringCutObjectSelector<reco::GsfElectron> ReducedEGProducer::keepGsfElectronSel_
private

Definition at line 232 of file ReducedEGProducer.cc.

Referenced by produce().

◆ keepOOTPhotonSel_

const StringCutObjectSelector<reco::Photon> ReducedEGProducer::keepOOTPhotonSel_
private

Definition at line 229 of file ReducedEGProducer.cc.

Referenced by produce().

◆ keepPhotonSel_

const StringCutObjectSelector<reco::Photon> ReducedEGProducer::keepPhotonSel_
private

Definition at line 226 of file ReducedEGProducer.cc.

Referenced by produce().

◆ ootPhotonFloatValueMapTs_

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > ReducedEGProducer::ootPhotonFloatValueMapTs_
private

Definition at line 176 of file ReducedEGProducer.cc.

Referenced by produce().

◆ ootPhotonT_

edm::EDGetTokenT<reco::PhotonCollection> ReducedEGProducer::ootPhotonT_
private

Definition at line 158 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outConversions_

const edm::EDPutTokenT<reco::ConversionCollection> ReducedEGProducer::outConversions_
private

Definition at line 206 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outEBEEClusters_

const edm::EDPutTokenT<reco::CaloClusterCollection> ReducedEGProducer::outEBEEClusters_
private

Definition at line 209 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outEBRecHits_

const edm::EDPutTokenT<EcalRecHitCollection> ReducedEGProducer::outEBRecHits_
private

Definition at line 214 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outEERecHits_

const edm::EDPutTokenT<EcalRecHitCollection> ReducedEGProducer::outEERecHits_
private

Definition at line 215 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outESClusters_

const edm::EDPutTokenT<reco::CaloClusterCollection> ReducedEGProducer::outESClusters_
private

Definition at line 210 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outESRecHits_

edm::EDPutTokenT<EcalRecHitCollection> ReducedEGProducer::outESRecHits_
private

Definition at line 216 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectronCores_

const edm::EDPutTokenT<reco::GsfElectronCoreCollection> ReducedEGProducer::outGsfElectronCores_
private

Definition at line 204 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectronFloatValueMaps_

const std::vector<edm::EDPutTokenT<edm::ValueMap<float> > > ReducedEGProducer::outGsfElectronFloatValueMaps_
private

Definition at line 224 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectronIds_

const std::vector<edm::EDPutTokenT<edm::ValueMap<float> > > ReducedEGProducer::outGsfElectronIds_
private

Definition at line 221 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectronPfCandMap_

const edm::EDPutTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef> > > ReducedEGProducer::outGsfElectronPfCandMap_
private

Definition at line 219 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectrons_

const edm::EDPutTokenT<reco::GsfElectronCollection> ReducedEGProducer::outGsfElectrons_
private

Definition at line 203 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfTracks_

const edm::EDPutTokenT<reco::GsfTrackCollection> ReducedEGProducer::outGsfTracks_
private

Definition at line 205 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outHBHERecHits_

const edm::EDPutTokenT<HBHERecHitCollection> ReducedEGProducer::outHBHERecHits_
private

Definition at line 217 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTEBEEClusters_

edm::EDPutTokenT<reco::CaloClusterCollection> ReducedEGProducer::outOOTEBEEClusters_
private

Definition at line 212 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTESClusters_

edm::EDPutTokenT<reco::CaloClusterCollection> ReducedEGProducer::outOOTESClusters_
private

Definition at line 213 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTPhotonCores_

edm::EDPutTokenT<reco::PhotonCoreCollection> ReducedEGProducer::outOOTPhotonCores_
private

Definition at line 202 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTPhotonFloatValueMaps_

std::vector<edm::EDPutTokenT<edm::ValueMap<float> > > ReducedEGProducer::outOOTPhotonFloatValueMaps_
private

Definition at line 223 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTPhotons_

edm::EDPutTokenT<reco::PhotonCollection> ReducedEGProducer::outOOTPhotons_
private

Definition at line 201 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTSuperClusters_

edm::EDPutTokenT<reco::SuperClusterCollection> ReducedEGProducer::outOOTSuperClusters_
private

Definition at line 211 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotonCores_

const edm::EDPutTokenT<reco::PhotonCoreCollection> ReducedEGProducer::outPhotonCores_
private

Definition at line 200 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotonFloatValueMaps_

const std::vector<edm::EDPutTokenT<edm::ValueMap<float> > > ReducedEGProducer::outPhotonFloatValueMaps_
private

Definition at line 222 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotonIds_

const std::vector<edm::EDPutTokenT<edm::ValueMap<bool> > > ReducedEGProducer::outPhotonIds_
private

Definition at line 220 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotonPfCandMap_

const edm::EDPutTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef> > > ReducedEGProducer::outPhotonPfCandMap_
private

Definition at line 218 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotons_

const edm::EDPutTokenT<reco::PhotonCollection> ReducedEGProducer::outPhotons_
private

Definition at line 199 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outSingleConversions_

const edm::EDPutTokenT<reco::ConversionCollection> ReducedEGProducer::outSingleConversions_
private

Definition at line 207 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outSuperClusters_

const edm::EDPutTokenT<reco::SuperClusterCollection> ReducedEGProducer::outSuperClusters_
private

Definition at line 208 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonCalibEnergyErrT_

edm::EDGetTokenT<edm::ValueMap<float> > ReducedEGProducer::photonCalibEnergyErrT_
private

Definition at line 191 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonCalibEnergyT_

edm::EDGetTokenT<edm::ValueMap<float> > ReducedEGProducer::photonCalibEnergyT_
private

Definition at line 190 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonFloatValueMapTs_

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > ReducedEGProducer::photonFloatValueMapTs_
private

Definition at line 175 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonIdTs_

std::vector<edm::EDGetTokenT<edm::ValueMap<bool> > > ReducedEGProducer::photonIdTs_
private

Definition at line 172 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonPfCandMapT_

const edm::EDGetTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef> > > ReducedEGProducer::photonPfCandMapT_
private

Definition at line 169 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonT_

const edm::EDGetTokenT<reco::PhotonCollection> ReducedEGProducer::photonT_
private

Definition at line 157 of file ReducedEGProducer.cc.

Referenced by produce().

◆ preshowerEcalHits_

const edm::EDGetTokenT<EcalRecHitCollection> ReducedEGProducer::preshowerEcalHits_
private

Definition at line 166 of file ReducedEGProducer.cc.

Referenced by produce().

◆ recoHIPhotonIsolationMapInputToken_

const edm::EDGetTokenT<reco::HIPhotonIsolationMap> ReducedEGProducer::recoHIPhotonIsolationMapInputToken_
private

Definition at line 179 of file ReducedEGProducer.cc.

Referenced by produce().

◆ recoHIPhotonIsolationMapOutputName_

edm::EDPutTokenT<reco::HIPhotonIsolationMap> ReducedEGProducer::recoHIPhotonIsolationMapOutputName_
private

Definition at line 180 of file ReducedEGProducer.cc.

Referenced by produce().

◆ relinkGsfElectronSel_

const StringCutObjectSelector<reco::GsfElectron> ReducedEGProducer::relinkGsfElectronSel_
private

Definition at line 234 of file ReducedEGProducer.cc.

Referenced by produce().

◆ relinkOOTPhotonSel_

const StringCutObjectSelector<reco::Photon> ReducedEGProducer::relinkOOTPhotonSel_
private

Definition at line 231 of file ReducedEGProducer.cc.

Referenced by produce().

◆ relinkPhotonSel_

const StringCutObjectSelector<reco::Photon> ReducedEGProducer::relinkPhotonSel_
private

Definition at line 228 of file ReducedEGProducer.cc.

Referenced by produce().

◆ relinkSuperclusterPtMin_

const double ReducedEGProducer::relinkSuperclusterPtMin_
private

Definition at line 184 of file ReducedEGProducer.cc.

Referenced by produce().

◆ scAbsetaMax_

const double ReducedEGProducer::scAbsetaMax_
private

Definition at line 183 of file ReducedEGProducer.cc.

Referenced by produce().

◆ scPtMin_

const double ReducedEGProducer::scPtMin_
private

Definition at line 182 of file ReducedEGProducer.cc.

Referenced by produce().

◆ singleConversionT_

const edm::EDGetTokenT<reco::ConversionCollection> ReducedEGProducer::singleConversionT_
private

Definition at line 161 of file ReducedEGProducer.cc.

Referenced by produce().

◆ slimRelinkGsfElectronSel_

const StringCutObjectSelector<reco::GsfElectron> ReducedEGProducer::slimRelinkGsfElectronSel_
private

Definition at line 233 of file ReducedEGProducer.cc.

Referenced by produce().

◆ slimRelinkOOTPhotonSel_

const StringCutObjectSelector<reco::Photon> ReducedEGProducer::slimRelinkOOTPhotonSel_
private

Definition at line 230 of file ReducedEGProducer.cc.

Referenced by produce().

◆ slimRelinkPhotonSel_

const StringCutObjectSelector<reco::Photon> ReducedEGProducer::slimRelinkPhotonSel_
private

Definition at line 227 of file ReducedEGProducer.cc.

Referenced by produce().

◆ superclusterT_

const edm::EDGetTokenT<reco::SuperClusterCollection> ReducedEGProducer::superclusterT_
private

Definition at line 156 of file ReducedEGProducer.cc.

Referenced by produce().