#include <CompositeRefBaseCandidate.h>
Public Types | |
typedef std::vector < CandidateBaseRef > | daughters |
collection of references to daughters | |
Public Member Functions | |
void | addDaughter (const CandidateBaseRef &) |
add a daughter via a reference | |
virtual const_iterator | begin () const |
first daughter const_iterator | |
virtual iterator | begin () |
first daughter iterator | |
void | clearDaughters () |
clear daughter references | |
virtual CompositeRefBaseCandidate * | clone () const |
returns a clone of the candidate | |
CompositeRefBaseCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true) | |
constructor from values | |
CompositeRefBaseCandidate (const Candidate &c) | |
constructor from a particle | |
CompositeRefBaseCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true) | |
constructor from values | |
CompositeRefBaseCandidate () | |
default constructor | |
virtual const Candidate * | daughter (size_type) const |
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) | |
virtual Candidate * | daughter (size_type) |
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 | |
CandidateBaseRef | daughterRef (size_type i) const |
reference to daughter at given position | |
virtual const_iterator | end () const |
last daughter const_iterator | |
virtual iterator | end () |
last daughter iterator | |
virtual const Candidate * | mother (size_type) const |
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) | |
virtual size_t | numberOfDaughters () const |
number of daughters | |
virtual size_t | numberOfMothers () const |
number of mothers | |
virtual | ~CompositeRefBaseCandidate () |
destructor | |
Private Types | |
typedef candidate::const_iterator_imp_specific < daughters > | const_iterator_imp_specific |
const iterator implementation | |
typedef candidate::iterator_imp_specific_dummy < daughters > | iterator_imp_specific |
iterator implementation | |
Private Member Functions | |
virtual bool | overlap (const Candidate &) const |
check overlap with another candidate | |
Private Attributes | |
daughters | dau |
collection of references to daughters |
a reco::Candidate composed of daughters. The daughters has persistent references (edm::RefToBase<...>) to reco::Candidate stored in a separate collection.
Definition at line 19 of file CompositeRefBaseCandidate.h.
typedef candidate::const_iterator_imp_specific<daughters> reco::CompositeRefBaseCandidate::const_iterator_imp_specific [private] |
const iterator implementation
Reimplemented from reco::LeafCandidate.
Definition at line 67 of file CompositeRefBaseCandidate.h.
typedef std::vector<CandidateBaseRef> reco::CompositeRefBaseCandidate::daughters |
collection of references to daughters
Reimplemented from reco::LeafCandidate.
Definition at line 22 of file CompositeRefBaseCandidate.h.
typedef candidate::iterator_imp_specific_dummy<daughters> reco::CompositeRefBaseCandidate::iterator_imp_specific [private] |
iterator implementation
Reimplemented from reco::LeafCandidate.
Definition at line 69 of file CompositeRefBaseCandidate.h.
reco::CompositeRefBaseCandidate::CompositeRefBaseCandidate | ( | ) | [inline] |
default constructor
Definition at line 24 of file CompositeRefBaseCandidate.h.
Referenced by clone().
: LeafCandidate() { }
reco::CompositeRefBaseCandidate::CompositeRefBaseCandidate | ( | Charge | q, |
const LorentzVector & | p4, | ||
const Point & | vtx = Point( 0, 0, 0 ) , |
||
int | pdgId = 0 , |
||
int | status = 0 , |
||
bool | integerCharge = true |
||
) | [inline] |
constructor from values
Definition at line 26 of file CompositeRefBaseCandidate.h.
: LeafCandidate( q, p4, vtx, pdgId, status, integerCharge ) { }
reco::CompositeRefBaseCandidate::CompositeRefBaseCandidate | ( | Charge | q, |
const PolarLorentzVector & | p4, | ||
const Point & | vtx = Point( 0, 0, 0 ) , |
||
int | pdgId = 0 , |
||
int | status = 0 , |
||
bool | integerCharge = true |
||
) | [inline] |
constructor from values
Definition at line 30 of file CompositeRefBaseCandidate.h.
: LeafCandidate( q, p4, vtx, pdgId, status, integerCharge ) { }
reco::CompositeRefBaseCandidate::CompositeRefBaseCandidate | ( | const Candidate & | c | ) | [inline, explicit] |
constructor from a particle
Definition at line 34 of file CompositeRefBaseCandidate.h.
: LeafCandidate( c ) { }
CompositeRefBaseCandidate::~CompositeRefBaseCandidate | ( | ) | [virtual] |
void reco::CompositeRefBaseCandidate::addDaughter | ( | const CandidateBaseRef & | cand | ) | [inline] |
add a daughter via a reference
Definition at line 76 of file CompositeRefBaseCandidate.h.
References dau.
Referenced by reco::GenericJet::GenericJet().
{ dau.push_back( cand ); }
Candidate::const_iterator CompositeRefBaseCandidate::begin | ( | void | ) | const [virtual] |
first daughter const_iterator
Reimplemented from reco::LeafCandidate.
Definition at line 14 of file CompositeRefBaseCandidate.cc.
References dau.
{ return const_iterator( new const_iterator_imp_specific( dau.begin() ) ); }
Candidate::iterator CompositeRefBaseCandidate::begin | ( | void | ) | [virtual] |
first daughter iterator
Reimplemented from reco::LeafCandidate.
Definition at line 22 of file CompositeRefBaseCandidate.cc.
{ return iterator( new iterator_imp_specific ); }
void reco::CompositeRefBaseCandidate::clearDaughters | ( | ) | [inline] |
clear daughter references
Definition at line 61 of file CompositeRefBaseCandidate.h.
References dau.
{ dau.clear(); }
CompositeRefBaseCandidate * CompositeRefBaseCandidate::clone | ( | void | ) | const [virtual] |
returns a clone of the candidate
Reimplemented from reco::LeafCandidate.
Definition at line 10 of file CompositeRefBaseCandidate.cc.
References CompositeRefBaseCandidate().
{ return new CompositeRefBaseCandidate( * this ); }
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
Reimplemented from reco::LeafCandidate.
Definition at line 30 of file CompositeRefBaseCandidate.cc.
References dau, i, and numberOfDaughters().
{ return ( i < numberOfDaughters() ) ? & * dau[ i ] : 0; // i >= 0, since i is unsigned }
return daughter at a given position, i = 0, ... numberOfDaughters() - 1
Reimplemented from reco::LeafCandidate.
Definition at line 38 of file CompositeRefBaseCandidate.cc.
{
return 0;
}
CandidateBaseRef reco::CompositeRefBaseCandidate::daughterRef | ( | size_type | i | ) | const [inline] |
Candidate::const_iterator CompositeRefBaseCandidate::end | ( | void | ) | const [virtual] |
last daughter const_iterator
Reimplemented from reco::LeafCandidate.
Definition at line 18 of file CompositeRefBaseCandidate.cc.
References dau.
{ return const_iterator( new const_iterator_imp_specific( dau.end() ) ); }
Candidate::iterator CompositeRefBaseCandidate::end | ( | void | ) | [virtual] |
last daughter iterator
Reimplemented from reco::LeafCandidate.
Definition at line 26 of file CompositeRefBaseCandidate.cc.
{ return iterator( new iterator_imp_specific ); }
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode)
Reimplemented from reco::LeafCandidate.
Definition at line 34 of file CompositeRefBaseCandidate.cc.
{
return 0;
}
size_t CompositeRefBaseCandidate::numberOfDaughters | ( | ) | const [virtual] |
number of daughters
Reimplemented from reco::LeafCandidate.
Definition at line 42 of file CompositeRefBaseCandidate.cc.
References dau.
Referenced by daughter(), and reco::GenericJet::nConstituents().
{ return dau.size(); }
size_t CompositeRefBaseCandidate::numberOfMothers | ( | ) | const [virtual] |
number of mothers
Reimplemented from reco::LeafCandidate.
Definition at line 46 of file CompositeRefBaseCandidate.cc.
{
return 0;
}
bool CompositeRefBaseCandidate::overlap | ( | const Candidate & | c2 | ) | const [private, virtual] |
check overlap with another candidate
Reimplemented from reco::LeafCandidate.
Definition at line 50 of file CompositeRefBaseCandidate.cc.
References Exception.
{ throw cms::Exception( "Error" ) << "can't check overlap internally for CompositeRefBaseCanddate"; }
collection of references to daughters
Definition at line 71 of file CompositeRefBaseCandidate.h.
Referenced by addDaughter(), begin(), clearDaughters(), daughter(), daughterRef(), end(), and numberOfDaughters().