1 #ifndef RecoEgamma_EgammaElectronProducers_GsfElectronGSCrysFixer_h
2 #define RecoEgamma_EgammaElectronProducers_GsfElectronGSCrysFixer_h
58 token = consumes<T>(
tag);
107 produces<reco::GsfElectronCollection >();
109 produces<ElectronRefMap>();
118 for(
size_t coreNr=0;coreNr<newCores->size();coreNr++){
120 auto oldRef = newToOldCoresMap[coreRef];
121 if( oldRef.isNonnull() && oldRef==oldEle.
superCluster()){
131 auto outEles = std::make_unique<reco::GsfElectronCollection>();
143 std::vector<reco::GsfElectronRef> oldElectrons;
146 for (
auto& oldEle : *elesHandle) {
147 auto&& refToBase(elesHandle->refAt(iE++));
148 oldElectrons.emplace_back(refToBase.id(), &oldEle, refToBase.key());
152 outEles->emplace_back(oldEle,newCoreRef);
153 auto& newEle(outEles->back());
160 float eNewSCOverEOldSC = newEle.superCluster()->energy()/oldEle.
superCluster()->energy();
164 newEle.full5x5_setShowerShape(full5x5ShowerShape);
165 newEle.setShowerShape(showerShape);
173 auto&& newElectronsHandle(iEvent.
put(
std::move(outEles)));
177 refMapFiller.
insert(newElectronsHandle, oldElectrons.begin(), oldElectrons.end());
T getParameter(std::string const &) const
edm::Ref< GsfElectronCoreCollection > GsfElectronCoreRef
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
virtual ~GsfElectronGSCrysFixer()
auto_ptr< JetDefinition::Plugin > plugin
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< SCRefMap > newCoresToOldSCMapToken_
#define DEFINE_FWK_MODULE(type)
void getToken(edm::EDGetTokenT< T > &token, const edm::ParameterSet &pset, const std::string &label, const std::string &instance="")
void insert(const H &h, I begin, I end)
edm::View< reco::GsfElectron > GsfElectronView
const CaloTopology * topology_
std::unique_ptr< ModifyObjectValueBase > gedRegression_
const CaloGeometry * geometry_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
edm::EDGetTokenT< GsfElectronView > oldGsfElesToken_
GsfElectronGSCrysFixer(const edm::ParameterSet &)
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
edm::ValueMap< reco::SuperClusterRef > SCRefMap
edm::ValueMap< reco::GsfElectronRef > ElectronRefMap
edm::EDGetTokenT< EcalRecHitCollection > ebRecHitsToken_
ParameterSet const & getParameterSet(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const
edm::EDGetTokenT< reco::GsfElectronCoreCollection > newCoresToken_
T get(const Candidate &c)