test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions
pat::DuplicatedPhotonRemover Class Reference

#include <DuplicatedPhotonRemover.h>

Classes

struct  EqualBySuperCluster
 
struct  EqualBySuperClusterSeed
 

Public Member Functions

template<typename PhotonCollection >
std::auto_ptr< std::vector
< size_t > > 
duplicatesBySeed (const PhotonCollection &photons) const
 
std::auto_ptr< std::vector
< size_t > > 
duplicatesBySeed (const reco::PhotonCollection &photons) const
 
std::auto_ptr< std::vector
< size_t > > 
duplicatesBySeed (const edm::View< reco::Photon > &photons) const
 
template<typename PhotonCollection >
std::auto_ptr< std::vector
< size_t > > 
duplicatesBySuperCluster (const PhotonCollection &photons) const
 
std::auto_ptr< std::vector
< size_t > > 
duplicatesBySuperCluster (const edm::View< reco::Photon > &photons) const
 
std::auto_ptr< std::vector
< size_t > > 
duplicatesBySuperCluster (const reco::PhotonCollection &photons) const
 
template<typename PhotonCollection , typename ElectronCollection >
std::auto_ptr< pat::OverlapListelectronsBySeed (const PhotonCollection &photons, const ElectronCollection &electrons) const
 Indices of photons which happen to be also electrons (that is, they share the same SC seed) More...
 
std::auto_ptr< pat::OverlapListelectronsBySeed (const reco::PhotonCollection &photons, const reco::GsfElectronCollection &electrons) const
 
std::auto_ptr< pat::OverlapListelectronsBySeed (const edm::View< reco::Photon > &photons, const reco::GsfElectronCollection &electrons) const
 
std::auto_ptr< pat::OverlapListelectronsBySeed (const reco::PhotonCollection &photons, const edm::View< reco::GsfElectron > &electrons) const
 
std::auto_ptr< pat::OverlapListelectronsBySeed (const edm::View< reco::Photon > &photons, const edm::View< reco::GsfElectron > &electrons) const
 
template<typename PhotonCollection , typename ElectronCollection >
std::auto_ptr< pat::OverlapListelectronsBySuperCluster (const PhotonCollection &photons, const ElectronCollection &electrons) const
 Indices of photons which happen to be also electrons (that is, they share the same SC) More...
 
std::auto_ptr< pat::OverlapListelectronsBySuperCluster (const edm::View< reco::Photon > &photons, const reco::GsfElectronCollection &electrons) const
 
std::auto_ptr< pat::OverlapListelectronsBySuperCluster (const reco::PhotonCollection &photons, const reco::GsfElectronCollection &electrons) const
 
std::auto_ptr< pat::OverlapListelectronsBySuperCluster (const edm::View< reco::Photon > &photons, const edm::View< reco::GsfElectron > &electrons) const
 
std::auto_ptr< pat::OverlapListelectronsBySuperCluster (const reco::PhotonCollection &photons, const edm::View< reco::GsfElectron > &electrons) const
 

Detailed Description

Definition at line 18 of file DuplicatedPhotonRemover.h.

Member Function Documentation

template<typename PhotonCollection >
std::auto_ptr< std::vector< size_t > > pat::DuplicatedPhotonRemover::duplicatesBySeed ( const PhotonCollection photons) const

Indices of duplicated photons (same supercluster) to remove. It keeps the photons with highest energy. PhotonCollection can be anything that has a "begin()" and "end()", and that hold things which have a "superCluster()" method notable examples are std::vector<Photon> and edm::View<Photon> (but GsfElectrons work too)

Definition at line 93 of file DuplicatedPhotonRemover.h.

References pat::GenericDuplicateRemover< Comparator, Arbitrator >::duplicates().

93  {
94  typedef typename PhotonCollection::value_type PhotonType;
96  return dups.duplicates(photons);
97 }
std::auto_ptr< std::vector< size_t > > duplicates(const Collection &items) const
std::auto_ptr< std::vector<size_t> > pat::DuplicatedPhotonRemover::duplicatesBySeed ( const reco::PhotonCollection photons) const
std::auto_ptr< std::vector< size_t > > pat::DuplicatedPhotonRemover::duplicatesBySeed ( const edm::View< reco::Photon > &  photons) const

Definition at line 11 of file DuplicatedPhotonRemover.cc.

References interactiveExample::photons.

11  {
12  return duplicatesBySeed< edm::View<reco::Photon> >(photons);
13 }
template<typename PhotonCollection >
std::auto_ptr< std::vector< size_t > > pat::DuplicatedPhotonRemover::duplicatesBySuperCluster ( const PhotonCollection photons) const

Indices of duplicated photons (same supercluster) to remove. It keeps the photons with highest energy. PhotonCollection can be anything that has a "begin()" and "end()", and that hold things which have a "superCluster()" method notable examples are std::vector<Photon> and edm::View<Photon> (but GsfElectrons work too)

Definition at line 85 of file DuplicatedPhotonRemover.h.

References pat::GenericDuplicateRemover< Comparator, Arbitrator >::duplicates().

85  {
86  typedef typename PhotonCollection::value_type PhotonType;
88  return dups.duplicates(photons);
89 }
std::auto_ptr< std::vector< size_t > > duplicates(const Collection &items) const
std::auto_ptr< std::vector< size_t > > pat::DuplicatedPhotonRemover::duplicatesBySuperCluster ( const edm::View< reco::Photon > &  photons) const

Definition at line 21 of file DuplicatedPhotonRemover.cc.

References interactiveExample::photons.

21  {
22  return duplicatesBySuperCluster< edm::View<reco::Photon> >(photons);
23 }
std::auto_ptr< std::vector<size_t> > pat::DuplicatedPhotonRemover::duplicatesBySuperCluster ( const reco::PhotonCollection photons) const
template<typename PhotonCollection , typename ElectronCollection >
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySeed ( const PhotonCollection photons,
const ElectronCollection electrons 
) const

Indices of photons which happen to be also electrons (that is, they share the same SC seed)

Indices of photons which happen to be also electrons (that is, they share the same SC)

Definition at line 110 of file DuplicatedPhotonRemover.h.

References pat::GenericOverlapFinder< Distance >::find().

110  {
112  return ovl.find(photons, electrons);
113 }
std::auto_ptr< OverlapList > find(const Collection &items, const OtherCollection &other) const
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySeed ( const reco::PhotonCollection photons,
const reco::GsfElectronCollection electrons 
) const

Definition at line 28 of file DuplicatedPhotonRemover.cc.

References HI_PhotonSkim_cff::electrons, and interactiveExample::photons.

29  {
30  return electronsBySeed<reco::PhotonCollection, reco::GsfElectronCollection>(photons, electrons);
31 }
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySeed ( const edm::View< reco::Photon > &  photons,
const reco::GsfElectronCollection electrons 
) const

Definition at line 34 of file DuplicatedPhotonRemover.cc.

References HI_PhotonSkim_cff::electrons, and interactiveExample::photons.

35  {
36  return electronsBySeed<edm::View<reco::Photon>, reco::GsfElectronCollection>(photons, electrons);
37 }
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySeed ( const reco::PhotonCollection photons,
const edm::View< reco::GsfElectron > &  electrons 
) const

Definition at line 53 of file DuplicatedPhotonRemover.cc.

References HI_PhotonSkim_cff::electrons, and interactiveExample::photons.

54  {
55  return electronsBySeed<reco::PhotonCollection, edm::View<reco::GsfElectron> >(photons, electrons);
56 }
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySeed ( const edm::View< reco::Photon > &  photons,
const edm::View< reco::GsfElectron > &  electrons 
) const

Definition at line 59 of file DuplicatedPhotonRemover.cc.

References HI_PhotonSkim_cff::electrons, and interactiveExample::photons.

60  {
61  return electronsBySeed<edm::View<reco::Photon>, edm::View<reco::GsfElectron> >(photons, electrons);
62 }
template<typename PhotonCollection , typename ElectronCollection >
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySuperCluster ( const PhotonCollection photons,
const ElectronCollection electrons 
) const

Indices of photons which happen to be also electrons (that is, they share the same SC)

Definition at line 102 of file DuplicatedPhotonRemover.h.

References pat::GenericOverlapFinder< Distance >::find().

102  {
104  return ovl.find(photons, electrons);
105 }
std::auto_ptr< OverlapList > find(const Collection &items, const OtherCollection &other) const
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySuperCluster ( const edm::View< reco::Photon > &  photons,
const reco::GsfElectronCollection electrons 
) const

Definition at line 40 of file DuplicatedPhotonRemover.cc.

References HI_PhotonSkim_cff::electrons, and interactiveExample::photons.

41  {
42  return electronsBySuperCluster<edm::View<reco::Photon>, reco::GsfElectronCollection>(photons, electrons);
43 }
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySuperCluster ( const reco::PhotonCollection photons,
const reco::GsfElectronCollection electrons 
) const

Definition at line 46 of file DuplicatedPhotonRemover.cc.

References HI_PhotonSkim_cff::electrons, and interactiveExample::photons.

47  {
48  return electronsBySuperCluster<reco::PhotonCollection, reco::GsfElectronCollection>(photons, electrons);
49 }
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySuperCluster ( const edm::View< reco::Photon > &  photons,
const edm::View< reco::GsfElectron > &  electrons 
) const

Definition at line 65 of file DuplicatedPhotonRemover.cc.

References HI_PhotonSkim_cff::electrons, and interactiveExample::photons.

66  {
67  return electronsBySuperCluster<edm::View<reco::Photon>, edm::View<reco::GsfElectron> >(photons, electrons);
68 }
std::auto_ptr< pat::OverlapList > pat::DuplicatedPhotonRemover::electronsBySuperCluster ( const reco::PhotonCollection photons,
const edm::View< reco::GsfElectron > &  electrons 
) const

Definition at line 71 of file DuplicatedPhotonRemover.cc.

References HI_PhotonSkim_cff::electrons, and interactiveExample::photons.

72  {
73  return electronsBySuperCluster<reco::PhotonCollection, edm::View<reco::GsfElectron> >(photons, electrons);
74 }