4 #include <unordered_set> 51 return std::hash<uint32_t>()(
id.rawId());
65 doPreshowerEcalHits_(!config.getParameter<
edm::InputTag>(
"preshowerEcalHits").
label().
empty()),
67 photonPfCandMapT_(consumes<
edm::ValueMap<
std::vector<
reco::
PFCandidateRef> > >(config.getParameter<
edm::InputTag>(
"photonsPFValMap"))),
68 gsfElectronPfCandMapT_(consumes<
edm::ValueMap<
std::vector<
reco::
PFCandidateRef> > >(config.getParameter<
edm::InputTag>(
"gsfElectronsPFValMap"))),
70 outPhotons_(
"reducedGedPhotons"),
71 outPhotonCores_(
"reducedGedPhotonCores"),
72 outOOTPhotons_(
"reducedOOTPhotons"),
73 outOOTPhotonCores_(
"reducedOOTPhotonCores"),
74 outGsfElectrons_(
"reducedGedGsfElectrons"),
75 outGsfElectronCores_(
"reducedGedGsfElectronCores"),
76 outGsfTracks_(
"reducedGsfTracks"),
77 outConversions_(
"reducedConversions"),
78 outSingleConversions_(
"reducedSingleLegConversions"),
79 outSuperClusters_(
"reducedSuperClusters"),
80 outEBEEClusters_(
"reducedEBEEClusters"),
81 outESClusters_(
"reducedESClusters"),
82 outOOTSuperClusters_(
"reducedOOTSuperClusters"),
83 outOOTEBEEClusters_(
"reducedOOTEBEEClusters"),
84 outOOTESClusters_(
"reducedOOTESClusters"),
85 outEBRecHits_(
"reducedEBRecHits"),
86 outEERecHits_(
"reducedEERecHits"),
87 outESRecHits_(
"reducedESRecHits"),
88 outPhotonPfCandMap_(
"reducedPhotonPfCandMap"),
89 outGsfElectronPfCandMap_(
"reducedGsfElectronPfCandMap"),
90 outPhotonIds_(config.getParameter<
std::vector<
std::
string> >(
"photonIDOutput")),
91 outGsfElectronIds_(config.getParameter<
std::vector<
std::
string> >(
"gsfElectronIDOutput")),
92 outPhotonPFClusterIsos_(config.getParameter<
std::vector<
std::
string> >(
"photonPFClusterIsoOutput")),
93 outOOTPhotonPFClusterIsos_(config.getParameter<
std::vector<
std::
string> >(
"ootPhotonPFClusterIsoOutput")),
94 outGsfElectronPFClusterIsos_(config.getParameter<
std::vector<
std::
string> >(
"gsfElectronPFClusterIsoOutput")),
95 keepPhotonSel_(config.getParameter<
std::
string>(
"keepPhotons")),
96 slimRelinkPhotonSel_(config.getParameter<
std::
string>(
"slimRelinkPhotons")),
97 relinkPhotonSel_(config.getParameter<
std::
string>(
"relinkPhotons")),
98 keepOOTPhotonSel_(config.getParameter<
std::
string>(
"keepOOTPhotons")),
99 slimRelinkOOTPhotonSel_(config.getParameter<
std::
string>(
"slimRelinkOOTPhotons")),
100 relinkOOTPhotonSel_(config.getParameter<
std::
string>(
"relinkOOTPhotons")),
101 keepGsfElectronSel_(config.getParameter<
std::
string>(
"keepGsfElectrons")),
102 slimRelinkGsfElectronSel_(config.getParameter<
std::
string>(
"slimRelinkGsfElectrons")),
103 relinkGsfElectronSel_(config.getParameter<
std::
string>(
"relinkGsfElectrons"))
105 const std::vector<edm::InputTag>& photonidinputs =
106 config.
getParameter<std::vector<edm::InputTag> >(
"photonIDSources");
111 const std::vector<edm::InputTag>& gsfelectronidinputs =
112 config.
getParameter<std::vector<edm::InputTag> >(
"gsfElectronIDSources");
117 const std::vector<edm::InputTag>& photonpfclusterisoinputs =
118 config.
getParameter<std::vector<edm::InputTag> >(
"photonPFClusterIsoSources");
123 const std::vector<edm::InputTag>& ootphotonpfclusterisoinputs =
124 config.
getParameter<std::vector<edm::InputTag> >(
"ootPhotonPFClusterIsoSources");
129 const std::vector<edm::InputTag>& gsfelectronpfclusterisoinputs =
130 config.
getParameter<std::vector<edm::InputTag> >(
"gsfElectronPFClusterIsoSources");
156 produces< edm::ValueMap<bool> >(outid);
159 produces< edm::ValueMap<float> >(outid);
162 produces< edm::ValueMap<float> >(outid);
165 produces< edm::ValueMap<float> >(outid);
168 produces< edm::ValueMap<float> >(outid);
214 std::vector<edm::Handle<edm::ValueMap<bool> > > photonIdHandles(
photonIdTs_.size());
217 theEvent.
getByToken(photonIdT,photonIdHandles[index++]);
220 std::vector<edm::Handle<edm::ValueMap<float> > > gsfElectronIdHandles(
gsfElectronIdTs_.size());
223 theEvent.
getByToken(gsfElectronIdT,gsfElectronIdHandles[index++]);
226 std::vector<edm::Handle<edm::ValueMap<float> > > photonPFClusterIsoHandles(
photonPFClusterIsoTs_.size());
229 theEvent.
getByToken(photonPFClusterIsoT,photonPFClusterIsoHandles[index++]);
235 theEvent.
getByToken(ootPhotonPFClusterIsoT,ootPhotonPFClusterIsoHandles[index++]);
241 theEvent.
getByToken(gsfElectronPFClusterIsoT,gsfElectronPFClusterIsoHandles[index++]);
246 const CaloTopology *caloTopology = & (*theCaloTopology);
249 auto photons = std::make_unique<reco::PhotonCollection>();
250 auto photonCores = std::make_unique<reco::PhotonCoreCollection>();
251 auto ootPhotons = std::make_unique<reco::PhotonCollection>();
252 auto ootPhotonCores = std::make_unique<reco::PhotonCoreCollection>();
253 auto gsfElectrons = std::make_unique<reco::GsfElectronCollection>();
254 auto gsfElectronCores = std::make_unique<reco::GsfElectronCoreCollection>();
255 auto gsfTracks = std::make_unique<reco::GsfTrackCollection>();
256 auto conversions = std::make_unique<reco::ConversionCollection>();
258 auto superClusters = std::make_unique<reco::SuperClusterCollection>();
259 auto ebeeClusters = std::make_unique<reco::CaloClusterCollection>();
260 auto esClusters = std::make_unique<reco::CaloClusterCollection>();
261 auto ootSuperClusters = std::make_unique<reco::SuperClusterCollection>();
262 auto ootEbeeClusters = std::make_unique<reco::CaloClusterCollection>();
263 auto ootEsClusters = std::make_unique<reco::CaloClusterCollection>();
264 auto ebRecHits = std::make_unique<EcalRecHitCollection>();
265 auto eeRecHits = std::make_unique<EcalRecHitCollection>();
266 auto esRecHits = std::make_unique<EcalRecHitCollection>();
267 auto photonPfCandMap = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
268 auto gsfElectronPfCandMap = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
271 std::map<reco::PhotonCoreRef, unsigned int> photonCoreMap;
272 std::map<reco::PhotonCoreRef, unsigned int> ootPhotonCoreMap;
273 std::map<reco::GsfElectronCoreRef, unsigned int> gsfElectronCoreMap;
274 std::map<reco::GsfTrackRef, unsigned int> gsfTrackMap;
275 std::map<reco::ConversionRef, unsigned int> conversionMap;
276 std::map<reco::ConversionRef, unsigned int> singleConversionMap;
277 std::map<reco::SuperClusterRef, unsigned int> superClusterMap;
278 std::map<reco::CaloClusterPtr, unsigned int> ebeeClusterMap;
279 std::map<reco::CaloClusterPtr, unsigned int> esClusterMap;
280 std::map<reco::SuperClusterRef, unsigned int> ootSuperClusterMap;
281 std::map<reco::CaloClusterPtr, unsigned int> ootEbeeClusterMap;
282 std::map<reco::CaloClusterPtr, unsigned int> ootEsClusterMap;
283 std::unordered_set<DetId> rechitMap;
285 std::unordered_set<unsigned int> superClusterFullRelinkMap;
286 std::unordered_set<unsigned int> ootSuperClusterFullRelinkMap;
289 std::vector<std::vector<reco::PFCandidateRef> > pfCandIsoPairVecPho;
290 std::vector<std::vector<reco::PFCandidateRef> > pfCandIsoPairVecEle;
293 std::vector<std::vector<bool> > photonIdVals(photonIdHandles.size());
294 std::vector<std::vector<float> > gsfElectronIdVals(gsfElectronIdHandles.size());
295 std::vector<std::vector<float> > photonPFClusterIsoVals(photonPFClusterIsoHandles.size());
296 std::vector<std::vector<float> > ootPhotonPFClusterIsoVals(ootPhotonPFClusterIsoHandles.size());
297 std::vector<std::vector<float> > gsfElectronPFClusterIsoVals(gsfElectronPFClusterIsoHandles.size());
301 for (
const auto&
photon : *photonHandle) {
312 pfCandIsoPairVecPho.push_back((*photonPfCandMapHandle)[photonref]);
316 for (
const auto& photonIdHandle : photonIdHandles) {
317 photonIdVals[subindex++].push_back((*photonIdHandle)[photonref]);
321 for (
const auto& photonPFClusterIsoHandle : photonPFClusterIsoHandles) {
322 photonPFClusterIsoVals[subindex++].push_back((*photonPFClusterIsoHandle)[photonref]);
327 linkCore(photonCore, *photonCores, photonCoreMap);
331 if (!slimRelink)
continue;
337 linkSuperCluster(superCluster, superClusterMap, *superClusters, relink, superClusterFullRelinkMap);
340 if (!relink)
continue;
347 linkConversions(singleconvrefs, *singleConversions, singleConversionMap);
355 for (
const auto& ootPhoton : *ootPhotonHandle) {
363 ootPhotons->push_back(ootPhoton);
367 for (
const auto& ootPhotonPFClusterIsoHandle : ootPhotonPFClusterIsoHandles) {
368 ootPhotonPFClusterIsoVals[subindex++].push_back((*ootPhotonPFClusterIsoHandle)[ootPhotonref]);
373 linkCore(ootPhotonCore, *ootPhotonCores, ootPhotonCoreMap);
377 if (!slimRelink)
continue;
382 linkSuperCluster(ootSuperCluster, ootSuperClusterMap, *ootSuperClusters, relink, ootSuperClusterFullRelinkMap);
387 for (
const auto& gsfElectron : *gsfElectronHandle) {
395 gsfElectrons->push_back(gsfElectron);
396 pfCandIsoPairVecEle.push_back((*gsfElectronPfCandMapHandle)[gsfElectronref]);
400 for (
const auto& gsfElectronIdHandle : gsfElectronIdHandles) {
401 gsfElectronIdVals[subindex++].push_back((*gsfElectronIdHandle)[gsfElectronref]);
405 for (
const auto& gsfElectronPFClusterIsoHandle : gsfElectronPFClusterIsoHandles) {
406 gsfElectronPFClusterIsoVals[subindex++].push_back((*gsfElectronPFClusterIsoHandle)[gsfElectronref]);
410 linkCore(gsfElectronCore, *gsfElectronCores, gsfElectronCoreMap);
415 if (!gsfTrackMap.count(gsfTrack)) {
416 gsfTracks->push_back(*gsfTrack);
417 gsfTrackMap[gsfTrack] = gsfTracks->size() - 1;
423 if (!gsfTrackMap.count(ambigGsfTrack)) {
424 gsfTracks->push_back(*ambigGsfTrack);
425 gsfTrackMap[ambigGsfTrack] = gsfTracks->size() - 1;
431 if (!slimRelink)
continue;
436 linkSuperCluster(superCluster, superClusterMap, *superClusters, relink, superClusterFullRelinkMap);
439 if (!relink)
continue;
446 linkConversions(singleconvrefs, *singleConversions, singleConversionMap);
457 for (
auto& superCluster : *superClusters) {
464 bool fullrelink = superClusterFullRelinkMap.count(index++);
467 superCluster.clearHitsAndFractions();
472 linkCaloClusters(superCluster, *ebeeClusters, ebeeClusterMap, rechitMap, barrelHitHandle, endcapHitHandle, caloTopology, *esClusters, esClusterMap);
483 for (
auto& ootSuperCluster : *ootSuperClusters) {
490 bool fullrelink = ootSuperClusterFullRelinkMap.count(index++);
493 ootSuperCluster.clearHitsAndFractions();
498 linkCaloClusters(ootSuperCluster, *ootEbeeClusters, ootEbeeClusterMap, rechitMap, barrelHitHandle, endcapHitHandle, caloTopology, *ootEsClusters, ootEsClusterMap);
504 for (
const EcalRecHit &rechit : *barrelHitHandle) {
505 if (rechitMap.count(rechit.detid())) {
506 ebRecHits->push_back(rechit);
510 for (
const EcalRecHit &rechit : *endcapHitHandle) {
511 if (rechitMap.count(rechit.detid())) {
512 eeRecHits->push_back(rechit);
520 for (
const EcalRecHit &rechit : *preshowerHitHandle) {
521 if (rechitMap.count(rechit.detid())) {
522 esRecHits->push_back(rechit);
535 relinkCaloClusters(superCluster, ebeeClusterMap, esClusterMap, outEBEEClusterHandle, outESClusterHandle);
545 relinkCaloClusters(ootSuperCluster, ootEbeeClusterMap, ootEsClusterMap, outOOTEBEEClusterHandle, outOOTESClusterHandle);
601 std::vector<reco::GsfTrackRef> ambigTracksInThisElectron;
605 ambigTracksInThisElectron.push_back(*igsf);
609 gsfElectron.clearAmbiguousGsfTracks();
612 for (
const auto &it : ambigTracksInThisElectron) {
613 const auto &gsftkmapped = gsfTrackMap.find(it);
615 if (gsftkmapped != gsfTrackMap.end()) {
617 gsfElectron.addAmbiguousGsfTrack(gsftkref);
620 throw cms::Exception(
"There must be a problem with linking and mapping of ambiguous gsf tracks...");
623 if (gsfElectron.ambiguousGsfTracksSize() > 0)
624 gsfElectron.setAmbiguous(
true);
626 ambigTracksInThisElectron.clear();
639 fillerPhotons.insert(outPhotonHandle,pfCandIsoPairVecPho.begin(),pfCandIsoPairVecPho.end());
640 fillerPhotons.fill();
644 fillerGsfElectrons.insert(outGsfElectronHandle,pfCandIsoPairVecEle.begin(),pfCandIsoPairVecEle.end());
645 fillerGsfElectrons.fill();
652 auto oMap = std::make_unique<MapType>();
654 typename MapType::Filler
filler(*oMap);
655 filler.insert(refH, vec.begin(), vec.end());
663 for (
auto const&
vals : photonIdVals){
669 for (
auto const&
vals : gsfElectronIdVals){
675 for (
auto const&
vals : photonPFClusterIsoVals){
681 for (
auto const&
vals : ootPhotonPFClusterIsoVals){
687 for (
auto const&
vals : gsfElectronPFClusterIsoVals){
692 template <
typename T,
typename U>
695 if (!coreMap.count(core)) {
696 cores.push_back(*core);
697 coreMap[core] = cores.size() - 1;
702 std::map<reco::SuperClusterRef, unsigned int>& superClusterMap,
705 std::unordered_set<unsigned int>& superClusterFullRelinkMap)
707 const auto &mappedsc = superClusterMap.find(superCluster);
710 unsigned int mappedscidx = 0;
711 if (mappedsc==superClusterMap.end()) {
712 superClusters.push_back(*superCluster);
713 mappedscidx = superClusters.size() - 1;
714 superClusterMap[superCluster] = mappedscidx;
717 mappedscidx = mappedsc->second;
721 if (relink) superClusterFullRelinkMap.insert(mappedscidx);
726 std::map<reco::ConversionRef, unsigned int>& conversionMap)
728 for (
const auto& convref : convrefs) {
736 std::map<reco::ConversionRef, unsigned int>& conversionMap)
739 for (
const auto&
conversion : *conversionHandle) {
744 if (!matched)
continue;
753 std::map<reco::ConversionRef, unsigned int>& conversionMap)
756 for (
const auto&
conversion : *conversionHandle) {
761 if (!matched)
continue;
769 std::map<reco::ConversionRef, unsigned int>& conversionMap)
771 if (!conversionMap.count(convref)) {
772 conversions.push_back(*convref);
773 conversionMap[convref] = conversions.size() - 1;
779 std::map<reco::CaloClusterPtr, unsigned int>& caloClusterMap)
781 if (!caloClusterMap.count(caloCluster)) {
782 caloClusters.push_back(*caloCluster);
783 caloClusterMap[caloCluster] = caloClusters.size() - 1;
789 std::map<reco::CaloClusterPtr, unsigned int>& ebeeClusterMap,
790 std::unordered_set<DetId>& rechitMap,
795 std::map<reco::CaloClusterPtr, unsigned int>& esClusterMap)
797 for (
const auto& cluster : superCluster.
clusters()) {
800 for (
const auto& hitfrac : cluster->hitsAndFractions()) {
801 rechitMap.insert(hitfrac.first);
804 bool barrel = cluster->hitsAndFractions().front().first.subdetId()==
EcalBarrel;
806 DetId seed = EcalClusterTools::getMaximum(*cluster, rhcol).first;
809 for (
const auto& detid : dets5x5) {
810 rechitMap.insert(detid);
816 for (
const auto& hitfrac : cluster->hitsAndFractions()) {
817 rechitMap.insert(hitfrac.first);
824 const std::map<reco::CaloClusterPtr, unsigned int>& ebeeClusterMap,
825 const std::map<reco::CaloClusterPtr, unsigned int>& esClusterMap,
830 const auto &seedmapped = ebeeClusterMap.find(superCluster.
seed());
831 if (seedmapped != ebeeClusterMap.end()) {
839 for (
const auto &cluster : superCluster.
clusters()) {
840 const auto &clustermapped = ebeeClusterMap.find(cluster);
841 if (clustermapped != ebeeClusterMap.end()) {
852 if (!clusters.
empty()) {
859 const auto &clustermapped = esClusterMap.find(cluster);
860 if (clustermapped != esClusterMap.end()) {
871 if (!esclusters.
empty()) {
876 template <
typename T>
878 const std::map<reco::SuperClusterRef, unsigned int>& superClusterMap,
881 const auto &scmapped = superClusterMap.find(core.superCluster());
882 if (scmapped != superClusterMap.end()) {
885 core.setSuperCluster(scref);
890 const std::map<reco::GsfTrackRef, unsigned int>& gsfTrackMap,
893 const auto &gsftkmapped = gsfTrackMap.find(gsfElectronCore.
gsfTrack());
894 if (gsftkmapped != gsfTrackMap.end()) {
902 const std::map<reco::ConversionRef, unsigned int>& conversionMap,
906 for (
const auto& convref : convrefs) {
907 const auto &convmapped = conversionMap.find(convref);
908 if (convmapped != conversionMap.end()) {
918 if (!outconvrefs.
empty()) {
924 const std::map<reco::PhotonCoreRef, unsigned int>& photonCoreMap,
927 const auto &coremapped = photonCoreMap.find(photon.
photonCore());
928 if (coremapped != photonCoreMap.end()) {
936 const std::map<reco::GsfElectronCoreRef, unsigned int>& gsfElectronCoreMap,
939 const auto &coremapped = gsfElectronCoreMap.find(gsfElectron.
core());
940 if (coremapped != gsfElectronCoreMap.end()) {
const bool doPreshowerEcalHits_
void setPreshowerClusters(const CaloClusterPtrVector &clusters)
void linkCaloClusters(const reco::SuperCluster &superCluster, reco::CaloClusterCollection &ebeeClusters, std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, std::unordered_set< DetId > &rechitMap, const edm::Handle< EcalRecHitCollection > &barrelHitHandle, const edm::Handle< EcalRecHitCollection > &endcapHitHandle, const CaloTopology *caloTopology, reco::CaloClusterCollection &esClusters, std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap)
void relinkGsfTrack(reco::GsfElectronCore &electroncore, const std::map< reco::GsfTrackRef, unsigned int > &gsfTrackMap, const edm::OrphanHandle< reco::GsfTrackCollection > &outGsfTrackHandle)
T getParameter(std::string const &) const
const StringCutObjectSelector< reco::Photon > relinkOOTPhotonSel_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronT_
void setCore(const reco::GsfElectronCoreRef &core)
const edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackT_
const StringCutObjectSelector< reco::Photon > slimRelinkPhotonSel_
void setGsfTrack(const GsfTrackRef &gsfTrack)
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
const std::vector< std::string > outPhotonIds_
~ReducedEGProducer() override
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonPFClusterIsoTs_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void push_back(Ptr< T > const &iPtr)
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronPFClusterIsoTs_
bool empty() const
Is the RefVector empty.
const GsfTrackRef & gsfTrack() const
const std::string outGsfTracks_
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
const std::string outOOTPhotons_
const std::string outEBEEClusters_
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
const StringCutObjectSelector< reco::Photon > keepPhotonSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
bool empty() const
Is the RefVector empty.
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
const StringCutObjectSelector< reco::GsfElectron > relinkGsfElectronSel_
void setClusters(const CaloClusterPtrVector &clusters)
void linkConversion(const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
const std::string outEBRecHits_
const std::string outESRecHits_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void relinkConversions(reco::PhotonCore &photonCore, const reco::ConversionRefVector &convrefs, const std::map< reco::ConversionRef, unsigned int > &conversionMap, const edm::OrphanHandle< reco::ConversionCollection > &outConversionHandle)
const edm::EDGetTokenT< EcalRecHitCollection > preshowerEcalHits_
void linkConversions(const reco::ConversionRefVector &convrefs, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
reco::PhotonCoreRef photonCore() const
returns a reference to the core photon object
const std::vector< std::string > outGsfElectronIds_
void setPhotonCore(const reco::PhotonCoreRef &photonCore)
const std::string outSingleConversions_
const std::string outESClusters_
const std::string outOOTSuperClusters_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
const StringCutObjectSelector< reco::Photon > keepOOTPhotonSel_
const std::string outOOTESClusters_
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
void relinkGsfElectronCore(reco::GsfElectron &gsfElectron, const std::map< reco::GsfElectronCoreRef, unsigned int > &gsfElectronCoreMap, const edm::OrphanHandle< reco::GsfElectronCoreCollection > &outGsfElectronCoreHandle)
void linkConversionsByTrackRef(const edm::Handle< reco::ConversionCollection > &conversionHandle, const reco::GsfElectron &gsfElectron, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
void setConversions(const reco::ConversionRefVector &conversions)
const std::string outOOTEBEEClusters_
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
const std::vector< std::string > outPhotonPFClusterIsos_
void linkSuperCluster(const reco::SuperClusterRef &superCluster, std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, reco::SuperClusterCollection &superClusters, const bool relink, std::unordered_set< unsigned int > &superClusterFullRelinkMap)
void linkCore(const T &core, U &cores, std::map< T, unsigned int > &coreMap)
const StringCutObjectSelector< reco::Photon > relinkPhotonSel_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
void relinkCaloClusters(reco::SuperCluster &superCluster, const std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, const std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap, const edm::OrphanHandle< reco::CaloClusterCollection > &outEBEEClusterHandle, const edm::OrphanHandle< reco::CaloClusterCollection > &outESClusterHandle)
const std::string outPhotons_
const std::string outGsfElectronPfCandMap_
void relinkSuperCluster(T &core, const std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, const edm::OrphanHandle< reco::SuperClusterCollection > &outSuperClusterHandle)
const std::string outGsfElectronCores_
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
void relinkPhotonCore(reco::Photon &photon, const std::map< reco::PhotonCoreRef, unsigned int > &photonCoreMap, const edm::OrphanHandle< reco::PhotonCoreCollection > &outPhotonCoreHandle)
void conversion(EventAux const &from, EventAuxiliary &to)
const std::vector< std::string > outGsfElectronPFClusterIsos_
const std::string outSuperClusters_
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
const std::string outConversions_
T const * product() const
void clear()
Clear the vector.
std::vector< Photon > PhotonCollection
collectin of Photon objects
const std::string outGsfElectrons_
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
const StringCutObjectSelector< reco::GsfElectron > slimRelinkGsfElectronSel_
virtual GsfElectronCoreRef core() const
const std::string outPhotonCores_
void clear()
Clear the PtrVector.
void linkCaloCluster(const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
const std::string outEERecHits_
const StringCutObjectSelector< reco::Photon > slimRelinkOOTPhotonSel_
void produce(edm::Event &evt, const edm::EventSetup &es) final
const std::string outPhotonPfCandMap_
const std::vector< std::string > outOOTPhotonPFClusterIsos_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonPFClusterIsoTs_
const CaloClusterPtr & seed() const
seed BasicCluster
size_t operator()(const DetId &id) const
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
const std::string outOOTPhotonCores_
const edm::EDGetTokenT< reco::PhotonCollection > ootPhotonT_
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
ReducedEGProducer(const edm::ParameterSet &ps)
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_