CMS 3D CMS Logo

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

#include <GsfElectronCoreBaseProducer.h>

Inheritance diagram for GsfElectronCoreBaseProducer:
edm::stream::EDProducer<> GEDGsfElectronCoreProducer GsfElectronCoreEcalDrivenProducer GsfElectronCoreProducer LowPtGsfElectronCoreProducer

Public Member Functions

 GsfElectronCoreBaseProducer (const edm::ParameterSet &conf)
 
 ~GsfElectronCoreBaseProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescription (edm::ParameterSetDescription &)
 

Protected Member Functions

void fillElectronCore (reco::GsfElectronCore *)
 
void initEvent (edm::Event &event, const edm::EventSetup &setup)
 

Protected Attributes

edm::Handle< reco::TrackCollectionctfTracksH_
 
edm::Handle< reco::GsfPFRecTrackCollectiongsfPfRecTracksH_
 
edm::Handle< reco::GsfTrackCollectiongsfTracksH_
 
bool useGsfPfRecTracks_
 

Private Attributes

edm::EDGetTokenT< reco::TrackCollectionctfTracksTag_
 
edm::EDGetTokenT< reco::GsfPFRecTrackCollectiongsfPfRecTracksTag_
 
edm::EDGetTokenT< reco::GsfTrackCollectiongsfTracksTag_
 

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

Definition at line 31 of file GsfElectronCoreBaseProducer.h.

Constructor & Destructor Documentation

GsfElectronCoreBaseProducer::GsfElectronCoreBaseProducer ( const edm::ParameterSet conf)
explicit

Definition at line 24 of file GsfElectronCoreBaseProducer.cc.

References edm::ParameterSet::getParameter().

25  {
26  produces<GsfElectronCoreCollection>() ;
27  gsfPfRecTracksTag_ = mayConsume<reco::GsfPFRecTrackCollection>(config.getParameter<edm::InputTag>("gsfPfRecTracks")) ;
28  gsfTracksTag_ = consumes<reco::GsfTrackCollection>(config.getParameter<edm::InputTag>("gsfTracks"));
29  ctfTracksTag_ = consumes<reco::TrackCollection>(config.getParameter<edm::InputTag>("ctfTracks"));
30  useGsfPfRecTracks_ = config.getParameter<bool>("useGsfPfRecTracks") ;
31  }
Definition: config.py:1
edm::EDGetTokenT< reco::TrackCollection > ctfTracksTag_
edm::EDGetTokenT< reco::GsfPFRecTrackCollection > gsfPfRecTracksTag_
edm::EDGetTokenT< reco::GsfTrackCollection > gsfTracksTag_
GsfElectronCoreBaseProducer::~GsfElectronCoreBaseProducer ( )
override

Definition at line 33 of file GsfElectronCoreBaseProducer.cc.

34  {}

Member Function Documentation

void GsfElectronCoreBaseProducer::fillDescription ( edm::ParameterSetDescription desc)
static

Definition at line 16 of file GsfElectronCoreBaseProducer.cc.

References edm::ParameterSetDescription::add().

Referenced by GEDGsfElectronCoreProducer::fillDescriptions(), and LowPtGsfElectronCoreProducer::fillDescriptions().

17  {
18  desc.add<edm::InputTag>("gsfPfRecTracks",edm::InputTag("pfTrackElec")) ;
19  desc.add<edm::InputTag>("gsfTracks",edm::InputTag("electronGsfTracks")) ;
20  desc.add<edm::InputTag>("ctfTracks",edm::InputTag("generalTracks")) ;
21  desc.add<bool>("useGsfPfRecTracks",true) ;
22  }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void GsfElectronCoreBaseProducer::fillElectronCore ( reco::GsfElectronCore eleCore)
protected

Definition at line 50 of file GsfElectronCoreBaseProducer.cc.

References gsfElectronTools::getClosestCtfToGsf(), reco::GsfElectronCore::gsfTrack(), and reco::GsfElectronCore::setCtfTrack().

Referenced by LowPtGsfElectronCoreProducer::produce(), GsfElectronCoreEcalDrivenProducer::produceEcalDrivenCore(), GEDGsfElectronCoreProducer::produceElectronCore(), and GsfElectronCoreProducer::produceTrackerDrivenCore().

51  {
52  const GsfTrackRef & gsfTrackRef = eleCore->gsfTrack() ;
53 
54  std::pair<TrackRef,float> ctfpair = gsfElectronTools::getClosestCtfToGsf(gsfTrackRef,ctfTracksH_) ;
55  eleCore->setCtfTrack(ctfpair.first,ctfpair.second) ;
56  }
void setCtfTrack(const TrackRef &closestCtfTrack, float ctfGsfOverlap)
const GsfTrackRef & gsfTrack() const
edm::Handle< reco::TrackCollection > ctfTracksH_
std::pair< reco::TrackRef, float > getClosestCtfToGsf(reco::GsfTrackRef const &, edm::Handle< reco::TrackCollection > const &ctfTracksH)
void GsfElectronCoreBaseProducer::initEvent ( edm::Event event,
const edm::EventSetup setup 
)
protected

Definition at line 42 of file GsfElectronCoreBaseProducer.cc.

Referenced by GsfElectronCoreEcalDrivenProducer::produce(), GEDGsfElectronCoreProducer::produce(), GsfElectronCoreProducer::produce(), and LowPtGsfElectronCoreProducer::produce().

43  {
45  { event.getByToken(gsfPfRecTracksTag_,gsfPfRecTracksH_) ; }
46  event.getByToken(gsfTracksTag_,gsfTracksH_) ;
47  event.getByToken(ctfTracksTag_,ctfTracksH_) ;
48  }
edm::Handle< reco::TrackCollection > ctfTracksH_
edm::Handle< reco::GsfTrackCollection > gsfTracksH_
edm::EDGetTokenT< reco::TrackCollection > ctfTracksTag_
edm::EDGetTokenT< reco::GsfPFRecTrackCollection > gsfPfRecTracksTag_
edm::Handle< reco::GsfPFRecTrackCollection > gsfPfRecTracksH_
edm::EDGetTokenT< reco::GsfTrackCollection > gsfTracksTag_

Member Data Documentation

edm::Handle<reco::TrackCollection> GsfElectronCoreBaseProducer::ctfTracksH_
protected

Definition at line 47 of file GsfElectronCoreBaseProducer.h.

edm::EDGetTokenT<reco::TrackCollection> GsfElectronCoreBaseProducer::ctfTracksTag_
private

Definition at line 56 of file GsfElectronCoreBaseProducer.h.

edm::Handle<reco::GsfPFRecTrackCollection> GsfElectronCoreBaseProducer::gsfPfRecTracksH_
protected
edm::EDGetTokenT<reco::GsfPFRecTrackCollection> GsfElectronCoreBaseProducer::gsfPfRecTracksTag_
private

Definition at line 54 of file GsfElectronCoreBaseProducer.h.

edm::Handle<reco::GsfTrackCollection> GsfElectronCoreBaseProducer::gsfTracksH_
protected
edm::EDGetTokenT<reco::GsfTrackCollection> GsfElectronCoreBaseProducer::gsfTracksTag_
private

Definition at line 55 of file GsfElectronCoreBaseProducer.h.

bool GsfElectronCoreBaseProducer::useGsfPfRecTracks_
protected