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

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)
 
 ~ReducedEGProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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

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

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 44 of file ReducedEGProducer.h.

Constructor & Destructor Documentation

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

Definition at line 43 of file ReducedEGProducer.cc.

References applyGsfElectronCalibOnData_, applyGsfElectronCalibOnMC_, applyPhotonCalibOnData_, applyPhotonCalibOnMC_, doPreshowerEcalHits_, edm::ParameterSet::getParameter(), gsfElectronCalibEcalEnergyErrT_, gsfElectronCalibEcalEnergyT_, gsfElectronCalibEnergyErrT_, gsfElectronCalibEnergyT_, gsfElectronFloatValueMapTs_, gsfElectronIdTs_, edm::EDGetTokenT< T >::isUninitialized(), edm::InputTag::label(), ootPhotonFloatValueMapTs_, 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_, photonCalibEnergyErrT_, photonCalibEnergyT_, photonFloatValueMapTs_, photonIdTs_, setToken(), AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::tag.

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

Definition at line 191 of file ReducedEGProducer.cc.

191 {}

Member Function Documentation

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

Definition at line 193 of file ReducedEGProducer.cc.

References hcalHitSel_, and EGHcalRecHitSelector::setup().

193 { hcalHitSel_.setup(iSetup); }
EGHcalRecHitSelector hcalHitSel_
void setup(const edm::EventSetup &iSetup)
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 1073 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().

1078  {
1079  const float newEnergy = energyMap[oldEleRef];
1080  const float newEnergyErr = energyErrMap[oldEleRef];
1081  const float newEcalEnergy = ecalEnergyMap[oldEleRef];
1082  const float newEcalEnergyErr = ecalEnergyErrMap[oldEleRef];
1083 
1084  //make a copy of this as the setCorrectedEcalEnergy call with modifiy the electrons p4
1085  const math::XYZTLorentzVector oldP4 = electron.p4();
1086  const float corr = newEnergy / oldP4.E();
1087 
1088  electron.setCorrectedEcalEnergy(newEcalEnergy);
1089  electron.setCorrectedEcalEnergyError(newEcalEnergyErr);
1090 
1091  math::XYZTLorentzVector newP4 =
1092  math::XYZTLorentzVector(oldP4.x() * corr, oldP4.y() * corr, oldP4.z() * corr, newEnergy);
1093  electron.correctMomentum(newP4, electron.trackMomentumError(), newEnergyErr);
1094 }
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 1064 of file ReducedEGProducer.cc.

References reco::Photon::setCorrectedEnergy().

Referenced by produce().

1067  {
1068  float newEnergy = energyMap[oldPhoRef];
1069  float newEnergyErr = energyErrMap[oldPhoRef];
1070  photon.setCorrectedEnergy(reco::Photon::P4type::regression2, newEnergy, newEnergyErr, true);
1071 }
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 897 of file ReducedEGProducer.cc.

Referenced by linkCaloClusters(), and produce().

899  {
900  if (!caloClusterMap.count(caloCluster)) {
901  caloClusters.push_back(*caloCluster);
902  caloClusterMap[caloCluster] = caloClusters.size() - 1;
903  }
904 }
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 906 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().

914  {
915  for (const auto& cluster : superCluster.clusters()) {
916  linkCaloCluster(cluster, ebeeClusters, ebeeClusterMap);
917 
918  for (const auto& hitfrac : cluster->hitsAndFractions()) {
919  rechitMap.insert(hitfrac.first);
920  }
921  //make sure to also take all hits in the 5x5 around the max energy xtal
922  bool barrel = cluster->hitsAndFractions().front().first.subdetId() == EcalBarrel;
923  const EcalRecHitCollection* rhcol = barrel ? barrelHitHandle.product() : endcapHitHandle.product();
924  DetId seed = EcalClusterTools::getMaximum(*cluster, rhcol).first;
925 
926  std::vector<DetId> dets5x5 =
927  caloTopology->getSubdetectorTopology(DetId::Ecal, barrel ? EcalBarrel : EcalEndcap)->getWindow(seed, 5, 5);
928  for (const auto& detid : dets5x5) {
929  rechitMap.insert(detid);
930  }
931  }
932  for (const auto& cluster : superCluster.preshowerClusters()) {
933  linkCaloCluster(cluster, esClusters, esClusterMap);
934 
935  for (const auto& hitfrac : cluster->hitsAndFractions()) {
936  rechitMap.insert(hitfrac.first);
937  }
938  }
939 }
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:80
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:83
Definition: DetId.h:17
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
T const * product() const
Definition: Handle.h:69
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:17
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 888 of file ReducedEGProducer.cc.

Referenced by linkConversions(), and linkConversionsByTrackRef().

890  {
891  if (!conversionMap.count(convref)) {
892  conversions.push_back(*convref);
893  conversionMap[convref] = conversions.size() - 1;
894  }
895 }
void ReducedEGProducer::linkConversions ( const reco::ConversionRefVector convrefs,
reco::ConversionCollection conversions,
std::map< reco::ConversionRef, unsigned int > &  conversionMap 
)
private

Definition at line 848 of file ReducedEGProducer.cc.

References linkConversion().

Referenced by produce().

850  {
851  for (const auto& convref : convrefs) {
852  linkConversion(convref, conversions, conversionMap);
853  }
854 }
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 856 of file ReducedEGProducer.cc.

References edm::conversion(), linkConversion(), muonTagProbeFilters_cff::matched, and ConversionTools::matchesConversion().

Referenced by produce().

859  {
860  int index = 0;
861  for (const auto& conversion : *conversionHandle) {
862  reco::ConversionRef convref(conversionHandle, index++);
863 
864  bool matched = ConversionTools::matchesConversion(gsfElectron, conversion, true, true);
865  if (!matched)
866  continue;
867 
868  linkConversion(convref, conversions, conversionMap);
869  }
870 }
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 872 of file ReducedEGProducer.cc.

References edm::conversion(), linkConversion(), muonTagProbeFilters_cff::matched, and ConversionTools::matchesConversion().

875  {
876  int index = 0;
877  for (const auto& conversion : *conversionHandle) {
878  reco::ConversionRef convref(conversionHandle, index++);
879 
880  bool matched = ConversionTools::matchesConversion(superCluster, conversion, 0.2);
881  if (!matched)
882  continue;
883 
884  linkConversion(convref, conversions, conversionMap);
885  }
886 }
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 819 of file ReducedEGProducer.cc.

Referenced by produce().

819  {
820  if (!coreMap.count(core)) {
821  cores.push_back(*core);
822  coreMap[core] = cores.size() - 1;
823  }
824 }
Definition: __init__.py:1
void ReducedEGProducer::linkHcalHits ( const reco::SuperCluster superClus,
const HBHERecHitCollection recHits,
std::unordered_set< DetId > &  hcalDetIds 
)
private

Definition at line 941 of file ReducedEGProducer.cc.

References EGHcalRecHitSelector::addDetIds(), and hcalHitSel_.

Referenced by produce().

943  {
944  hcalHitSel_.addDetIds(superClus, recHits, hcalDetIds);
945 }
EGHcalRecHitSelector hcalHitSel_
void addDetIds(const reco::SuperCluster &superClus, const HBHERecHitCollection &recHits, CollType &detIdsToStore) const
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 826 of file ReducedEGProducer.cc.

Referenced by produce().

830  {
831  const auto& mappedsc = superClusterMap.find(superCluster);
832  //get index in output collection in order to keep track whether superCluster
833  //will be subject to full relinking
834  unsigned int mappedscidx = 0;
835  if (mappedsc == superClusterMap.end()) {
836  superClusters.push_back(*superCluster);
837  mappedscidx = superClusters.size() - 1;
838  superClusterMap[superCluster] = mappedscidx;
839  } else {
840  mappedscidx = mappedsc->second;
841  }
842 
843  //additionally mark supercluster for full relinking
844  if (relink)
845  superClusterFullRelinkMap.insert(mappedscidx);
846 }
void ReducedEGProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
final

Definition at line 195 of file ReducedEGProducer.cc.

References applyGsfElectronCalibOnData_, applyGsfElectronCalibOnMC_, applyPhotonCalibOnData_, applyPhotonCalibOnMC_, barrelEcalHits_, calibrateElectron(), calibratePhoton(), printConversionInfo::conversionHandle, pwdgSkimBPark_cfi::conversions, conversionT_, doPreshowerEcalHits_, endcapEcalHits_, ev, Exception, trigObjTnPSource_cfi::filler, edm::EventSetup::get(), edm::Event::getByToken(), gsfElectronCalibEcalEnergyErrT_, gsfElectronCalibEcalEnergyT_, gsfElectronCalibEnergyErrT_, gsfElectronCalibEnergyT_, gsfElectronFloatValueMapTs_, gsfElectronIdTs_, gsfElectronPfCandMapT_, electronIsolatorFromEffectiveArea_cfi::gsfElectrons, gsfElectronT_, ecalDrivenGsfElectronCoresFromMultiCl_cff::gsfTracks, gsfTrackT_, hbheHits_, edm::EventBase::isRealData(), edm::EDGetTokenT< T >::isUninitialized(), 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_, muons2muons_cfi::photon, photonCalibEnergyErrT_, photonCalibEnergyT_, photonCore_cfi::photonCore, photonFloatValueMapTs_, photonIdTs_, photonPfCandMapT_, BPHMonitor_cfi::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 HLT_2018_cff::superClusters.

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

951  {
952  //remap seed cluster
953  const auto& seedmapped = ebeeClusterMap.find(superCluster.seed());
954  if (seedmapped != ebeeClusterMap.end()) {
955  //make new ptr
956  reco::CaloClusterPtr clusptr(outEBEEClusterHandle, seedmapped->second);
957  superCluster.setSeed(clusptr);
958  }
959 
960  //remap all clusters
962  for (const auto& cluster : superCluster.clusters()) {
963  const auto& clustermapped = ebeeClusterMap.find(cluster);
964  if (clustermapped != ebeeClusterMap.end()) {
965  //make new ptr
966  reco::CaloClusterPtr clusptr(outEBEEClusterHandle, clustermapped->second);
967  clusters.push_back(clusptr);
968  } else {
969  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
970  clusters.clear();
971  break;
972  }
973  }
974  if (!clusters.empty()) {
975  superCluster.setClusters(clusters);
976  }
977 
978  //remap preshower clusters
979  reco::CaloClusterPtrVector esclusters;
980  for (const auto& cluster : superCluster.preshowerClusters()) {
981  const auto& clustermapped = esClusterMap.find(cluster);
982  if (clustermapped != esClusterMap.end()) {
983  //make new ptr
984  reco::CaloClusterPtr clusptr(outESClusterHandle, clustermapped->second);
985  esclusters.push_back(clusptr);
986  } else {
987  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
988  esclusters.clear();
989  break;
990  }
991  }
992  if (!esclusters.empty()) {
993  superCluster.setPreshowerClusters(esclusters);
994  }
995 }
void setPreshowerClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:116
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:149
bool empty() const
Is the RefVector empty.
Definition: PtrVectorBase.h:70
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:107
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:80
void setClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:110
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:83
void clear()
Clear the PtrVector.
Definition: PtrVectorBase.h:79
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
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 1020 of file ReducedEGProducer.cc.

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

Referenced by produce().

1023  {
1024  reco::ConversionRefVector outconvrefs;
1025  for (const auto& convref : convrefs) {
1026  const auto& convmapped = conversionMap.find(convref);
1027  if (convmapped != conversionMap.end()) {
1028  //make new ref
1029  reco::ConversionRef outref(outConversionHandle, convmapped->second);
1030  } else {
1031  //can only relink if all conversions are being relinked, so if one is missing, then skip the relinking completely
1032  outconvrefs.clear();
1033  break;
1034  }
1035  }
1036  if (!outconvrefs.empty()) {
1037  photonCore.setConversions(outconvrefs);
1038  }
1039 }
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:99
void setConversions(const reco::ConversionRefVector &conversions)
Definition: PhotonCore.h:76
void clear()
Clear the vector.
Definition: RefVector.h:142
void ReducedEGProducer::relinkGsfElectronCore ( reco::GsfElectron gsfElectron,
const std::map< reco::GsfElectronCoreRef, unsigned int > &  gsfElectronCoreMap,
const edm::OrphanHandle< reco::GsfElectronCoreCollection > &  outGsfElectronCoreHandle 
)
private

Definition at line 1052 of file ReducedEGProducer.cc.

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

Referenced by produce().

1055  {
1056  const auto& coremapped = gsfElectronCoreMap.find(gsfElectron.core());
1057  if (coremapped != gsfElectronCoreMap.end()) {
1058  //make new ref
1059  reco::GsfElectronCoreRef coreref(outgsfElectronCoreHandle, coremapped->second);
1060  gsfElectron.setCore(coreref);
1061  }
1062 }
void setCore(const reco::GsfElectronCoreRef &core)
Definition: GsfElectron.h:152
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 1010 of file ReducedEGProducer.cc.

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

Referenced by produce().

1012  {
1013  const auto& gsftkmapped = gsfTrackMap.find(gsfElectronCore.gsfTrack());
1014  if (gsftkmapped != gsfTrackMap.end()) {
1015  reco::GsfTrackRef gsftkref(outGsfTrackHandle, gsftkmapped->second);
1016  gsfElectronCore.setGsfTrack(gsftkref);
1017  }
1018 }
void ReducedEGProducer::relinkPhotonCore ( reco::Photon photon,
const std::map< reco::PhotonCoreRef, unsigned int > &  photonCoreMap,
const edm::OrphanHandle< reco::PhotonCoreCollection > &  outPhotonCoreHandle 
)
private

Definition at line 1041 of file ReducedEGProducer.cc.

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

Referenced by produce().

1043  {
1044  const auto& coremapped = photonCoreMap.find(photon.photonCore());
1045  if (coremapped != photonCoreMap.end()) {
1046  //make new ref
1047  reco::PhotonCoreRef coreref(outPhotonCoreHandle, coremapped->second);
1048  photon.setPhotonCore(coreref);
1049  }
1050 }
reco::PhotonCoreRef photonCore() const
returns a reference to the core photon object
Definition: Photon.h:46
void setPhotonCore(const reco::PhotonCoreRef &photonCore)
Definition: Photon.h:47
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 998 of file ReducedEGProducer.cc.

Referenced by produce().

1001  {
1002  const auto& scmapped = superClusterMap.find(core.superCluster());
1003  if (scmapped != superClusterMap.end()) {
1004  //make new ref
1005  reco::SuperClusterRef scref(outSuperClusterHandle, scmapped->second);
1006  core.setSuperCluster(scref);
1007  }
1008 }
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 139 of file ReducedEGProducer.h.

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

Referenced by ReducedEGProducer().

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

Member Data Documentation

const bool ReducedEGProducer::applyGsfElectronCalibOnData_
private

Definition at line 169 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const bool ReducedEGProducer::applyGsfElectronCalibOnMC_
private

Definition at line 170 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const bool ReducedEGProducer::applyPhotonCalibOnData_
private

Definition at line 167 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const bool ReducedEGProducer::applyPhotonCalibOnMC_
private

Definition at line 168 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 151 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 148 of file ReducedEGProducer.h.

Referenced by produce().

const bool ReducedEGProducer::doPreshowerEcalHits_
private

Definition at line 153 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 152 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 176 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 175 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 174 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 173 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 165 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 161 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 158 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 146 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 147 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 155 of file ReducedEGProducer.h.

Referenced by produce().

EGHcalRecHitSelector ReducedEGProducer::hcalHitSel_
private

Definition at line 216 of file ReducedEGProducer.h.

Referenced by beginRun(), and linkHcalHits().

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

Definition at line 212 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 209 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 206 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 164 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 145 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outConversions_
private

Definition at line 186 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEBEEClusters_
private

Definition at line 189 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEBRecHits_
private

Definition at line 194 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEERecHits_
private

Definition at line 195 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outESClusters_
private

Definition at line 190 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outESRecHits_
private

Definition at line 196 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectronCores_
private

Definition at line 184 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 204 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 201 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectronPfCandMap_
private

Definition at line 199 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectrons_
private

Definition at line 183 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfTracks_
private

Definition at line 185 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outHBHERecHits_
private

Definition at line 197 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTEBEEClusters_
private

Definition at line 192 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTESClusters_
private

Definition at line 193 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTPhotonCores_
private

Definition at line 182 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 203 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTPhotons_
private

Definition at line 181 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTSuperClusters_
private

Definition at line 191 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotonCores_
private

Definition at line 180 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 202 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 200 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotonPfCandMap_
private

Definition at line 198 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotons_
private

Definition at line 179 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outSingleConversions_
private

Definition at line 187 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outSuperClusters_
private

Definition at line 188 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 172 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 171 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 163 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 160 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 157 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 144 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 154 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 214 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 211 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 208 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 149 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 213 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 210 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 207 of file ReducedEGProducer.h.

Referenced by produce().