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