DataFormats
Candidate
src
CompositeRefCandidate.cc
Go to the documentation of this file.
1
#include "
DataFormats/Candidate/interface/CompositeRefCandidate.h
"
2
#include "
FWCore/Utilities/interface/Exception.h
"
3
4
using namespace
reco
;
5
6
CompositeRefCandidate::~CompositeRefCandidate
() {}
7
8
CompositeRefCandidate
*
CompositeRefCandidate::clone
()
const
{
return
new
CompositeRefCandidate
(*
this
); }
9
10
const
Candidate
*
CompositeRefCandidate::daughter
(
size_type
i
)
const
{
11
return
(
i
<
numberOfDaughters
()) ? &*
dau
[
i
] :
nullptr
;
// i >= 0, since i is unsigned
12
}
13
14
const
Candidate
*
CompositeRefCandidate::mother
(
size_type
i
)
const
{
15
return
(
i
<
numberOfMothers
()) ? &*
mom
[
i
] :
nullptr
;
// i >= 0, since i is unsigned
16
}
17
18
Candidate
*
CompositeRefCandidate::daughter
(
size_type
i
) {
return
nullptr
; }
19
20
size_t
CompositeRefCandidate::numberOfDaughters
()
const
{
return
dau
.
size
(); }
21
22
size_t
CompositeRefCandidate::numberOfMothers
()
const
{
return
mom
.
size
(); }
23
24
bool
CompositeRefCandidate::overlap
(
const
Candidate
& c2)
const
{
25
throw
cms::Exception
(
"Error"
) <<
"can't check overlap internally for CompositeRefCanddate"
;
26
}
mps_fire.i
i
Definition:
mps_fire.py:428
reco::CompositeRefCandidate::daughter
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
Definition:
CompositeRefCandidate.cc:10
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
reco::CompositeRefCandidate::~CompositeRefCandidate
~CompositeRefCandidate() override
destructor
Definition:
CompositeRefCandidate.cc:6
reco::CompositeRefCandidate
Definition:
CompositeRefCandidate.h:17
reco::CompositeRefCandidate::dau
daughters dau
collection of references to daughters
Definition:
CompositeRefCandidate.h:77
reco::CompositeRefCandidate::numberOfDaughters
size_t numberOfDaughters() const override
number of daughters
Definition:
CompositeRefCandidate.cc:20
reco::CompositeRefCandidate::mom
daughters mom
collection of references to mothers
Definition:
CompositeRefCandidate.h:79
reco::CompositeRefCandidate::numberOfMothers
size_t numberOfMothers() const override
number of mothers (zero or one in most of but not all the cases)
Definition:
CompositeRefCandidate.cc:22
reco::CompositeRefCandidate::overlap
bool overlap(const Candidate &) const override
check overlap with another candidate
Definition:
CompositeRefCandidate.cc:24
reco::Candidate
Definition:
Candidate.h:27
reco::CompositeRefCandidate::mother
const Candidate * mother(size_t i=0) const override
return pointer to mother
Definition:
CompositeRefCandidate.cc:14
Exception
Definition:
hltDiff.cc:245
Exception.h
reco::CompositeRefCandidate::clone
CompositeRefCandidate * clone() const override
returns a clone of the candidate
Definition:
CompositeRefCandidate.cc:8
edm::RefVector::size
size_type size() const
Size of the RefVector.
Definition:
RefVector.h:102
reco::CompositeRefCandidate::CompositeRefCandidate
CompositeRefCandidate()
default constructor
Definition:
CompositeRefCandidate.h:24
CompositeRefCandidate.h
reco::Candidate::size_type
size_t size_type
Definition:
Candidate.h:29
Generated for CMSSW Reference Manual by
1.8.16