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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 47 of file ReducedEGProducer.h.

Constructor & Destructor Documentation

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

Definition at line 47 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.

47  :
48  photonT_(consumes<reco::PhotonCollection>(config.getParameter<edm::InputTag>("photons"))),
49  gsfElectronT_(consumes<reco::GsfElectronCollection>(config.getParameter<edm::InputTag>("gsfElectrons"))),
50  gsfTrackT_(consumes<reco::GsfTrackCollection>(config.getParameter<edm::InputTag>("gsfTracks"))),
51  conversionT_(consumes<reco::ConversionCollection>(config.getParameter<edm::InputTag>("conversions"))),
52  singleConversionT_(consumes<reco::ConversionCollection>(config.getParameter<edm::InputTag>("singleConversions"))),
53  barrelEcalHits_(consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("barrelEcalHits"))),
54  endcapEcalHits_(consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("endcapEcalHits"))),
55  doPreshowerEcalHits_(!config.getParameter<edm::InputTag>("preshowerEcalHits").label().empty()),
56  preshowerEcalHits_(doPreshowerEcalHits_ ? consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("preshowerEcalHits")) : edm::EDGetTokenT<EcalRecHitCollection>()),
57  hbheHits_(consumes<HBHERecHitCollection>(config.getParameter<edm::InputTag>("hbheHits"))),
58  photonPfCandMapT_(consumes<edm::ValueMap<std::vector<reco::PFCandidateRef> > >(config.getParameter<edm::InputTag>("photonsPFValMap"))),
59  gsfElectronPfCandMapT_(consumes<edm::ValueMap<std::vector<reco::PFCandidateRef> > >(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 {
103 
104  const edm::InputTag& aTag = config.getParameter<edm::InputTag>("ootPhotons");
105  if (not aTag.label().empty()) ootPhotonT_ = consumes<reco::PhotonCollection>(aTag);
106 
107  const std::vector<edm::InputTag>& photonidinputs =
108  config.getParameter<std::vector<edm::InputTag> >("photonIDSources");
109  for (const edm::InputTag &tag : photonidinputs) {
110  photonIdTs_.emplace_back(consumes<edm::ValueMap<bool> >(tag));
111  }
112 
113  const std::vector<edm::InputTag>& gsfelectronidinputs =
114  config.getParameter<std::vector<edm::InputTag> >("gsfElectronIDSources");
115  for (const edm::InputTag &tag : gsfelectronidinputs) {
116  gsfElectronIdTs_.emplace_back(consumes<edm::ValueMap<float> >(tag));
117  }
118 
119  const std::vector<edm::InputTag>& photonpfclusterisoinputs =
120  config.getParameter<std::vector<edm::InputTag> >("photonFloatValueMapSources");
121  for (const edm::InputTag &tag : photonpfclusterisoinputs) {
122  photonFloatValueMapTs_.emplace_back(consumes<edm::ValueMap<float> >(tag));
123  }
124 
125  const std::vector<edm::InputTag>& ootphotonpfclusterisoinputs =
126  config.getParameter<std::vector<edm::InputTag> >("ootPhotonFloatValueMapSources");
127  for (const edm::InputTag &tag : ootphotonpfclusterisoinputs) {
128  ootPhotonFloatValueMapTs_.emplace_back(consumes<edm::ValueMap<float> >(tag));
129  }
130 
131  const std::vector<edm::InputTag>& gsfelectronpfclusterisoinputs =
132  config.getParameter<std::vector<edm::InputTag> >("gsfElectronFloatValueMapSources");
133  for (const edm::InputTag &tag : gsfelectronpfclusterisoinputs) {
134  gsfElectronFloatValueMapTs_.emplace_back(consumes<edm::ValueMap<float> >(tag));
135  }
136 
138  setToken(photonCalibEnergyT_,config,"photonCalibEnergySource");
139  setToken(photonCalibEnergyErrT_,config,"photonCalibEnergyErrSource");
140  }
142  setToken(gsfElectronCalibEnergyT_,config,"gsfElectronCalibEnergySource");
143  setToken(gsfElectronCalibEnergyErrT_,config,"gsfElectronCalibEnergyErrSource");
144  setToken(gsfElectronCalibEcalEnergyT_,config,"gsfElectronCalibEcalEnergySource");
145  setToken(gsfElectronCalibEcalEnergyErrT_,config,"gsfElectronCalibEcalEnergyErrSource");
146  }
147 
148  produces< reco::PhotonCollection >(outPhotons_);
149  produces< reco::PhotonCoreCollection >(outPhotonCores_);
151  produces< reco::PhotonCollection >(outOOTPhotons_);
152  produces< reco::PhotonCoreCollection >(outOOTPhotonCores_);
153  }
154  produces< reco::GsfElectronCollection >(outGsfElectrons_);
155  produces< reco::GsfElectronCoreCollection >(outGsfElectronCores_);
156  produces< reco::GsfTrackCollection >(outGsfTracks_);
157  produces< reco::ConversionCollection >(outConversions_);
158  produces< reco::ConversionCollection >(outSingleConversions_);
159  produces< reco::SuperClusterCollection >(outSuperClusters_);
160  produces< reco::CaloClusterCollection >(outEBEEClusters_);
161  produces< reco::CaloClusterCollection >(outESClusters_);
163  produces< reco::SuperClusterCollection >(outOOTSuperClusters_);
164  produces< reco::CaloClusterCollection >(outOOTEBEEClusters_);
165  produces< reco::CaloClusterCollection >(outOOTESClusters_);
166  }
167  produces< EcalRecHitCollection >(outEBRecHits_);
168  produces< EcalRecHitCollection >(outEERecHits_);
169  if (doPreshowerEcalHits_) produces< EcalRecHitCollection >(outESRecHits_);
170  produces< HBHERecHitCollection >(outHBHERecHits_);
171  produces< edm::ValueMap<std::vector<reco::PFCandidateRef> > >(outPhotonPfCandMap_);
172  produces< edm::ValueMap<std::vector<reco::PFCandidateRef> > >(outGsfElectronPfCandMap_);
173  for (const std::string &outid : outPhotonIds_) {
174  produces< edm::ValueMap<bool> >(outid);
175  }
176  for (const std::string &outid : outGsfElectronIds_) {
177  produces< edm::ValueMap<float> >(outid);
178  }
179  for (const std::string &outid : outPhotonFloatValueMaps_) {
180  produces< edm::ValueMap<float> >(outid);
181  }
183  for (const std::string &outid : outOOTPhotonFloatValueMaps_) {
184  produces< edm::ValueMap<float> >(outid);
185  }
186  }
187  for (const std::string &outid : outGsfElectronFloatValueMaps_) {
188  produces< edm::ValueMap<float> >(outid);
189  }
190 }
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 192 of file ReducedEGProducer.cc.

193 {
194 }

Member Function Documentation

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

Definition at line 196 of file ReducedEGProducer.cc.

References hcalHitSel_, and EGHcalRecHitSelector::setup().

197 {
198  hcalHitSel_.setup(iSetup);
199 }
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 1065 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().

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

References reco::Photon::setCorrectedEnergy().

Referenced by produce().

1058 {
1059  float newEnergy = energyMap[oldPhoRef];
1060  float newEnergyErr = energyErrMap[oldPhoRef];
1061  photon.setCorrectedEnergy(reco::Photon::P4type::regression2, newEnergy, newEnergyErr, true);
1062 
1063 }
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 877 of file ReducedEGProducer.cc.

Referenced by linkCaloClusters(), and produce().

880 {
881  if (!caloClusterMap.count(caloCluster)) {
882  caloClusters.push_back(*caloCluster);
883  caloClusterMap[caloCluster] = caloClusters.size() - 1;
884  }
885 }
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 887 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().

896 {
897  for (const auto& cluster : superCluster.clusters()) {
898  linkCaloCluster(cluster, ebeeClusters, ebeeClusterMap);
899 
900  for (const auto& hitfrac : cluster->hitsAndFractions()) {
901  rechitMap.insert(hitfrac.first);
902  }
903  //make sure to also take all hits in the 5x5 around the max energy xtal
904  bool barrel = cluster->hitsAndFractions().front().first.subdetId()==EcalBarrel;
905  const EcalRecHitCollection *rhcol = barrel ? barrelHitHandle.product() : endcapHitHandle.product();
906  DetId seed = EcalClusterTools::getMaximum(*cluster, rhcol).first;
907 
908  std::vector<DetId> dets5x5 = caloTopology->getSubdetectorTopology(DetId::Ecal, barrel ? EcalBarrel : EcalEndcap)->getWindow(seed,5,5);
909  for (const auto& detid : dets5x5) {
910  rechitMap.insert(detid);
911  }
912  }
913  for (const auto& cluster : superCluster.preshowerClusters()) {
914  linkCaloCluster(cluster, esClusters, esClusterMap);
915 
916  for (const auto& hitfrac : cluster->hitsAndFractions()) {
917  rechitMap.insert(hitfrac.first);
918  }
919  }
920 }
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:74
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:20
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 867 of file ReducedEGProducer.cc.

Referenced by linkConversions(), and linkConversionsByTrackRef().

870 {
871  if (!conversionMap.count(convref)) {
872  conversions.push_back(*convref);
873  conversionMap[convref] = conversions.size() - 1;
874  }
875 }
void ReducedEGProducer::linkConversions ( const reco::ConversionRefVector convrefs,
reco::ConversionCollection conversions,
std::map< reco::ConversionRef, unsigned int > &  conversionMap 
)
private

Definition at line 824 of file ReducedEGProducer.cc.

References linkConversion().

Referenced by produce().

827 {
828  for (const auto& convref : convrefs) {
829  linkConversion(convref, conversions, conversionMap);
830  }
831 }
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 833 of file ReducedEGProducer.cc.

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

Referenced by produce().

837 {
838  int index = 0;
839  for (const auto& conversion : *conversionHandle) {
840 
841  reco::ConversionRef convref(conversionHandle,index++);
842 
843  bool matched = ConversionTools::matchesConversion(gsfElectron,conversion,true,true);
844  if (!matched) continue;
845 
846  linkConversion(convref, conversions, conversionMap);
847  }
848 }
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 850 of file ReducedEGProducer.cc.

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

854 {
855  int index = 0;
856  for (const auto& conversion : *conversionHandle) {
857 
858  reco::ConversionRef convref(conversionHandle,index++);
859 
860  bool matched = ConversionTools::matchesConversion(superCluster,conversion,0.2);
861  if (!matched) continue;
862 
863  linkConversion(convref, conversions, conversionMap);
864  }
865 }
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 793 of file ReducedEGProducer.cc.

Referenced by produce().

794 {
795  if (!coreMap.count(core)) {
796  cores.push_back(*core);
797  coreMap[core] = cores.size() - 1;
798  }
799 }
Definition: __init__.py:1
void ReducedEGProducer::linkHcalHits ( const reco::SuperCluster superClus,
const HBHERecHitCollection recHits,
std::unordered_set< DetId > &  hcalDetIds 
)
private

Definition at line 922 of file ReducedEGProducer.cc.

References EGHcalRecHitSelector::addDetIds(), and hcalHitSel_.

Referenced by produce().

925 {
926  hcalHitSel_.addDetIds(superClus,recHits,hcalDetIds);
927 }
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 801 of file ReducedEGProducer.cc.

Referenced by produce().

806 {
807  const auto &mappedsc = superClusterMap.find(superCluster);
808  //get index in output collection in order to keep track whether superCluster
809  //will be subject to full relinking
810  unsigned int mappedscidx = 0;
811  if (mappedsc==superClusterMap.end()) {
812  superClusters.push_back(*superCluster);
813  mappedscidx = superClusters.size() - 1;
814  superClusterMap[superCluster] = mappedscidx;
815  }
816  else {
817  mappedscidx = mappedsc->second;
818  }
819 
820  //additionally mark supercluster for full relinking
821  if (relink) superClusterFullRelinkMap.insert(mappedscidx);
822 }
void ReducedEGProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
final

Definition at line 202 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_, 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_, muons_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.

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

934 {
935  //remap seed cluster
936  const auto &seedmapped = ebeeClusterMap.find(superCluster.seed());
937  if (seedmapped != ebeeClusterMap.end()) {
938  //make new ptr
939  reco::CaloClusterPtr clusptr(outEBEEClusterHandle,seedmapped->second);
940  superCluster.setSeed(clusptr);
941  }
942 
943  //remap all clusters
945  for (const auto &cluster : superCluster.clusters()) {
946  const auto &clustermapped = ebeeClusterMap.find(cluster);
947  if (clustermapped != ebeeClusterMap.end()) {
948  //make new ptr
949  reco::CaloClusterPtr clusptr(outEBEEClusterHandle,clustermapped->second);
950  clusters.push_back(clusptr);
951  }
952  else {
953  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
954  clusters.clear();
955  break;
956  }
957  }
958  if (!clusters.empty()) {
959  superCluster.setClusters(clusters);
960  }
961 
962  //remap preshower clusters
963  reco::CaloClusterPtrVector esclusters;
964  for (const auto& cluster : superCluster.preshowerClusters()) {
965  const auto &clustermapped = esClusterMap.find(cluster);
966  if (clustermapped != esClusterMap.end()) {
967  //make new ptr
968  reco::CaloClusterPtr clusptr(outESClusterHandle,clustermapped->second);
969  esclusters.push_back(clusptr);
970  }
971  else {
972  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
973  esclusters.clear();
974  break;
975  }
976  }
977  if (!esclusters.empty()) {
978  superCluster.setPreshowerClusters(esclusters);
979  }
980 }
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 1006 of file ReducedEGProducer.cc.

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

Referenced by produce().

1010 {
1011  reco::ConversionRefVector outconvrefs;
1012  for (const auto& convref : convrefs) {
1013  const auto &convmapped = conversionMap.find(convref);
1014  if (convmapped != conversionMap.end()) {
1015  //make new ref
1016  reco::ConversionRef outref(outConversionHandle,convmapped->second);
1017  }
1018  else {
1019  //can only relink if all conversions are being relinked, so if one is missing, then skip the relinking completely
1020  outconvrefs.clear();
1021  break;
1022  }
1023  }
1024  if (!outconvrefs.empty()) {
1025  photonCore.setConversions(outconvrefs);
1026  }
1027 }
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 1041 of file ReducedEGProducer.cc.

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

Referenced by produce().

1044 {
1045  const auto &coremapped = gsfElectronCoreMap.find(gsfElectron.core());
1046  if (coremapped != gsfElectronCoreMap.end()) {
1047  //make new ref
1048  reco::GsfElectronCoreRef coreref(outgsfElectronCoreHandle,coremapped->second);
1049  gsfElectron.setCore(coreref);
1050  }
1051 }
void setCore(const reco::GsfElectronCoreRef &core)
Definition: GsfElectron.h:182
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 995 of file ReducedEGProducer.cc.

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

Referenced by produce().

998 {
999  const auto &gsftkmapped = gsfTrackMap.find(gsfElectronCore.gsfTrack());
1000  if (gsftkmapped != gsfTrackMap.end()) {
1001  reco::GsfTrackRef gsftkref(outGsfTrackHandle, gsftkmapped->second);
1002  gsfElectronCore.setGsfTrack(gsftkref);
1003  }
1004 }
void ReducedEGProducer::relinkPhotonCore ( reco::Photon photon,
const std::map< reco::PhotonCoreRef, unsigned int > &  photonCoreMap,
const edm::OrphanHandle< reco::PhotonCoreCollection > &  outPhotonCoreHandle 
)
private

Definition at line 1029 of file ReducedEGProducer.cc.

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

Referenced by produce().

1032 {
1033  const auto &coremapped = photonCoreMap.find(photon.photonCore());
1034  if (coremapped != photonCoreMap.end()) {
1035  //make new ref
1036  reco::PhotonCoreRef coreref(outPhotonCoreHandle,coremapped->second);
1037  photon.setPhotonCore(coreref);
1038  }
1039 }
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 983 of file ReducedEGProducer.cc.

Referenced by produce().

986 {
987  const auto &scmapped = superClusterMap.find(core.superCluster());
988  if (scmapped != superClusterMap.end()) {
989  //make new ref
990  reco::SuperClusterRef scref(outSuperClusterHandle,scmapped->second);
991  core.setSuperCluster(scref);
992  }
993 }
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 145 of file ReducedEGProducer.h.

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

Referenced by ReducedEGProducer().

145  {
146  token = consumes<T>(config.getParameter<edm::InputTag>(name));
147  }
T getParameter(std::string const &) const

Member Data Documentation

const bool ReducedEGProducer::applyGsfElectronCalibOnData_
private

Definition at line 176 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const bool ReducedEGProducer::applyGsfElectronCalibOnMC_
private

Definition at line 177 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const bool ReducedEGProducer::applyPhotonCalibOnData_
private

Definition at line 174 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const bool ReducedEGProducer::applyPhotonCalibOnMC_
private

Definition at line 175 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 158 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 155 of file ReducedEGProducer.h.

Referenced by produce().

const bool ReducedEGProducer::doPreshowerEcalHits_
private

Definition at line 160 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 159 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 183 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 182 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 181 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 180 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 172 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 168 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 165 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 153 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 154 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 162 of file ReducedEGProducer.h.

Referenced by produce().

EGHcalRecHitSelector ReducedEGProducer::hcalHitSel_
private

Definition at line 223 of file ReducedEGProducer.h.

Referenced by beginRun(), and linkHcalHits().

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

Definition at line 219 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 216 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 213 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 171 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 152 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outConversions_
private

Definition at line 193 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEBEEClusters_
private

Definition at line 196 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEBRecHits_
private

Definition at line 201 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEERecHits_
private

Definition at line 202 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outESClusters_
private

Definition at line 197 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outESRecHits_
private

Definition at line 203 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectronCores_
private

Definition at line 191 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 211 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 208 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectronPfCandMap_
private

Definition at line 206 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectrons_
private

Definition at line 190 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfTracks_
private

Definition at line 192 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outHBHERecHits_
private

Definition at line 204 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTEBEEClusters_
private

Definition at line 199 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTESClusters_
private

Definition at line 200 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTPhotonCores_
private

Definition at line 189 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 210 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTPhotons_
private

Definition at line 188 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outOOTSuperClusters_
private

Definition at line 198 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotonCores_
private

Definition at line 187 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 209 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 207 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotonPfCandMap_
private

Definition at line 205 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotons_
private

Definition at line 186 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outSingleConversions_
private

Definition at line 194 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outSuperClusters_
private

Definition at line 195 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 179 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 178 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 170 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 167 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

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

Definition at line 164 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 151 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 161 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 221 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 218 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 215 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 156 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 220 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 217 of file ReducedEGProducer.h.

Referenced by produce().

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

Definition at line 214 of file ReducedEGProducer.h.

Referenced by produce().