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)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () 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_
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordcaloTopology_
 
const edm::EDGetTokenT< reco::ConversionCollectionconversionT_
 
const bool doPreshowerEcalHits_
 
const edm::EDGetTokenT< EcalRecHitCollectionendcapEcalHits_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyErrT_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyT_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyErrT_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyT_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronFloatValueMapTs_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
 
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
 
const edm::EDGetTokenT< reco::GsfElectronCollectiongsfElectronT_
 
const edm::EDGetTokenT< 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 edm::EDGetTokenT< reco::HIPhotonIsolationMaprecoHIPhotonIsolationMapInputToken_
 
const std::string recoHIPhotonIsolationMapOutputName_
 
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) \edited: K. McDermott(Cornell) : refactored code + out of time photons

Definition at line 43 of file ReducedEGProducer.h.

Constructor & Destructor Documentation

◆ ReducedEGProducer()

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

Definition at line 42 of file ReducedEGProducer.cc.

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

References label.

Member Function Documentation

◆ beginRun()

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

Definition at line 192 of file ReducedEGProducer.cc.

192 { hcalHitSel_.setup(iSetup); }

References hcalHitSel_, and EGHcalRecHitSelector::setup().

◆ calibrateElectron()

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

Definition at line 1074 of file ReducedEGProducer.cc.

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

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

Referenced by produce().

◆ calibratePhoton()

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

Definition at line 1065 of file ReducedEGProducer.cc.

1068  {
1069  float newEnergy = energyMap[oldPhoRef];
1070  float newEnergyErr = energyErrMap[oldPhoRef];
1071  photon.setCorrectedEnergy(reco::Photon::P4type::regression2, newEnergy, newEnergyErr, true);
1072 }

References muons2muons_cfi::photon.

Referenced by produce().

◆ linkCaloCluster()

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

Definition at line 898 of file ReducedEGProducer.cc.

900  {
901  if (!caloClusterMap.count(caloCluster)) {
902  caloClusters.push_back(*caloCluster);
903  caloClusterMap[caloCluster] = caloClusters.size() - 1;
904  }
905 }

Referenced by linkCaloClusters(), and produce().

◆ linkCaloClusters()

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

Definition at line 907 of file ReducedEGProducer.cc.

915  {
916  for (const auto& cluster : superCluster.clusters()) {
917  linkCaloCluster(cluster, ebeeClusters, ebeeClusterMap);
918 
919  for (const auto& hitfrac : cluster->hitsAndFractions()) {
920  rechitMap.insert(hitfrac.first);
921  }
922  //make sure to also take all hits in the 5x5 around the max energy xtal
923  bool barrel = cluster->hitsAndFractions().front().first.subdetId() == EcalBarrel;
924  const EcalRecHitCollection* rhcol = barrel ? barrelHitHandle.product() : endcapHitHandle.product();
925  DetId seed = EcalClusterTools::getMaximum(*cluster, rhcol).first;
926 
927  std::vector<DetId> dets5x5 =
929  for (const auto& detid : dets5x5) {
930  rechitMap.insert(detid);
931  }
932  }
933  for (const auto& cluster : superCluster.preshowerClusters()) {
934  linkCaloCluster(cluster, esClusters, esClusterMap);
935 
936  for (const auto& hitfrac : cluster->hitsAndFractions()) {
937  rechitMap.insert(hitfrac.first);
938  }
939  }
940 }

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 fileCollector::seed.

Referenced by produce().

◆ linkConversion()

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

Definition at line 889 of file ReducedEGProducer.cc.

891  {
892  if (!conversionMap.count(convref)) {
893  conversions.push_back(*convref);
894  conversionMap[convref] = conversions.size() - 1;
895  }
896 }

References pwdgSkimBPark_cfi::conversions.

Referenced by linkConversions(), and linkConversionsByTrackRef().

◆ linkConversions()

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

Definition at line 849 of file ReducedEGProducer.cc.

851  {
852  for (const auto& convref : convrefs) {
853  linkConversion(convref, conversions, conversionMap);
854  }
855 }

References pwdgSkimBPark_cfi::conversions, and linkConversion().

Referenced by produce().

◆ linkConversionsByTrackRef() [1/2]

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

Definition at line 857 of file ReducedEGProducer.cc.

860  {
861  int index = 0;
862  for (const auto& conversion : *conversionHandle) {
864 
865  bool matched = ConversionTools::matchesConversion(gsfElectron, conversion, true, true);
866  if (!matched)
867  continue;
868 
869  linkConversion(convref, conversions, conversionMap);
870  }
871 }

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

Referenced by produce().

◆ linkConversionsByTrackRef() [2/2]

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

Definition at line 873 of file ReducedEGProducer.cc.

876  {
877  int index = 0;
878  for (const auto& conversion : *conversionHandle) {
880 
881  bool matched = ConversionTools::matchesConversion(superCluster, conversion, 0.2);
882  if (!matched)
883  continue;
884 
885  linkConversion(convref, conversions, conversionMap);
886  }
887 }

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

◆ linkCore()

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

Definition at line 820 of file ReducedEGProducer.cc.

820  {
821  if (!coreMap.count(core)) {
822  cores.push_back(*core);
823  coreMap[core] = cores.size() - 1;
824  }
825 }

References HLT_FULL_cff::cores.

Referenced by produce().

◆ linkHcalHits()

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

Definition at line 942 of file ReducedEGProducer.cc.

944  {
945  hcalHitSel_.addDetIds(superClus, recHits, hcalDetIds);
946 }

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

Referenced by produce().

◆ linkSuperCluster()

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

Definition at line 827 of file ReducedEGProducer.cc.

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

References HLT_FULL_cff::superClusters.

Referenced by produce().

◆ produce()

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

Definition at line 194 of file ReducedEGProducer.cc.

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

References applyGsfElectronCalibOnData_, applyGsfElectronCalibOnMC_, applyPhotonCalibOnData_, applyPhotonCalibOnMC_, barrelEcalHits_, calibrateElectron(), calibratePhoton(), caloTopology_, printConversionInfo::conversionHandle, pwdgSkimBPark_cfi::conversions, conversionT_, PA_ZEESkim_cff::decay, doPreshowerEcalHits_, endcapEcalHits_, ev, Exception, trigObjTnPSource_cfi::filler, edm::Event::get(), edm::Event::getByToken(), edm::EventSetup::getHandle(), 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(), recoHIPhotonIsolationMapInputToken_, recoHIPhotonIsolationMapOutputName_, relinkCaloClusters(), relinkConversions(), relinkGsfElectronCore(), relinkGsfElectronSel_, relinkGsfTrack(), relinkOOTPhotonSel_, relinkPhotonCore(), relinkPhotonSel_, relinkSuperCluster(), reducedEgamma_cfi::singleConversions, singleConversionT_, slimRelinkGsfElectronSel_, slimRelinkOOTPhotonSel_, slimRelinkPhotonSel_, AlCaHLTBitMon_QueryRunRegistry::string, and HLT_FULL_cff::superClusters.

◆ relinkCaloClusters()

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

Definition at line 948 of file ReducedEGProducer.cc.

952  {
953  //remap seed cluster
954  const auto& seedmapped = ebeeClusterMap.find(superCluster.seed());
955  if (seedmapped != ebeeClusterMap.end()) {
956  //make new ptr
957  reco::CaloClusterPtr clusptr(outEBEEClusterHandle, seedmapped->second);
958  superCluster.setSeed(clusptr);
959  }
960 
961  //remap all clusters
963  for (const auto& cluster : superCluster.clusters()) {
964  const auto& clustermapped = ebeeClusterMap.find(cluster);
965  if (clustermapped != ebeeClusterMap.end()) {
966  //make new ptr
967  reco::CaloClusterPtr clusptr(outEBEEClusterHandle, clustermapped->second);
968  clusters.push_back(clusptr);
969  } else {
970  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
971  clusters.clear();
972  break;
973  }
974  }
975  if (!clusters.empty()) {
976  superCluster.setClusters(clusters);
977  }
978 
979  //remap preshower clusters
980  reco::CaloClusterPtrVector esclusters;
981  for (const auto& cluster : superCluster.preshowerClusters()) {
982  const auto& clustermapped = esClusterMap.find(cluster);
983  if (clustermapped != esClusterMap.end()) {
984  //make new ptr
985  reco::CaloClusterPtr clusptr(outESClusterHandle, clustermapped->second);
986  esclusters.push_back(clusptr);
987  } else {
988  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
989  esclusters.clear();
990  break;
991  }
992  }
993  if (!esclusters.empty()) {
994  superCluster.setPreshowerClusters(esclusters);
995  }
996 }

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

◆ relinkConversions()

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

Definition at line 1021 of file ReducedEGProducer.cc.

1024  {
1025  reco::ConversionRefVector outconvrefs;
1026  for (const auto& convref : convrefs) {
1027  const auto& convmapped = conversionMap.find(convref);
1028  if (convmapped != conversionMap.end()) {
1029  //make new ref
1030  reco::ConversionRef outref(outConversionHandle, convmapped->second);
1031  } else {
1032  //can only relink if all conversions are being relinked, so if one is missing, then skip the relinking completely
1033  outconvrefs.clear();
1034  break;
1035  }
1036  }
1037  if (!outconvrefs.empty()) {
1038  photonCore.setConversions(outconvrefs);
1039  }
1040 }

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

Referenced by produce().

◆ relinkGsfElectronCore()

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

Definition at line 1053 of file ReducedEGProducer.cc.

1056  {
1057  const auto& coremapped = gsfElectronCoreMap.find(gsfElectron.core());
1058  if (coremapped != gsfElectronCoreMap.end()) {
1059  //make new ref
1060  reco::GsfElectronCoreRef coreref(outgsfElectronCoreHandle, coremapped->second);
1061  gsfElectron.setCore(coreref);
1062  }
1063 }

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

Referenced by produce().

◆ relinkGsfTrack()

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

Definition at line 1011 of file ReducedEGProducer.cc.

1013  {
1014  const auto& gsftkmapped = gsfTrackMap.find(gsfElectronCore.gsfTrack());
1015  if (gsftkmapped != gsfTrackMap.end()) {
1016  reco::GsfTrackRef gsftkref(outGsfTrackHandle, gsftkmapped->second);
1017  gsfElectronCore.setGsfTrack(gsftkref);
1018  }
1019 }

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

Referenced by produce().

◆ relinkPhotonCore()

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

Definition at line 1042 of file ReducedEGProducer.cc.

1044  {
1045  const auto& coremapped = photonCoreMap.find(photon.photonCore());
1046  if (coremapped != photonCoreMap.end()) {
1047  //make new ref
1048  reco::PhotonCoreRef coreref(outPhotonCoreHandle, coremapped->second);
1049  photon.setPhotonCore(coreref);
1050  }
1051 }

References muons2muons_cfi::photon.

Referenced by produce().

◆ relinkSuperCluster()

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

Definition at line 999 of file ReducedEGProducer.cc.

1002  {
1003  const auto& scmapped = superClusterMap.find(core.superCluster());
1004  if (scmapped != superClusterMap.end()) {
1005  //make new ref
1006  reco::SuperClusterRef scref(outSuperClusterHandle, scmapped->second);
1007  core.setSuperCluster(scref);
1008  }
1009 }

Referenced by produce().

◆ setToken()

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

Definition at line 137 of file ReducedEGProducer.h.

137  {
138  token = consumes<T>(config.getParameter<edm::InputTag>(name));
139  }

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

Member Data Documentation

◆ applyGsfElectronCalibOnData_

const bool ReducedEGProducer::applyGsfElectronCalibOnData_
private

Definition at line 170 of file ReducedEGProducer.h.

Referenced by produce().

◆ applyGsfElectronCalibOnMC_

const bool ReducedEGProducer::applyGsfElectronCalibOnMC_
private

Definition at line 171 of file ReducedEGProducer.h.

Referenced by produce().

◆ applyPhotonCalibOnData_

const bool ReducedEGProducer::applyPhotonCalibOnData_
private

Definition at line 168 of file ReducedEGProducer.h.

Referenced by produce().

◆ applyPhotonCalibOnMC_

const bool ReducedEGProducer::applyPhotonCalibOnMC_
private

Definition at line 169 of file ReducedEGProducer.h.

Referenced by produce().

◆ barrelEcalHits_

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

Definition at line 149 of file ReducedEGProducer.h.

Referenced by produce().

◆ caloTopology_

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

Definition at line 179 of file ReducedEGProducer.h.

Referenced by produce().

◆ conversionT_

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

Definition at line 146 of file ReducedEGProducer.h.

Referenced by produce().

◆ doPreshowerEcalHits_

const bool ReducedEGProducer::doPreshowerEcalHits_
private

Definition at line 151 of file ReducedEGProducer.h.

Referenced by produce().

◆ endcapEcalHits_

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

Definition at line 150 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronCalibEcalEnergyErrT_

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

Definition at line 177 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronCalibEcalEnergyT_

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

Definition at line 176 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronCalibEnergyErrT_

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

Definition at line 175 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronCalibEnergyT_

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

Definition at line 174 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronFloatValueMapTs_

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

Definition at line 163 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronIdTs_

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

Definition at line 159 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronPfCandMapT_

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

Definition at line 156 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronT_

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

Definition at line 144 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfTrackT_

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

Definition at line 145 of file ReducedEGProducer.h.

Referenced by produce().

◆ hbheHits_

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

Definition at line 153 of file ReducedEGProducer.h.

Referenced by produce().

◆ hcalHitSel_

EGHcalRecHitSelector ReducedEGProducer::hcalHitSel_
private

Definition at line 218 of file ReducedEGProducer.h.

Referenced by beginRun(), and linkHcalHits().

◆ keepGsfElectronSel_

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

Definition at line 214 of file ReducedEGProducer.h.

Referenced by produce().

◆ keepOOTPhotonSel_

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

Definition at line 211 of file ReducedEGProducer.h.

Referenced by produce().

◆ keepPhotonSel_

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

Definition at line 208 of file ReducedEGProducer.h.

Referenced by produce().

◆ ootPhotonFloatValueMapTs_

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

Definition at line 162 of file ReducedEGProducer.h.

Referenced by produce().

◆ ootPhotonT_

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

Definition at line 143 of file ReducedEGProducer.h.

Referenced by produce().

◆ outConversions_

const std::string ReducedEGProducer::outConversions_
private

Definition at line 188 of file ReducedEGProducer.h.

Referenced by produce().

◆ outEBEEClusters_

const std::string ReducedEGProducer::outEBEEClusters_
private

Definition at line 191 of file ReducedEGProducer.h.

Referenced by produce().

◆ outEBRecHits_

const std::string ReducedEGProducer::outEBRecHits_
private

Definition at line 196 of file ReducedEGProducer.h.

Referenced by produce().

◆ outEERecHits_

const std::string ReducedEGProducer::outEERecHits_
private

Definition at line 197 of file ReducedEGProducer.h.

Referenced by produce().

◆ outESClusters_

const std::string ReducedEGProducer::outESClusters_
private

Definition at line 192 of file ReducedEGProducer.h.

Referenced by produce().

◆ outESRecHits_

const std::string ReducedEGProducer::outESRecHits_
private

Definition at line 198 of file ReducedEGProducer.h.

Referenced by produce().

◆ outGsfElectronCores_

const std::string ReducedEGProducer::outGsfElectronCores_
private

Definition at line 186 of file ReducedEGProducer.h.

Referenced by produce().

◆ outGsfElectronFloatValueMaps_

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

Definition at line 206 of file ReducedEGProducer.h.

Referenced by produce().

◆ outGsfElectronIds_

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

Definition at line 203 of file ReducedEGProducer.h.

Referenced by produce().

◆ outGsfElectronPfCandMap_

const std::string ReducedEGProducer::outGsfElectronPfCandMap_
private

Definition at line 201 of file ReducedEGProducer.h.

Referenced by produce().

◆ outGsfElectrons_

const std::string ReducedEGProducer::outGsfElectrons_
private

Definition at line 185 of file ReducedEGProducer.h.

Referenced by produce().

◆ outGsfTracks_

const std::string ReducedEGProducer::outGsfTracks_
private

Definition at line 187 of file ReducedEGProducer.h.

Referenced by produce().

◆ outHBHERecHits_

const std::string ReducedEGProducer::outHBHERecHits_
private

Definition at line 199 of file ReducedEGProducer.h.

Referenced by produce().

◆ outOOTEBEEClusters_

const std::string ReducedEGProducer::outOOTEBEEClusters_
private

Definition at line 194 of file ReducedEGProducer.h.

Referenced by produce().

◆ outOOTESClusters_

const std::string ReducedEGProducer::outOOTESClusters_
private

Definition at line 195 of file ReducedEGProducer.h.

Referenced by produce().

◆ outOOTPhotonCores_

const std::string ReducedEGProducer::outOOTPhotonCores_
private

Definition at line 184 of file ReducedEGProducer.h.

Referenced by produce().

◆ outOOTPhotonFloatValueMaps_

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

Definition at line 205 of file ReducedEGProducer.h.

Referenced by produce().

◆ outOOTPhotons_

const std::string ReducedEGProducer::outOOTPhotons_
private

Definition at line 183 of file ReducedEGProducer.h.

Referenced by produce().

◆ outOOTSuperClusters_

const std::string ReducedEGProducer::outOOTSuperClusters_
private

Definition at line 193 of file ReducedEGProducer.h.

Referenced by produce().

◆ outPhotonCores_

const std::string ReducedEGProducer::outPhotonCores_
private

Definition at line 182 of file ReducedEGProducer.h.

Referenced by produce().

◆ outPhotonFloatValueMaps_

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

Definition at line 204 of file ReducedEGProducer.h.

Referenced by produce().

◆ outPhotonIds_

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

Definition at line 202 of file ReducedEGProducer.h.

Referenced by produce().

◆ outPhotonPfCandMap_

const std::string ReducedEGProducer::outPhotonPfCandMap_
private

Definition at line 200 of file ReducedEGProducer.h.

Referenced by produce().

◆ outPhotons_

const std::string ReducedEGProducer::outPhotons_
private

Definition at line 181 of file ReducedEGProducer.h.

Referenced by produce().

◆ outSingleConversions_

const std::string ReducedEGProducer::outSingleConversions_
private

Definition at line 189 of file ReducedEGProducer.h.

Referenced by produce().

◆ outSuperClusters_

const std::string ReducedEGProducer::outSuperClusters_
private

Definition at line 190 of file ReducedEGProducer.h.

Referenced by produce().

◆ photonCalibEnergyErrT_

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

Definition at line 173 of file ReducedEGProducer.h.

Referenced by produce().

◆ photonCalibEnergyT_

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

Definition at line 172 of file ReducedEGProducer.h.

Referenced by produce().

◆ photonFloatValueMapTs_

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

Definition at line 161 of file ReducedEGProducer.h.

Referenced by produce().

◆ photonIdTs_

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

Definition at line 158 of file ReducedEGProducer.h.

Referenced by produce().

◆ photonPfCandMapT_

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

Definition at line 155 of file ReducedEGProducer.h.

Referenced by produce().

◆ photonT_

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

Definition at line 142 of file ReducedEGProducer.h.

Referenced by produce().

◆ preshowerEcalHits_

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

Definition at line 152 of file ReducedEGProducer.h.

Referenced by produce().

◆ recoHIPhotonIsolationMapInputToken_

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

Definition at line 165 of file ReducedEGProducer.h.

Referenced by produce().

◆ recoHIPhotonIsolationMapOutputName_

const std::string ReducedEGProducer::recoHIPhotonIsolationMapOutputName_
private

Definition at line 166 of file ReducedEGProducer.h.

Referenced by produce().

◆ relinkGsfElectronSel_

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

Definition at line 216 of file ReducedEGProducer.h.

Referenced by produce().

◆ relinkOOTPhotonSel_

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

Definition at line 213 of file ReducedEGProducer.h.

Referenced by produce().

◆ relinkPhotonSel_

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

Definition at line 210 of file ReducedEGProducer.h.

Referenced by produce().

◆ singleConversionT_

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

Definition at line 147 of file ReducedEGProducer.h.

Referenced by produce().

◆ slimRelinkGsfElectronSel_

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

Definition at line 215 of file ReducedEGProducer.h.

Referenced by produce().

◆ slimRelinkOOTPhotonSel_

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

Definition at line 212 of file ReducedEGProducer.h.

Referenced by produce().

◆ slimRelinkPhotonSel_

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

Definition at line 209 of file ReducedEGProducer.h.

Referenced by produce().

ReducedEGProducer::outPhotonPfCandMap_
const std::string outPhotonPfCandMap_
Definition: ReducedEGProducer.h:200
ReducedEGProducer::endcapEcalHits_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
Definition: ReducedEGProducer.h:150
muonTagProbeFilters_cff.matched
matched
Definition: muonTagProbeFilters_cff.py:62
ReducedEGProducer::applyGsfElectronCalibOnMC_
const bool applyGsfElectronCalibOnMC_
Definition: ReducedEGProducer.h:171
muons2muons_cfi.photon
photon
Definition: muons2muons_cfi.py:28
EGHcalRecHitSelector::setup
void setup(const edm::EventSetup &iSetup)
Definition: EGHcalRecHitSelector.h:29
ReducedEGProducer::photonCalibEnergyT_
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyT_
Definition: ReducedEGProducer.h:172
EcalRecHit
Definition: EcalRecHit.h:15
ReducedEGProducer::outPhotonFloatValueMaps_
const std::vector< std::string > outPhotonFloatValueMaps_
Definition: ReducedEGProducer.h:204
edm::RefVector::clear
void clear()
Clear the vector.
Definition: RefVector.h:142
ReducedEGProducer::singleConversionT_
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
Definition: ReducedEGProducer.h:147
reco::SuperCluster::setPreshowerClusters
void setPreshowerClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:116
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
ReducedEGProducer::doPreshowerEcalHits_
const bool doPreshowerEcalHits_
Definition: ReducedEGProducer.h:151
reco::SuperCluster::clusters
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:80
ReducedEGProducer::linkCaloClusters
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)
Definition: ReducedEGProducer.cc:907
ReducedEGProducer::relinkOOTPhotonSel_
const StringCutObjectSelector< reco::Photon > relinkOOTPhotonSel_
Definition: ReducedEGProducer.h:213
edm::conversion
void conversion(EventAux const &from, EventAuxiliary &to)
Definition: EventAux.cc:9
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ReducedEGProducer::outOOTPhotons_
const std::string outOOTPhotons_
Definition: ReducedEGProducer.h:183
ReducedEGProducer::linkHcalHits
void linkHcalHits(const reco::SuperCluster &superClus, const HBHERecHitCollection &recHits, std::unordered_set< DetId > &hcalDetIds)
Definition: ReducedEGProducer.cc:942
ReducedEGProducer::calibratePhoton
static void calibratePhoton(reco::Photon &photon, const reco::PhotonRef &oldPhoRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap)
Definition: ReducedEGProducer.cc:1065
ReducedEGProducer::outEBEEClusters_
const std::string outEBEEClusters_
Definition: ReducedEGProducer.h:191
ReducedEGProducer::keepPhotonSel_
const StringCutObjectSelector< reco::Photon > keepPhotonSel_
Definition: ReducedEGProducer.h:208
reco::SuperCluster
Definition: SuperCluster.h:18
ReducedEGProducer::conversionT_
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_
Definition: ReducedEGProducer.h:146
ootPhotons_cff.ootPhotons
ootPhotons
Definition: ootPhotons_cff.py:13
edm
HLT enums.
Definition: AlignableModifier.h:19
ReducedEGProducer::gsfElectronCalibEnergyT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyT_
Definition: ReducedEGProducer.h:174
ReducedEGProducer::outGsfTracks_
const std::string outGsfTracks_
Definition: ReducedEGProducer.h:187
ReducedEGProducer::slimRelinkPhotonSel_
const StringCutObjectSelector< reco::Photon > slimRelinkPhotonSel_
Definition: ReducedEGProducer.h:209
HBHERecHit
Definition: HBHERecHit.h:13
ReducedEGProducer::relinkGsfTrack
void relinkGsfTrack(reco::GsfElectronCore &electroncore, const std::map< reco::GsfTrackRef, unsigned int > &gsfTrackMap, const edm::OrphanHandle< reco::GsfTrackCollection > &outGsfTrackHandle)
Definition: ReducedEGProducer.cc:1011
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
ReducedEGProducer::outOOTPhotonFloatValueMaps_
const std::vector< std::string > outOOTPhotonFloatValueMaps_
Definition: ReducedEGProducer.h:205
ReducedEGProducer::hcalHitSel_
EGHcalRecHitSelector hcalHitSel_
Definition: ReducedEGProducer.h:218
ReducedEGProducer::keepGsfElectronSel_
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
Definition: ReducedEGProducer.h:214
ootPhotonCore_cff.ootPhotonCore
ootPhotonCore
Definition: ootPhotonCore_cff.py:4
edm::EDGetTokenT::isUninitialized
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:99
edm::SortedCollection< EcalRecHit >
ReducedEGProducer::photonPfCandMapT_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
Definition: ReducedEGProducer.h:155
printConversionInfo.conversionHandle
conversionHandle
Definition: printConversionInfo.py:15
edm::RefVector< ConversionCollection >
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
EGHcalRecHitSelector::addDetIds
void addDetIds(const reco::SuperCluster &superClus, const HBHERecHitCollection &recHits, CollType &detIdsToStore) const
Definition: EGHcalRecHitSelector.h:49
ReducedEGProducer::outHBHERecHits_
const std::string outHBHERecHits_
Definition: ReducedEGProducer.h:199
electronIsolatorFromEffectiveArea_cfi.gsfElectrons
gsfElectrons
Definition: electronIsolatorFromEffectiveArea_cfi.py:4
edm::Handle< reco::PhotonCollection >
CaloTopology
Definition: CaloTopology.h:19
ReducedEGProducer::outEBRecHits_
const std::string outEBRecHits_
Definition: ReducedEGProducer.h:196
EcalBarrel
Definition: EcalSubdetector.h:10
ReducedEGProducer::outESRecHits_
const std::string outESRecHits_
Definition: ReducedEGProducer.h:198
edm::Ref< ConversionCollection >
ReducedEGProducer::relinkConversions
void relinkConversions(reco::PhotonCore &photonCore, const reco::ConversionRefVector &convrefs, const std::map< reco::ConversionRef, unsigned int > &conversionMap, const edm::OrphanHandle< reco::ConversionCollection > &outConversionHandle)
Definition: ReducedEGProducer.cc:1021
HLT_FULL_cff.superClusters
superClusters
Definition: HLT_FULL_cff.py:15171
reco::GsfElectron::core
virtual GsfElectronCoreRef core() const
Definition: GsfElectron.cc:8
reco::SuperCluster::setSeed
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:107
fileCollector.seed
seed
Definition: fileCollector.py:127
config
Definition: config.py:1
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
DetId
Definition: DetId.h:17
ReducedEGProducer::relinkGsfElectronSel_
const StringCutObjectSelector< reco::GsfElectron > relinkGsfElectronSel_
Definition: ReducedEGProducer.h:216
ReducedEGProducer::linkConversionsByTrackRef
void linkConversionsByTrackRef(const edm::Handle< reco::ConversionCollection > &conversionHandle, const reco::GsfElectron &gsfElectron, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
Definition: ReducedEGProducer.cc:857
ReducedEGProducer::linkConversion
void linkConversion(const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
Definition: ReducedEGProducer.cc:889
edm::RefVector::empty
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:99
l1t::PFCandidateRef
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
Definition: PFCandidate.h:58
edm::PtrVector< CaloCluster >
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
reco::PhotonCore
Definition: PhotonCore.h:24
ReducedEGProducer::preshowerEcalHits_
const edm::EDGetTokenT< EcalRecHitCollection > preshowerEcalHits_
Definition: ReducedEGProducer.h:152
metsig::electron
Definition: SignAlgoResolutions.h:48
ReducedEGProducer::applyPhotonCalibOnMC_
const bool applyPhotonCalibOnMC_
Definition: ReducedEGProducer.h:169
edm::ESHandle< CaloTopology >
ReducedEGProducer::applyGsfElectronCalibOnData_
const bool applyGsfElectronCalibOnData_
Definition: ReducedEGProducer.h:170
ReducedEGProducer::photonCalibEnergyErrT_
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyErrT_
Definition: ReducedEGProducer.h:173
reco::GsfElectron
Definition: GsfElectron.h:35
ecalDrivenGsfElectronCoresFromMultiCl_cff.gsfTracks
gsfTracks
Definition: ecalDrivenGsfElectronCoresFromMultiCl_cff.py:4
ReducedEGProducer::ootPhotonT_
edm::EDGetTokenT< reco::PhotonCollection > ootPhotonT_
Definition: ReducedEGProducer.h:143
ReducedEGProducer::relinkSuperCluster
void relinkSuperCluster(T &core, const std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, const edm::OrphanHandle< reco::SuperClusterCollection > &outSuperClusterHandle)
Definition: ReducedEGProducer.cc:999
ReducedEGProducer::outSingleConversions_
const std::string outSingleConversions_
Definition: ReducedEGProducer.h:189
ReducedEGProducer::gsfElectronPfCandMapT_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
Definition: ReducedEGProducer.h:156
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ReducedEGProducer::keepOOTPhotonSel_
const StringCutObjectSelector< reco::Photon > keepOOTPhotonSel_
Definition: ReducedEGProducer.h:211
ReducedEGProducer::relinkPhotonCore
void relinkPhotonCore(reco::Photon &photon, const std::map< reco::PhotonCoreRef, unsigned int > &photonCoreMap, const edm::OrphanHandle< reco::PhotonCoreCollection > &outPhotonCoreHandle)
Definition: ReducedEGProducer.cc:1042
EcalEndcap
Definition: EcalSubdetector.h:10
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
ReducedEGProducer::outOOTESClusters_
const std::string outOOTESClusters_
Definition: ReducedEGProducer.h:195
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
edm::PtrVector::push_back
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:149
ReducedEGProducer::linkConversions
void linkConversions(const reco::ConversionRefVector &convrefs, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
Definition: ReducedEGProducer.cc:849
ReducedEGProducer::hbheHits_
const edm::EDGetTokenT< HBHERecHitCollection > hbheHits_
Definition: ReducedEGProducer.h:153
core
Definition: __init__.py:1
edm::ParameterSet
Definition: ParameterSet.h:47
ReducedEGProducer::relinkCaloClusters
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)
Definition: ReducedEGProducer.cc:948
ReducedEGProducer::outGsfElectronIds_
const std::vector< std::string > outGsfElectronIds_
Definition: ReducedEGProducer.h:203
reco::SuperCluster::seed
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
reco::SuperCluster::setClusters
void setClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:110
ReducedEGProducer::ootPhotonFloatValueMapTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonFloatValueMapTs_
Definition: ReducedEGProducer.h:162
ReducedEGProducer::gsfElectronFloatValueMapTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronFloatValueMapTs_
Definition: ReducedEGProducer.h:163
ReducedEGProducer::outGsfElectronPfCandMap_
const std::string outGsfElectronPfCandMap_
Definition: ReducedEGProducer.h:201
edm::PtrVectorBase::empty
bool empty() const
Is the RefVector empty.
Definition: PtrVectorBase.h:70
ReducedEGProducer::outGsfElectrons_
const std::string outGsfElectrons_
Definition: ReducedEGProducer.h:185
ConversionTools::matchesConversion
static bool matchesConversion(const reco::GsfElectron &ele, const reco::Conversion &conv, bool allowCkfMatch=true, bool allowAmbiguousGsfMatch=false)
Definition: ConversionTools.cc:53
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
ReducedEGProducer::outESClusters_
const std::string outESClusters_
Definition: ReducedEGProducer.h:192
CaloTopology::getSubdetectorTopology
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:17
ReducedEGProducer::outOOTSuperClusters_
const std::string outOOTSuperClusters_
Definition: ReducedEGProducer.h:193
ReducedEGProducer::linkSuperCluster
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)
Definition: ReducedEGProducer.cc:827
reco::GsfElectronCore
Definition: GsfElectronCore.h:32
ReducedEGProducer::gsfElectronIdTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
Definition: ReducedEGProducer.h:159
ReducedEGProducer::gsfElectronCalibEnergyErrT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyErrT_
Definition: ReducedEGProducer.h:175
photonCore_cfi.photonCore
photonCore
Definition: photonCore_cfi.py:7
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
ReducedEGProducer::gsfElectronCalibEcalEnergyErrT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyErrT_
Definition: ReducedEGProducer.h:177
ReducedEGProducer::calibrateElectron
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)
Definition: ReducedEGProducer.cc:1074
ReducedEGProducer::outPhotons_
const std::string outPhotons_
Definition: ReducedEGProducer.h:181
BPHMonitor_cfi.photons
photons
Definition: BPHMonitor_cfi.py:91
ReducedEGProducer::relinkGsfElectronCore
void relinkGsfElectronCore(reco::GsfElectron &gsfElectron, const std::map< reco::GsfElectronCoreRef, unsigned int > &gsfElectronCoreMap, const edm::OrphanHandle< reco::GsfElectronCoreCollection > &outGsfElectronCoreHandle)
Definition: ReducedEGProducer.cc:1053
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
edm::PtrVectorBase::clear
void clear()
Clear the PtrVector.
Definition: PtrVectorBase.h:79
DetId::Ecal
Definition: DetId.h:27
ReducedEGProducer::outGsfElectronCores_
const std::string outGsfElectronCores_
Definition: ReducedEGProducer.h:186
ReducedEGProducer::outOOTEBEEClusters_
const std::string outOOTEBEEClusters_
Definition: ReducedEGProducer.h:194
ReducedEGProducer::slimRelinkGsfElectronSel_
const StringCutObjectSelector< reco::GsfElectron > slimRelinkGsfElectronSel_
Definition: ReducedEGProducer.h:215
ReducedEGProducer::photonFloatValueMapTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonFloatValueMapTs_
Definition: ReducedEGProducer.h:161
ReducedEGProducer::linkCore
void linkCore(const T &core, U &cores, std::map< T, unsigned int > &coreMap)
Definition: ReducedEGProducer.cc:820
reducedEgamma_cfi.singleConversions
singleConversions
Definition: reducedEgamma_cfi.py:20
edm::Ptr< CaloCluster >
ReducedEGProducer::relinkPhotonSel_
const StringCutObjectSelector< reco::Photon > relinkPhotonSel_
Definition: ReducedEGProducer.h:210
CaloSubdetectorTopology::getWindow
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
Definition: CaloSubdetectorTopology.cc:4
reco::Photon
Definition: Photon.h:21
ReducedEGProducer::outConversions_
const std::string outConversions_
Definition: ReducedEGProducer.h:188
ReducedEGProducer::photonIdTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
Definition: ReducedEGProducer.h:158
PA_ZEESkim_cff.decay
decay
Definition: PA_ZEESkim_cff.py:26
ReducedEGProducer::outOOTPhotonCores_
const std::string outOOTPhotonCores_
Definition: ReducedEGProducer.h:184
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
ReducedEGProducer::outEERecHits_
const std::string outEERecHits_
Definition: ReducedEGProducer.h:197
edm::OrphanHandle
Definition: EDProductfwd.h:39
ReducedEGProducer::slimRelinkOOTPhotonSel_
const StringCutObjectSelector< reco::Photon > slimRelinkOOTPhotonSel_
Definition: ReducedEGProducer.h:212
reco::HIPhotonIsolationMap
edm::ValueMap< reco::HIPhotonIsolation > HIPhotonIsolationMap
Definition: HIPhotonIsolation.h:118
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
ReducedEGProducer::barrelEcalHits_
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
Definition: ReducedEGProducer.h:149
edm::ValueMap
Definition: ValueMap.h:107
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Exception
Definition: hltDiff.cc:246
ReducedEGProducer::photonT_
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
Definition: ReducedEGProducer.h:142
HLT_FULL_cff.cores
cores
Definition: HLT_FULL_cff.py:104305
ReducedEGProducer::outSuperClusters_
const std::string outSuperClusters_
Definition: ReducedEGProducer.h:190
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
ReducedEGProducer::caloTopology_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopology_
Definition: ReducedEGProducer.h:179
ReducedEGProducer::linkCaloCluster
void linkCaloCluster(const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
Definition: ReducedEGProducer.cc:898
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
ReducedEGProducer::gsfElectronCalibEcalEnergyT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyT_
Definition: ReducedEGProducer.h:176
reco::SuperCluster::preshowerClusters
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:83
ReducedEGProducer::outGsfElectronFloatValueMaps_
const std::vector< std::string > outGsfElectronFloatValueMaps_
Definition: ReducedEGProducer.h:206
ReducedEGProducer::gsfElectronT_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronT_
Definition: ReducedEGProducer.h:144
pwdgSkimBPark_cfi.conversions
conversions
Definition: pwdgSkimBPark_cfi.py:10
edm::Event
Definition: Event.h:73
ReducedEGProducer::outPhotonCores_
const std::string outPhotonCores_
Definition: ReducedEGProducer.h:182
ReducedEGProducer::applyPhotonCalibOnData_
const bool applyPhotonCalibOnData_
Definition: ReducedEGProducer.h:168
ReducedEGProducer::gsfTrackT_
const edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackT_
Definition: ReducedEGProducer.h:145
ReducedEGProducer::recoHIPhotonIsolationMapOutputName_
const std::string recoHIPhotonIsolationMapOutputName_
Definition: ReducedEGProducer.h:166
keep
const int keep
Definition: GenParticlePruner.cc:48
reco::GsfElectron::setCore
void setCore(const reco::GsfElectronCoreRef &core)
Definition: GsfElectron.h:160
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
ReducedEGProducer::outPhotonIds_
const std::vector< std::string > outPhotonIds_
Definition: ReducedEGProducer.h:202
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:318
ReducedEGProducer::recoHIPhotonIsolationMapInputToken_
const edm::EDGetTokenT< reco::HIPhotonIsolationMap > recoHIPhotonIsolationMapInputToken_
Definition: ReducedEGProducer.h:165