#include <GsfElectronSelector.h>
Public Types | |
typedef reco::GsfElectronCollection | collection |
Public Member Functions | |
template<typename I > | |
void | cloneAndStore (const I &begin, const I &end, edm::Event &evt) |
GsfElectronCollectionStoreManager (const edm::Handle< reco::GsfElectronCollection > &) | |
edm::OrphanHandle < reco::GsfElectronCollection > | put (edm::Event &evt) |
size_t | size () const |
Private Attributes | |
std::auto_ptr < reco::GsfElectronCoreCollection > | selElectronCores_ |
std::auto_ptr < reco::GsfElectronCollection > | selElectrons_ |
std::auto_ptr < reco::GsfTrackExtraCollection > | selGsfTrackExtras_ |
std::auto_ptr < TrackingRecHitCollection > | selHits_ |
std::auto_ptr < reco::SuperClusterCollection > | selSuperClusters_ |
std::auto_ptr < reco::TrackExtraCollection > | selTrackExtras_ |
std::auto_ptr < reco::GsfTrackCollection > | selTracks_ |
Definition at line 25 of file GsfElectronSelector.h.
Definition at line 26 of file GsfElectronSelector.h.
helper::GsfElectronCollectionStoreManager::GsfElectronCollectionStoreManager | ( | const edm::Handle< reco::GsfElectronCollection > & | ) | [inline] |
Definition at line 27 of file GsfElectronSelector.h.
: selElectrons_( new reco::GsfElectronCollection ), selElectronCores_ (new reco::GsfElectronCoreCollection ) , selSuperClusters_( new reco::SuperClusterCollection ), selTracks_( new reco::GsfTrackCollection ), selTrackExtras_( new reco::TrackExtraCollection ), selGsfTrackExtras_( new reco::GsfTrackExtraCollection ), selHits_( new TrackingRecHitCollection ) { }
void helper::GsfElectronCollectionStoreManager::cloneAndStore | ( | const I & | begin, |
const I & | end, | ||
edm::Event & | evt | ||
) | [inline] |
Definition at line 37 of file GsfElectronSelector.h.
References reco::TrackExtraBase::add(), reco::GsfElectron::core(), end, reco::GsfTrack::gsfExtra(), reco::GsfElectron::gsfTrack(), Exhume::I, i, reco::Track::innerDetId(), reco::Track::innerMomentum(), reco::Track::innerOk(), reco::Track::innerPosition(), reco::Track::innerStateCovariance(), edm::Ref< C, T, F >::isNonnull(), reco::Track::outerDetId(), reco::Track::outerMomentum(), reco::Track::outerOk(), reco::Track::outerPosition(), reco::Track::outerStateCovariance(), reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), dt_dqm_sourceclient_common_cff::reco, reco::Track::seedDirection(), selElectronCores_, selElectrons_, selGsfTrackExtras_, selHits_, selSuperClusters_, selTrackExtras_, selTracks_, reco::Track::setExtra(), reco::GsfTrack::setGsfExtra(), and reco::GsfElectron::superCluster().
{ using namespace reco; TrackingRecHitRefProd rHits = evt.template getRefBeforePut<TrackingRecHitCollection>(); TrackExtraRefProd rTrackExtras = evt.template getRefBeforePut<TrackExtraCollection>(); GsfTrackExtraRefProd rGsfTrackExtras = evt.template getRefBeforePut<GsfTrackExtraCollection>(); GsfTrackRefProd rTracks = evt.template getRefBeforePut<GsfTrackCollection>(); GsfElectronCoreRefProd rElectronCores = evt.template getRefBeforePut<GsfElectronCoreCollection>(); GsfElectronRefProd rElectrons = evt.template getRefBeforePut<GsfElectronCollection>(); SuperClusterRefProd rSuperClusters = evt.template getRefBeforePut<SuperClusterCollection>(); size_t idx = 0, tidx = 0, hidx = 0; for( I i = begin; i != end; ++ i ) { const GsfElectron & ele = * * i; selElectronCores_->push_back( GsfElectronCore( *(ele.core()) ) ); selElectronCores_->back().setGsfTrack( GsfTrackRef( rTracks, idx ) ); selElectronCores_->back().setSuperCluster( SuperClusterRef( rSuperClusters, idx ) ); selSuperClusters_->push_back( SuperCluster( * ( ele.superCluster() ) ) ); selElectrons_->push_back(GsfElectron(ele,GsfElectronCoreRef(rElectronCores,idx++),CaloClusterPtr(),TrackRef(),TrackBaseRef(),GsfTrackRefVector())); GsfTrackRef trkRef = ele.gsfTrack(); if ( trkRef.isNonnull() ) { selTracks_->push_back( GsfTrack( * trkRef ) ); GsfTrack & trk = selTracks_->back(); selTrackExtras_->push_back( TrackExtra( trk.outerPosition(), trk.outerMomentum(), trk.outerOk(), trk.innerPosition(), trk.innerMomentum(), trk.innerOk(), trk.outerStateCovariance(), trk.outerDetId(), trk.innerStateCovariance(), trk.innerDetId(), trk.seedDirection() ) ); selGsfTrackExtras_->push_back( GsfTrackExtra( *(trk.gsfExtra()) ) ); TrackExtra & tx = selTrackExtras_->back(); for( trackingRecHit_iterator hit = trk.recHitsBegin(); hit != trk.recHitsEnd(); ++ hit ) { selHits_->push_back( (*hit)->clone() ); tx.add( TrackingRecHitRef( rHits, hidx ++ ) ); } trk.setGsfExtra( GsfTrackExtraRef( rGsfTrackExtras, tidx ) ); trk.setExtra( TrackExtraRef( rTrackExtras, tidx ++ ) ); } } }
edm::OrphanHandle<reco::GsfElectronCollection> helper::GsfElectronCollectionStoreManager::put | ( | edm::Event & | evt | ) | [inline] |
Definition at line 75 of file GsfElectronSelector.h.
References h, edm::Event::put(), selElectronCores_, selElectrons_, selGsfTrackExtras_, selHits_, selSuperClusters_, selTrackExtras_, and selTracks_.
{ edm::OrphanHandle<reco::GsfElectronCollection> h = evt.put( selElectrons_ ); evt.put( selElectronCores_ ); evt.put( selSuperClusters_ ); evt.put( selTracks_ ); evt.put( selTrackExtras_ ); evt.put( selGsfTrackExtras_ ); evt.put( selHits_ ); return h; }
size_t helper::GsfElectronCollectionStoreManager::size | ( | void | ) | const [inline] |
Definition at line 86 of file GsfElectronSelector.h.
References selElectrons_.
{ return selElectrons_->size(); }
std::auto_ptr<reco::GsfElectronCoreCollection> helper::GsfElectronCollectionStoreManager::selElectronCores_ [private] |
Definition at line 89 of file GsfElectronSelector.h.
Referenced by cloneAndStore(), and put().
std::auto_ptr<reco::GsfElectronCollection> helper::GsfElectronCollectionStoreManager::selElectrons_ [private] |
Definition at line 88 of file GsfElectronSelector.h.
Referenced by cloneAndStore(), put(), and size().
std::auto_ptr<reco::GsfTrackExtraCollection> helper::GsfElectronCollectionStoreManager::selGsfTrackExtras_ [private] |
Definition at line 93 of file GsfElectronSelector.h.
Referenced by cloneAndStore(), and put().
std::auto_ptr<TrackingRecHitCollection> helper::GsfElectronCollectionStoreManager::selHits_ [private] |
Definition at line 94 of file GsfElectronSelector.h.
Referenced by cloneAndStore(), and put().
std::auto_ptr<reco::SuperClusterCollection> helper::GsfElectronCollectionStoreManager::selSuperClusters_ [private] |
Definition at line 90 of file GsfElectronSelector.h.
Referenced by cloneAndStore(), and put().
std::auto_ptr<reco::TrackExtraCollection> helper::GsfElectronCollectionStoreManager::selTrackExtras_ [private] |
Definition at line 92 of file GsfElectronSelector.h.
Referenced by cloneAndStore(), and put().
std::auto_ptr<reco::GsfTrackCollection> helper::GsfElectronCollectionStoreManager::selTracks_ [private] |
Definition at line 91 of file GsfElectronSelector.h.
Referenced by cloneAndStore(), and put().