![]() |
![]() |
#include <GEDGsfElectronCoreProducer.h>
Public Member Functions | |
GEDGsfElectronCoreProducer (const edm::ParameterSet &conf) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
virtual | ~GEDGsfElectronCoreProducer () |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &) |
Private Member Functions | |
void | produceElectronCore (const reco::PFCandidate &pfCandidate, reco::GsfElectronCoreCollection *electrons) |
Private Attributes | |
edm::Handle < reco::PFCandidateCollection > | gedEMUnbiasedH_ |
edm::InputTag | gedEMUnbiasedTag_ |
Definition at line 8 of file GEDGsfElectronCoreProducer.h.
GEDGsfElectronCoreProducer::GEDGsfElectronCoreProducer | ( | const edm::ParameterSet & | conf | ) | [explicit] |
Definition at line 32 of file GEDGsfElectronCoreProducer.cc.
References gedEMUnbiasedTag_, and edm::ParameterSet::getParameter().
: GsfElectronCoreBaseProducer(config) { gedEMUnbiasedTag_ = config.getParameter<edm::InputTag>("GEDEMUnbiased") ; }
GEDGsfElectronCoreProducer::~GEDGsfElectronCoreProducer | ( | ) | [virtual] |
Definition at line 84 of file GEDGsfElectronCoreProducer.cc.
{}
void GEDGsfElectronCoreProducer::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDProducer.
Definition at line 23 of file GEDGsfElectronCoreProducer.cc.
References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::add(), and GsfElectronCoreBaseProducer::fillDescription().
{ edm::ParameterSetDescription desc ; GsfElectronCoreBaseProducer::fillDescription(desc) ; desc.add<edm::InputTag>("GEDEMUnbiased",edm::InputTag("GEDPFCandidates")) ; descriptions.add("produceEcalDrivenGsfElectronCores",desc) ; }
void GEDGsfElectronCoreProducer::produce | ( | edm::Event & | event, |
const edm::EventSetup & | setup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 38 of file GEDGsfElectronCoreProducer.cc.
References HI_PhotonSkim_cff::electrons, gedEMUnbiasedH_, gedEMUnbiasedTag_, i, GsfElectronCoreBaseProducer::initEvent(), produceElectronCore(), and edm::Handle< T >::product().
{ // base input GsfElectronCoreBaseProducer::initEvent(event,setup) ; event.getByLabel(gedEMUnbiasedTag_,gedEMUnbiasedH_); // output std::auto_ptr<GsfElectronCoreCollection> electrons(new GsfElectronCoreCollection) ; const PFCandidateCollection * pfCandidateCollection = gedEMUnbiasedH_.product(); for ( unsigned int i=0 ; i<pfCandidateCollection->size() ; ++i ) produceElectronCore((*pfCandidateCollection)[i],electrons.get()) ; event.put(electrons) ; }
void GEDGsfElectronCoreProducer::produceElectronCore | ( | const reco::PFCandidate & | pfCandidate, |
reco::GsfElectronCoreCollection * | electrons | ||
) | [private] |
Definition at line 55 of file GEDGsfElectronCoreProducer.cc.
References reco::PFCandidate::egammaExtraRef(), GsfElectronCoreBaseProducer::fillElectronCore(), reco::PFCandidate::gsfTrackRef(), edm::Ref< C, T, F >::isNull(), reco::GsfElectronCore::setPflowSuperCluster(), and reco::GsfElectronCore::setSuperCluster().
Referenced by produce().
{ const GsfTrackRef gsfTrackRef = pfCandidate.gsfTrackRef(); if(gsfTrackRef.isNull()) return; reco::PFCandidateEGammaExtraRef extraRef = pfCandidate.egammaExtraRef(); if(extraRef.isNull()) return; GsfElectronCore * eleCore = new GsfElectronCore(gsfTrackRef) ; GsfElectronCoreBaseProducer::fillElectronCore(eleCore) ; SuperClusterRef scRef = extraRef->superClusterRef(); SuperClusterRef scBoxRef = extraRef->superClusterBoxRef(); if (!scRef.isNull() || !scBoxRef.isNull()) { eleCore->setSuperCluster(scRef) ; eleCore->setPflowSuperCluster(scBoxRef) ; electrons->push_back(*eleCore) ; } else { edm::LogWarning("GEDGsfElectronCoreProducer")<<"Both superClusterRef and superClusterBoxRef of pfCandidate.egammaExtraRef() are Null" ; } delete eleCore ; }
Definition at line 22 of file GEDGsfElectronCoreProducer.h.
Referenced by produce().
Definition at line 24 of file GEDGsfElectronCoreProducer.h.
Referenced by GEDGsfElectronCoreProducer(), and produce().