CMS 3D CMS Logo

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

reco::ShallowCloneCandidate Class Reference

#include <ShallowCloneCandidate.h>

Inheritance diagram for reco::ShallowCloneCandidate:
reco::LeafCandidate reco::Candidate

List of all members.

Public Types

typedef CandidateCollection daughters
 collection of daughter candidates

Public Member Functions

virtual const_iterator begin () const
 first daughter const_iterator
virtual iterator begin ()
 first daughter iterator
virtual ShallowCloneCandidateclone () const
 returns a clone of the Candidate object
virtual const Candidatedaughter (size_type i) const
 return daughter at a given position (throws an exception)
virtual Candidatedaughter (size_type i)
 return daughter at a given position (throws an exception)
virtual const_iterator end () const
 last daughter const_iterator
virtual iterator end ()
 last daughter iterator
virtual bool hasMasterClone () const
 has master clone
virtual bool isCaloMuon () const
virtual bool isConvertedPhoton () const
virtual bool isElectron () const
virtual bool isGlobalMuon () const
virtual bool isJet () const
virtual bool isMuon () const
virtual bool isPhoton () const
virtual bool isStandAloneMuon () const
virtual bool isTrackerMuon () const
virtual const CandidateBaseRefmasterClone () const
 returns reference to master clone
virtual const Candidatemother (size_type i) const
 return daughter at a given position (throws an exception)
virtual size_t numberOfDaughters () const
 number of daughters
virtual size_t numberOfMothers () const
 number of daughters
 ShallowCloneCandidate (const CandidateBaseRef &masterClone, Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0))
 constructor from values
 ShallowCloneCandidate ()
 default constructor
 ShallowCloneCandidate (const CandidateBaseRef &masterClone)
 constructor from Particle
 ShallowCloneCandidate (const CandidateBaseRef &masterClone, Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0))
 constructor from values
virtual ~ShallowCloneCandidate ()
 destructor

Private Types

typedef
candidate::const_iterator_imp_specific
< daughters
const_iterator_imp_specific
typedef
candidate::iterator_imp_specific
< daughters
iterator_imp_specific

Private Member Functions

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

Private Attributes

CandidateBaseRef masterClone_
 CandidateBaseReference to master clone.

Detailed Description

shallow clone of a particle candidate keepint a reference to the master clone

Author:
Luca Lista, INFN
Version:
Id:
ShallowCloneCandidate.h,v 1.17 2009/11/02 21:46:53 srappocc Exp

Definition at line 17 of file ShallowCloneCandidate.h.


Member Typedef Documentation

Reimplemented from reco::LeafCandidate.

Definition at line 77 of file ShallowCloneCandidate.h.

collection of daughter candidates

Reimplemented from reco::LeafCandidate.

Definition at line 20 of file ShallowCloneCandidate.h.

Reimplemented from reco::LeafCandidate.

Definition at line 79 of file ShallowCloneCandidate.h.


Constructor & Destructor Documentation

reco::ShallowCloneCandidate::ShallowCloneCandidate ( ) [inline]

default constructor

Definition at line 22 of file ShallowCloneCandidate.h.

Referenced by clone().

: LeafCandidate() {  }
reco::ShallowCloneCandidate::ShallowCloneCandidate ( const CandidateBaseRef masterClone) [inline, explicit]

constructor from Particle

Definition at line 24 of file ShallowCloneCandidate.h.

                                                                           : 
      LeafCandidate( * masterClone ), 
      masterClone_( masterClone->hasMasterClone() ? 
                    masterClone->masterClone() : 
                    masterClone ) { 
    }
reco::ShallowCloneCandidate::ShallowCloneCandidate ( const CandidateBaseRef masterClone,
Charge  q,
const LorentzVector p4,
const Point vtx = Point( 0, 0, 0 ) 
) [inline]

constructor from values

Definition at line 31 of file ShallowCloneCandidate.h.

reco::ShallowCloneCandidate::ShallowCloneCandidate ( const CandidateBaseRef masterClone,
Charge  q,
const PolarLorentzVector p4,
const Point vtx = Point( 0, 0, 0 ) 
) [inline]

constructor from values

Definition at line 35 of file ShallowCloneCandidate.h.

ShallowCloneCandidate::~ShallowCloneCandidate ( ) [virtual]

destructor

Definition at line 4 of file ShallowCloneCandidate.cc.

                                              { 
}

Member Function Documentation

ShallowCloneCandidate::const_iterator ShallowCloneCandidate::begin ( void  ) const [virtual]

first daughter const_iterator

Reimplemented from reco::LeafCandidate.

Definition at line 11 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                                       { 
  return masterClone_->begin(); 
}
Candidate::iterator ShallowCloneCandidate::begin ( void  ) [virtual]

first daughter iterator

Reimplemented from reco::LeafCandidate.

Definition at line 19 of file ShallowCloneCandidate.cc.

                                               { 
  return iterator( new iterator_imp_specific ); 
}
ShallowCloneCandidate * ShallowCloneCandidate::clone ( void  ) const [virtual]

returns a clone of the Candidate object

Reimplemented from reco::LeafCandidate.

Definition at line 7 of file ShallowCloneCandidate.cc.

References ShallowCloneCandidate().

                                                           { 
  return new ShallowCloneCandidate( *this ); 
}
const Candidate * ShallowCloneCandidate::daughter ( size_type  i) const [virtual]

return daughter at a given position (throws an exception)

Reimplemented from reco::LeafCandidate.

Definition at line 35 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                                     { 
  return masterClone_->daughter( i ); 
}
Candidate * ShallowCloneCandidate::daughter ( size_type  i) [virtual]

return daughter at a given position (throws an exception)

Reimplemented from reco::LeafCandidate.

Definition at line 43 of file ShallowCloneCandidate.cc.

                                                         { 
  return 0;
}
Candidate::iterator ShallowCloneCandidate::end ( void  ) [virtual]

last daughter iterator

Reimplemented from reco::LeafCandidate.

Definition at line 23 of file ShallowCloneCandidate.cc.

                                             { 
  return iterator( new iterator_imp_specific ); 
}
ShallowCloneCandidate::const_iterator ShallowCloneCandidate::end ( void  ) const [virtual]

last daughter const_iterator

Reimplemented from reco::LeafCandidate.

Definition at line 15 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                                     { 
  return masterClone_->end(); 
}
bool ShallowCloneCandidate::hasMasterClone ( ) const [virtual]

has master clone

Reimplemented from reco::LeafCandidate.

Definition at line 47 of file ShallowCloneCandidate.cc.

                                                 {
  return true;
}
bool ShallowCloneCandidate::isCaloMuon ( ) const [virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 75 of file ShallowCloneCandidate.cc.

References masterClone_.

                                             { 
  return masterClone_->isCaloMuon(); 
}
bool ShallowCloneCandidate::isConvertedPhoton ( ) const [virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 83 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                    { 
  return masterClone_->isConvertedPhoton(); 
}
bool ShallowCloneCandidate::isElectron ( ) const [virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 55 of file ShallowCloneCandidate.cc.

References masterClone_.

                                             { 
  return masterClone_->isElectron(); 
}
bool ShallowCloneCandidate::isGlobalMuon ( ) const [virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 63 of file ShallowCloneCandidate.cc.

References masterClone_.

                                               { 
  return masterClone_->isGlobalMuon(); 
}
bool ShallowCloneCandidate::isJet ( ) const [virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 87 of file ShallowCloneCandidate.cc.

References masterClone_.

                                        { 
  return masterClone_->isJet(); 
}
bool ShallowCloneCandidate::isMuon ( ) const [virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 59 of file ShallowCloneCandidate.cc.

References masterClone_.

                                         { 
  return masterClone_->isMuon(); 
}
bool ShallowCloneCandidate::isPhoton ( ) const [virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 79 of file ShallowCloneCandidate.cc.

References masterClone_.

                                           { 
  return masterClone_->isPhoton(); 
}
bool ShallowCloneCandidate::isStandAloneMuon ( ) const [virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 67 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                   { 
  return masterClone_->isStandAloneMuon(); 
}
bool ShallowCloneCandidate::isTrackerMuon ( ) const [virtual]

Reimplemented from reco::LeafCandidate.

Definition at line 71 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                { 
  return masterClone_->isTrackerMuon(); 
}
const CandidateBaseRef & ShallowCloneCandidate::masterClone ( ) const [virtual]

returns reference to master clone

Reimplemented from reco::LeafCandidate.

Definition at line 51 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                                  {
  return masterClone_;
}
const Candidate * ShallowCloneCandidate::mother ( size_type  i) const [virtual]

return daughter at a given position (throws an exception)

Reimplemented from reco::LeafCandidate.

Definition at line 39 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                                   { 
  return masterClone_->mother( i ); 
}
size_t ShallowCloneCandidate::numberOfDaughters ( ) const [virtual]

number of daughters

Reimplemented from reco::LeafCandidate.

Definition at line 27 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                      { 
  return masterClone_->numberOfDaughters(); 
}
size_t ShallowCloneCandidate::numberOfMothers ( ) const [virtual]

number of daughters

Reimplemented from reco::LeafCandidate.

Definition at line 31 of file ShallowCloneCandidate.cc.

References masterClone_.

                                                    { 
  return masterClone_->numberOfMothers(); 
}
virtual bool reco::ShallowCloneCandidate::overlap ( const Candidate c) const [inline, private, virtual]

check overlap with another Candidate

Reimplemented from reco::LeafCandidate.

Definition at line 81 of file ShallowCloneCandidate.h.

References masterClone_.

{ return masterClone_->overlap( c ); }

Member Data Documentation