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 edm::EDGetTokenT< reco::ConversionCollectionsingleConversionT_
 
const StringCutObjectSelector< reco::GsfElectronslimRelinkGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonslimRelinkOOTPhotonSel_
 
const StringCutObjectSelector< reco::PhotonslimRelinkPhotonSel_
 

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 265 of file ReducedEGProducer.cc.

References label.

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

References hcalHitSel_, and EGHcalRecHitSelector::setup().

378 { 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 1204 of file ReducedEGProducer.cc.

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

Referenced by produce().

1209  {
1210  const float newEnergy = energyMap[oldEleRef];
1211  const float newEnergyErr = energyErrMap[oldEleRef];
1212  const float newEcalEnergy = ecalEnergyMap[oldEleRef];
1213  const float newEcalEnergyErr = ecalEnergyErrMap[oldEleRef];
1214 
1215  //make a copy of this as the setCorrectedEcalEnergy call with modifiy the electrons p4
1216  const math::XYZTLorentzVector oldP4 = electron.p4();
1217  const float corr = newEnergy / oldP4.E();
1218 
1219  electron.setCorrectedEcalEnergy(newEcalEnergy);
1220  electron.setCorrectedEcalEnergyError(newEcalEnergyErr);
1221 
1222  math::XYZTLorentzVector newP4{oldP4.x() * corr, oldP4.y() * corr, oldP4.z() * corr, newEnergy};
1223  electron.correctMomentum(newP4, electron.trackMomentumError(), newEnergyErr);
1224 }
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 1195 of file ReducedEGProducer.cc.

References displacedMuons_cfi::photon.

Referenced by produce().

1198  {
1199  float newEnergy = energyMap[oldPhoRef];
1200  float newEnergyErr = energyErrMap[oldPhoRef];
1201  photon.setCorrectedEnergy(reco::Photon::P4type::regression2, newEnergy, newEnergyErr, true);
1202 }

◆ linkCaloCluster()

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

Definition at line 1028 of file ReducedEGProducer.cc.

Referenced by linkCaloClusters(), and produce().

1030  {
1031  if (!caloClusterMap.count(caloCluster)) {
1032  caloClusters.push_back(*caloCluster);
1033  caloClusterMap[caloCluster] = caloClusters.size() - 1;
1034  }
1035 }

◆ 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 1037 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().

1045  {
1046  for (const auto& cluster : superCluster.clusters()) {
1047  linkCaloCluster(cluster, ebeeClusters, ebeeClusterMap);
1048 
1049  for (const auto& hitfrac : cluster->hitsAndFractions()) {
1050  rechitMap.insert(hitfrac.first);
1051  }
1052  //make sure to also take all hits in the 5x5 around the max energy xtal
1053  bool barrel = cluster->hitsAndFractions().front().first.subdetId() == EcalBarrel;
1054  const EcalRecHitCollection* rhcol = barrel ? barrelHitHandle.product() : endcapHitHandle.product();
1055  DetId seed = EcalClusterTools::getMaximum(*cluster, rhcol).first;
1056 
1057  std::vector<DetId> dets5x5 =
1058  caloTopology.getSubdetectorTopology(DetId::Ecal, barrel ? EcalBarrel : EcalEndcap)->getWindow(seed, 5, 5);
1059  for (const auto& detid : dets5x5) {
1060  rechitMap.insert(detid);
1061  }
1062  }
1063  for (const auto& cluster : superCluster.preshowerClusters()) {
1064  linkCaloCluster(cluster, esClusters, esClusterMap);
1065 
1066  for (const auto& hitfrac : cluster->hitsAndFractions()) {
1067  rechitMap.insert(hitfrac.first);
1068  }
1069  }
1070 }
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 1019 of file ReducedEGProducer.cc.

References pwdgSkimBPark_cfi::conversions.

Referenced by linkConversions(), and linkConversionsByTrackRef().

1021  {
1022  if (!conversionMap.count(convref)) {
1023  conversions.push_back(*convref);
1024  conversionMap[convref] = conversions.size() - 1;
1025  }
1026 }

◆ linkConversions()

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

Definition at line 979 of file ReducedEGProducer.cc.

References pwdgSkimBPark_cfi::conversions, and linkConversion().

Referenced by produce().

981  {
982  for (const auto& convref : convrefs) {
983  linkConversion(convref, conversions, conversionMap);
984  }
985 }
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 987 of file ReducedEGProducer.cc.

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

Referenced by produce().

990  {
991  int index = 0;
992  for (const auto& conversion : *conversionHandle) {
994 
995  bool matched = ConversionTools::matchesConversion(gsfElectron, conversion, true, true);
996  if (!matched)
997  continue;
998 
999  linkConversion(convref, conversions, conversionMap);
1000  }
1001 }
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 1003 of file ReducedEGProducer.cc.

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

1006  {
1007  int index = 0;
1008  for (const auto& conversion : *conversionHandle) {
1010 
1011  bool matched = ConversionTools::matchesConversion(superCluster, conversion, 0.2);
1012  if (!matched)
1013  continue;
1014 
1015  linkConversion(convref, conversions, conversionMap);
1016  }
1017 }
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 950 of file ReducedEGProducer.cc.

References HLT_FULL_cff::cores.

Referenced by produce().

950  {
951  if (!coreMap.count(core)) {
952  cores.push_back(*core);
953  coreMap[core] = cores.size() - 1;
954  }
955 }
Definition: __init__.py:1

◆ linkHcalHits()

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

Definition at line 1072 of file ReducedEGProducer.cc.

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

Referenced by produce().

1074  {
1075  hcalHitSel_.addDetIds(superClus, recHits, hcalDetIds);
1076 }
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 957 of file ReducedEGProducer.cc.

References HLT_2023v12_cff::superClusters.

Referenced by produce().

961  {
962  const auto& mappedsc = superClusterMap.find(superCluster);
963  //get index in output collection in order to keep track whether superCluster
964  //will be subject to full relinking
965  unsigned int mappedscidx = 0;
966  if (mappedsc == superClusterMap.end()) {
967  superClusters.push_back(*superCluster);
968  mappedscidx = superClusters.size() - 1;
969  superClusterMap[superCluster] = mappedscidx;
970  } else {
971  mappedscidx = mappedsc->second;
972  }
973 
974  //additionally mark supercluster for full relinking
975  if (relink)
976  superClusterFullRelinkMap.insert(mappedscidx);
977 }

◆ produce()

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

Definition at line 380 of file ReducedEGProducer.cc.

References 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(), 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(), reducedEgamma_cfi::singleConversions, singleConversionT_, slimRelinkGsfElectronSel_, slimRelinkOOTPhotonSel_, slimRelinkPhotonSel_, and HLT_2023v12_cff::superClusters.

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

1082  {
1083  //remap seed cluster
1084  const auto& seedmapped = ebeeClusterMap.find(superCluster.seed());
1085  if (seedmapped != ebeeClusterMap.end()) {
1086  //make new ptr
1087  reco::CaloClusterPtr clusptr(outEBEEClusterHandle, seedmapped->second);
1088  superCluster.setSeed(clusptr);
1089  }
1090 
1091  //remap all clusters
1093  for (const auto& cluster : superCluster.clusters()) {
1094  const auto& clustermapped = ebeeClusterMap.find(cluster);
1095  if (clustermapped != ebeeClusterMap.end()) {
1096  //make new ptr
1097  reco::CaloClusterPtr clusptr(outEBEEClusterHandle, clustermapped->second);
1098  clusters.push_back(clusptr);
1099  } else {
1100  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
1101  clusters.clear();
1102  break;
1103  }
1104  }
1105  if (!clusters.empty()) {
1106  superCluster.setClusters(clusters);
1107  }
1108 
1109  //remap preshower clusters
1110  reco::CaloClusterPtrVector esclusters;
1111  for (const auto& cluster : superCluster.preshowerClusters()) {
1112  const auto& clustermapped = esClusterMap.find(cluster);
1113  if (clustermapped != esClusterMap.end()) {
1114  //make new ptr
1115  reco::CaloClusterPtr clusptr(outESClusterHandle, clustermapped->second);
1116  esclusters.push_back(clusptr);
1117  } else {
1118  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
1119  esclusters.clear();
1120  break;
1121  }
1122  }
1123  if (!esclusters.empty()) {
1124  superCluster.setPreshowerClusters(esclusters);
1125  }
1126 }
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 1151 of file ReducedEGProducer.cc.

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

Referenced by produce().

1154  {
1155  reco::ConversionRefVector outconvrefs;
1156  for (const auto& convref : convrefs) {
1157  const auto& convmapped = conversionMap.find(convref);
1158  if (convmapped != conversionMap.end()) {
1159  //make new ref
1160  reco::ConversionRef outref(outConversionHandle, convmapped->second);
1161  } else {
1162  //can only relink if all conversions are being relinked, so if one is missing, then skip the relinking completely
1163  outconvrefs.clear();
1164  break;
1165  }
1166  }
1167  if (!outconvrefs.empty()) {
1168  photonCore.setConversions(outconvrefs);
1169  }
1170 }
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 1183 of file ReducedEGProducer.cc.

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

Referenced by produce().

1186  {
1187  const auto& coremapped = gsfElectronCoreMap.find(gsfElectron.core());
1188  if (coremapped != gsfElectronCoreMap.end()) {
1189  //make new ref
1190  reco::GsfElectronCoreRef coreref(outgsfElectronCoreHandle, coremapped->second);
1191  gsfElectron.setCore(coreref);
1192  }
1193 }
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 1141 of file ReducedEGProducer.cc.

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

Referenced by produce().

1143  {
1144  const auto& gsftkmapped = gsfTrackMap.find(gsfElectronCore.gsfTrack());
1145  if (gsftkmapped != gsfTrackMap.end()) {
1146  reco::GsfTrackRef gsftkref(outGsfTrackHandle, gsftkmapped->second);
1147  gsfElectronCore.setGsfTrack(gsftkref);
1148  }
1149 }

◆ 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 1172 of file ReducedEGProducer.cc.

References displacedMuons_cfi::photon.

Referenced by produce().

1174  {
1175  const auto& coremapped = photonCoreMap.find(photon.photonCore());
1176  if (coremapped != photonCoreMap.end()) {
1177  //make new ref
1178  reco::PhotonCoreRef coreref(outPhotonCoreHandle, coremapped->second);
1179  photon.setPhotonCore(coreref);
1180  }
1181 }

◆ 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 1129 of file ReducedEGProducer.cc.

Referenced by produce().

1132  {
1133  const auto& scmapped = superClusterMap.find(core.superCluster());
1134  if (scmapped != superClusterMap.end()) {
1135  //make new ref
1136  reco::SuperClusterRef scref(outSuperClusterHandle, scmapped->second);
1137  core.setSuperCluster(scref);
1138  }
1139 }
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 183 of file ReducedEGProducer.cc.

Referenced by produce().

◆ applyGsfElectronCalibOnMC_

const bool ReducedEGProducer::applyGsfElectronCalibOnMC_
private

Definition at line 184 of file ReducedEGProducer.cc.

Referenced by produce().

◆ applyPhotonCalibOnData_

const bool ReducedEGProducer::applyPhotonCalibOnData_
private

Definition at line 181 of file ReducedEGProducer.cc.

Referenced by produce().

◆ applyPhotonCalibOnMC_

const bool ReducedEGProducer::applyPhotonCalibOnMC_
private

Definition at line 182 of file ReducedEGProducer.cc.

Referenced by produce().

◆ barrelEcalHits_

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

Definition at line 162 of file ReducedEGProducer.cc.

Referenced by produce().

◆ caloTopology_

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

Definition at line 192 of file ReducedEGProducer.cc.

Referenced by produce().

◆ conversionT_

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

Definition at line 159 of file ReducedEGProducer.cc.

Referenced by produce().

◆ doPreshowerEcalHits_

const bool ReducedEGProducer::doPreshowerEcalHits_
private

Definition at line 164 of file ReducedEGProducer.cc.

Referenced by produce().

◆ endcapEcalHits_

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

Definition at line 163 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronCalibEcalEnergyErrT_

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

Definition at line 190 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronCalibEcalEnergyT_

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

Definition at line 189 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronCalibEnergyErrT_

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

Definition at line 188 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronCalibEnergyT_

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

Definition at line 187 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronFloatValueMapTs_

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

Definition at line 176 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronIdTs_

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

Definition at line 172 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronPfCandMapT_

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

Definition at line 169 of file ReducedEGProducer.cc.

Referenced by produce().

◆ gsfElectronT_

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

Definition at line 158 of file ReducedEGProducer.cc.

Referenced by produce().

◆ hbheHits_

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

Definition at line 166 of file ReducedEGProducer.cc.

Referenced by produce().

◆ hcalHitSel_

EGHcalRecHitSelector ReducedEGProducer::hcalHitSel_
private

Definition at line 231 of file ReducedEGProducer.cc.

Referenced by beginRun(), and linkHcalHits().

◆ keepGsfElectronSel_

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

Definition at line 227 of file ReducedEGProducer.cc.

Referenced by produce().

◆ keepOOTPhotonSel_

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

Definition at line 224 of file ReducedEGProducer.cc.

Referenced by produce().

◆ keepPhotonSel_

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

Definition at line 221 of file ReducedEGProducer.cc.

Referenced by produce().

◆ ootPhotonFloatValueMapTs_

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

Definition at line 175 of file ReducedEGProducer.cc.

Referenced by produce().

◆ ootPhotonT_

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

Definition at line 157 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outConversions_

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

Definition at line 201 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outEBEEClusters_

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

Definition at line 204 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outEBRecHits_

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

Definition at line 209 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outEERecHits_

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

Definition at line 210 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outESClusters_

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

Definition at line 205 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outESRecHits_

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

Definition at line 211 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectronCores_

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

Definition at line 199 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectronFloatValueMaps_

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

Definition at line 219 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectronIds_

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

Definition at line 216 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectronPfCandMap_

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

Definition at line 214 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfElectrons_

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

Definition at line 198 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outGsfTracks_

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

Definition at line 200 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outHBHERecHits_

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

Definition at line 212 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTEBEEClusters_

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

Definition at line 207 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTESClusters_

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

Definition at line 208 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTPhotonCores_

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

Definition at line 197 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTPhotonFloatValueMaps_

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

Definition at line 218 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTPhotons_

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

Definition at line 196 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outOOTSuperClusters_

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

Definition at line 206 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotonCores_

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

Definition at line 195 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotonFloatValueMaps_

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

Definition at line 217 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotonIds_

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

Definition at line 215 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotonPfCandMap_

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

Definition at line 213 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outPhotons_

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

Definition at line 194 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outSingleConversions_

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

Definition at line 202 of file ReducedEGProducer.cc.

Referenced by produce().

◆ outSuperClusters_

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

Definition at line 203 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonCalibEnergyErrT_

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

Definition at line 186 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonCalibEnergyT_

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

Definition at line 185 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonFloatValueMapTs_

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

Definition at line 174 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonIdTs_

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

Definition at line 171 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonPfCandMapT_

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

Definition at line 168 of file ReducedEGProducer.cc.

Referenced by produce().

◆ photonT_

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

Definition at line 156 of file ReducedEGProducer.cc.

Referenced by produce().

◆ preshowerEcalHits_

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

Definition at line 165 of file ReducedEGProducer.cc.

Referenced by produce().

◆ recoHIPhotonIsolationMapInputToken_

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

Definition at line 178 of file ReducedEGProducer.cc.

Referenced by produce().

◆ recoHIPhotonIsolationMapOutputName_

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

Definition at line 179 of file ReducedEGProducer.cc.

Referenced by produce().

◆ relinkGsfElectronSel_

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

Definition at line 229 of file ReducedEGProducer.cc.

Referenced by produce().

◆ relinkOOTPhotonSel_

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

Definition at line 226 of file ReducedEGProducer.cc.

Referenced by produce().

◆ relinkPhotonSel_

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

Definition at line 223 of file ReducedEGProducer.cc.

Referenced by produce().

◆ singleConversionT_

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

Definition at line 160 of file ReducedEGProducer.cc.

Referenced by produce().

◆ slimRelinkGsfElectronSel_

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

Definition at line 228 of file ReducedEGProducer.cc.

Referenced by produce().

◆ slimRelinkOOTPhotonSel_

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

Definition at line 225 of file ReducedEGProducer.cc.

Referenced by produce().

◆ slimRelinkPhotonSel_

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

Definition at line 222 of file ReducedEGProducer.cc.

Referenced by produce().