CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
ReducedEGProducer Class Reference

#include <ReducedEGProducer.h>

Inheritance diagram for ReducedEGProducer:
edm::stream::EDProducer<>

Public Member Functions

void beginRun (edm::Run const &, const edm::EventSetup &) final
 
void produce (edm::Event &evt, const edm::EventSetup &es) final
 
 ReducedEGProducer (const edm::ParameterSet &ps)
 
 ~ReducedEGProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

void linkCaloCluster (const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
 
void linkCaloClusters (const reco::SuperCluster &superCluster, reco::CaloClusterCollection &ebeeClusters, std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, std::unordered_set< DetId > &rechitMap, const edm::Handle< EcalRecHitCollection > &barrelHitHandle, const edm::Handle< EcalRecHitCollection > &endcapHitHandle, const CaloTopology *caloTopology, reco::CaloClusterCollection &esClusters, std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap)
 
void linkConversion (const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
 
void linkConversions (const reco::ConversionRefVector &convrefs, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
 
void linkConversionsByTrackRef (const edm::Handle< reco::ConversionCollection > &conversionHandle, const reco::GsfElectron &gsfElectron, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
 
void linkConversionsByTrackRef (const edm::Handle< reco::ConversionCollection > &conversionHandle, const reco::SuperCluster &superCluster, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
 
template<typename T , typename U >
void linkCore (const T &core, U &cores, std::map< T, unsigned int > &coreMap)
 
void linkHcalHits (const reco::SuperCluster &superClus, const HBHERecHitCollection &recHits, std::unordered_set< DetId > &hcalDetIds)
 
void linkSuperCluster (const reco::SuperClusterRef &superCluster, std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, reco::SuperClusterCollection &superClusters, const bool relink, std::unordered_set< unsigned int > &superClusterFullRelinkMap)
 
void relinkCaloClusters (reco::SuperCluster &superCluster, const std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, const std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap, const edm::OrphanHandle< reco::CaloClusterCollection > &outEBEEClusterHandle, const edm::OrphanHandle< reco::CaloClusterCollection > &outESClusterHandle)
 
void relinkConversions (reco::PhotonCore &photonCore, const reco::ConversionRefVector &convrefs, const std::map< reco::ConversionRef, unsigned int > &conversionMap, const edm::OrphanHandle< reco::ConversionCollection > &outConversionHandle)
 
void relinkGsfElectronCore (reco::GsfElectron &gsfElectron, const std::map< reco::GsfElectronCoreRef, unsigned int > &gsfElectronCoreMap, const edm::OrphanHandle< reco::GsfElectronCoreCollection > &outGsfElectronCoreHandle)
 
void relinkGsfTrack (reco::GsfElectronCore &electroncore, const std::map< reco::GsfTrackRef, unsigned int > &gsfTrackMap, const edm::OrphanHandle< reco::GsfTrackCollection > &outGsfTrackHandle)
 
void relinkPhotonCore (reco::Photon &photon, const std::map< reco::PhotonCoreRef, unsigned int > &photonCoreMap, const edm::OrphanHandle< reco::PhotonCoreCollection > &outPhotonCoreHandle)
 
template<typename T >
void relinkSuperCluster (T &core, const std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, const edm::OrphanHandle< reco::SuperClusterCollection > &outSuperClusterHandle)
 
template<typename T >
void setToken (edm::EDGetTokenT< T > &token, const edm::ParameterSet &config, const std::string &name)
 

Static Private Member Functions

static void calibrateElectron (reco::GsfElectron &gsfElectron, const reco::GsfElectronRef &oldEleRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap, const edm::ValueMap< float > &ecalEnergyMap, const edm::ValueMap< float > &ecalEnergyErrMap)
 
static void calibratePhoton (reco::Photon &photon, const reco::PhotonRef &oldPhoRef, const edm::ValueMap< float > &energyMap, const edm::ValueMap< float > &energyErrMap)
 

Private Attributes

const bool applyGsfElectronCalibOnData_
 
const bool applyGsfElectronCalibOnMC_
 
const bool applyPhotonCalibOnData_
 
const bool applyPhotonCalibOnMC_
 
const edm::EDGetTokenT< EcalRecHitCollectionbarrelEcalHits_
 
const edm::EDGetTokenT< reco::ConversionCollectionconversionT_
 
const bool doPreshowerEcalHits_
 
const edm::EDGetTokenT< EcalRecHitCollectionendcapEcalHits_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyErrT_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyT_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyErrT_
 
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyT_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronFloatValueMapTs_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
 
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
 
const edm::EDGetTokenT< reco::GsfElectronCollectiongsfElectronT_
 
const edm::EDGetTokenT< reco::GsfTrackCollectiongsfTrackT_
 
const edm::EDGetTokenT< HBHERecHitCollectionhbheHits_
 
EGHcalRecHitSelector hcalHitSel_
 
const StringCutObjectSelector< reco::GsfElectronkeepGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonkeepOOTPhotonSel_
 
const StringCutObjectSelector< reco::PhotonkeepPhotonSel_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonFloatValueMapTs_
 
edm::EDGetTokenT< reco::PhotonCollectionootPhotonT_
 
const std::string outConversions_
 
const std::string outEBEEClusters_
 
const std::string outEBRecHits_
 
const std::string outEERecHits_
 
const std::string outESClusters_
 
const std::string outESRecHits_
 
const std::string outGsfElectronCores_
 
const std::vector< std::string > outGsfElectronFloatValueMaps_
 
const std::vector< std::string > outGsfElectronIds_
 
const std::string outGsfElectronPfCandMap_
 
const std::string outGsfElectrons_
 
const std::string outGsfTracks_
 
const std::string outHBHERecHits_
 
const std::string outOOTEBEEClusters_
 
const std::string outOOTESClusters_
 
const std::string outOOTPhotonCores_
 
const std::vector< std::string > outOOTPhotonFloatValueMaps_
 
const std::string outOOTPhotons_
 
const std::string outOOTSuperClusters_
 
const std::string outPhotonCores_
 
const std::vector< std::string > outPhotonFloatValueMaps_
 
const std::vector< std::string > outPhotonIds_
 
const std::string outPhotonPfCandMap_
 
const std::string outPhotons_
 
const std::string outSingleConversions_
 
const std::string outSuperClusters_
 
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyErrT_
 
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyT_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonFloatValueMapTs_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
 
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
 
const edm::EDGetTokenT< reco::PhotonCollectionphotonT_
 
const edm::EDGetTokenT< EcalRecHitCollectionpreshowerEcalHits_
 
const StringCutObjectSelector< reco::GsfElectronrelinkGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonrelinkOOTPhotonSel_
 
const StringCutObjectSelector< reco::PhotonrelinkPhotonSel_
 
const edm::EDGetTokenT< reco::ConversionCollectionsingleConversionT_
 
const StringCutObjectSelector< reco::GsfElectronslimRelinkGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonslimRelinkOOTPhotonSel_
 
const StringCutObjectSelector< reco::PhotonslimRelinkPhotonSel_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Select subset of electrons and photons from input collections and produced consistently relinked output collections including associated SuperClusters, CaloClusters and ecal RecHits

Author
J.Bendavid (CERN) \edited: K. McDermott(Cornell) : refactored code + out of time photons

Definition at line 41 of file ReducedEGProducer.h.

Constructor & Destructor Documentation

◆ ReducedEGProducer()

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

Definition at line 43 of file ReducedEGProducer.cc.

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

References applyGsfElectronCalibOnData_, applyGsfElectronCalibOnMC_, applyPhotonCalibOnData_, applyPhotonCalibOnMC_, doPreshowerEcalHits_, gsfElectronCalibEcalEnergyErrT_, gsfElectronCalibEcalEnergyT_, gsfElectronCalibEnergyErrT_, gsfElectronCalibEnergyT_, gsfElectronFloatValueMapTs_, gsfElectronIdTs_, edm::EDGetTokenT< T >::isUninitialized(), edm::InputTag::label(), ootPhotonFloatValueMapTs_, ootPhotonT_, outConversions_, outEBEEClusters_, outEBRecHits_, outEERecHits_, outESClusters_, outESRecHits_, outGsfElectronCores_, outGsfElectronFloatValueMaps_, outGsfElectronIds_, outGsfElectronPfCandMap_, outGsfElectrons_, outGsfTracks_, outHBHERecHits_, outOOTEBEEClusters_, outOOTESClusters_, outOOTPhotonCores_, outOOTPhotonFloatValueMaps_, outOOTPhotons_, outOOTSuperClusters_, outPhotonCores_, outPhotonFloatValueMaps_, outPhotonIds_, outPhotonPfCandMap_, outPhotons_, outSingleConversions_, outSuperClusters_, photonCalibEnergyErrT_, photonCalibEnergyT_, photonFloatValueMapTs_, photonIdTs_, setToken(), AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::tag.

◆ ~ReducedEGProducer()

ReducedEGProducer::~ReducedEGProducer ( )
override

Definition at line 191 of file ReducedEGProducer.cc.

191 {}

Member Function Documentation

◆ beginRun()

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

Definition at line 193 of file ReducedEGProducer.cc.

193 { 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 1073 of file ReducedEGProducer.cc.

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

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 1064 of file ReducedEGProducer.cc.

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

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 897 of file ReducedEGProducer.cc.

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

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 906 of file ReducedEGProducer.cc.

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

References Reference_intrackfit_cff::barrel, reco::SuperCluster::clusters(), DetId::Ecal, EcalBarrel, EcalEndcap, CaloTopology::getSubdetectorTopology(), CaloSubdetectorTopology::getWindow(), linkCaloCluster(), reco::SuperCluster::preshowerClusters(), edm::Handle< T >::product(), and SurveyInfoScenario_cff::seed.

Referenced by produce().

◆ linkConversion()

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

Definition at line 888 of file ReducedEGProducer.cc.

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

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 848 of file ReducedEGProducer.cc.

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

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 856 of file ReducedEGProducer.cc.

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

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 872 of file ReducedEGProducer.cc.

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

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 819 of file ReducedEGProducer.cc.

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

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 941 of file ReducedEGProducer.cc.

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

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 826 of file ReducedEGProducer.cc.

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

References HLT_2018_cff::superClusters.

Referenced by produce().

◆ produce()

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

Definition at line 195 of file ReducedEGProducer.cc.

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

References applyGsfElectronCalibOnData_, applyGsfElectronCalibOnMC_, applyPhotonCalibOnData_, applyPhotonCalibOnMC_, barrelEcalHits_, calibrateElectron(), calibratePhoton(), printConversionInfo::conversionHandle, pwdgSkimBPark_cfi::conversions, conversionT_, PA_ZEESkim_cff::decay, doPreshowerEcalHits_, endcapEcalHits_, ev, Exception, trigObjTnPSource_cfi::filler, edm::EventSetup::get(), get, edm::Event::getByToken(), gsfElectronCalibEcalEnergyErrT_, gsfElectronCalibEcalEnergyT_, gsfElectronCalibEnergyErrT_, gsfElectronCalibEnergyT_, gsfElectronFloatValueMapTs_, gsfElectronIdTs_, gsfElectronPfCandMapT_, electronIsolatorFromEffectiveArea_cfi::gsfElectrons, gsfElectronT_, ecalDrivenGsfElectronCoresFromMultiCl_cff::gsfTracks, gsfTrackT_, hbheHits_, edm::EventBase::isRealData(), edm::EDGetTokenT< T >::isUninitialized(), keep, keepGsfElectronSel_, keepOOTPhotonSel_, keepPhotonSel_, linkCaloCluster(), linkCaloClusters(), linkConversions(), linkConversionsByTrackRef(), linkCore(), linkHcalHits(), linkSuperCluster(), eostools::move(), ootPhotonCore_cff::ootPhotonCore, ootPhotonFloatValueMapTs_, ootPhotons_cff::ootPhotons, ootPhotonT_, outConversions_, outEBEEClusters_, outEBRecHits_, outEERecHits_, outESClusters_, outESRecHits_, outGsfElectronCores_, outGsfElectronFloatValueMaps_, outGsfElectronIds_, outGsfElectronPfCandMap_, outGsfElectrons_, outGsfTracks_, outHBHERecHits_, outOOTEBEEClusters_, outOOTESClusters_, outOOTPhotonCores_, outOOTPhotonFloatValueMaps_, outOOTPhotons_, outOOTSuperClusters_, outPhotonCores_, outPhotonFloatValueMaps_, outPhotonIds_, outPhotonPfCandMap_, outPhotons_, outSingleConversions_, outSuperClusters_, muons2muons_cfi::photon, photonCalibEnergyErrT_, photonCalibEnergyT_, photonCore_cfi::photonCore, photonFloatValueMapTs_, photonIdTs_, photonPfCandMapT_, BPHMonitor_cfi::photons, photonT_, preshowerEcalHits_, edm::Event::put(), relinkCaloClusters(), relinkConversions(), relinkGsfElectronCore(), relinkGsfElectronSel_, relinkGsfTrack(), relinkOOTPhotonSel_, relinkPhotonCore(), relinkPhotonSel_, relinkSuperCluster(), reducedEgamma_cfi::singleConversions, singleConversionT_, slimRelinkGsfElectronSel_, slimRelinkOOTPhotonSel_, slimRelinkPhotonSel_, AlCaHLTBitMon_QueryRunRegistry::string, and HLT_2018_cff::superClusters.

◆ 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 947 of file ReducedEGProducer.cc.

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

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 1020 of file ReducedEGProducer.cc.

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

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 1052 of file ReducedEGProducer.cc.

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

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 1010 of file ReducedEGProducer.cc.

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

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 1041 of file ReducedEGProducer.cc.

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

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 998 of file ReducedEGProducer.cc.

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

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

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

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

Referenced by ReducedEGProducer().

Member Data Documentation

◆ applyGsfElectronCalibOnData_

const bool ReducedEGProducer::applyGsfElectronCalibOnData_
private

Definition at line 166 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ applyGsfElectronCalibOnMC_

const bool ReducedEGProducer::applyGsfElectronCalibOnMC_
private

Definition at line 167 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ applyPhotonCalibOnData_

const bool ReducedEGProducer::applyPhotonCalibOnData_
private

Definition at line 164 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ applyPhotonCalibOnMC_

const bool ReducedEGProducer::applyPhotonCalibOnMC_
private

Definition at line 165 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ barrelEcalHits_

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

Definition at line 148 of file ReducedEGProducer.h.

Referenced by produce().

◆ conversionT_

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

Definition at line 145 of file ReducedEGProducer.h.

Referenced by produce().

◆ doPreshowerEcalHits_

const bool ReducedEGProducer::doPreshowerEcalHits_
private

Definition at line 150 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ endcapEcalHits_

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

Definition at line 149 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronCalibEcalEnergyErrT_

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

Definition at line 173 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ gsfElectronCalibEcalEnergyT_

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

Definition at line 172 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ gsfElectronCalibEnergyErrT_

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

Definition at line 171 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ gsfElectronCalibEnergyT_

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

Definition at line 170 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ gsfElectronFloatValueMapTs_

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

Definition at line 162 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ gsfElectronIdTs_

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

Definition at line 158 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ gsfElectronPfCandMapT_

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

Definition at line 155 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfElectronT_

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

Definition at line 143 of file ReducedEGProducer.h.

Referenced by produce().

◆ gsfTrackT_

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

Definition at line 144 of file ReducedEGProducer.h.

Referenced by produce().

◆ hbheHits_

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

Definition at line 152 of file ReducedEGProducer.h.

Referenced by produce().

◆ hcalHitSel_

EGHcalRecHitSelector ReducedEGProducer::hcalHitSel_
private

Definition at line 213 of file ReducedEGProducer.h.

Referenced by beginRun(), and linkHcalHits().

◆ keepGsfElectronSel_

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

Definition at line 209 of file ReducedEGProducer.h.

Referenced by produce().

◆ keepOOTPhotonSel_

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

Definition at line 206 of file ReducedEGProducer.h.

Referenced by produce().

◆ keepPhotonSel_

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

Definition at line 203 of file ReducedEGProducer.h.

Referenced by produce().

◆ ootPhotonFloatValueMapTs_

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

Definition at line 161 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ ootPhotonT_

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

Definition at line 142 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outConversions_

const std::string ReducedEGProducer::outConversions_
private

Definition at line 183 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outEBEEClusters_

const std::string ReducedEGProducer::outEBEEClusters_
private

Definition at line 186 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outEBRecHits_

const std::string ReducedEGProducer::outEBRecHits_
private

Definition at line 191 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outEERecHits_

const std::string ReducedEGProducer::outEERecHits_
private

Definition at line 192 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outESClusters_

const std::string ReducedEGProducer::outESClusters_
private

Definition at line 187 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outESRecHits_

const std::string ReducedEGProducer::outESRecHits_
private

Definition at line 193 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outGsfElectronCores_

const std::string ReducedEGProducer::outGsfElectronCores_
private

Definition at line 181 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outGsfElectronFloatValueMaps_

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

Definition at line 201 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outGsfElectronIds_

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

Definition at line 198 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outGsfElectronPfCandMap_

const std::string ReducedEGProducer::outGsfElectronPfCandMap_
private

Definition at line 196 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outGsfElectrons_

const std::string ReducedEGProducer::outGsfElectrons_
private

Definition at line 180 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outGsfTracks_

const std::string ReducedEGProducer::outGsfTracks_
private

Definition at line 182 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outHBHERecHits_

const std::string ReducedEGProducer::outHBHERecHits_
private

Definition at line 194 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outOOTEBEEClusters_

const std::string ReducedEGProducer::outOOTEBEEClusters_
private

Definition at line 189 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outOOTESClusters_

const std::string ReducedEGProducer::outOOTESClusters_
private

Definition at line 190 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outOOTPhotonCores_

const std::string ReducedEGProducer::outOOTPhotonCores_
private

Definition at line 179 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outOOTPhotonFloatValueMaps_

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

Definition at line 200 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outOOTPhotons_

const std::string ReducedEGProducer::outOOTPhotons_
private

Definition at line 178 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outOOTSuperClusters_

const std::string ReducedEGProducer::outOOTSuperClusters_
private

Definition at line 188 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outPhotonCores_

const std::string ReducedEGProducer::outPhotonCores_
private

Definition at line 177 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outPhotonFloatValueMaps_

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

Definition at line 199 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outPhotonIds_

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

Definition at line 197 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outPhotonPfCandMap_

const std::string ReducedEGProducer::outPhotonPfCandMap_
private

Definition at line 195 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outPhotons_

const std::string ReducedEGProducer::outPhotons_
private

Definition at line 176 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outSingleConversions_

const std::string ReducedEGProducer::outSingleConversions_
private

Definition at line 184 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ outSuperClusters_

const std::string ReducedEGProducer::outSuperClusters_
private

Definition at line 185 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ photonCalibEnergyErrT_

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

Definition at line 169 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ photonCalibEnergyT_

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

Definition at line 168 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ photonFloatValueMapTs_

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

Definition at line 160 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ photonIdTs_

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

Definition at line 157 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

◆ photonPfCandMapT_

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

Definition at line 154 of file ReducedEGProducer.h.

Referenced by produce().

◆ photonT_

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

Definition at line 141 of file ReducedEGProducer.h.

Referenced by produce().

◆ preshowerEcalHits_

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

Definition at line 151 of file ReducedEGProducer.h.

Referenced by produce().

◆ relinkGsfElectronSel_

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

Definition at line 211 of file ReducedEGProducer.h.

Referenced by produce().

◆ relinkOOTPhotonSel_

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

Definition at line 208 of file ReducedEGProducer.h.

Referenced by produce().

◆ relinkPhotonSel_

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

Definition at line 205 of file ReducedEGProducer.h.

Referenced by produce().

◆ singleConversionT_

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

Definition at line 146 of file ReducedEGProducer.h.

Referenced by produce().

◆ slimRelinkGsfElectronSel_

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

Definition at line 210 of file ReducedEGProducer.h.

Referenced by produce().

◆ slimRelinkOOTPhotonSel_

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

Definition at line 207 of file ReducedEGProducer.h.

Referenced by produce().

◆ slimRelinkPhotonSel_

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

Definition at line 204 of file ReducedEGProducer.h.

Referenced by produce().

ReducedEGProducer::outPhotonPfCandMap_
const std::string outPhotonPfCandMap_
Definition: ReducedEGProducer.h:195
ReducedEGProducer::endcapEcalHits_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
Definition: ReducedEGProducer.h:149
muonTagProbeFilters_cff.matched
matched
Definition: muonTagProbeFilters_cff.py:62
ReducedEGProducer::applyGsfElectronCalibOnMC_
const bool applyGsfElectronCalibOnMC_
Definition: ReducedEGProducer.h:167
muons2muons_cfi.photon
photon
Definition: muons2muons_cfi.py:28
EGHcalRecHitSelector::setup
void setup(const edm::EventSetup &iSetup)
Definition: EGHcalRecHitSelector.h:27
ReducedEGProducer::photonCalibEnergyT_
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyT_
Definition: ReducedEGProducer.h:168
EcalRecHit
Definition: EcalRecHit.h:15
ReducedEGProducer::outPhotonFloatValueMaps_
const std::vector< std::string > outPhotonFloatValueMaps_
Definition: ReducedEGProducer.h:199
edm::RefVector::clear
void clear()
Clear the vector.
Definition: RefVector.h:142
electrons_cff.bool
bool
Definition: electrons_cff.py:372
ReducedEGProducer::singleConversionT_
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
Definition: ReducedEGProducer.h:146
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:150
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:906
ReducedEGProducer::relinkOOTPhotonSel_
const StringCutObjectSelector< reco::Photon > relinkOOTPhotonSel_
Definition: ReducedEGProducer.h:208
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::linkHcalHits
void linkHcalHits(const reco::SuperCluster &superClus, const HBHERecHitCollection &recHits, std::unordered_set< DetId > &hcalDetIds)
Definition: ReducedEGProducer.cc:941
ReducedEGProducer::outOOTPhotons_
const std::string outOOTPhotons_
Definition: ReducedEGProducer.h:178
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:1064
ReducedEGProducer::outEBEEClusters_
const std::string outEBEEClusters_
Definition: ReducedEGProducer.h:186
ReducedEGProducer::keepPhotonSel_
const StringCutObjectSelector< reco::Photon > keepPhotonSel_
Definition: ReducedEGProducer.h:203
reco::SuperCluster
Definition: SuperCluster.h:18
ReducedEGProducer::conversionT_
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_
Definition: ReducedEGProducer.h:145
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:170
ReducedEGProducer::outGsfTracks_
const std::string outGsfTracks_
Definition: ReducedEGProducer.h:182
ReducedEGProducer::slimRelinkPhotonSel_
const StringCutObjectSelector< reco::Photon > slimRelinkPhotonSel_
Definition: ReducedEGProducer.h:204
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:1010
ReducedEGProducer::outOOTPhotonFloatValueMaps_
const std::vector< std::string > outOOTPhotonFloatValueMaps_
Definition: ReducedEGProducer.h:200
ReducedEGProducer::hcalHitSel_
EGHcalRecHitSelector hcalHitSel_
Definition: ReducedEGProducer.h:213
ReducedEGProducer::keepGsfElectronSel_
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
Definition: ReducedEGProducer.h:209
ootPhotonCore_cff.ootPhotonCore
ootPhotonCore
Definition: ootPhotonCore_cff.py:4
edm::SortedCollection< EcalRecHit >
ReducedEGProducer::photonPfCandMapT_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
Definition: ReducedEGProducer.h:154
CaloTopologyRecord
Definition: CaloTopologyRecord.h:10
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:46
ReducedEGProducer::outHBHERecHits_
const std::string outHBHERecHits_
Definition: ReducedEGProducer.h:194
ReducedEGProducer::setToken
void setToken(edm::EDGetTokenT< T > &token, const edm::ParameterSet &config, const std::string &name)
Definition: ReducedEGProducer.h:136
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:191
EcalBarrel
Definition: EcalSubdetector.h:10
ReducedEGProducer::outESRecHits_
const std::string outESRecHits_
Definition: ReducedEGProducer.h:193
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:1020
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
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:211
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:856
ReducedEGProducer::linkConversion
void linkConversion(const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
Definition: ReducedEGProducer.cc:888
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
edm::EDGetTokenT::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:70
reco::PhotonCore
Definition: PhotonCore.h:24
ReducedEGProducer::preshowerEcalHits_
const edm::EDGetTokenT< EcalRecHitCollection > preshowerEcalHits_
Definition: ReducedEGProducer.h:151
metsig::electron
Definition: SignAlgoResolutions.h:48
ReducedEGProducer::applyPhotonCalibOnMC_
const bool applyPhotonCalibOnMC_
Definition: ReducedEGProducer.h:165
edm::ESHandle< CaloTopology >
ReducedEGProducer::applyGsfElectronCalibOnData_
const bool applyGsfElectronCalibOnData_
Definition: ReducedEGProducer.h:166
ReducedEGProducer::photonCalibEnergyErrT_
edm::EDGetTokenT< edm::ValueMap< float > > photonCalibEnergyErrT_
Definition: ReducedEGProducer.h:169
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:142
ReducedEGProducer::relinkSuperCluster
void relinkSuperCluster(T &core, const std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, const edm::OrphanHandle< reco::SuperClusterCollection > &outSuperClusterHandle)
Definition: ReducedEGProducer.cc:998
ReducedEGProducer::outSingleConversions_
const std::string outSingleConversions_
Definition: ReducedEGProducer.h:184
ReducedEGProducer::gsfElectronPfCandMapT_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
Definition: ReducedEGProducer.h:155
HLT_2018_cff.superClusters
superClusters
Definition: HLT_2018_cff.py:13791
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ReducedEGProducer::keepOOTPhotonSel_
const StringCutObjectSelector< reco::Photon > keepOOTPhotonSel_
Definition: ReducedEGProducer.h:206
ReducedEGProducer::relinkPhotonCore
void relinkPhotonCore(reco::Photon &photon, const std::map< reco::PhotonCoreRef, unsigned int > &photonCoreMap, const edm::OrphanHandle< reco::PhotonCoreCollection > &outPhotonCoreHandle)
Definition: ReducedEGProducer.cc:1041
EcalEndcap
Definition: EcalSubdetector.h:10
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
ReducedEGProducer::outOOTESClusters_
const std::string outOOTESClusters_
Definition: ReducedEGProducer.h:190
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:848
ReducedEGProducer::hbheHits_
const edm::EDGetTokenT< HBHERecHitCollection > hbheHits_
Definition: ReducedEGProducer.h:152
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
core
Definition: __init__.py:1
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:947
ReducedEGProducer::outGsfElectronIds_
const std::vector< std::string > outGsfElectronIds_
Definition: ReducedEGProducer.h:198
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
ParameterSet
Definition: Functions.h:16
ReducedEGProducer::ootPhotonFloatValueMapTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonFloatValueMapTs_
Definition: ReducedEGProducer.h:161
ReducedEGProducer::gsfElectronFloatValueMapTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronFloatValueMapTs_
Definition: ReducedEGProducer.h:162
ReducedEGProducer::outGsfElectronPfCandMap_
const std::string outGsfElectronPfCandMap_
Definition: ReducedEGProducer.h:196
edm::PtrVectorBase::empty
bool empty() const
Is the RefVector empty.
Definition: PtrVectorBase.h:70
ReducedEGProducer::outGsfElectrons_
const std::string outGsfElectrons_
Definition: ReducedEGProducer.h:180
ConversionTools::matchesConversion
static bool matchesConversion(const reco::GsfElectron &ele, const reco::Conversion &conv, bool allowCkfMatch=true, bool allowAmbiguousGsfMatch=false)
Definition: ConversionTools.cc:54
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
ReducedEGProducer::outESClusters_
const std::string outESClusters_
Definition: ReducedEGProducer.h:187
CaloTopology::getSubdetectorTopology
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:17
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:826
ReducedEGProducer::outOOTSuperClusters_
const std::string outOOTSuperClusters_
Definition: ReducedEGProducer.h:188
reco::GsfElectronCore
Definition: GsfElectronCore.h:32
ReducedEGProducer::gsfElectronIdTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
Definition: ReducedEGProducer.h:158
ReducedEGProducer::gsfElectronCalibEnergyErrT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEnergyErrT_
Definition: ReducedEGProducer.h:171
photonCore_cfi.photonCore
photonCore
Definition: photonCore_cfi.py:7
ReducedEGProducer::gsfElectronCalibEcalEnergyErrT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyErrT_
Definition: ReducedEGProducer.h:173
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:1073
ReducedEGProducer::outPhotons_
const std::string outPhotons_
Definition: ReducedEGProducer.h:176
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:1052
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
get
#define get
ReducedEGProducer::outGsfElectronCores_
const std::string outGsfElectronCores_
Definition: ReducedEGProducer.h:181
ReducedEGProducer::outOOTEBEEClusters_
const std::string outOOTEBEEClusters_
Definition: ReducedEGProducer.h:189
ReducedEGProducer::slimRelinkGsfElectronSel_
const StringCutObjectSelector< reco::GsfElectron > slimRelinkGsfElectronSel_
Definition: ReducedEGProducer.h:210
ReducedEGProducer::photonFloatValueMapTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonFloatValueMapTs_
Definition: ReducedEGProducer.h:160
ReducedEGProducer::linkCore
void linkCore(const T &core, U &cores, std::map< T, unsigned int > &coreMap)
Definition: ReducedEGProducer.cc:819
reducedEgamma_cfi.singleConversions
singleConversions
Definition: reducedEgamma_cfi.py:20
edm::Ptr< CaloCluster >
ReducedEGProducer::relinkPhotonSel_
const StringCutObjectSelector< reco::Photon > relinkPhotonSel_
Definition: ReducedEGProducer.h:205
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:183
ReducedEGProducer::photonIdTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
Definition: ReducedEGProducer.h:157
PA_ZEESkim_cff.decay
decay
Definition: PA_ZEESkim_cff.py:26
ReducedEGProducer::outOOTPhotonCores_
const std::string outOOTPhotonCores_
Definition: ReducedEGProducer.h:179
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
ReducedEGProducer::outEERecHits_
const std::string outEERecHits_
Definition: ReducedEGProducer.h:192
edm::OrphanHandle
Definition: EDProductfwd.h:39
ReducedEGProducer::slimRelinkOOTPhotonSel_
const StringCutObjectSelector< reco::Photon > slimRelinkOOTPhotonSel_
Definition: ReducedEGProducer.h:207
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:148
edm::ValueMap
Definition: ValueMap.h:107
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Exception
Definition: hltDiff.cc:246
edm::RefVectorIterator
Definition: EDProductfwd.h:33
ReducedEGProducer::photonT_
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
Definition: ReducedEGProducer.h:141
HLT_FULL_cff.cores
cores
Definition: HLT_FULL_cff.py:100366
ReducedEGProducer::outSuperClusters_
const std::string outSuperClusters_
Definition: ReducedEGProducer.h:185
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
ReducedEGProducer::linkCaloCluster
void linkCaloCluster(const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
Definition: ReducedEGProducer.cc:897
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
ReducedEGProducer::gsfElectronCalibEcalEnergyT_
edm::EDGetTokenT< edm::ValueMap< float > > gsfElectronCalibEcalEnergyT_
Definition: ReducedEGProducer.h:172
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:201
ReducedEGProducer::gsfElectronT_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronT_
Definition: ReducedEGProducer.h:143
pwdgSkimBPark_cfi.conversions
conversions
Definition: pwdgSkimBPark_cfi.py:10
edm::Event
Definition: Event.h:73
ReducedEGProducer::outPhotonCores_
const std::string outPhotonCores_
Definition: ReducedEGProducer.h:177
ReducedEGProducer::applyPhotonCalibOnData_
const bool applyPhotonCalibOnData_
Definition: ReducedEGProducer.h:164
ReducedEGProducer::gsfTrackT_
const edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackT_
Definition: ReducedEGProducer.h:144
MapType
MapType
Definition: SiPixelTemplateDBObject_PayloadInspector.cc:51
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
ReducedEGProducer::outPhotonIds_
const std::vector< std::string > outPhotonIds_
Definition: ReducedEGProducer.h:197
SurveyInfoScenario_cff.seed
seed
Definition: SurveyInfoScenario_cff.py:295
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316