CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions
CandMatcher< C1, C2 > Class Template Reference

#include <CandMatcher.h>

Inheritance diagram for CandMatcher< C1, C2 >:
CandMatcherBase< C1, C2 >

Public Member Functions

 CandMatcher (const typename CandMatcherBase< C1, C2 >::map_vector &maps)
 constructor More...
 
 CandMatcher (const typename CandMatcherBase< C1, C2 >::map_type &map)
 constructor More...
 
virtual ~CandMatcher ()
 destructor More...
 
- Public Member Functions inherited from CandMatcherBase< C1, C2 >
 CandMatcherBase (const map_vector &maps)
 constructor More...
 
 CandMatcherBase (const map_type &map)
 constructor More...
 
ref_type operator() (const reco::Candidate &) const
 get match from transient reference More...
 
virtual ~CandMatcherBase ()
 destructor More...
 

Protected Member Functions

virtual bool compositePreselect (const reco::Candidate &c, const reco::Candidate &m) const
 composite candidate preselection More...
 
virtual std::vector< const reco::Candidate * > getDaughters (const reco::Candidate *) const
 get ultimate daughter (get all in the general case) More...
 
- Protected Member Functions inherited from CandMatcherBase< C1, C2 >
void initMaps ()
 init maps More...
 
const std::vector< const map_type * > & maps () const
 

Additional Inherited Members

- Public Types inherited from CandMatcherBase< C1, C2 >
typedef reco::helper::CandMapTrait< C1, C2 >::type map_type
 map type More...
 
typedef std::vector< const map_type * > map_vector
 map vector More...
 
typedef reco::helper::CandRefTrait< C2 >::ref_type ref_type
 ref type More...
 
typedef map_type::key_type reference_type
 concrete candidate reference type More...
 
typedef reco::helper::CandRefTrait< C2 >::refProd_type refProd_type
 refProd type More...
 
typedef reference_type::value_type value_type
 concrete candidate reference type More...
 

Detailed Description

template<typename C1, typename C2 = C1>
class CandMatcher< C1, C2 >

Definition at line 69 of file CandMatcher.h.

Constructor & Destructor Documentation

template<typename C1 , typename C2 >
CandMatcher< C1, C2 >::CandMatcher ( const typename CandMatcherBase< C1, C2 >::map_vector maps)
explicit

constructor

Definition at line 211 of file CandMatcher.h.

References CandMatcherBase< C1, C2 >::initMaps().

211  :
214 }
const std::vector< const map_type * > & maps() const
Definition: CandMatcher.h:48
void initMaps()
init maps
Definition: CandMatcher.h:114
template<typename C1 , typename C2 >
CandMatcher< C1, C2 >::CandMatcher ( const typename CandMatcherBase< C1, C2 >::map_type map)
explicit

constructor

Definition at line 217 of file CandMatcher.h.

References CandMatcherBase< C1, C2 >::initMaps().

template<typename C1 , typename C2 >
CandMatcher< C1, C2 >::~CandMatcher ( )
virtual

destructor

Definition at line 223 of file CandMatcher.h.

223  {
224 }

Member Function Documentation

template<typename C1 , typename C2 >
bool CandMatcher< C1, C2 >::compositePreselect ( const reco::Candidate c,
const reco::Candidate m 
) const
protectedvirtual

composite candidate preselection

Implements CandMatcherBase< C1, C2 >.

Definition at line 234 of file CandMatcher.h.

References reco::Candidate::numberOfDaughters().

234  {
235  // By default, check that the number of daughters is identical
236  return( c.numberOfDaughters() == m.numberOfDaughters() );
237 }
virtual size_type numberOfDaughters() const =0
number of daughters
template<typename C1 , typename C2 >
std::vector< const reco::Candidate * > CandMatcher< C1, C2 >::getDaughters ( const reco::Candidate c) const
protectedvirtual

get ultimate daughter (get all in the general case)

Implements CandMatcherBase< C1, C2 >.

Definition at line 227 of file CandMatcher.h.

References findQualityFiles::v.

227  {
228  std::vector<const reco::Candidate *> v;
229  v.push_back( c );
230  return v;
231 }