CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

reco::CandidateWithRef< Ref > Class Template Reference

#include <CandidateWithRef.h>

Inheritance diagram for reco::CandidateWithRef< Ref >:
reco::LeafCandidate reco::Candidate

List of all members.

Public Types

typedef Ref reference

Public Member Functions

 CandidateWithRef ()
 default constructor
 CandidateWithRef (const LorentzVector &p4, Charge q=0, const Point &vtx=Point(0, 0, 0))
 constructor from values
virtual CandidateWithRefclone () const
 returns a clone of the candidate
reference ref () const
 reference
void setRef (const Ref &r)
 set reference
virtual ~CandidateWithRef ()
 destructor

Private Member Functions

virtual bool overlap (const Candidate &) const
 check overlap with another candidate

Private Attributes

reference ref_
 reference to a CaloRecHit

Detailed Description

template<typename Ref>
class reco::CandidateWithRef< Ref >

Reco Candidates with a generic reference as component

Author:
Luca Lista, INFN
Version:
Id:
CandidateWithRef.h,v 1.2 2006/12/25 07:51:59 wmtan Exp

Definition at line 18 of file CandidateWithRef.h.


Member Typedef Documentation

template<typename Ref>
typedef Ref reco::CandidateWithRef< Ref >::reference

Definition at line 20 of file CandidateWithRef.h.


Constructor & Destructor Documentation

template<typename Ref>
reco::CandidateWithRef< Ref >::CandidateWithRef ( ) [inline]

default constructor

Definition at line 22 of file CandidateWithRef.h.

: LeafCandidate() { }
template<typename Ref>
reco::CandidateWithRef< Ref >::CandidateWithRef ( const LorentzVector p4,
Charge  q = 0,
const Point vtx = Point( 0, 0, 0 ) 
) [inline]

constructor from values

Definition at line 24 of file CandidateWithRef.h.

                                                                                                     :
      LeafCandidate( q, p4, vtx ) { }
template<typename Ref >
reco::CandidateWithRef< Ref >::~CandidateWithRef ( ) [virtual]

destructor

Definition at line 46 of file CandidateWithRef.h.

                                             { 
  }

Member Function Documentation

template<typename Ref >
CandidateWithRef< Ref > * reco::CandidateWithRef< Ref >::clone ( void  ) const [virtual]

returns a clone of the candidate

Reimplemented from reco::LeafCandidate.

Definition at line 50 of file CandidateWithRef.h.

                                                               {
    return new CandidateWithRef<Ref>( * this );
  }
template<typename Ref >
bool reco::CandidateWithRef< Ref >::overlap ( const Candidate c) const [private, virtual]

check overlap with another candidate

Reimplemented from reco::LeafCandidate.

Definition at line 55 of file CandidateWithRef.h.

References trackerHits::c, connectstrParser::o, and reco::CandidateWithRef< Ref >::ref().

                                                                   {
    const CandidateWithRef * o = dynamic_cast<const CandidateWithRef *>( & c );
    if ( o == 0 ) return false;
    if ( ref().isNull() ) return false;
    if ( o->ref().isNull() ) return false;
    return ( ref() != o->ref() );
  }
template<typename Ref>
reference reco::CandidateWithRef< Ref >::ref ( ) const [inline]

reference

Definition at line 33 of file CandidateWithRef.h.

References reco::CandidateWithRef< Ref >::ref_.

Referenced by reco::CandidateWithRef< Ref >::overlap().

{ return ref_; }
template<typename Ref>
void reco::CandidateWithRef< Ref >::setRef ( const Ref &  r) [inline]

set reference

Definition at line 31 of file CandidateWithRef.h.

References csvReporter::r, and reco::CandidateWithRef< Ref >::ref_.

{ ref_ = r; }

Member Data Documentation

template<typename Ref>
reference reco::CandidateWithRef< Ref >::ref_ [private]