CommonTools
CandUtils
src
makeCompositeCandidate.cc
Go to the documentation of this file.
1
#include <memory>
2
3
#include "
CommonTools/CandUtils/interface/makeCompositeCandidate.h
"
4
using namespace
reco
;
5
using namespace
std
;
6
7
helpers::CompositeCandidateMaker
makeCompositeCandidate
(
const
Candidate
&
c1
,
const
Candidate
& c2) {
8
helpers::CompositeCandidateMaker
cmp
(std::make_unique<CompositeCandidate>());
9
cmp
.addDaughter(
c1
);
10
cmp
.addDaughter(c2);
11
return
cmp
;
12
}
13
14
helpers::CompositeCandidateMaker
makeCompositeCandidate
(
const
Candidate
&
c1
,
const
Candidate
& c2,
const
Candidate
& c3) {
15
helpers::CompositeCandidateMaker
cmp
(std::make_unique<CompositeCandidate>());
16
cmp
.addDaughter(
c1
);
17
cmp
.addDaughter(c2);
18
cmp
.addDaughter(c3);
19
return
cmp
;
20
}
21
22
helpers::CompositeCandidateMaker
makeCompositeCandidate
(
const
Candidate
&
c1
,
23
const
Candidate
& c2,
24
const
Candidate
& c3,
25
const
Candidate
& c4) {
26
helpers::CompositeCandidateMaker
cmp
(std::make_unique<CompositeCandidate>());
27
cmp
.addDaughter(
c1
);
28
cmp
.addDaughter(c2);
29
cmp
.addDaughter(c3);
30
cmp
.addDaughter(c4);
31
return
cmp
;
32
}
33
34
helpers::CompositeCandidateMaker
makeCompositeCandidateWithRefsToMaster
(
const
reco::CandidateRef
&
c1
,
35
const
reco::CandidateRef
& c2) {
36
helpers::CompositeCandidateMaker
cmp
(std::make_unique<CompositeCandidate>());
37
cmp
.addDaughter(
ShallowCloneCandidate
(
CandidateBaseRef
(
c1
)));
38
cmp
.addDaughter(
ShallowCloneCandidate
(
CandidateBaseRef
(c2)));
39
return
cmp
;
40
}
41
42
helpers::CompositeCandidateMaker
makeCompositeCandidateWithRefsToMaster
(
const
reco::CandidateRef
&
c1
,
43
const
reco::CandidateRef
& c2,
44
const
reco::CandidateRef
& c3) {
45
helpers::CompositeCandidateMaker
cmp
(std::make_unique<CompositeCandidate>());
46
cmp
.addDaughter(
ShallowCloneCandidate
(
CandidateBaseRef
(
c1
)));
47
cmp
.addDaughter(
ShallowCloneCandidate
(
CandidateBaseRef
(c2)));
48
cmp
.addDaughter(
ShallowCloneCandidate
(
CandidateBaseRef
(c3)));
49
return
cmp
;
50
}
51
52
helpers::CompositeCandidateMaker
makeCompositeCandidateWithRefsToMaster
(
const
reco::CandidateRef
&
c1
,
53
const
reco::CandidateRef
& c2,
54
const
reco::CandidateRef
& c3,
55
const
reco::CandidateRef
& c4) {
56
helpers::CompositeCandidateMaker
cmp
(std::make_unique<CompositeCandidate>());
57
cmp
.addDaughter(
ShallowCloneCandidate
(
CandidateBaseRef
(
c1
)));
58
cmp
.addDaughter(
ShallowCloneCandidate
(
CandidateBaseRef
(c2)));
59
cmp
.addDaughter(
ShallowCloneCandidate
(
CandidateBaseRef
(c3)));
60
cmp
.addDaughter(
ShallowCloneCandidate
(
CandidateBaseRef
(c4)));
61
return
cmp
;
62
}
63
64
helpers::CompositePtrCandidateMaker
makeCompositePtrCandidate
(
const
CandidatePtr
&
c1
,
const
CandidatePtr
& c2) {
65
helpers::CompositePtrCandidateMaker
cmp
(std::make_unique<CompositePtrCandidate>());
66
cmp
.addDaughter(
c1
);
67
cmp
.addDaughter(c2);
68
return
cmp
;
69
}
70
71
helpers::CompositePtrCandidateMaker
makeCompositePtrCandidate
(
const
CandidatePtr
&
c1
,
72
const
CandidatePtr
& c2,
73
const
CandidatePtr
& c3) {
74
helpers::CompositePtrCandidateMaker
cmp
(std::make_unique<CompositePtrCandidate>());
75
cmp
.addDaughter(
c1
);
76
cmp
.addDaughter(c2);
77
cmp
.addDaughter(c3);
78
return
cmp
;
79
}
80
81
helpers::CompositePtrCandidateMaker
makeCompositePtrCandidate
(
const
CandidatePtr
&
c1
,
82
const
CandidatePtr
& c2,
83
const
CandidatePtr
& c3,
84
const
CandidatePtr
& c4) {
85
helpers::CompositePtrCandidateMaker
cmp
(std::make_unique<CompositePtrCandidate>());
86
cmp
.addDaughter(
c1
);
87
cmp
.addDaughter(c2);
88
cmp
.addDaughter(c3);
89
cmp
.addDaughter(c4);
90
return
cmp
;
91
}
makeCompositeCandidate
helpers::CompositeCandidateMaker makeCompositeCandidate(const Candidate &c1, const Candidate &c2)
Definition:
makeCompositeCandidate.cc:7
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
makeCompositeCandidateWithRefsToMaster
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster(const reco::CandidateRef &c1, const reco::CandidateRef &c2)
Definition:
makeCompositeCandidate.cc:34
edm::Ref
Definition:
AssociativeIterator.h:58
helpers::CompositePtrCandidateMaker
Definition:
makeCompositeCandidate.h:27
makeCompositeCandidate.h
helpers::CompositeCandidateMaker
Definition:
makeCompositeCandidate.h:9
reco::CandidateBaseRef
edm::RefToBase< Candidate > CandidateBaseRef
persistent reference to an object in a collection of Candidate objects
Definition:
CandidateFwd.h:31
alignmentValidation.c1
c1
do drawing
Definition:
alignmentValidation.py:1025
edm::Ptr< Candidate >
reco::Candidate
Definition:
Candidate.h:27
std
Definition:
JetResolutionObject.h:76
fileCollector.cmp
cmp
Definition:
fileCollector.py:125
makeCompositePtrCandidate
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate(const CandidatePtr &c1, const CandidatePtr &c2)
Definition:
makeCompositeCandidate.cc:64
reco::ShallowCloneCandidate
Definition:
ShallowCloneCandidate.h:15
Generated for CMSSW Reference Manual by
1.8.16