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 applyPhotonCalibOnData_(config.getParameter<
bool>(
"applyPhotonCalibOnData")),
71 applyPhotonCalibOnMC_(config.getParameter<
bool>(
"applyPhotonCalibOnMC")),
72 applyGsfElectronCalibOnData_(config.getParameter<
bool>(
"applyGsfElectronCalibOnData")),
73 applyGsfElectronCalibOnMC_(config.getParameter<
bool>(
"applyGsfElectronCalibOnMC")),
75 outPhotons_(
"reducedGedPhotons"),
76 outPhotonCores_(
"reducedGedPhotonCores"),
77 outOOTPhotons_(
"reducedOOTPhotons"),
78 outOOTPhotonCores_(
"reducedOOTPhotonCores"),
79 outGsfElectrons_(
"reducedGedGsfElectrons"),
80 outGsfElectronCores_(
"reducedGedGsfElectronCores"),
81 outGsfTracks_(
"reducedGsfTracks"),
82 outConversions_(
"reducedConversions"),
83 outSingleConversions_(
"reducedSingleLegConversions"),
84 outSuperClusters_(
"reducedSuperClusters"),
85 outEBEEClusters_(
"reducedEBEEClusters"),
86 outESClusters_(
"reducedESClusters"),
87 outOOTSuperClusters_(
"reducedOOTSuperClusters"),
88 outOOTEBEEClusters_(
"reducedOOTEBEEClusters"),
89 outOOTESClusters_(
"reducedOOTESClusters"),
90 outEBRecHits_(
"reducedEBRecHits"),
91 outEERecHits_(
"reducedEERecHits"),
92 outESRecHits_(
"reducedESRecHits"),
93 outPhotonPfCandMap_(
"reducedPhotonPfCandMap"),
94 outGsfElectronPfCandMap_(
"reducedGsfElectronPfCandMap"),
95 outPhotonIds_(config.getParameter<
std::vector<
std::
string> >(
"photonIDOutput")),
96 outGsfElectronIds_(config.getParameter<
std::vector<
std::
string> >(
"gsfElectronIDOutput")),
97 outPhotonFloatValueMaps_(config.getParameter<
std::vector<
std::
string> >(
"photonFloatValueMapOutput")),
98 outOOTPhotonFloatValueMaps_(config.getParameter<
std::vector<
std::
string> >(
"ootPhotonFloatValueMapOutput")),
99 outGsfElectronFloatValueMaps_(config.getParameter<
std::vector<
std::
string> >(
"gsfElectronFloatValueMapOutput")),
100 keepPhotonSel_(config.getParameter<
std::
string>(
"keepPhotons")),
101 slimRelinkPhotonSel_(config.getParameter<
std::
string>(
"slimRelinkPhotons")),
102 relinkPhotonSel_(config.getParameter<
std::
string>(
"relinkPhotons")),
103 keepOOTPhotonSel_(config.getParameter<
std::
string>(
"keepOOTPhotons")),
104 slimRelinkOOTPhotonSel_(config.getParameter<
std::
string>(
"slimRelinkOOTPhotons")),
105 relinkOOTPhotonSel_(config.getParameter<
std::
string>(
"relinkOOTPhotons")),
106 keepGsfElectronSel_(config.getParameter<
std::
string>(
"keepGsfElectrons")),
107 slimRelinkGsfElectronSel_(config.getParameter<
std::
string>(
"slimRelinkGsfElectrons")),
108 relinkGsfElectronSel_(config.getParameter<
std::
string>(
"relinkGsfElectrons"))
110 const std::vector<edm::InputTag>& photonidinputs =
111 config.
getParameter<std::vector<edm::InputTag> >(
"photonIDSources");
116 const std::vector<edm::InputTag>& gsfelectronidinputs =
117 config.
getParameter<std::vector<edm::InputTag> >(
"gsfElectronIDSources");
122 const std::vector<edm::InputTag>& photonpfclusterisoinputs =
123 config.
getParameter<std::vector<edm::InputTag> >(
"photonFloatValueMapSources");
128 const std::vector<edm::InputTag>& ootphotonpfclusterisoinputs =
129 config.
getParameter<std::vector<edm::InputTag> >(
"ootPhotonFloatValueMapSources");
134 const std::vector<edm::InputTag>& gsfelectronpfclusterisoinputs =
135 config.
getParameter<std::vector<edm::InputTag> >(
"gsfElectronFloatValueMapSources");
172 produces< edm::ValueMap<bool> >(outid);
175 produces< edm::ValueMap<float> >(outid);
178 produces< edm::ValueMap<float> >(outid);
181 produces< edm::ValueMap<float> >(outid);
184 produces< edm::ValueMap<float> >(outid);
230 std::vector<edm::Handle<edm::ValueMap<bool> > > photonIdHandles(
photonIdTs_.size());
233 theEvent.
getByToken(photonIdT,photonIdHandles[index++]);
236 std::vector<edm::Handle<edm::ValueMap<float> > > gsfElectronIdHandles(
gsfElectronIdTs_.size());
239 theEvent.
getByToken(gsfElectronIdT,gsfElectronIdHandles[index++]);
242 std::vector<edm::Handle<edm::ValueMap<float> > > photonFloatValueMapHandles(
photonFloatValueMapTs_.size());
245 theEvent.
getByToken(photonFloatValueMapT,photonFloatValueMapHandles[index++]);
251 theEvent.
getByToken(ootPhotonFloatValueMapT,ootPhotonFloatValueMapHandles[index++]);
257 theEvent.
getByToken(gsfElectronFloatValueMapT,gsfElectronFloatValueMapHandles[index++]);
280 const CaloTopology *caloTopology = & (*theCaloTopology);
283 auto photons = std::make_unique<reco::PhotonCollection>();
284 auto photonCores = std::make_unique<reco::PhotonCoreCollection>();
285 auto ootPhotons = std::make_unique<reco::PhotonCollection>();
286 auto ootPhotonCores = std::make_unique<reco::PhotonCoreCollection>();
287 auto gsfElectrons = std::make_unique<reco::GsfElectronCollection>();
288 auto gsfElectronCores = std::make_unique<reco::GsfElectronCoreCollection>();
289 auto gsfTracks = std::make_unique<reco::GsfTrackCollection>();
290 auto conversions = std::make_unique<reco::ConversionCollection>();
292 auto superClusters = std::make_unique<reco::SuperClusterCollection>();
293 auto ebeeClusters = std::make_unique<reco::CaloClusterCollection>();
294 auto esClusters = std::make_unique<reco::CaloClusterCollection>();
295 auto ootSuperClusters = std::make_unique<reco::SuperClusterCollection>();
296 auto ootEbeeClusters = std::make_unique<reco::CaloClusterCollection>();
297 auto ootEsClusters = std::make_unique<reco::CaloClusterCollection>();
298 auto ebRecHits = std::make_unique<EcalRecHitCollection>();
299 auto eeRecHits = std::make_unique<EcalRecHitCollection>();
300 auto esRecHits = std::make_unique<EcalRecHitCollection>();
301 auto photonPfCandMap = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
302 auto gsfElectronPfCandMap = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
305 std::map<reco::PhotonCoreRef, unsigned int> photonCoreMap;
306 std::map<reco::PhotonCoreRef, unsigned int> ootPhotonCoreMap;
307 std::map<reco::GsfElectronCoreRef, unsigned int> gsfElectronCoreMap;
308 std::map<reco::GsfTrackRef, unsigned int> gsfTrackMap;
309 std::map<reco::ConversionRef, unsigned int> conversionMap;
310 std::map<reco::ConversionRef, unsigned int> singleConversionMap;
311 std::map<reco::SuperClusterRef, unsigned int> superClusterMap;
312 std::map<reco::CaloClusterPtr, unsigned int> ebeeClusterMap;
313 std::map<reco::CaloClusterPtr, unsigned int> esClusterMap;
314 std::map<reco::SuperClusterRef, unsigned int> ootSuperClusterMap;
315 std::map<reco::CaloClusterPtr, unsigned int> ootEbeeClusterMap;
316 std::map<reco::CaloClusterPtr, unsigned int> ootEsClusterMap;
317 std::unordered_set<DetId> rechitMap;
319 std::unordered_set<unsigned int> superClusterFullRelinkMap;
320 std::unordered_set<unsigned int> ootSuperClusterFullRelinkMap;
323 std::vector<std::vector<reco::PFCandidateRef> > pfCandIsoPairVecPho;
324 std::vector<std::vector<reco::PFCandidateRef> > pfCandIsoPairVecEle;
327 std::vector<std::vector<bool> > photonIdVals(photonIdHandles.size());
328 std::vector<std::vector<float> > gsfElectronIdVals(gsfElectronIdHandles.size());
329 std::vector<std::vector<float> > photonFloatValueMapVals(photonFloatValueMapHandles.size());
330 std::vector<std::vector<float> > ootPhotonFloatValueMapVals(ootPhotonFloatValueMapHandles.size());
331 std::vector<std::vector<float> > gsfElectronFloatValueMapVals(gsfElectronFloatValueMapHandles.size());
335 for (
const auto&
photon : *photonHandle) {
340 auto& newPhoton =
photons->back();
345 *photonCalibEnergyHandle,*photonCalibEnergyErrHandle);
356 pfCandIsoPairVecPho.push_back((*photonPfCandMapHandle)[photonref]);
360 for (
const auto& photonIdHandle : photonIdHandles) {
361 photonIdVals[subindex++].push_back((*photonIdHandle)[photonref]);
365 for (
const auto& photonFloatValueMapHandle : photonFloatValueMapHandles) {
366 photonFloatValueMapVals[subindex++].push_back((*photonFloatValueMapHandle)[photonref]);
371 linkCore(photonCore, *photonCores, photonCoreMap);
375 if (!slimRelink)
continue;
381 linkSuperCluster(superCluster, superClusterMap, *superClusters, relink, superClusterFullRelinkMap);
384 if (!relink)
continue;
391 linkConversions(singleconvrefs, *singleConversions, singleConversionMap);
399 for (
const auto& ootPhoton : *ootPhotonHandle) {
407 ootPhotons->push_back(ootPhoton);
411 for (
const auto& ootPhotonFloatValueMapHandle : ootPhotonFloatValueMapHandles) {
412 ootPhotonFloatValueMapVals[subindex++].push_back((*ootPhotonFloatValueMapHandle)[ootPhotonref]);
417 linkCore(ootPhotonCore, *ootPhotonCores, ootPhotonCoreMap);
421 if (!slimRelink)
continue;
426 linkSuperCluster(ootSuperCluster, ootSuperClusterMap, *ootSuperClusters, relink, ootSuperClusterFullRelinkMap);
431 for (
const auto& gsfElectron : *gsfElectronHandle) {
435 gsfElectrons->push_back(gsfElectron);
436 auto& newGsfElectron = gsfElectrons->back();
440 *gsfElectronCalibEnergyHandle,*gsfElectronCalibEnergyErrHandle,
441 *gsfElectronCalibEcalEnergyHandle,*gsfElectronCalibEcalEnergyErrHandle);
447 gsfElectrons->pop_back();
451 pfCandIsoPairVecEle.push_back((*gsfElectronPfCandMapHandle)[gsfElectronref]);
455 for (
const auto& gsfElectronIdHandle : gsfElectronIdHandles) {
456 gsfElectronIdVals[subindex++].push_back((*gsfElectronIdHandle)[gsfElectronref]);
460 for (
const auto& gsfElectronFloatValueMapHandle : gsfElectronFloatValueMapHandles) {
461 gsfElectronFloatValueMapVals[subindex++].push_back((*gsfElectronFloatValueMapHandle)[gsfElectronref]);
465 linkCore(gsfElectronCore, *gsfElectronCores, gsfElectronCoreMap);
470 if (!gsfTrackMap.count(gsfTrack)) {
471 gsfTracks->push_back(*gsfTrack);
472 gsfTrackMap[gsfTrack] = gsfTracks->size() - 1;
478 if (!gsfTrackMap.count(ambigGsfTrack)) {
479 gsfTracks->push_back(*ambigGsfTrack);
480 gsfTrackMap[ambigGsfTrack] = gsfTracks->size() - 1;
486 if (!slimRelink)
continue;
491 linkSuperCluster(superCluster, superClusterMap, *superClusters, relink, superClusterFullRelinkMap);
494 if (!relink)
continue;
501 linkConversions(singleconvrefs, *singleConversions, singleConversionMap);
512 for (
auto& superCluster : *superClusters) {
519 bool fullrelink = superClusterFullRelinkMap.count(index++);
522 superCluster.clearHitsAndFractions();
527 linkCaloClusters(superCluster, *ebeeClusters, ebeeClusterMap, rechitMap, barrelHitHandle, endcapHitHandle, caloTopology, *esClusters, esClusterMap);
538 for (
auto& ootSuperCluster : *ootSuperClusters) {
545 bool fullrelink = ootSuperClusterFullRelinkMap.count(index++);
548 ootSuperCluster.clearHitsAndFractions();
553 linkCaloClusters(ootSuperCluster, *ootEbeeClusters, ootEbeeClusterMap, rechitMap, barrelHitHandle, endcapHitHandle, caloTopology, *ootEsClusters, ootEsClusterMap);
559 for (
const EcalRecHit &rechit : *barrelHitHandle) {
560 if (rechitMap.count(rechit.detid())) {
561 ebRecHits->push_back(rechit);
565 for (
const EcalRecHit &rechit : *endcapHitHandle) {
566 if (rechitMap.count(rechit.detid())) {
567 eeRecHits->push_back(rechit);
575 for (
const EcalRecHit &rechit : *preshowerHitHandle) {
576 if (rechitMap.count(rechit.detid())) {
577 esRecHits->push_back(rechit);
590 relinkCaloClusters(superCluster, ebeeClusterMap, esClusterMap, outEBEEClusterHandle, outESClusterHandle);
600 relinkCaloClusters(ootSuperCluster, ootEbeeClusterMap, ootEsClusterMap, outOOTEBEEClusterHandle, outOOTESClusterHandle);
656 std::vector<reco::GsfTrackRef> ambigTracksInThisElectron;
659 ambigTracksInThisElectron.push_back(*igsf);
663 gsfElectron.clearAmbiguousGsfTracks();
666 for (
const auto &it : ambigTracksInThisElectron) {
667 const auto &gsftkmapped = gsfTrackMap.find(it);
669 if (gsftkmapped != gsfTrackMap.end()) {
671 gsfElectron.addAmbiguousGsfTrack(gsftkref);
674 throw cms::Exception(
"There must be a problem with linking and mapping of ambiguous gsf tracks...");
677 if (gsfElectron.ambiguousGsfTracksSize() > 0)
678 gsfElectron.setAmbiguous(
true);
680 ambigTracksInThisElectron.clear();
693 fillerPhotons.insert(outPhotonHandle,pfCandIsoPairVecPho.begin(),pfCandIsoPairVecPho.end());
694 fillerPhotons.fill();
698 fillerGsfElectrons.insert(outGsfElectronHandle,pfCandIsoPairVecEle.begin(),pfCandIsoPairVecEle.end());
699 fillerGsfElectrons.fill();
706 auto oMap = std::make_unique<MapType>();
708 typename MapType::Filler
filler(*oMap);
709 filler.insert(refH, vec.begin(), vec.end());
717 for (
auto const&
vals : photonIdVals){
723 for (
auto const&
vals : gsfElectronIdVals){
729 for (
auto const&
vals : photonFloatValueMapVals){
735 for (
auto const&
vals : ootPhotonFloatValueMapVals){
741 for (
auto const&
vals : gsfElectronFloatValueMapVals){
746 template <
typename T,
typename U>
749 if (!coreMap.count(core)) {
750 cores.push_back(*core);
751 coreMap[core] = cores.size() - 1;
756 std::map<reco::SuperClusterRef, unsigned int>& superClusterMap,
759 std::unordered_set<unsigned int>& superClusterFullRelinkMap)
761 const auto &mappedsc = superClusterMap.find(superCluster);
764 unsigned int mappedscidx = 0;
765 if (mappedsc==superClusterMap.end()) {
766 superClusters.push_back(*superCluster);
767 mappedscidx = superClusters.size() - 1;
768 superClusterMap[superCluster] = mappedscidx;
771 mappedscidx = mappedsc->second;
775 if (relink) superClusterFullRelinkMap.insert(mappedscidx);
780 std::map<reco::ConversionRef, unsigned int>& conversionMap)
782 for (
const auto& convref : convrefs) {
790 std::map<reco::ConversionRef, unsigned int>& conversionMap)
793 for (
const auto&
conversion : *conversionHandle) {
798 if (!matched)
continue;
807 std::map<reco::ConversionRef, unsigned int>& conversionMap)
810 for (
const auto&
conversion : *conversionHandle) {
815 if (!matched)
continue;
823 std::map<reco::ConversionRef, unsigned int>& conversionMap)
825 if (!conversionMap.count(convref)) {
826 conversions.push_back(*convref);
827 conversionMap[convref] = conversions.size() - 1;
833 std::map<reco::CaloClusterPtr, unsigned int>& caloClusterMap)
835 if (!caloClusterMap.count(caloCluster)) {
836 caloClusters.push_back(*caloCluster);
837 caloClusterMap[caloCluster] = caloClusters.size() - 1;
843 std::map<reco::CaloClusterPtr, unsigned int>& ebeeClusterMap,
844 std::unordered_set<DetId>& rechitMap,
849 std::map<reco::CaloClusterPtr, unsigned int>& esClusterMap)
851 for (
const auto& cluster : superCluster.
clusters()) {
854 for (
const auto& hitfrac : cluster->hitsAndFractions()) {
855 rechitMap.insert(hitfrac.first);
858 bool barrel = cluster->hitsAndFractions().front().first.subdetId()==
EcalBarrel;
860 DetId seed = EcalClusterTools::getMaximum(*cluster, rhcol).first;
863 for (
const auto& detid : dets5x5) {
864 rechitMap.insert(detid);
870 for (
const auto& hitfrac : cluster->hitsAndFractions()) {
871 rechitMap.insert(hitfrac.first);
878 const std::map<reco::CaloClusterPtr, unsigned int>& ebeeClusterMap,
879 const std::map<reco::CaloClusterPtr, unsigned int>& esClusterMap,
884 const auto &seedmapped = ebeeClusterMap.find(superCluster.
seed());
885 if (seedmapped != ebeeClusterMap.end()) {
893 for (
const auto &cluster : superCluster.
clusters()) {
894 const auto &clustermapped = ebeeClusterMap.find(cluster);
895 if (clustermapped != ebeeClusterMap.end()) {
906 if (!clusters.
empty()) {
913 const auto &clustermapped = esClusterMap.find(cluster);
914 if (clustermapped != esClusterMap.end()) {
925 if (!esclusters.
empty()) {
930 template <
typename T>
932 const std::map<reco::SuperClusterRef, unsigned int>& superClusterMap,
935 const auto &scmapped = superClusterMap.find(core.superCluster());
936 if (scmapped != superClusterMap.end()) {
939 core.setSuperCluster(scref);
944 const std::map<reco::GsfTrackRef, unsigned int>& gsfTrackMap,
947 const auto &gsftkmapped = gsfTrackMap.find(gsfElectronCore.
gsfTrack());
948 if (gsftkmapped != gsfTrackMap.end()) {
956 const std::map<reco::ConversionRef, unsigned int>& conversionMap,
960 for (
const auto& convref : convrefs) {
961 const auto &convmapped = conversionMap.find(convref);
962 if (convmapped != conversionMap.end()) {
972 if (!outconvrefs.
empty()) {
978 const std::map<reco::PhotonCoreRef, unsigned int>& photonCoreMap,
981 const auto &coremapped = photonCoreMap.find(photon.
photonCore());
982 if (coremapped != photonCoreMap.end()) {
990 const std::map<reco::GsfElectronCoreRef, unsigned int>& gsfElectronCoreMap,
993 const auto &coremapped = gsfElectronCoreMap.find(gsfElectron.
core());
994 if (coremapped != gsfElectronCoreMap.end()) {
1006 float newEnergy = energyMap[oldPhoRef];
1007 float newEnergyErr = energyErrMap[oldPhoRef];
1008 photon.
setCorrectedEnergy(reco::Photon::P4type::regression2, newEnergy, newEnergyErr,
true);
1019 const float newEnergy = energyMap[oldEleRef];
1020 const float newEnergyErr = energyErrMap[oldEleRef];
1021 const float newEcalEnergy = ecalEnergyMap[oldEleRef];
1022 const float newEcalEnergyErr = ecalEnergyErrMap[oldEleRef];
1026 const float corr = newEnergy / oldP4.E();
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_
float trackMomentumError() const
void setCore(const reco::GsfElectronCoreRef &core)
const bool applyPhotonCalibOnData_
const edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyT_
const StringCutObjectSelector< reco::Photon > slimRelinkPhotonSel_
void setGsfTrack(const GsfTrackRef &gsfTrack)
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
const LorentzVector & p4(P4Kind kind) const
const std::vector< std::string > outPhotonIds_
void setCorrectedEnergy(P4type type, float E, float dE, bool toCand=true)
~ReducedEGProducer() override
const std::vector< std::string > outOOTPhotonFloatValueMaps_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void calibratePhoton(reco::Photon &photon, const reco::PhotonRef &oldPhoRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap)
void push_back(Ptr< T > const &iPtr)
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyT_
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
const std::vector< std::string > outPhotonFloatValueMaps_
bool empty() const
Is the RefVector empty.
const GsfTrackRef & gsfTrack() const
const std::string outGsfTracks_
void setToken(edm::EDGetTokenT< T > &token, const edm::ParameterSet &config, const std::string &name)
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
const std::string outOOTPhotons_
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 bool applyGsfElectronCalibOnData_
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
bool empty() const
Is the RefVector empty.
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyErrT_
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_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
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 setCorrectedEcalEnergyError(float newEnergyError)
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
static void calibrateElectron(reco::GsfElectron &gsfElectron, const reco::GsfElectronRef &oldEleRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap, const edm::ValueMap< float > &ecalEnergyMap, const edm::ValueMap< float > &ecalEnergyErrMap)
void relinkGsfElectronCore(reco::GsfElectron &gsfElectron, const std::map< reco::GsfElectronCoreRef, unsigned int > &gsfElectronCoreMap, const edm::OrphanHandle< reco::GsfElectronCoreCollection > &outGsfElectronCoreHandle)
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronFloatValueMapTs_
void linkConversionsByTrackRef(const edm::Handle< reco::ConversionCollection > &conversionHandle, const reco::GsfElectron &gsfElectron, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
void setConversions(const reco::ConversionRefVector &conversions)
const std::string outOOTEBEEClusters_
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
void linkSuperCluster(const reco::SuperClusterRef &superCluster, std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, reco::SuperClusterCollection &superClusters, const bool relink, std::unordered_set< unsigned int > &superClusterFullRelinkMap)
void linkCore(const T &core, U &cores, std::map< T, unsigned int > &coreMap)
const StringCutObjectSelector< reco::Photon > relinkPhotonSel_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyErrT_
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
const bool applyPhotonCalibOnMC_
void relinkCaloClusters(reco::SuperCluster &superCluster, const std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, const std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap, const edm::OrphanHandle< reco::CaloClusterCollection > &outEBEEClusterHandle, const edm::OrphanHandle< reco::CaloClusterCollection > &outESClusterHandle)
const std::string outPhotons_
const std::string outGsfElectronPfCandMap_
void relinkSuperCluster(T &core, const std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, const edm::OrphanHandle< reco::SuperClusterCollection > &outSuperClusterHandle)
const std::string outGsfElectronCores_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonFloatValueMapTs_
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
void relinkPhotonCore(reco::Photon &photon, const std::map< reco::PhotonCoreRef, unsigned int > &photonCoreMap, const edm::OrphanHandle< reco::PhotonCoreCollection > &outPhotonCoreHandle)
void conversion(EventAux const &from, EventAuxiliary &to)
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
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonFloatValueMapTs_
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 setCorrectedEcalEnergy(float newEnergy)
void clear()
Clear the PtrVector.
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyErrT_
void linkCaloCluster(const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
const std::string outEERecHits_
const StringCutObjectSelector< reco::Photon > slimRelinkOOTPhotonSel_
void produce(edm::Event &evt, const edm::EventSetup &es) final
const std::vector< std::string > outGsfElectronFloatValueMaps_
const std::string outPhotonPfCandMap_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
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_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyT_
const edm::EDGetTokenT< reco::PhotonCollection > ootPhotonT_
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
const bool applyGsfElectronCalibOnMC_
ReducedEGProducer(const edm::ParameterSet &ps)
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_