CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloRecHitCandidate.cc
Go to the documentation of this file.
1 // $Id: CaloRecHitCandidate.cc,v 1.1 2006/11/14 10:38:07 llista Exp $
3 
4 using namespace reco;
5 
7 
9  return new CaloRecHitCandidate( * this );
10 }
11 
12 bool CaloRecHitCandidate::overlap( const Candidate & c ) const {
13  const CaloRecHitCandidate * o = dynamic_cast<const CaloRecHitCandidate *>( & c );
14  if ( o == 0 ) return false;
15  if ( caloRecHit().isNull() ) return false;
16  if ( o->caloRecHit().isNull() ) return false;
17  return ( caloRecHit() != o->caloRecHit() );
18 }
CaloRecHitRef caloRecHit() const
reference to a CaloRecHit
bool isNull() const
Checks for null.
Definition: RefToBase.h:270
virtual CaloRecHitCandidate * clone() const
returns a clone of the candidate
virtual bool overlap(const Candidate &) const
check overlap with another candidate
virtual ~CaloRecHitCandidate()
destructor
CaloRecHitCandidate()
default constructor