#include <PhysicsTools/RecoAlgos/interface/PhotonSelector.h>
Public Types | |
typedef reco::PhotonCollection | collection |
Public Member Functions | |
template<typename I> | |
void | cloneAndStore (const I &begin, const I &end, edm::Event &evt) |
PhotonCollectionStoreManager (const edm::Handle< reco::PhotonCollection > &) | |
edm::OrphanHandle < reco::PhotonCollection > | put (edm::Event &evt) |
size_t | size () const |
Private Attributes | |
std::auto_ptr < reco::PhotonCollection > | selPhotons_ |
std::auto_ptr < reco::SuperClusterCollection > | selSuperClusters_ |
Definition at line 21 of file PhotonSelector.h.
Definition at line 22 of file PhotonSelector.h.
helper::PhotonCollectionStoreManager::PhotonCollectionStoreManager | ( | const edm::Handle< reco::PhotonCollection > & | ) | [inline] |
Definition at line 23 of file PhotonSelector.h.
00023 : 00024 selPhotons_( new reco::PhotonCollection ), 00025 selSuperClusters_( new reco::SuperClusterCollection ) { 00026 }
void helper::PhotonCollectionStoreManager::cloneAndStore | ( | const I & | begin, | |
const I & | end, | |||
edm::Event & | evt | |||
) | [inline] |
Definition at line 28 of file PhotonSelector.h.
References I, i, configurableAnalysis::Photon, HcalSimpleRecAlgoImpl::reco(), selPhotons_, and selSuperClusters_.
00028 { 00029 using namespace reco; 00030 PhotonRefProd rPhotons = evt.template getRefBeforePut<PhotonCollection>(); 00031 SuperClusterRefProd rSuperClusters = evt.template getRefBeforePut<SuperClusterCollection>(); 00032 size_t idx = 0; 00033 for( I i = begin; i != end; ++ i ) { 00034 const Photon & ele = * * i; 00035 selPhotons_->push_back( Photon( ele ) ); 00036 selPhotons_->back().setSuperCluster( SuperClusterRef( rSuperClusters, idx ++ ) ); 00037 selSuperClusters_->push_back( SuperCluster( * ( ele.superCluster() ) ) ); 00038 } 00039 }
edm::OrphanHandle<reco::PhotonCollection> helper::PhotonCollectionStoreManager::put | ( | edm::Event & | evt | ) | [inline] |
Definition at line 40 of file PhotonSelector.h.
References h, edm::Event::put(), selPhotons_, and selSuperClusters_.
00040 { 00041 edm::OrphanHandle<reco::PhotonCollection> h = evt.put( selPhotons_ ); 00042 evt.put( selSuperClusters_ ); 00043 return h; 00044 }
size_t helper::PhotonCollectionStoreManager::size | ( | void | ) | const [inline] |
Definition at line 45 of file PhotonSelector.h.
References selPhotons_.
00045 { return selPhotons_->size(); }
std::auto_ptr<reco::PhotonCollection> helper::PhotonCollectionStoreManager::selPhotons_ [private] |
std::auto_ptr<reco::SuperClusterCollection> helper::PhotonCollectionStoreManager::selSuperClusters_ [private] |