CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
ReducedEGProducer Class Reference

#include <ReducedEGProducer.h>

Inheritance diagram for ReducedEGProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

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

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, const CaloTopology *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 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)
 

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_
 
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< reco::GsfTrackCollectiongsfTrackT_
 
const StringCutObjectSelector< reco::GsfElectronkeepGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonkeepOOTPhotonSel_
 
const StringCutObjectSelector< reco::PhotonkeepPhotonSel_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonFloatValueMapTs_
 
const edm::EDGetTokenT< reco::PhotonCollectionootPhotonT_
 
const std::string outConversions_
 
const std::string outEBEEClusters_
 
const std::string outEBRecHits_
 
const std::string outEERecHits_
 
const std::string outESClusters_
 
const std::string outESRecHits_
 
const std::string outGsfElectronCores_
 
const std::vector< std::string > outGsfElectronFloatValueMaps_
 
const std::vector< std::string > outGsfElectronIds_
 
const std::string outGsfElectronPfCandMap_
 
const std::string outGsfElectrons_
 
const std::string outGsfTracks_
 
const std::string outOOTEBEEClusters_
 
const std::string outOOTESClusters_
 
const std::string outOOTPhotonCores_
 
const std::vector< std::string > outOOTPhotonFloatValueMaps_
 
const std::string outOOTPhotons_
 
const std::string outOOTSuperClusters_
 
const std::string outPhotonCores_
 
const std::vector< std::string > outPhotonFloatValueMaps_
 
const std::vector< std::string > outPhotonIds_
 
const std::string outPhotonPfCandMap_
 
const std::string outPhotons_
 
const std::string outSingleConversions_
 
const std::string outSuperClusters_
 
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 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<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

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

Constructor & Destructor Documentation

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

Definition at line 56 of file ReducedEGProducer.cc.

References applyGsfElectronCalibOnData_, applyGsfElectronCalibOnMC_, applyPhotonCalibOnData_, applyPhotonCalibOnMC_, edm::EDConsumerBase::consumes(), doPreshowerEcalHits_, edm::ParameterSet::getParameter(), gsfElectronCalibEcalEnergyErrT_, gsfElectronCalibEcalEnergyT_, gsfElectronCalibEnergyErrT_, gsfElectronCalibEnergyT_, gsfElectronFloatValueMapTs_, gsfElectronIdTs_, ootPhotonFloatValueMapTs_, outConversions_, outEBEEClusters_, outEBRecHits_, outEERecHits_, outESClusters_, outESRecHits_, outGsfElectronCores_, outGsfElectronFloatValueMaps_, outGsfElectronIds_, outGsfElectronPfCandMap_, outGsfElectrons_, outGsfTracks_, outOOTEBEEClusters_, outOOTESClusters_, outOOTPhotonCores_, outOOTPhotonFloatValueMaps_, outOOTPhotons_, outOOTSuperClusters_, outPhotonCores_, outPhotonFloatValueMaps_, outPhotonIds_, outPhotonPfCandMap_, outPhotons_, outSingleConversions_, outSuperClusters_, photonCalibEnergyErrT_, photonCalibEnergyT_, photonFloatValueMapTs_, photonIdTs_, setToken(), AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::tag.

56  :
57  photonT_(consumes<reco::PhotonCollection>(config.getParameter<edm::InputTag>("photons"))),
58  ootPhotonT_(consumes<reco::PhotonCollection>(config.getParameter<edm::InputTag>("ootPhotons"))),
59  gsfElectronT_(consumes<reco::GsfElectronCollection>(config.getParameter<edm::InputTag>("gsfElectrons"))),
60  gsfTrackT_(consumes<reco::GsfTrackCollection>(config.getParameter<edm::InputTag>("gsfTracks"))),
61  conversionT_(consumes<reco::ConversionCollection>(config.getParameter<edm::InputTag>("conversions"))),
62  singleConversionT_(consumes<reco::ConversionCollection>(config.getParameter<edm::InputTag>("singleConversions"))),
63  barrelEcalHits_(consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("barrelEcalHits"))),
64  endcapEcalHits_(consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("endcapEcalHits"))),
65  doPreshowerEcalHits_(!config.getParameter<edm::InputTag>("preshowerEcalHits").label().empty()),
66  preshowerEcalHits_(doPreshowerEcalHits_ ? consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("preshowerEcalHits")) : edm::EDGetTokenT<EcalRecHitCollection>()),
67  photonPfCandMapT_(consumes<edm::ValueMap<std::vector<reco::PFCandidateRef> > >(config.getParameter<edm::InputTag>("photonsPFValMap"))),
68  gsfElectronPfCandMapT_(consumes<edm::ValueMap<std::vector<reco::PFCandidateRef> > >(config.getParameter<edm::InputTag>("gsfElectronsPFValMap"))),
69  //calibration flags
70  applyPhotonCalibOnData_(config.getParameter<bool>("applyPhotonCalibOnData")),
71  applyPhotonCalibOnMC_(config.getParameter<bool>("applyPhotonCalibOnMC")),
72  applyGsfElectronCalibOnData_(config.getParameter<bool>("applyGsfElectronCalibOnData")),
73  applyGsfElectronCalibOnMC_(config.getParameter<bool>("applyGsfElectronCalibOnMC")),
74  //output collections
75  outPhotons_("reducedGedPhotons"),
76  outPhotonCores_("reducedGedPhotonCores"),
77  outOOTPhotons_("reducedOOTPhotons"),
78  outOOTPhotonCores_("reducedOOTPhotonCores"),
79  outGsfElectrons_("reducedGedGsfElectrons"),
80  outGsfElectronCores_("reducedGedGsfElectronCores"),
81  outGsfTracks_("reducedGsfTracks"),
82  outConversions_("reducedConversions"),
83  outSingleConversions_("reducedSingleLegConversions"),
84  outSuperClusters_("reducedSuperClusters"),
85  outEBEEClusters_("reducedEBEEClusters"),
86  outESClusters_("reducedESClusters"),
87  outOOTSuperClusters_("reducedOOTSuperClusters"),
88  outOOTEBEEClusters_("reducedOOTEBEEClusters"),
89  outOOTESClusters_("reducedOOTESClusters"),
90  outEBRecHits_("reducedEBRecHits"),
91  outEERecHits_("reducedEERecHits"),
92  outESRecHits_("reducedESRecHits"),
93  outPhotonPfCandMap_("reducedPhotonPfCandMap"),
94  outGsfElectronPfCandMap_("reducedGsfElectronPfCandMap"),
95  outPhotonIds_(config.getParameter<std::vector<std::string> >("photonIDOutput")),
96  outGsfElectronIds_(config.getParameter<std::vector<std::string> >("gsfElectronIDOutput")),
97  outPhotonFloatValueMaps_(config.getParameter<std::vector<std::string> >("photonFloatValueMapOutput")),
98  outOOTPhotonFloatValueMaps_(config.getParameter<std::vector<std::string> >("ootPhotonFloatValueMapOutput")),
99  outGsfElectronFloatValueMaps_(config.getParameter<std::vector<std::string> >("gsfElectronFloatValueMapOutput")),
100  keepPhotonSel_(config.getParameter<std::string>("keepPhotons")),
101  slimRelinkPhotonSel_(config.getParameter<std::string>("slimRelinkPhotons")),
102  relinkPhotonSel_(config.getParameter<std::string>("relinkPhotons")),
103  keepOOTPhotonSel_(config.getParameter<std::string>("keepOOTPhotons")),
104  slimRelinkOOTPhotonSel_(config.getParameter<std::string>("slimRelinkOOTPhotons")),
105  relinkOOTPhotonSel_(config.getParameter<std::string>("relinkOOTPhotons")),
106  keepGsfElectronSel_(config.getParameter<std::string>("keepGsfElectrons")),
107  slimRelinkGsfElectronSel_(config.getParameter<std::string>("slimRelinkGsfElectrons")),
108  relinkGsfElectronSel_(config.getParameter<std::string>("relinkGsfElectrons"))
109 {
110  const std::vector<edm::InputTag>& photonidinputs =
111  config.getParameter<std::vector<edm::InputTag> >("photonIDSources");
112  for (const edm::InputTag &tag : photonidinputs) {
113  photonIdTs_.emplace_back(consumes<edm::ValueMap<bool> >(tag));
114  }
115 
116  const std::vector<edm::InputTag>& gsfelectronidinputs =
117  config.getParameter<std::vector<edm::InputTag> >("gsfElectronIDSources");
118  for (const edm::InputTag &tag : gsfelectronidinputs) {
120  }
121 
122  const std::vector<edm::InputTag>& photonpfclusterisoinputs =
123  config.getParameter<std::vector<edm::InputTag> >("photonFloatValueMapSources");
124  for (const edm::InputTag &tag : photonpfclusterisoinputs) {
126  }
127 
128  const std::vector<edm::InputTag>& ootphotonpfclusterisoinputs =
129  config.getParameter<std::vector<edm::InputTag> >("ootPhotonFloatValueMapSources");
130  for (const edm::InputTag &tag : ootphotonpfclusterisoinputs) {
132  }
133 
134  const std::vector<edm::InputTag>& gsfelectronpfclusterisoinputs =
135  config.getParameter<std::vector<edm::InputTag> >("gsfElectronFloatValueMapSources");
136  for (const edm::InputTag &tag : gsfelectronpfclusterisoinputs) {
138  }
139 
141  setToken(photonCalibEnergyT_,config,"photonCalibEnergySource");
142  setToken(photonCalibEnergyErrT_,config,"photonCalibEnergyErrSource");
143  }
145  setToken(gsfElectronCalibEnergyT_,config,"gsfElectronCalibEnergySource");
146  setToken(gsfElectronCalibEnergyErrT_,config,"gsfElectronCalibEnergyErrSource");
147  setToken(gsfElectronCalibEcalEnergyT_,config,"gsfElectronCalibEcalEnergySource");
148  setToken(gsfElectronCalibEcalEnergyErrT_,config,"gsfElectronCalibEcalEnergyErrSource");
149  }
150 
151  produces< reco::PhotonCollection >(outPhotons_);
152  produces< reco::PhotonCoreCollection >(outPhotonCores_);
153  produces< reco::PhotonCollection >(outOOTPhotons_);
154  produces< reco::PhotonCoreCollection >(outOOTPhotonCores_);
155  produces< reco::GsfElectronCollection >(outGsfElectrons_);
156  produces< reco::GsfElectronCoreCollection >(outGsfElectronCores_);
157  produces< reco::GsfTrackCollection >(outGsfTracks_);
158  produces< reco::ConversionCollection >(outConversions_);
159  produces< reco::ConversionCollection >(outSingleConversions_);
160  produces< reco::SuperClusterCollection >(outSuperClusters_);
161  produces< reco::CaloClusterCollection >(outEBEEClusters_);
162  produces< reco::CaloClusterCollection >(outESClusters_);
163  produces< reco::SuperClusterCollection >(outOOTSuperClusters_);
164  produces< reco::CaloClusterCollection >(outOOTEBEEClusters_);
165  produces< reco::CaloClusterCollection >(outOOTESClusters_);
166  produces< EcalRecHitCollection >(outEBRecHits_);
167  produces< EcalRecHitCollection >(outEERecHits_);
168  if (doPreshowerEcalHits_) produces< EcalRecHitCollection >(outESRecHits_);
169  produces< edm::ValueMap<std::vector<reco::PFCandidateRef> > >(outPhotonPfCandMap_);
170  produces< edm::ValueMap<std::vector<reco::PFCandidateRef> > >(outGsfElectronPfCandMap_);
171  for (const std::string &outid : outPhotonIds_) {
172  produces< edm::ValueMap<bool> >(outid);
173  }
174  for (const std::string &outid : outGsfElectronIds_) {
175  produces< edm::ValueMap<float> >(outid);
176  }
177  for (const std::string &outid : outPhotonFloatValueMaps_) {
178  produces< edm::ValueMap<float> >(outid);
179  }
180  for (const std::string &outid : outOOTPhotonFloatValueMaps_) {
181  produces< edm::ValueMap<float> >(outid);
182  }
183  for (const std::string &outid : outGsfElectronFloatValueMaps_) {
184  produces< edm::ValueMap<float> >(outid);
185  }
186 }
const bool doPreshowerEcalHits_
const StringCutObjectSelector< reco::Photon > relinkOOTPhotonSel_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronT_
const bool applyPhotonCalibOnData_
const edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyT_
const StringCutObjectSelector< reco::Photon > slimRelinkPhotonSel_
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
const std::vector< std::string > outPhotonIds_
const std::vector< std::string > outOOTPhotonFloatValueMaps_
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyT_
const std::vector< std::string > outPhotonFloatValueMaps_
const std::string outGsfTracks_
void setToken(edm::EDGetTokenT< T > &token, const edm::ParameterSet &config, const std::string &name)
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
const std::string outOOTPhotons_
Definition: config.py:1
const std::string outEBEEClusters_
const StringCutObjectSelector< reco::Photon > keepPhotonSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
const bool applyGsfElectronCalibOnData_
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyErrT_
const StringCutObjectSelector< reco::GsfElectron > relinkGsfElectronSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
const std::string outEBRecHits_
const std::string outESRecHits_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< EcalRecHitCollection > preshowerEcalHits_
const std::vector< std::string > outGsfElectronIds_
const std::string outSingleConversions_
const std::string outESClusters_
const std::string outOOTSuperClusters_
const StringCutObjectSelector< reco::Photon > keepOOTPhotonSel_
const std::string outOOTESClusters_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronFloatValueMapTs_
const std::string outOOTEBEEClusters_
const StringCutObjectSelector< reco::Photon > relinkPhotonSel_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyErrT_
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
const bool applyPhotonCalibOnMC_
const std::string outPhotons_
const std::string outGsfElectronPfCandMap_
const std::string outGsfElectronCores_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonFloatValueMapTs_
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
const std::string outSuperClusters_
const std::string outConversions_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonFloatValueMapTs_
const std::string outGsfElectrons_
const StringCutObjectSelector< reco::GsfElectron > slimRelinkGsfElectronSel_
std::string const & label() const
Definition: InputTag.h:36
const std::string outPhotonCores_
fixed size matrix
HLT enums.
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyErrT_
const std::string outEERecHits_
const StringCutObjectSelector< reco::Photon > slimRelinkOOTPhotonSel_
const std::vector< std::string > outGsfElectronFloatValueMaps_
const std::string outPhotonPfCandMap_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
const std::string outOOTPhotonCores_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyT_
const edm::EDGetTokenT< reco::PhotonCollection > ootPhotonT_
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
const bool applyGsfElectronCalibOnMC_
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_
ReducedEGProducer::~ReducedEGProducer ( )
override

Definition at line 188 of file ReducedEGProducer.cc.

189 {
190 }

Member Function Documentation

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

References corr, reco::GsfElectron::correctMomentum(), reco::GsfElectron::p4(), reco::GsfElectron::setCorrectedEcalEnergy(), reco::GsfElectron::setCorrectedEcalEnergyError(), and reco::GsfElectron::trackMomentumError().

Referenced by produce().

1018 {
1019  const float newEnergy = energyMap[oldEleRef];
1020  const float newEnergyErr = energyErrMap[oldEleRef];
1021  const float newEcalEnergy = ecalEnergyMap[oldEleRef];
1022  const float newEcalEnergyErr = ecalEnergyErrMap[oldEleRef];
1023 
1024  //make a copy of this as the setCorrectedEcalEnergy call with modifiy the electrons p4
1025  const math::XYZTLorentzVector oldP4 = electron.p4();
1026  const float corr = newEnergy / oldP4.E();
1027 
1028  electron.setCorrectedEcalEnergy(newEcalEnergy);
1029  electron.setCorrectedEcalEnergyError(newEcalEnergyErr);
1030 
1032  oldP4.y() * corr,
1033  oldP4.z() * corr,
1034  newEnergy);
1035  electron.correctMomentum(newP4, electron.trackMomentumError(), newEnergyErr);
1036 
1037 }
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
JetCorrectorParameters corr
Definition: classes.h:5
void ReducedEGProducer::calibratePhoton ( reco::Photon photon,
const reco::PhotonRef oldPhoRef,
const edm::ValueMap< float > &  energyMap,
const edm::ValueMap< float > &  energyErrMap 
)
staticprivate

Definition at line 1001 of file ReducedEGProducer.cc.

References reco::Photon::setCorrectedEnergy().

Referenced by produce().

1005 {
1006  float newEnergy = energyMap[oldPhoRef];
1007  float newEnergyErr = energyErrMap[oldPhoRef];
1008  photon.setCorrectedEnergy(reco::Photon::P4type::regression2, newEnergy, newEnergyErr, true);
1009 
1010 }
void setCorrectedEnergy(P4type type, float E, float dE, bool toCand=true)
void ReducedEGProducer::linkCaloCluster ( const reco::CaloClusterPtr caloCluster,
reco::CaloClusterCollection caloClusters,
std::map< reco::CaloClusterPtr, unsigned int > &  caloClusterMap 
)
private

Definition at line 831 of file ReducedEGProducer.cc.

Referenced by linkCaloClusters(), and produce().

834 {
835  if (!caloClusterMap.count(caloCluster)) {
836  caloClusters.push_back(*caloCluster);
837  caloClusterMap[caloCluster] = caloClusters.size() - 1;
838  }
839 }
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,
const CaloTopology caloTopology,
reco::CaloClusterCollection esClusters,
std::map< reco::CaloClusterPtr, unsigned int > &  esClusterMap 
)
private

Definition at line 841 of file ReducedEGProducer.cc.

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

Referenced by produce().

850 {
851  for (const auto& cluster : superCluster.clusters()) {
852  linkCaloCluster(cluster, ebeeClusters, ebeeClusterMap);
853 
854  for (const auto& hitfrac : cluster->hitsAndFractions()) {
855  rechitMap.insert(hitfrac.first);
856  }
857  //make sure to also take all hits in the 5x5 around the max energy xtal
858  bool barrel = cluster->hitsAndFractions().front().first.subdetId()==EcalBarrel;
859  const EcalRecHitCollection *rhcol = barrel ? barrelHitHandle.product() : endcapHitHandle.product();
860  DetId seed = EcalClusterTools::getMaximum(*cluster, rhcol).first;
861 
862  std::vector<DetId> dets5x5 = caloTopology->getSubdetectorTopology(DetId::Ecal, barrel ? EcalBarrel : EcalEndcap)->getWindow(seed,5,5);
863  for (const auto& detid : dets5x5) {
864  rechitMap.insert(detid);
865  }
866  }
867  for (const auto& cluster : superCluster.preshowerClusters()) {
868  linkCaloCluster(cluster, esClusters, esClusterMap);
869 
870  for (const auto& hitfrac : cluster->hitsAndFractions()) {
871  rechitMap.insert(hitfrac.first);
872  }
873  }
874 }
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:69
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:72
Definition: DetId.h:18
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
T const * product() const
Definition: Handle.h:81
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:25
void linkCaloCluster(const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
void ReducedEGProducer::linkConversion ( const reco::ConversionRef convref,
reco::ConversionCollection conversions,
std::map< reco::ConversionRef, unsigned int > &  conversionMap 
)
private

Definition at line 821 of file ReducedEGProducer.cc.

Referenced by linkConversions(), and linkConversionsByTrackRef().

824 {
825  if (!conversionMap.count(convref)) {
826  conversions.push_back(*convref);
827  conversionMap[convref] = conversions.size() - 1;
828  }
829 }
void ReducedEGProducer::linkConversions ( const reco::ConversionRefVector convrefs,
reco::ConversionCollection conversions,
std::map< reco::ConversionRef, unsigned int > &  conversionMap 
)
private

Definition at line 778 of file ReducedEGProducer.cc.

References linkConversion().

Referenced by produce().

781 {
782  for (const auto& convref : convrefs) {
783  linkConversion(convref, conversions, conversionMap);
784  }
785 }
void linkConversion(const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
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 787 of file ReducedEGProducer.cc.

References edm::conversion(), diffTreeTool::index, linkConversion(), electrons_cff::matched, and ConversionTools::matchesConversion().

Referenced by produce().

791 {
792  int index = 0;
793  for (const auto& conversion : *conversionHandle) {
794 
795  reco::ConversionRef convref(conversionHandle,index++);
796 
797  bool matched = ConversionTools::matchesConversion(gsfElectron,conversion,true,true);
798  if (!matched) continue;
799 
800  linkConversion(convref, conversions, conversionMap);
801  }
802 }
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
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 804 of file ReducedEGProducer.cc.

References edm::conversion(), diffTreeTool::index, linkConversion(), electrons_cff::matched, and ConversionTools::matchesConversion().

808 {
809  int index = 0;
810  for (const auto& conversion : *conversionHandle) {
811 
812  reco::ConversionRef convref(conversionHandle,index++);
813 
814  bool matched = ConversionTools::matchesConversion(superCluster,conversion,0.2);
815  if (!matched) continue;
816 
817  linkConversion(convref, conversions, conversionMap);
818  }
819 }
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
template<typename T , typename U >
void ReducedEGProducer::linkCore ( const T core,
U &  cores,
std::map< T, unsigned int > &  coreMap 
)
private

Definition at line 747 of file ReducedEGProducer.cc.

Referenced by produce().

748 {
749  if (!coreMap.count(core)) {
750  cores.push_back(*core);
751  coreMap[core] = cores.size() - 1;
752  }
753 }
Definition: __init__.py:1
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 755 of file ReducedEGProducer.cc.

Referenced by produce().

760 {
761  const auto &mappedsc = superClusterMap.find(superCluster);
762  //get index in output collection in order to keep track whether superCluster
763  //will be subject to full relinking
764  unsigned int mappedscidx = 0;
765  if (mappedsc==superClusterMap.end()) {
766  superClusters.push_back(*superCluster);
767  mappedscidx = superClusters.size() - 1;
768  superClusterMap[superCluster] = mappedscidx;
769  }
770  else {
771  mappedscidx = mappedsc->second;
772  }
773 
774  //additionally mark supercluster for full relinking
775  if (relink) superClusterFullRelinkMap.insert(mappedscidx);
776 }
void ReducedEGProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
final

Definition at line 192 of file ReducedEGProducer.cc.

References applyGsfElectronCalibOnData_, applyGsfElectronCalibOnMC_, applyPhotonCalibOnData_, applyPhotonCalibOnMC_, barrelEcalHits_, calibrateElectron(), calibratePhoton(), printConversionInfo::conversionHandle, conversions_cfi::conversions, conversionT_, doPreshowerEcalHits_, endcapEcalHits_, ev, Exception, objects.autophobj::filler, edm::EventSetup::get(), edm::Event::getByToken(), gsfElectronCalibEcalEnergyErrT_, gsfElectronCalibEcalEnergyT_, gsfElectronCalibEnergyErrT_, gsfElectronCalibEnergyT_, gsfElectronCores_cfi::gsfElectronCores, gsfElectronFloatValueMapTs_, gsfElectronIdTs_, gsfElectronPfCandMapT_, gsfElectrons_cfi::gsfElectrons, gsfElectronT_, gedGsfElectronCores_cfi::gsfTracks, gsfTrackT_, diffTreeTool::index, edm::EventBase::isRealData(), keep, keepGsfElectronSel_, keepOOTPhotonSel_, keepPhotonSel_, linkCaloCluster(), linkCaloClusters(), linkConversions(), linkConversionsByTrackRef(), linkCore(), linkSuperCluster(), eostools::move(), ootPhotonCore_cff::ootPhotonCore, ootPhotonFloatValueMapTs_, ootPhotons_cff::ootPhotons, ootPhotonT_, outConversions_, outEBEEClusters_, outEBRecHits_, outEERecHits_, outESClusters_, outESRecHits_, outGsfElectronCores_, outGsfElectronFloatValueMaps_, outGsfElectronIds_, outGsfElectronPfCandMap_, outGsfElectrons_, outGsfTracks_, outOOTEBEEClusters_, outOOTESClusters_, outOOTPhotonCores_, outOOTPhotonFloatValueMaps_, outOOTPhotons_, outOOTSuperClusters_, outPhotonCores_, outPhotonFloatValueMaps_, outPhotonIds_, outPhotonPfCandMap_, outPhotons_, outSingleConversions_, outSuperClusters_, muons2muons_cfi::photon, photonCalibEnergyErrT_, photonCalibEnergyT_, photonCore_cfi::photonCore, photonFloatValueMapTs_, photonIdTs_, photonPfCandMapT_, nano_cff::photons, photonT_, preshowerEcalHits_, edm::Event::put(), relinkCaloClusters(), relinkConversions(), relinkGsfElectronCore(), relinkGsfElectronSel_, relinkGsfTrack(), relinkOOTPhotonSel_, relinkPhotonCore(), relinkPhotonSel_, relinkSuperCluster(), reducedEgamma_cfi::singleConversions, singleConversionT_, slimRelinkGsfElectronSel_, slimRelinkOOTPhotonSel_, slimRelinkPhotonSel_, AlCaHLTBitMon_QueryRunRegistry::string, and create_public_pileup_plots::vals.

192  {
193 
194  //get input collections
195 
196 
198  theEvent.getByToken(photonT_, photonHandle);
199 
200  edm::Handle<reco::PhotonCollection> ootPhotonHandle;
201  theEvent.getByToken(ootPhotonT_, ootPhotonHandle);
202 
204  theEvent.getByToken(gsfElectronT_, gsfElectronHandle);
205 
207  theEvent.getByToken(gsfTrackT_, gsfTrackHandle);
208 
210  theEvent.getByToken(conversionT_, conversionHandle);
211 
212  edm::Handle<reco::ConversionCollection> singleConversionHandle;
213  theEvent.getByToken(singleConversionT_, singleConversionHandle);
214 
215  edm::Handle<EcalRecHitCollection> barrelHitHandle;
216  theEvent.getByToken(barrelEcalHits_, barrelHitHandle);
217 
218  edm::Handle<EcalRecHitCollection> endcapHitHandle;
219  theEvent.getByToken(endcapEcalHits_, endcapHitHandle);
220 
221  edm::Handle<EcalRecHitCollection> preshowerHitHandle;
222  if (doPreshowerEcalHits_) theEvent.getByToken(preshowerEcalHits_, preshowerHitHandle);
223 
225  theEvent.getByToken(photonPfCandMapT_, photonPfCandMapHandle);
226 
228  theEvent.getByToken(gsfElectronPfCandMapT_, gsfElectronPfCandMapHandle);
229 
230  std::vector<edm::Handle<edm::ValueMap<bool> > > photonIdHandles(photonIdTs_.size());
231  int index = 0; // universal index for range based loops
232  for (const auto& photonIdT : photonIdTs_) {
233  theEvent.getByToken(photonIdT,photonIdHandles[index++]);
234  }
235 
236  std::vector<edm::Handle<edm::ValueMap<float> > > gsfElectronIdHandles(gsfElectronIdTs_.size());
237  index = 0;
238  for (const auto& gsfElectronIdT : gsfElectronIdTs_) {
239  theEvent.getByToken(gsfElectronIdT,gsfElectronIdHandles[index++]);
240  }
241 
242  std::vector<edm::Handle<edm::ValueMap<float> > > photonFloatValueMapHandles(photonFloatValueMapTs_.size());
243  index = 0;
244  for (const auto& photonFloatValueMapT : photonFloatValueMapTs_) {
245  theEvent.getByToken(photonFloatValueMapT,photonFloatValueMapHandles[index++]);
246  }
247 
248  std::vector<edm::Handle<edm::ValueMap<float> > > ootPhotonFloatValueMapHandles(ootPhotonFloatValueMapTs_.size());
249  index = 0;
250  for (const auto& ootPhotonFloatValueMapT : ootPhotonFloatValueMapTs_) {
251  theEvent.getByToken(ootPhotonFloatValueMapT,ootPhotonFloatValueMapHandles[index++]);
252  }
253 
254  std::vector<edm::Handle<edm::ValueMap<float> > > gsfElectronFloatValueMapHandles(gsfElectronFloatValueMapTs_.size());
255  index = 0;
256  for (const auto& gsfElectronFloatValueMapT : gsfElectronFloatValueMapTs_) {
257  theEvent.getByToken(gsfElectronFloatValueMapT,gsfElectronFloatValueMapHandles[index++]);
258  }
259 
260 
261  edm::Handle<edm::ValueMap<float> > gsfElectronCalibEnergyHandle;
262  edm::Handle<edm::ValueMap<float> > gsfElectronCalibEnergyErrHandle;
263  edm::Handle<edm::ValueMap<float> > gsfElectronCalibEcalEnergyHandle;
264  edm::Handle<edm::ValueMap<float> > gsfElectronCalibEcalEnergyErrHandle;
266  theEvent.getByToken(gsfElectronCalibEnergyT_,gsfElectronCalibEnergyHandle);
267  theEvent.getByToken(gsfElectronCalibEnergyErrT_,gsfElectronCalibEnergyErrHandle);
268  theEvent.getByToken(gsfElectronCalibEcalEnergyT_,gsfElectronCalibEcalEnergyHandle);
269  theEvent.getByToken(gsfElectronCalibEcalEnergyErrT_,gsfElectronCalibEcalEnergyErrHandle);
270  }
271  edm::Handle<edm::ValueMap<float> > photonCalibEnergyHandle;
272  edm::Handle<edm::ValueMap<float> > photonCalibEnergyErrHandle;
274  theEvent.getByToken(photonCalibEnergyT_,photonCalibEnergyHandle);
275  theEvent.getByToken(photonCalibEnergyErrT_,photonCalibEnergyErrHandle);
276  }
277 
278  edm::ESHandle<CaloTopology> theCaloTopology;
279  theEventSetup.get<CaloTopologyRecord>().get(theCaloTopology);
280  const CaloTopology *caloTopology = & (*theCaloTopology);
281 
282  //initialize output collections
283  auto photons = std::make_unique<reco::PhotonCollection>();
284  auto photonCores = std::make_unique<reco::PhotonCoreCollection>();
285  auto ootPhotons = std::make_unique<reco::PhotonCollection>();
286  auto ootPhotonCores = std::make_unique<reco::PhotonCoreCollection>();
287  auto gsfElectrons = std::make_unique<reco::GsfElectronCollection>();
288  auto gsfElectronCores = std::make_unique<reco::GsfElectronCoreCollection>();
289  auto gsfTracks = std::make_unique<reco::GsfTrackCollection>();
290  auto conversions = std::make_unique<reco::ConversionCollection>();
291  auto singleConversions = std::make_unique<reco::ConversionCollection>();
292  auto superClusters = std::make_unique<reco::SuperClusterCollection>();
293  auto ebeeClusters = std::make_unique<reco::CaloClusterCollection>();
294  auto esClusters = std::make_unique<reco::CaloClusterCollection>();
295  auto ootSuperClusters = std::make_unique<reco::SuperClusterCollection>();
296  auto ootEbeeClusters = std::make_unique<reco::CaloClusterCollection>();
297  auto ootEsClusters = std::make_unique<reco::CaloClusterCollection>();
298  auto ebRecHits = std::make_unique<EcalRecHitCollection>();
299  auto eeRecHits = std::make_unique<EcalRecHitCollection>();
300  auto esRecHits = std::make_unique<EcalRecHitCollection>();
301  auto photonPfCandMap = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
302  auto gsfElectronPfCandMap = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
303 
304  //maps to collection indices of output objects
305  std::map<reco::PhotonCoreRef, unsigned int> photonCoreMap;
306  std::map<reco::PhotonCoreRef, unsigned int> ootPhotonCoreMap;
307  std::map<reco::GsfElectronCoreRef, unsigned int> gsfElectronCoreMap;
308  std::map<reco::GsfTrackRef, unsigned int> gsfTrackMap;
309  std::map<reco::ConversionRef, unsigned int> conversionMap;
310  std::map<reco::ConversionRef, unsigned int> singleConversionMap;
311  std::map<reco::SuperClusterRef, unsigned int> superClusterMap;
312  std::map<reco::CaloClusterPtr, unsigned int> ebeeClusterMap;
313  std::map<reco::CaloClusterPtr, unsigned int> esClusterMap;
314  std::map<reco::SuperClusterRef, unsigned int> ootSuperClusterMap;
315  std::map<reco::CaloClusterPtr, unsigned int> ootEbeeClusterMap;
316  std::map<reco::CaloClusterPtr, unsigned int> ootEsClusterMap;
317  std::unordered_set<DetId> rechitMap;
318 
319  std::unordered_set<unsigned int> superClusterFullRelinkMap;
320  std::unordered_set<unsigned int> ootSuperClusterFullRelinkMap;
321 
322  //vectors for pfcandidate valuemaps
323  std::vector<std::vector<reco::PFCandidateRef> > pfCandIsoPairVecPho;
324  std::vector<std::vector<reco::PFCandidateRef> > pfCandIsoPairVecEle;
325 
326  //vectors for id valuemaps
327  std::vector<std::vector<bool> > photonIdVals(photonIdHandles.size());
328  std::vector<std::vector<float> > gsfElectronIdVals(gsfElectronIdHandles.size());
329  std::vector<std::vector<float> > photonFloatValueMapVals(photonFloatValueMapHandles.size());
330  std::vector<std::vector<float> > ootPhotonFloatValueMapVals(ootPhotonFloatValueMapHandles.size());
331  std::vector<std::vector<float> > gsfElectronFloatValueMapVals(gsfElectronFloatValueMapHandles.size());
332 
333  //loop over photons and fill maps
334  index = -1;
335  for (const auto& photon : *photonHandle) {
336  index++;
337 
338  reco::PhotonRef photonref(photonHandle,index);
339  photons->push_back(photon);
340  auto& newPhoton = photons->back();
341 
342  if( (applyPhotonCalibOnData_ && theEvent.isRealData()) ||
343  (applyPhotonCalibOnMC_ && !theEvent.isRealData()) ){
344  calibratePhoton(newPhoton,photonref,
345  *photonCalibEnergyHandle,*photonCalibEnergyErrHandle);
346  }
347 
348  //we do this after calibration
349  bool keep = keepPhotonSel_(newPhoton);
350  if (!keep){
351  photons->pop_back();
352  continue;
353  }
354 
355  //fill pf candidate value map vector
356  pfCandIsoPairVecPho.push_back((*photonPfCandMapHandle)[photonref]);
357 
358  //fill photon id valuemap vectors
359  int subindex = 0;
360  for (const auto& photonIdHandle : photonIdHandles) {
361  photonIdVals[subindex++].push_back((*photonIdHandle)[photonref]);
362  }
363 
364  subindex = 0;
365  for (const auto& photonFloatValueMapHandle : photonFloatValueMapHandles) {
366  photonFloatValueMapVals[subindex++].push_back((*photonFloatValueMapHandle)[photonref]);
367  }
368 
369  //link photon core
370  const reco::PhotonCoreRef &photonCore = photon.photonCore();
371  linkCore(photonCore, *photonCores, photonCoreMap);
372 
373  bool slimRelink = slimRelinkPhotonSel_(newPhoton);
374  //no supercluster relinking unless slimRelink selection is satisfied
375  if (!slimRelink) continue;
376 
377  bool relink = relinkPhotonSel_(newPhoton);
378 
379  //link supercluster
380  const reco::SuperClusterRef &superCluster = photon.superCluster();
381  linkSuperCluster(superCluster, superClusterMap, *superClusters, relink, superClusterFullRelinkMap);
382 
383  //conversions only for full relinking
384  if (!relink) continue;
385 
386  const reco::ConversionRefVector &convrefs = photon.conversions();
387  linkConversions(convrefs, *conversions, conversionMap);
388 
389  //explicitly references conversions
390  const reco::ConversionRefVector &singleconvrefs = photon.conversionsOneLeg();
391  linkConversions(singleconvrefs, *singleConversions, singleConversionMap);
392  }
393 
394  //loop over oot photons and fill maps
395  //special note1: since not PFCand --> no PF isolation, IDs (but we do have FloatValueMap!)
396  //special note2: conversion sequence not run over bcs from oot phos, so skip relinking of oot phos
397  //special note3: clusters and superclusters in own collections!
398  index = -1;
399  for (const auto& ootPhoton : *ootPhotonHandle) {
400  index++;
401 
402  bool keep = keepOOTPhotonSel_(ootPhoton);
403  if (!keep) continue;
404 
405  reco::PhotonRef ootPhotonref(ootPhotonHandle,index);
406 
407  ootPhotons->push_back(ootPhoton);
408 
409  //fill photon pfclusteriso valuemap vectors
410  int subindex = 0;
411  for (const auto& ootPhotonFloatValueMapHandle : ootPhotonFloatValueMapHandles) {
412  ootPhotonFloatValueMapVals[subindex++].push_back((*ootPhotonFloatValueMapHandle)[ootPhotonref]);
413  }
414 
415  //link photon core
416  const reco::PhotonCoreRef &ootPhotonCore = ootPhoton.photonCore();
417  linkCore(ootPhotonCore, *ootPhotonCores, ootPhotonCoreMap);
418 
419  bool slimRelink = slimRelinkOOTPhotonSel_(ootPhoton);
420  //no supercluster relinking unless slimRelink selection is satisfied
421  if (!slimRelink) continue;
422 
423  bool relink = relinkOOTPhotonSel_(ootPhoton);
424 
425  const reco::SuperClusterRef &ootSuperCluster = ootPhoton.superCluster();
426  linkSuperCluster(ootSuperCluster, ootSuperClusterMap, *ootSuperClusters, relink, ootSuperClusterFullRelinkMap);
427  }
428 
429  //loop over electrons and fill maps
430  index = -1;
431  for (const auto& gsfElectron : *gsfElectronHandle) {
432  index++;
433 
434  reco::GsfElectronRef gsfElectronref(gsfElectronHandle,index);
435  gsfElectrons->push_back(gsfElectron);
436  auto& newGsfElectron = gsfElectrons->back();
437  if( (applyGsfElectronCalibOnData_ && theEvent.isRealData()) ||
438  (applyGsfElectronCalibOnMC_ && !theEvent.isRealData()) ){
439  calibrateElectron(newGsfElectron, gsfElectronref,
440  *gsfElectronCalibEnergyHandle,*gsfElectronCalibEnergyErrHandle,
441  *gsfElectronCalibEcalEnergyHandle,*gsfElectronCalibEcalEnergyErrHandle);
442 
443  }
444 
445  bool keep = keepGsfElectronSel_(newGsfElectron);
446  if (!keep) {
447  gsfElectrons->pop_back();
448  continue;
449  }
450 
451  pfCandIsoPairVecEle.push_back((*gsfElectronPfCandMapHandle)[gsfElectronref]);
452 
453  //fill electron id valuemap vectors
454  int subindex = 0;
455  for (const auto& gsfElectronIdHandle : gsfElectronIdHandles) {
456  gsfElectronIdVals[subindex++].push_back((*gsfElectronIdHandle)[gsfElectronref]);
457  }
458 
459  subindex = 0;
460  for (const auto& gsfElectronFloatValueMapHandle : gsfElectronFloatValueMapHandles) {
461  gsfElectronFloatValueMapVals[subindex++].push_back((*gsfElectronFloatValueMapHandle)[gsfElectronref]);
462  }
463 
464  const reco::GsfElectronCoreRef &gsfElectronCore = gsfElectron.core();
465  linkCore(gsfElectronCore, *gsfElectronCores, gsfElectronCoreMap);
466 
467  const reco::GsfTrackRef &gsfTrack = gsfElectron.gsfTrack();
468 
469  // Save the main gsfTrack
470  if (!gsfTrackMap.count(gsfTrack)) {
471  gsfTracks->push_back(*gsfTrack);
472  gsfTrackMap[gsfTrack] = gsfTracks->size() - 1;
473  }
474 
475  // Save additional ambiguous gsf tracks in a map:
476  for (reco::GsfTrackRefVector::const_iterator igsf = gsfElectron.ambiguousGsfTracksBegin(); igsf != gsfElectron.ambiguousGsfTracksEnd(); ++igsf) {
477  const reco::GsfTrackRef &ambigGsfTrack = *igsf;
478  if (!gsfTrackMap.count(ambigGsfTrack)) {
479  gsfTracks->push_back(*ambigGsfTrack);
480  gsfTrackMap[ambigGsfTrack] = gsfTracks->size() - 1;
481  }
482  }
483 
484  bool slimRelink = slimRelinkGsfElectronSel_(newGsfElectron);
485  //no supercluster relinking unless slimRelink selection is satisfied
486  if (!slimRelink) continue;
487 
488  bool relink = relinkGsfElectronSel_(newGsfElectron);
489 
490  const reco::SuperClusterRef &superCluster = gsfElectron.superCluster();
491  linkSuperCluster(superCluster, superClusterMap, *superClusters, relink, superClusterFullRelinkMap);
492 
493  //conversions only for full relinking
494  if (!relink) continue;
495 
496  const reco::ConversionRefVector &convrefs = gsfElectron.core()->conversions();
497  linkConversions(convrefs, *conversions, conversionMap);
498 
499  //explicitly references conversions
500  const reco::ConversionRefVector &singleconvrefs = gsfElectron.core()->conversionsOneLeg();
501  linkConversions(singleconvrefs, *singleConversions, singleConversionMap);
502 
503  //conversions matched by trackrefs
504  linkConversionsByTrackRef(conversionHandle, gsfElectron, *conversions, conversionMap);
505 
506  //single leg conversions matched by trackrefs
507  linkConversionsByTrackRef(singleConversionHandle, gsfElectron, *singleConversions, singleConversionMap);
508  }
509 
510  //loop over output SuperClusters and fill maps
511  index = 0;
512  for (auto& superCluster : *superClusters) {
513 
514  //link seed cluster no matter what
515  const reco::CaloClusterPtr &seedCluster = superCluster.seed();
516  linkCaloCluster(seedCluster, *ebeeClusters, ebeeClusterMap);
517 
518  //only proceed if superCluster is marked for full relinking
519  bool fullrelink = superClusterFullRelinkMap.count(index++);
520  if (!fullrelink) {
521  //zero detid vector which is anyways not useful without stored rechits
522  superCluster.clearHitsAndFractions();
523  continue;
524  }
525 
526  // link calo clusters
527  linkCaloClusters(superCluster, *ebeeClusters, ebeeClusterMap, rechitMap, barrelHitHandle, endcapHitHandle, caloTopology, *esClusters, esClusterMap);
528 
529  //conversions matched geometrically
530  linkConversionsByTrackRef(conversionHandle, superCluster, *conversions, conversionMap);
531 
532  //single leg conversions matched by trackrefs
533  linkConversionsByTrackRef(singleConversionHandle, superCluster, *singleConversions, singleConversionMap);
534  }
535 
536  //loop over output OOTSuperClusters and fill maps
537  index = 0;
538  for (auto& ootSuperCluster : *ootSuperClusters) {
539 
540  //link seed cluster no matter what
541  const reco::CaloClusterPtr &ootSeedCluster = ootSuperCluster.seed();
542  linkCaloCluster(ootSeedCluster, *ootEbeeClusters, ootEbeeClusterMap);
543 
544  //only proceed if ootSuperCluster is marked for full relinking
545  bool fullrelink = ootSuperClusterFullRelinkMap.count(index++);
546  if (!fullrelink) {
547  //zero detid vector which is anyways not useful without stored rechits
548  ootSuperCluster.clearHitsAndFractions();
549  continue;
550  }
551 
552  // link calo clusters
553  linkCaloClusters(ootSuperCluster, *ootEbeeClusters, ootEbeeClusterMap, rechitMap, barrelHitHandle, endcapHitHandle, caloTopology, *ootEsClusters, ootEsClusterMap);
554  }
555 
556  //now finalize and add to the event collections in "reverse" order
557 
558  //rechits (fill output collections of rechits to be stored)
559  for (const EcalRecHit &rechit : *barrelHitHandle) {
560  if (rechitMap.count(rechit.detid())) {
561  ebRecHits->push_back(rechit);
562  }
563  }
564 
565  for (const EcalRecHit &rechit : *endcapHitHandle) {
566  if (rechitMap.count(rechit.detid())) {
567  eeRecHits->push_back(rechit);
568  }
569  }
570 
571  theEvent.put(std::move(ebRecHits),outEBRecHits_);
572  theEvent.put(std::move(eeRecHits),outEERecHits_);
573 
574  if (doPreshowerEcalHits_) {
575  for (const EcalRecHit &rechit : *preshowerHitHandle) {
576  if (rechitMap.count(rechit.detid())) {
577  esRecHits->push_back(rechit);
578  }
579  }
580  theEvent.put(std::move(esRecHits),outESRecHits_);
581  }
582 
583  //CaloClusters
584  //put calocluster output collections in event and get orphan handles to create ptrs
585  const edm::OrphanHandle<reco::CaloClusterCollection> &outEBEEClusterHandle = theEvent.put(std::move(ebeeClusters),outEBEEClusters_);
586  const edm::OrphanHandle<reco::CaloClusterCollection> &outESClusterHandle = theEvent.put(std::move(esClusters),outESClusters_);;
587 
588  //Loop over SuperClusters and relink GEDPhoton + GSFElectron CaloClusters
589  for (reco::SuperCluster &superCluster : *superClusters) {
590  relinkCaloClusters(superCluster, ebeeClusterMap, esClusterMap, outEBEEClusterHandle, outESClusterHandle);
591  }
592 
593  //OOTCaloClusters
594  //put ootcalocluster output collections in event and get orphan handles to create ptrs
595  const edm::OrphanHandle<reco::CaloClusterCollection> &outOOTEBEEClusterHandle = theEvent.put(std::move(ootEbeeClusters),outOOTEBEEClusters_);
596  const edm::OrphanHandle<reco::CaloClusterCollection> &outOOTESClusterHandle = theEvent.put(std::move(ootEsClusters),outOOTESClusters_);;
597 
598  //Loop over OOTSuperClusters and relink OOTPhoton CaloClusters
599  for (reco::SuperCluster &ootSuperCluster : *ootSuperClusters) {
600  relinkCaloClusters(ootSuperCluster, ootEbeeClusterMap, ootEsClusterMap, outOOTEBEEClusterHandle, outOOTESClusterHandle);
601  }
602 
603  //put superclusters and conversions in the event
604  const edm::OrphanHandle<reco::SuperClusterCollection> &outSuperClusterHandle = theEvent.put(std::move(superClusters),outSuperClusters_);
605  const edm::OrphanHandle<reco::ConversionCollection> &outConversionHandle = theEvent.put(std::move(conversions),outConversions_);
606  const edm::OrphanHandle<reco::ConversionCollection> &outSingleConversionHandle = theEvent.put(std::move(singleConversions),outSingleConversions_);
607  const edm::OrphanHandle<reco::GsfTrackCollection> &outGsfTrackHandle = theEvent.put(std::move(gsfTracks),outGsfTracks_);
608 
609  //Loop over PhotonCores and relink GEDPhoton SuperClusters (and conversions)
610  for (reco::PhotonCore &photonCore : *photonCores) {
611  // superclusters
612  relinkSuperCluster(photonCore, superClusterMap, outSuperClusterHandle);
613 
614  //conversions
615  const reco::ConversionRefVector &convrefs = photonCore.conversions();
616  relinkConversions(photonCore, convrefs, conversionMap, outConversionHandle);
617 
618  //single leg conversions
619  const reco::ConversionRefVector &singleconvrefs = photonCore.conversionsOneLeg();
620  relinkConversions(photonCore, singleconvrefs, singleConversionMap, outSingleConversionHandle);
621  }
622 
623  //Relink GSFElectron SuperClusters and main GSF Tracks
624  for (reco::GsfElectronCore &gsfElectronCore : *gsfElectronCores) {
625  relinkSuperCluster(gsfElectronCore, superClusterMap, outSuperClusterHandle);
626  relinkGsfTrack(gsfElectronCore, gsfTrackMap, outGsfTrackHandle);
627  }
628 
629  //put ootsuperclusters in the event
630  const edm::OrphanHandle<reco::SuperClusterCollection> &outOOTSuperClusterHandle = theEvent.put(std::move(ootSuperClusters),outOOTSuperClusters_);
631 
632  //Relink OOTPhoton SuperClusters
633  for (reco::PhotonCore &ootPhotonCore : *ootPhotonCores) {
634  relinkSuperCluster(ootPhotonCore, ootSuperClusterMap, outOOTSuperClusterHandle);
635  }
636 
637  //put photoncores and gsfelectroncores into the event
638  const edm::OrphanHandle<reco::PhotonCoreCollection> &outPhotonCoreHandle = theEvent.put(std::move(photonCores),outPhotonCores_);
639  const edm::OrphanHandle<reco::PhotonCoreCollection> &outOOTPhotonCoreHandle = theEvent.put(std::move(ootPhotonCores),outOOTPhotonCores_);
640  const edm::OrphanHandle<reco::GsfElectronCoreCollection> &outgsfElectronCoreHandle = theEvent.put(std::move(gsfElectronCores),outGsfElectronCores_);
641 
642  //loop over photons, oot photons, and electrons and relink the cores
643  for (reco::Photon &photon : *photons) {
644  relinkPhotonCore(photon, photonCoreMap, outPhotonCoreHandle);
645  }
646 
647  for (reco::Photon &ootPhoton : *ootPhotons) {
648  relinkPhotonCore(ootPhoton, ootPhotonCoreMap, outOOTPhotonCoreHandle);
649  }
650 
651  for (reco::GsfElectron &gsfElectron : *gsfElectrons) {
652  relinkGsfElectronCore(gsfElectron, gsfElectronCoreMap, outgsfElectronCoreHandle);
653 
654  // -----
655  // Also in this loop let's relink ambiguous tracks
656  std::vector<reco::GsfTrackRef> ambigTracksInThisElectron;
657  // Here we loop over the ambiguous tracks and save them in a vector
658  for (reco::GsfTrackRefVector::const_iterator igsf = gsfElectron.ambiguousGsfTracksBegin(); igsf != gsfElectron.ambiguousGsfTracksEnd(); ++igsf) {
659  ambigTracksInThisElectron.push_back(*igsf);
660  }
661 
662  // Now we need to clear them (they are the refs to original collection):
663  gsfElectron.clearAmbiguousGsfTracks();
664 
665  // And here we add them back, now from a new reduced collection:
666  for (const auto &it : ambigTracksInThisElectron) {
667  const auto &gsftkmapped = gsfTrackMap.find(it);
668 
669  if (gsftkmapped != gsfTrackMap.end()) {
670  reco::GsfTrackRef gsftkref(outGsfTrackHandle, gsftkmapped->second);
671  gsfElectron.addAmbiguousGsfTrack(gsftkref);
672  }
673  else
674  throw cms::Exception("There must be a problem with linking and mapping of ambiguous gsf tracks...");
675  }
676 
677  if (gsfElectron.ambiguousGsfTracksSize() > 0)
678  gsfElectron.setAmbiguous(true); // Set the flag
679 
680  ambigTracksInThisElectron.clear();
681 
682  }
683 
684  //(finally) store the output photon and electron collections
685  const edm::OrphanHandle<reco::PhotonCollection> &outPhotonHandle = theEvent.put(std::move(photons),outPhotons_);
686  const edm::OrphanHandle<reco::PhotonCollection> &outOOTPhotonHandle = theEvent.put(std::move(ootPhotons),outOOTPhotons_);
687  const edm::OrphanHandle<reco::GsfElectronCollection> &outGsfElectronHandle = theEvent.put(std::move(gsfElectrons),outGsfElectrons_);
688 
689  //still need to output relinked valuemaps
690 
691  //photon pfcand isolation valuemap
692  edm::ValueMap<std::vector<reco::PFCandidateRef>>::Filler fillerPhotons(*photonPfCandMap);
693  fillerPhotons.insert(outPhotonHandle,pfCandIsoPairVecPho.begin(),pfCandIsoPairVecPho.end());
694  fillerPhotons.fill();
695 
696  //electron pfcand isolation valuemap
697  edm::ValueMap<std::vector<reco::PFCandidateRef>>::Filler fillerGsfElectrons(*gsfElectronPfCandMap);
698  fillerGsfElectrons.insert(outGsfElectronHandle,pfCandIsoPairVecEle.begin(),pfCandIsoPairVecEle.end());
699  fillerGsfElectrons.fill();
700 
701  theEvent.put(std::move(photonPfCandMap),outPhotonPfCandMap_);
702  theEvent.put(std::move(gsfElectronPfCandMap),outGsfElectronPfCandMap_);
703 
704  auto fillMap = [](auto refH, auto& vec, edm::Event& ev, const std::string& cAl = ""){
706  auto oMap = std::make_unique<MapType>();
707  {
708  typename MapType::Filler filler(*oMap);
709  filler.insert(refH, vec.begin(), vec.end());
710  filler.fill();
711  }
712  ev.put(std::move(oMap), cAl);
713  };
714 
715  //photon id value maps
716  index = 0;
717  for (auto const& vals : photonIdVals){
718  fillMap(outPhotonHandle, vals, theEvent, outPhotonIds_[index++]);
719  }
720 
721  //electron id value maps
722  index = 0;
723  for (auto const& vals : gsfElectronIdVals){
724  fillMap(outGsfElectronHandle, vals, theEvent, outGsfElectronIds_[index++]);
725  }
726 
727  // photon iso value maps
728  index = 0;
729  for (auto const& vals : photonFloatValueMapVals){
730  fillMap(outPhotonHandle, vals, theEvent, outPhotonFloatValueMaps_[index++]);
731  }
732 
733  //oot photon iso value maps
734  index = 0;
735  for (auto const& vals : ootPhotonFloatValueMapVals){
736  fillMap(outOOTPhotonHandle, vals, theEvent, outOOTPhotonFloatValueMaps_[index++]);
737  }
738 
739  //electron iso value maps
740  index = 0;
741  for (auto const& vals : gsfElectronFloatValueMapVals){
742  fillMap(outGsfElectronHandle, vals, theEvent, outGsfElectronFloatValueMaps_[index++]);
743  }
744 }
const bool doPreshowerEcalHits_
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, const CaloTopology *caloTopology, reco::CaloClusterCollection &esClusters, std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap)
void relinkGsfTrack(reco::GsfElectronCore &electroncore, const std::map< reco::GsfTrackRef, unsigned int > &gsfTrackMap, const edm::OrphanHandle< reco::GsfTrackCollection > &outGsfTrackHandle)
const StringCutObjectSelector< reco::Photon > relinkOOTPhotonSel_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronT_
const bool applyPhotonCalibOnData_
const edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyT_
const StringCutObjectSelector< reco::Photon > slimRelinkPhotonSel_
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
const std::vector< std::string > outPhotonIds_
const std::vector< std::string > outOOTPhotonFloatValueMaps_
static void calibratePhoton(reco::Photon &photon, const reco::PhotonRef &oldPhoRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap)
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyT_
const std::vector< std::string > outPhotonFloatValueMaps_
const std::string outGsfTracks_
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
const std::string outOOTPhotons_
bool ev
const std::string outEBEEClusters_
const StringCutObjectSelector< reco::Photon > keepPhotonSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
const bool applyGsfElectronCalibOnData_
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyErrT_
const StringCutObjectSelector< reco::GsfElectron > relinkGsfElectronSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
const std::string outEBRecHits_
const std::string outESRecHits_
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 int keep
const std::vector< std::string > outGsfElectronIds_
const std::string outSingleConversions_
const std::string outESClusters_
const std::string outOOTSuperClusters_
const StringCutObjectSelector< reco::Photon > keepOOTPhotonSel_
const std::string outOOTESClusters_
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)
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)
const std::string outOOTEBEEClusters_
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 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::string outPhotons_
const std::string outGsfElectronPfCandMap_
void relinkSuperCluster(T &core, const std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, const edm::OrphanHandle< reco::SuperClusterCollection > &outSuperClusterHandle)
const std::string outGsfElectronCores_
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)
const std::string outSuperClusters_
const std::string outConversions_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonFloatValueMapTs_
const std::string outGsfElectrons_
const StringCutObjectSelector< reco::GsfElectron > slimRelinkGsfElectronSel_
const std::string outPhotonCores_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyErrT_
void linkCaloCluster(const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
const std::string outEERecHits_
const StringCutObjectSelector< reco::Photon > slimRelinkOOTPhotonSel_
const std::vector< std::string > outGsfElectronFloatValueMaps_
const std::string outPhotonPfCandMap_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
const std::string outOOTPhotonCores_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyT_
const edm::EDGetTokenT< reco::PhotonCollection > ootPhotonT_
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
def move(src, dest)
Definition: eostools.py:510
const bool applyGsfElectronCalibOnMC_
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_
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 877 of file ReducedEGProducer.cc.

References edm::PtrVectorBase::clear(), fastPrimaryVertexProducer_cfi::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().

882 {
883  //remap seed cluster
884  const auto &seedmapped = ebeeClusterMap.find(superCluster.seed());
885  if (seedmapped != ebeeClusterMap.end()) {
886  //make new ptr
887  reco::CaloClusterPtr clusptr(outEBEEClusterHandle,seedmapped->second);
888  superCluster.setSeed(clusptr);
889  }
890 
891  //remap all clusters
893  for (const auto &cluster : superCluster.clusters()) {
894  const auto &clustermapped = ebeeClusterMap.find(cluster);
895  if (clustermapped != ebeeClusterMap.end()) {
896  //make new ptr
897  reco::CaloClusterPtr clusptr(outEBEEClusterHandle,clustermapped->second);
898  clusters.push_back(clusptr);
899  }
900  else {
901  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
902  clusters.clear();
903  break;
904  }
905  }
906  if (!clusters.empty()) {
907  superCluster.setClusters(clusters);
908  }
909 
910  //remap preshower clusters
911  reco::CaloClusterPtrVector esclusters;
912  for (const auto& cluster : superCluster.preshowerClusters()) {
913  const auto &clustermapped = esClusterMap.find(cluster);
914  if (clustermapped != esClusterMap.end()) {
915  //make new ptr
916  reco::CaloClusterPtr clusptr(outESClusterHandle,clustermapped->second);
917  esclusters.push_back(clusptr);
918  }
919  else {
920  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
921  esclusters.clear();
922  break;
923  }
924  }
925  if (!esclusters.empty()) {
926  superCluster.setPreshowerClusters(esclusters);
927  }
928 }
void setPreshowerClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:105
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:140
bool empty() const
Is the RefVector empty.
Definition: PtrVectorBase.h:71
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:96
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:69
void setClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:99
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:72
void clear()
Clear the PtrVector.
Definition: PtrVectorBase.h:80
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
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 954 of file ReducedEGProducer.cc.

References edm::RefVector< C, T, F >::clear(), edm::RefVector< C, T, F >::empty(), and reco::PhotonCore::setConversions().

Referenced by produce().

958 {
959  reco::ConversionRefVector outconvrefs;
960  for (const auto& convref : convrefs) {
961  const auto &convmapped = conversionMap.find(convref);
962  if (convmapped != conversionMap.end()) {
963  //make new ref
964  reco::ConversionRef outref(outConversionHandle,convmapped->second);
965  }
966  else {
967  //can only relink if all conversions are being relinked, so if one is missing, then skip the relinking completely
968  outconvrefs.clear();
969  break;
970  }
971  }
972  if (!outconvrefs.empty()) {
973  photonCore.setConversions(outconvrefs);
974  }
975 }
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:104
void setConversions(const reco::ConversionRefVector &conversions)
Definition: PhotonCore.h:79
void clear()
Clear the vector.
Definition: RefVector.h:147
void ReducedEGProducer::relinkGsfElectronCore ( reco::GsfElectron gsfElectron,
const std::map< reco::GsfElectronCoreRef, unsigned int > &  gsfElectronCoreMap,
const edm::OrphanHandle< reco::GsfElectronCoreCollection > &  outGsfElectronCoreHandle 
)
private

Definition at line 989 of file ReducedEGProducer.cc.

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

Referenced by produce().

992 {
993  const auto &coremapped = gsfElectronCoreMap.find(gsfElectron.core());
994  if (coremapped != gsfElectronCoreMap.end()) {
995  //make new ref
996  reco::GsfElectronCoreRef coreref(outgsfElectronCoreHandle,coremapped->second);
997  gsfElectron.setCore(coreref);
998  }
999 }
void setCore(const reco::GsfElectronCoreRef &core)
Definition: GsfElectron.h:181
virtual GsfElectronCoreRef core() const
Definition: GsfElectron.cc:8
void ReducedEGProducer::relinkGsfTrack ( reco::GsfElectronCore electroncore,
const std::map< reco::GsfTrackRef, unsigned int > &  gsfTrackMap,
const edm::OrphanHandle< reco::GsfTrackCollection > &  outGsfTrackHandle 
)
private

Definition at line 943 of file ReducedEGProducer.cc.

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

Referenced by produce().

946 {
947  const auto &gsftkmapped = gsfTrackMap.find(gsfElectronCore.gsfTrack());
948  if (gsftkmapped != gsfTrackMap.end()) {
949  reco::GsfTrackRef gsftkref(outGsfTrackHandle, gsftkmapped->second);
950  gsfElectronCore.setGsfTrack(gsftkref);
951  }
952 }
void ReducedEGProducer::relinkPhotonCore ( reco::Photon photon,
const std::map< reco::PhotonCoreRef, unsigned int > &  photonCoreMap,
const edm::OrphanHandle< reco::PhotonCoreCollection > &  outPhotonCoreHandle 
)
private

Definition at line 977 of file ReducedEGProducer.cc.

References reco::Photon::photonCore(), and reco::Photon::setPhotonCore().

Referenced by produce().

980 {
981  const auto &coremapped = photonCoreMap.find(photon.photonCore());
982  if (coremapped != photonCoreMap.end()) {
983  //make new ref
984  reco::PhotonCoreRef coreref(outPhotonCoreHandle,coremapped->second);
985  photon.setPhotonCore(coreref);
986  }
987 }
reco::PhotonCoreRef photonCore() const
returns a reference to the core photon object
Definition: Photon.h:50
void setPhotonCore(const reco::PhotonCoreRef &photonCore)
Definition: Photon.h:51
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 931 of file ReducedEGProducer.cc.

Referenced by produce().

934 {
935  const auto &scmapped = superClusterMap.find(core.superCluster());
936  if (scmapped != superClusterMap.end()) {
937  //make new ref
938  reco::SuperClusterRef scref(outSuperClusterHandle,scmapped->second);
939  core.setSuperCluster(scref);
940  }
941 }
Definition: __init__.py:1
template<typename T >
void ReducedEGProducer::setToken ( edm::EDGetTokenT< T > &  token,
const edm::ParameterSet config,
const std::string &  name 
)
inlineprivate

Definition at line 141 of file ReducedEGProducer.h.

References edm::ParameterSet::getParameter(), and dataset::name.

Referenced by ReducedEGProducer().

141  {
142  token = consumes<T>(config.getParameter<edm::InputTag>(name));
143  }
T getParameter(std::string const &) const

Member Data Documentation

const bool ReducedEGProducer::applyGsfElectronCalibOnData_
private

Definition at line 171 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const bool ReducedEGProducer::applyGsfElectronCalibOnMC_
private

Definition at line 172 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const bool ReducedEGProducer::applyPhotonCalibOnData_
private

Definition at line 169 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const bool ReducedEGProducer::applyPhotonCalibOnMC_
private

Definition at line 170 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 154 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 151 of file ReducedEGProducer.h.

Referenced by produce().

const bool ReducedEGProducer::doPreshowerEcalHits_
private

Definition at line 156 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 155 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 178 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 177 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 176 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 175 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 167 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 163 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 160 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 149 of file ReducedEGProducer.h.

Referenced by produce().

const edm::EDGetTokenT<reco::GsfTrackCollection> ReducedEGProducer::gsfTrackT_
private

Definition at line 150 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 213 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 210 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 207 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 166 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 148 of file ReducedEGProducer.h.

Referenced by produce().

const std::string ReducedEGProducer::outConversions_
private

Definition at line 188 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEBEEClusters_
private

Definition at line 191 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEBRecHits_
private

Definition at line 196 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEERecHits_
private

Definition at line 197 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outESClusters_
private

Definition at line 192 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outESRecHits_
private

Definition at line 198 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectronCores_
private

Definition at line 186 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::vector<std::string> ReducedEGProducer::outGsfElectronFloatValueMaps_
private

Definition at line 205 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::vector<std::string> ReducedEGProducer::outGsfElectronIds_
private

Definition at line 202 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectronPfCandMap_
private

Definition at line 200 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectrons_
private

Definition at line 185 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfTracks_
private

Definition at line 187 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTEBEEClusters_
private

Definition at line 194 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTESClusters_
private

Definition at line 195 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTPhotonCores_
private

Definition at line 184 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::vector<std::string> ReducedEGProducer::outOOTPhotonFloatValueMaps_
private

Definition at line 204 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTPhotons_
private

Definition at line 183 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTSuperClusters_
private

Definition at line 193 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotonCores_
private

Definition at line 182 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::vector<std::string> ReducedEGProducer::outPhotonFloatValueMaps_
private

Definition at line 203 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::vector<std::string> ReducedEGProducer::outPhotonIds_
private

Definition at line 201 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotonPfCandMap_
private

Definition at line 199 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotons_
private

Definition at line 181 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outSingleConversions_
private

Definition at line 189 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outSuperClusters_
private

Definition at line 190 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 174 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 173 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 165 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 162 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 159 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 147 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 157 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 215 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 212 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 209 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 152 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 214 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 211 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 208 of file ReducedEGProducer.h.

Referenced by produce().