#include <CompositeRefCandidate.h>
Public Types | |
typedef CandidateRefVector | daughters |
collection of references to daughters | |
typedef CandidateRefVector | mothers |
collection of references to daughters | |
Public Member Functions | |
void | addDaughter (const CandidateRef &) |
add a daughter via a reference | |
void | addMother (const CandidateRef &) |
add a daughter via a reference | |
virtual iterator | begin () |
first daughter iterator | |
virtual const_iterator | begin () const |
first daughter const_iterator | |
void | clearDaughters () |
clear daughter references | |
virtual CompositeRefCandidate * | clone () const |
returns a clone of the candidate | |
CompositeRefCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true) | |
constructor from values | |
CompositeRefCandidate (const Candidate &p) | |
constructor from a candidate | |
CompositeRefCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true) | |
constructor from values | |
CompositeRefCandidate () | |
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 | |
CandidateRef | daughterRef (size_type i) const |
reference to daughter at given position | |
const daughters & | daughterRefVector () const |
references to daughtes | |
virtual const_iterator | end () const |
last daughter const_iterator | |
virtual iterator | end () |
last daughter iterator | |
virtual const Candidate * | mother (size_t i=0) const |
return pointer to mother | |
CandidateRef | motherRef (size_type i=0) const |
reference to mother at given position | |
const mothers & | motherRefVector () const |
references to mothers | |
virtual size_t | numberOfDaughters () const |
number of daughters | |
virtual size_t | numberOfMothers () const |
number of mothers (zero or one in most of but not all the cases) | |
void | resetDaughters (const edm::ProductID &id) |
set daughters product ID | |
virtual | ~CompositeRefCandidate () |
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 | |
daughters | mom |
collection of references to mothers |
a reco::Candidate composed of daughters. The daughters has persistent references (edm::Ref <...>) to reco::Candidate stored in a separate collection.
Definition at line 20 of file CompositeRefCandidate.h.
typedef candidate::const_iterator_imp_specific<daughters> reco::CompositeRefCandidate::const_iterator_imp_specific [private] |
const iterator implementation
Reimplemented from reco::LeafCandidate.
Definition at line 80 of file CompositeRefCandidate.h.
collection of references to daughters
Reimplemented from reco::LeafCandidate.
Definition at line 23 of file CompositeRefCandidate.h.
typedef candidate::iterator_imp_specific_dummy<daughters> reco::CompositeRefCandidate::iterator_imp_specific [private] |
iterator implementation
Reimplemented from reco::LeafCandidate.
Definition at line 82 of file CompositeRefCandidate.h.
collection of references to daughters
Definition at line 25 of file CompositeRefCandidate.h.
reco::CompositeRefCandidate::CompositeRefCandidate | ( | ) | [inline] |
default constructor
Definition at line 27 of file CompositeRefCandidate.h.
Referenced by clone().
: LeafCandidate() { }
reco::CompositeRefCandidate::CompositeRefCandidate | ( | 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 29 of file CompositeRefCandidate.h.
: LeafCandidate( q, p4, vtx, pdgId, status, integerCharge ) { }
reco::CompositeRefCandidate::CompositeRefCandidate | ( | 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 33 of file CompositeRefCandidate.h.
: LeafCandidate( q, p4, vtx, pdgId, status, integerCharge ) { }
reco::CompositeRefCandidate::CompositeRefCandidate | ( | const Candidate & | p | ) | [inline, explicit] |
constructor from a candidate
Definition at line 37 of file CompositeRefCandidate.h.
: LeafCandidate( p ) { }
CompositeRefCandidate::~CompositeRefCandidate | ( | ) | [virtual] |
void reco::CompositeRefCandidate::addDaughter | ( | const CandidateRef & | cand | ) | [inline] |
add a daughter via a reference
Definition at line 91 of file CompositeRefCandidate.h.
References dau, and edm::RefVector< C, T, F >::push_back().
void reco::CompositeRefCandidate::addMother | ( | const CandidateRef & | cand | ) | [inline] |
add a daughter via a reference
Definition at line 95 of file CompositeRefCandidate.h.
References mom, and edm::RefVector< C, T, F >::push_back().
Candidate::iterator CompositeRefCandidate::begin | ( | void | ) | [virtual] |
first daughter iterator
Reimplemented from reco::LeafCandidate.
Definition at line 22 of file CompositeRefCandidate.cc.
{ return iterator( new iterator_imp_specific ); }
Candidate::const_iterator CompositeRefCandidate::begin | ( | void | ) | const [virtual] |
first daughter const_iterator
Reimplemented from reco::LeafCandidate.
Definition at line 14 of file CompositeRefCandidate.cc.
References edm::RefVector< C, T, F >::begin(), and dau.
{ return const_iterator( new const_iterator_imp_specific( dau.begin() ) ); }
void reco::CompositeRefCandidate::clearDaughters | ( | ) | [inline] |
clear daughter references
Definition at line 62 of file CompositeRefCandidate.h.
References edm::RefVector< C, T, F >::clear(), and dau.
CompositeRefCandidate * CompositeRefCandidate::clone | ( | void | ) | const [virtual] |
returns a clone of the candidate
Reimplemented from reco::LeafCandidate.
Definition at line 10 of file CompositeRefCandidate.cc.
References CompositeRefCandidate().
{ return new CompositeRefCandidate( * this ); }
return daughter at a given position, i = 0, ... numberOfDaughters() - 1
Reimplemented from reco::LeafCandidate.
Definition at line 38 of file CompositeRefCandidate.cc.
{
return 0;
}
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
Reimplemented from reco::LeafCandidate.
Definition at line 30 of file CompositeRefCandidate.cc.
References dau, i, and numberOfDaughters().
{ return ( i < numberOfDaughters() ) ? & * dau[ i ] : 0; // i >= 0, since i is unsigned }
CandidateRef reco::CompositeRefCandidate::daughterRef | ( | size_type | i | ) | const [inline] |
const daughters& reco::CompositeRefCandidate::daughterRefVector | ( | ) | const [inline] |
references to daughtes
Definition at line 66 of file CompositeRefCandidate.h.
References dau.
{ return dau; }
Candidate::iterator CompositeRefCandidate::end | ( | void | ) | [virtual] |
last daughter iterator
Reimplemented from reco::LeafCandidate.
Definition at line 26 of file CompositeRefCandidate.cc.
{ return iterator( new iterator_imp_specific ); }
Candidate::const_iterator CompositeRefCandidate::end | ( | void | ) | const [virtual] |
last daughter const_iterator
Reimplemented from reco::LeafCandidate.
Definition at line 18 of file CompositeRefCandidate.cc.
References dau, and edm::RefVector< C, T, F >::end().
{ return const_iterator( new const_iterator_imp_specific( dau.end() ) ); }
const Candidate * CompositeRefCandidate::mother | ( | size_t | i = 0 | ) | const [virtual] |
return pointer to mother
Reimplemented from reco::LeafCandidate.
Definition at line 34 of file CompositeRefCandidate.cc.
References i, mom, and numberOfMothers().
{ return ( i < numberOfMothers() ) ? & * mom[ i ] : 0; // i >= 0, since i is unsigned }
CandidateRef reco::CompositeRefCandidate::motherRef | ( | size_type | i = 0 | ) | const [inline] |
const mothers& reco::CompositeRefCandidate::motherRefVector | ( | ) | const [inline] |
references to mothers
Definition at line 70 of file CompositeRefCandidate.h.
References mom.
{ return mom; }
size_t CompositeRefCandidate::numberOfDaughters | ( | ) | const [virtual] |
number of daughters
Reimplemented from reco::LeafCandidate.
Definition at line 42 of file CompositeRefCandidate.cc.
References dau, and edm::RefVector< C, T, F >::size().
Referenced by daughter().
size_t CompositeRefCandidate::numberOfMothers | ( | ) | const [virtual] |
number of mothers (zero or one in most of but not all the cases)
Reimplemented from reco::LeafCandidate.
Definition at line 46 of file CompositeRefCandidate.cc.
References mom, and edm::RefVector< C, T, F >::size().
Referenced by mother().
bool CompositeRefCandidate::overlap | ( | const Candidate & | c2 | ) | const [private, virtual] |
check overlap with another candidate
Reimplemented from reco::LeafCandidate.
Definition at line 50 of file CompositeRefCandidate.cc.
References Exception.
{ throw cms::Exception( "Error" ) << "can't check overlap internally for CompositeRefCanddate"; }
void reco::CompositeRefCandidate::resetDaughters | ( | const edm::ProductID & | id | ) | [inline] |
daughters reco::CompositeRefCandidate::dau [private] |
collection of references to daughters
Definition at line 84 of file CompositeRefCandidate.h.
Referenced by addDaughter(), begin(), clearDaughters(), daughter(), daughterRef(), daughterRefVector(), end(), numberOfDaughters(), and resetDaughters().
daughters reco::CompositeRefCandidate::mom [private] |
collection of references to mothers
Definition at line 86 of file CompositeRefCandidate.h.
Referenced by addMother(), mother(), motherRef(), motherRefVector(), and numberOfMothers().