CMS 3D CMS Logo

reco::ShallowCloneCandidate Class Reference

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

#include <DataFormats/Candidate/interface/ShallowCloneCandidate.h>

Inheritance diagram for reco::ShallowCloneCandidate:

reco::Candidate reco::Particle

List of all members.

Public Types

typedef CandidateCollection daughters
 collection of daughter candidates

Public Member Functions

virtual iterator begin ()
 first daughter iterator
virtual const_iterator begin () const
 first daughter const_iterator
virtual ShallowCloneCandidateclone () const
 returns a clone of the Candidate object
virtual Candidatedaughter (size_type i)
 return daughter at a given position (throws an exception)
virtual const Candidatedaughter (size_type i) const
 return daughter at a given position (throws an exception)
virtual iterator end ()
 last daughter iterator
virtual const_iterator end () const
 last daughter const_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 PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0))
 constructor from values
 ShallowCloneCandidate (const CandidateBaseRef &masterClone, Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0))
 constructor from values
 ShallowCloneCandidate (const CandidateBaseRef &masterClone)
 constructor from Particle
 ShallowCloneCandidate ()
 default constructor
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.15 2008/04/21 14:04:27 llista Exp

Definition at line 17 of file ShallowCloneCandidate.h.


Member Typedef Documentation

typedef candidate::const_iterator_imp_specific<daughters> reco::ShallowCloneCandidate::const_iterator_imp_specific [private]

Definition at line 76 of file ShallowCloneCandidate.h.

typedef CandidateCollection reco::ShallowCloneCandidate::daughters

collection of daughter candidates

Definition at line 20 of file ShallowCloneCandidate.h.

typedef candidate::iterator_imp_specific<daughters> reco::ShallowCloneCandidate::iterator_imp_specific [private]

Definition at line 78 of file ShallowCloneCandidate.h.


Constructor & Destructor Documentation

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

default constructor

Definition at line 22 of file ShallowCloneCandidate.h.

Referenced by clone().

00022 : Candidate() {  }

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

constructor from Particle

Definition at line 24 of file ShallowCloneCandidate.h.

00024                                                                            : 
00025       Candidate( * masterClone ), 
00026       masterClone_( masterClone->hasMasterClone() ? 
00027                     masterClone->masterClone() : 
00028                     masterClone ) { 
00029     }

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.

00032                                                                                                       : 
00033       Candidate( q, p4, vtx ), masterClone_( masterClone ) { }

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.

00036                                                                                                            : 
00037       Candidate( q, p4, vtx ), masterClone_( masterClone ) { }

ShallowCloneCandidate::~ShallowCloneCandidate (  )  [virtual]

destructor

Definition at line 4 of file ShallowCloneCandidate.cc.

00004                                               { 
00005 }


Member Function Documentation

Candidate::iterator ShallowCloneCandidate::begin (  )  [virtual]

first daughter iterator

Implements reco::Candidate.

Definition at line 19 of file ShallowCloneCandidate.cc.

00019                                                { 
00020   return iterator( new iterator_imp_specific ); 
00021 }

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

first daughter const_iterator

Implements reco::Candidate.

Definition at line 11 of file ShallowCloneCandidate.cc.

References masterClone_.

00011                                                                        { 
00012   return masterClone_->begin(); 
00013 }

ShallowCloneCandidate * ShallowCloneCandidate::clone ( void   )  const [virtual]

returns a clone of the Candidate object

Implements reco::Candidate.

Definition at line 7 of file ShallowCloneCandidate.cc.

References ShallowCloneCandidate().

00007                                                            { 
00008   return new ShallowCloneCandidate( *this ); 
00009 }

Candidate * ShallowCloneCandidate::daughter ( size_type  i  )  [virtual]

return daughter at a given position (throws an exception)

Definition at line 43 of file ShallowCloneCandidate.cc.

00043                                                          { 
00044   return 0;
00045 }

const Candidate * ShallowCloneCandidate::daughter ( size_type  i  )  const [virtual]

return daughter at a given position (throws an exception)

Definition at line 35 of file ShallowCloneCandidate.cc.

References masterClone_.

00035                                                                      { 
00036   return masterClone_->daughter( i ); 
00037 }

Candidate::iterator ShallowCloneCandidate::end (  )  [virtual]

last daughter iterator

Implements reco::Candidate.

Definition at line 23 of file ShallowCloneCandidate.cc.

00023                                              { 
00024   return iterator( new iterator_imp_specific ); 
00025 }

ShallowCloneCandidate::const_iterator ShallowCloneCandidate::end (  )  const [virtual]

last daughter const_iterator

Implements reco::Candidate.

Definition at line 15 of file ShallowCloneCandidate.cc.

References masterClone_.

00015                                                                      { 
00016   return masterClone_->end(); 
00017 }

bool ShallowCloneCandidate::hasMasterClone (  )  const [virtual]

has master clone

Reimplemented from reco::Candidate.

Definition at line 47 of file ShallowCloneCandidate.cc.

00047                                                  {
00048   return true;
00049 }

bool ShallowCloneCandidate::isCaloMuon (  )  const [virtual]

Reimplemented from reco::Candidate.

Definition at line 75 of file ShallowCloneCandidate.cc.

References masterClone_.

00075                                              { 
00076   return masterClone_->isCaloMuon(); 
00077 }

bool ShallowCloneCandidate::isConvertedPhoton (  )  const [virtual]

Reimplemented from reco::Candidate.

Definition at line 83 of file ShallowCloneCandidate.cc.

References masterClone_.

00083                                                     { 
00084   return masterClone_->isConvertedPhoton(); 
00085 }

bool ShallowCloneCandidate::isElectron (  )  const [virtual]

Reimplemented from reco::Candidate.

Definition at line 55 of file ShallowCloneCandidate.cc.

References masterClone_.

00055                                              { 
00056   return masterClone_->isElectron(); 
00057 }

bool ShallowCloneCandidate::isGlobalMuon (  )  const [virtual]

Reimplemented from reco::Candidate.

Definition at line 63 of file ShallowCloneCandidate.cc.

References masterClone_.

00063                                                { 
00064   return masterClone_->isGlobalMuon(); 
00065 }

bool ShallowCloneCandidate::isJet (  )  const [virtual]

Reimplemented from reco::Candidate.

Definition at line 87 of file ShallowCloneCandidate.cc.

References masterClone_.

00087                                         { 
00088   return masterClone_->isJet(); 
00089 }

bool ShallowCloneCandidate::isMuon (  )  const [virtual]

Reimplemented from reco::Candidate.

Definition at line 59 of file ShallowCloneCandidate.cc.

References masterClone_.

00059                                          { 
00060   return masterClone_->isMuon(); 
00061 }

bool ShallowCloneCandidate::isPhoton (  )  const [virtual]

Reimplemented from reco::Candidate.

Definition at line 79 of file ShallowCloneCandidate.cc.

References masterClone_.

00079                                            { 
00080   return masterClone_->isPhoton(); 
00081 }

bool ShallowCloneCandidate::isStandAloneMuon (  )  const [virtual]

Reimplemented from reco::Candidate.

Definition at line 67 of file ShallowCloneCandidate.cc.

References masterClone_.

00067                                                    { 
00068   return masterClone_->isStandAloneMuon(); 
00069 }

bool ShallowCloneCandidate::isTrackerMuon (  )  const [virtual]

Reimplemented from reco::Candidate.

Definition at line 71 of file ShallowCloneCandidate.cc.

References masterClone_.

00071                                                 { 
00072   return masterClone_->isTrackerMuon(); 
00073 }

const CandidateBaseRef & ShallowCloneCandidate::masterClone (  )  const [virtual]

returns reference to master clone

Reimplemented from reco::Candidate.

Definition at line 51 of file ShallowCloneCandidate.cc.

References masterClone_.

00051                                                                   {
00052   return masterClone_;
00053 }

const Candidate * ShallowCloneCandidate::mother ( size_type  i  )  const [virtual]

return daughter at a given position (throws an exception)

Definition at line 39 of file ShallowCloneCandidate.cc.

References masterClone_.

00039                                                                    { 
00040   return masterClone_->mother( i ); 
00041 }

size_t ShallowCloneCandidate::numberOfDaughters (  )  const [virtual]

number of daughters

Implements reco::Candidate.

Definition at line 27 of file ShallowCloneCandidate.cc.

References masterClone_.

00027                                                       { 
00028   return masterClone_->numberOfDaughters(); 
00029 }

size_t ShallowCloneCandidate::numberOfMothers (  )  const [virtual]

number of daughters

Implements reco::Candidate.

Definition at line 31 of file ShallowCloneCandidate.cc.

References masterClone_.

00031                                                     { 
00032   return masterClone_->numberOfMothers(); 
00033 }

virtual bool reco::ShallowCloneCandidate::overlap ( const Candidate c  )  const [inline, private, virtual]

check overlap with another Candidate

Implements reco::Candidate.

Definition at line 80 of file ShallowCloneCandidate.h.

References masterClone_.

00080 { return masterClone_->overlap( c ); }


Member Data Documentation

CandidateBaseRef reco::ShallowCloneCandidate::masterClone_ [private]

CandidateBaseReference to master clone.

Definition at line 82 of file ShallowCloneCandidate.h.

Referenced by begin(), daughter(), end(), isCaloMuon(), isConvertedPhoton(), isElectron(), isGlobalMuon(), isJet(), isMuon(), isPhoton(), isStandAloneMuon(), isTrackerMuon(), masterClone(), mother(), numberOfDaughters(), numberOfMothers(), and overlap().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:51:32 2009 for CMSSW by  doxygen 1.5.4