CMS 3D CMS Logo

CaloRecHitCandidate.cc
Go to the documentation of this file.
2 
3 using namespace reco;
4 
6 
8  return new CaloRecHitCandidate( * this );
9 }
10 
11 bool CaloRecHitCandidate::overlap( const Candidate & c ) const {
12  const CaloRecHitCandidate * o = dynamic_cast<const CaloRecHitCandidate *>( & c );
13  if ( o == nullptr ) return false;
14  if ( caloRecHit().isNull() ) return false;
15  if ( o->caloRecHit().isNull() ) return false;
16  return ( caloRecHit() != o->caloRecHit() );
17 }
CaloRecHitRef caloRecHit() const
reference to a CaloRecHit
bool isNull() const
Checks for null.
Definition: RefToBase.h:328
CaloRecHitCandidate()
default constructor
CaloRecHitCandidate * clone() const override
returns a clone of the candidate
bool overlap(const Candidate &) const override
check overlap with another candidate
fixed size matrix
~CaloRecHitCandidate() override
destructor