#include <CompositePtrCandidate.h>
Public Types | |
typedef std::vector< CandidatePtr > | daughters |
collection of references to daughters | |
typedef std::vector< CandidatePtr > | mothers |
collection of references to daughters | |
Public Member Functions | |
void | addDaughter (const CandidatePtr &) |
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 CompositePtrCandidate * | clone () const |
returns a clone of the candidate | |
CompositePtrCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true) | |
constructor from values | |
CompositePtrCandidate (const Candidate &p) | |
constructor from a Candidate | |
CompositePtrCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true) | |
constructor from values | |
CompositePtrCandidate () | |
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 | |
CandidatePtr | daughterPtr (size_type i) const |
reference to daughter at given position | |
const daughters & | daughterPtrVector () 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 | |
virtual size_t | numberOfDaughters () const |
number of daughters | |
virtual size_t | numberOfMothers () const |
number of mothers | |
virtual size_type | numberOfSourceCandidatePtrs () const |
virtual CandidatePtr | sourceCandidatePtr (size_type i) const |
virtual | ~CompositePtrCandidate () |
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::Ptr <...>) to reco::Candidate stored in a separate collection.
Definition at line 20 of file CompositePtrCandidate.h.
typedef candidate::const_iterator_imp_specific<daughters> reco::CompositePtrCandidate::const_iterator_imp_specific [private] |
const iterator implementation
Reimplemented from reco::LeafCandidate.
Definition at line 82 of file CompositePtrCandidate.h.
typedef std::vector<CandidatePtr> reco::CompositePtrCandidate::daughters |
collection of references to daughters
Reimplemented from reco::LeafCandidate.
Definition at line 23 of file CompositePtrCandidate.h.
typedef candidate::iterator_imp_specific_dummy<daughters> reco::CompositePtrCandidate::iterator_imp_specific [private] |
iterator implementation
Reimplemented from reco::LeafCandidate.
Definition at line 84 of file CompositePtrCandidate.h.
typedef std::vector<CandidatePtr> reco::CompositePtrCandidate::mothers |
collection of references to daughters
Definition at line 25 of file CompositePtrCandidate.h.
reco::CompositePtrCandidate::CompositePtrCandidate | ( | ) | [inline] |
default constructor
Definition at line 27 of file CompositePtrCandidate.h.
Referenced by clone().
: LeafCandidate() { }
reco::CompositePtrCandidate::CompositePtrCandidate | ( | 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 CompositePtrCandidate.h.
: LeafCandidate( q, p4, vtx, pdgId, status, integerCharge ) { }
reco::CompositePtrCandidate::CompositePtrCandidate | ( | 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 CompositePtrCandidate.h.
: LeafCandidate( q, p4, vtx, pdgId, status, integerCharge ) { }
reco::CompositePtrCandidate::CompositePtrCandidate | ( | const Candidate & | p | ) | [inline, explicit] |
constructor from a Candidate
Definition at line 37 of file CompositePtrCandidate.h.
: LeafCandidate( p ) { }
CompositePtrCandidate::~CompositePtrCandidate | ( | ) | [virtual] |
void reco::CompositePtrCandidate::addDaughter | ( | const CandidatePtr & | cand | ) | [inline] |
add a daughter via a reference
Definition at line 91 of file CompositePtrCandidate.h.
References dau.
Referenced by reco::tau::RecoTauPiZeroStripPlugin2::addCandsToStrip(), VirtualJetProducer::copyConstituents(), reco::Jet::Jet(), reco::tau::xclean::CrossCleanPiZeros< PtrIter >::operator()(), RecoTauJetRegionProducer::produce(), and reco::WMuNuCandidatePtr::WMuNuCandidatePtr().
{ dau.push_back( cand ); }
Candidate::const_iterator CompositePtrCandidate::begin | ( | void | ) | const [virtual] |
first daughter const_iterator
Reimplemented from reco::LeafCandidate.
Definition at line 14 of file CompositePtrCandidate.cc.
References dau.
Referenced by PFJetIDSelectionFunctor::firstDataCuts(), reco::GenJet::getGenConstituent(), CastorTowerJetMonitor::processEventJets(), PFRootEventManager::reconstructGenJets(), and PFRootEventManager::reconstructPFJets().
{ return const_iterator( new const_iterator_imp_specific( dau.begin() ) ); }
Candidate::iterator CompositePtrCandidate::begin | ( | void | ) | [virtual] |
first daughter iterator
Reimplemented from reco::LeafCandidate.
Definition at line 22 of file CompositePtrCandidate.cc.
{ return iterator( new iterator_imp_specific ); }
void reco::CompositePtrCandidate::clearDaughters | ( | ) | [inline] |
clear daughter references
Definition at line 62 of file CompositePtrCandidate.h.
References dau.
Referenced by reco::tau::xclean::CrossCleanPiZeros< PtrIter >::operator()(), and RecoTauJetRegionProducer::produce().
{ dau.clear(); }
CompositePtrCandidate * CompositePtrCandidate::clone | ( | void | ) | const [virtual] |
returns a clone of the candidate
Reimplemented from reco::LeafCandidate.
Reimplemented in reco::BasicJet, reco::CaloJet, reco::GenJet, reco::JPTJet, reco::PFClusterJet, reco::PFJet, reco::TrackJet, and pat::Jet.
Definition at line 10 of file CompositePtrCandidate.cc.
References CompositePtrCandidate().
Referenced by ChainedJetCorrector::correction().
{ return new CompositePtrCandidate( * this ); }
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
Reimplemented from reco::LeafCandidate.
Reimplemented in pat::Jet.
Definition at line 30 of file CompositePtrCandidate.cc.
References dau, i, and numberOfDaughters().
Referenced by reco::Jet::getJetConstituentsQuick(), reco::RecoTauPiZero::maxDeltaEta(), reco::RecoTauPiZero::maxDeltaPhi(), reco::RecoTauPiZero::numberOfElectrons(), and reco::RecoTauPiZero::numberOfGammas().
{ 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 CompositePtrCandidate.cc.
{
return 0;
}
CandidatePtr reco::CompositePtrCandidate::daughterPtr | ( | size_type | i | ) | const [inline] |
reference to daughter at given position
Definition at line 64 of file CompositePtrCandidate.h.
Referenced by pat::Jet::cacheCaloTowers(), pat::Jet::cachePFCandidates(), reco::CaloJet::getCaloConstituent(), pat::Jet::getCaloConstituent(), reco::Jet::getJetConstituents(), reco::PFJet::getPFConstituent(), pat::Jet::getPFConstituent(), reco::RecoTauPiZero::print(), reco::Jet::print(), and sourceCandidatePtr().
const daughters& reco::CompositePtrCandidate::daughterPtrVector | ( | ) | const [inline] |
references to daughtes
Definition at line 66 of file CompositePtrCandidate.h.
References dau.
Referenced by reco::tau::RecoTauConstructor::addPiZero(), JetMCTagUtils::genTauDecayMode(), and reco::tau::xclean::CrossCleanPiZeros< PtrIter >::operator()().
{ return dau; }
Candidate::const_iterator CompositePtrCandidate::end | ( | void | ) | const [virtual] |
last daughter const_iterator
Reimplemented from reco::LeafCandidate.
Definition at line 18 of file CompositePtrCandidate.cc.
References dau.
Referenced by PFJetIDSelectionFunctor::firstDataCuts(), reco::GenJet::getGenConstituent(), and CastorTowerJetMonitor::processEventJets().
{ return const_iterator( new const_iterator_imp_specific( dau.end() ) ); }
Candidate::iterator CompositePtrCandidate::end | ( | void | ) | [virtual] |
last daughter iterator
Reimplemented from reco::LeafCandidate.
Definition at line 26 of file CompositePtrCandidate.cc.
{ return iterator( new iterator_imp_specific ); }
const Candidate * CompositePtrCandidate::mother | ( | size_t | i = 0 | ) | const [virtual] |
return pointer to mother
Reimplemented from reco::LeafCandidate.
Definition at line 34 of file CompositePtrCandidate.cc.
{
return 0;
}
size_t CompositePtrCandidate::numberOfDaughters | ( | ) | const [virtual] |
number of daughters
Reimplemented from reco::LeafCandidate.
Reimplemented in pat::Jet.
Definition at line 42 of file CompositePtrCandidate.cc.
References dau.
Referenced by daughter(), reco::tau::RecoTauPhotonFilter::filter(), PFJetIDSelectionFunctor::firstDataCuts(), reco::CaloJet::getCaloConstituents(), reco::GenJet::getGenConstituents(), reco::Jet::getJetConstituents(), reco::Jet::getJetConstituentsQuick(), reco::PFJet::getPFConstituents(), reco::PFJet::getTrackRefs(), reco::RecoTauPiZero::maxDeltaEta(), reco::RecoTauPiZero::maxDeltaPhi(), reco::Jet::nConstituents(), reco::RecoTauPiZero::numberOfElectrons(), reco::RecoTauPiZero::numberOfGammas(), numberOfSourceCandidatePtrs(), reco::TrackJet::numberOfTracks(), reco::tau::xclean::CrossCleanPiZeros< PtrIter >::operator()(), reco::RecoTauPiZero::print(), and reco::Jet::print().
{ return dau.size(); }
size_t CompositePtrCandidate::numberOfMothers | ( | ) | const [virtual] |
number of mothers
Reimplemented from reco::LeafCandidate.
Definition at line 46 of file CompositePtrCandidate.cc.
{
return 0;
}
size_t CompositePtrCandidate::numberOfSourceCandidatePtrs | ( | ) | const [virtual] |
number of source candidates ( the candidates used to construct this Candidate). for CompositeRefBaseCandidates, the source candidates are the daughters.
Reimplemented from reco::LeafCandidate.
Definition at line 50 of file CompositePtrCandidate.cc.
References numberOfDaughters().
{ return numberOfDaughters(); }
bool CompositePtrCandidate::overlap | ( | const Candidate & | c2 | ) | const [private, virtual] |
check overlap with another candidate
Reimplemented from reco::LeafCandidate.
Reimplemented in reco::BasicJet, reco::CaloJet, reco::GenJet, reco::JPTJet, reco::PFClusterJet, reco::PFJet, and reco::TrackJet.
Definition at line 58 of file CompositePtrCandidate.cc.
References Exception.
{ throw cms::Exception( "Error" ) << "can't check overlap internally for CompositePtrCanddate"; }
CandidatePtr CompositePtrCandidate::sourceCandidatePtr | ( | size_type | i | ) | const [virtual] |
return a RefToBase to one of the source Candidates ( the candidates used to construct this Candidate). for CompositeRefBaseCandidates, the source candidates are the daughters.
Reimplemented from reco::LeafCandidate.
Definition at line 54 of file CompositePtrCandidate.cc.
References daughterPtr().
{ return daughterPtr(i); }
daughters reco::CompositePtrCandidate::dau [private] |
collection of references to daughters
Definition at line 86 of file CompositePtrCandidate.h.
Referenced by addDaughter(), begin(), pat::Jet::cacheCaloTowers(), pat::Jet::cachePFCandidates(), clearDaughters(), daughter(), daughterPtr(), daughterPtrVector(), end(), pat::Jet::getCaloConstituent(), reco::CaloJet::getCaloConstituent(), reco::PFJet::getPFConstituent(), pat::Jet::getPFConstituent(), and numberOfDaughters().