CMS 3D CMS Logo

Classes | Namespaces | Functions
makeCompositeCandidate.h File Reference
#include "DataFormats/Candidate/interface/CompositeCandidate.h"
#include "DataFormats/Candidate/interface/CompositePtrCandidate.h"
#include "DataFormats/Candidate/interface/ShallowCloneCandidate.h"
#include <memory>

Go to the source code of this file.

Classes

struct  helpers::CompositeCandidateMaker
 
struct  helpers::CompositePtrCandidateMaker
 

Namespaces

 helpers
 

Functions

helpers::CompositeCandidateMaker makeCompositeCandidate (const reco::Candidate &c1, const reco::Candidate &c2)
 
helpers::CompositeCandidateMaker makeCompositeCandidate (const reco::Candidate &c1, const reco::Candidate &c2, const reco::Candidate &c3)
 
helpers::CompositeCandidateMaker makeCompositeCandidate (const reco::Candidate &c1, const reco::Candidate &c2, const reco::Candidate &c3, const reco::Candidate &c4)
 
template<typename C >
helpers::CompositeCandidateMaker makeCompositeCandidate (const typename C::const_iterator &begin, const typename C::const_iterator &end)
 
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster (const reco::CandidateRef &c1, const reco::CandidateRef &c2)
 
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster (const reco::CandidateRef &c1, const reco::CandidateRef &c2, const reco::CandidateRef &c3)
 
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster (const reco::CandidateRef &c1, const reco::CandidateRef &c2, const reco::CandidateRef &c3, const reco::CandidateRef &c4)
 
template<typename C >
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster (const typename C::const_iterator &begin, const typename C::const_iterator &end)
 
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate (const reco::CandidatePtr &c1, const reco::CandidatePtr &c2)
 
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate (const reco::CandidatePtr &c1, const reco::CandidatePtr &c2, const reco::CandidatePtr &c3)
 
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate (const reco::CandidatePtr &c1, const reco::CandidatePtr &c2, const reco::CandidatePtr &c3, const reco::CandidatePtr &c4)
 

Function Documentation

◆ makeCompositeCandidate() [1/4]

helpers::CompositeCandidateMaker makeCompositeCandidate ( const reco::Candidate c1,
const reco::Candidate c2 
)

Definition at line 7 of file makeCompositeCandidate.cc.

7  {
8  helpers::CompositeCandidateMaker cmp(std::make_unique<CompositeCandidate>());
9  cmp.addDaughter(c1);
10  cmp.addDaughter(c2);
11  return cmp;
12 }

References alignmentValidation::c1, and fileCollector::cmp.

◆ makeCompositeCandidate() [2/4]

helpers::CompositeCandidateMaker makeCompositeCandidate ( const reco::Candidate c1,
const reco::Candidate c2,
const reco::Candidate c3 
)

Definition at line 14 of file makeCompositeCandidate.cc.

14  {
15  helpers::CompositeCandidateMaker cmp(std::make_unique<CompositeCandidate>());
16  cmp.addDaughter(c1);
17  cmp.addDaughter(c2);
18  cmp.addDaughter(c3);
19  return cmp;
20 }

References alignmentValidation::c1, and fileCollector::cmp.

◆ makeCompositeCandidate() [3/4]

helpers::CompositeCandidateMaker makeCompositeCandidate ( const reco::Candidate c1,
const reco::Candidate c2,
const reco::Candidate c3,
const reco::Candidate c4 
)

Definition at line 22 of file makeCompositeCandidate.cc.

25  {
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 }

References alignmentValidation::c1, and fileCollector::cmp.

◆ makeCompositeCandidate() [4/4]

template<typename C >
helpers::CompositeCandidateMaker makeCompositeCandidate ( const typename C::const_iterator &  begin,
const typename C::const_iterator &  end 
)

Definition at line 62 of file makeCompositeCandidate.h.

63  {
64  helpers::CompositeCandidateMaker cmp(std::unique_ptr<reco::CompositeCandidate>(new reco::CompositeCandidate));
65  for (typename C::const_iterator i = begin; i != end; ++i)
66  cmp.addDaughter(*i);
67  return cmp;
68 }

References fileCollector::cmp, mps_fire::end, and mps_fire::i.

◆ makeCompositeCandidateWithRefsToMaster() [1/4]

helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster ( const reco::CandidateRef c1,
const reco::CandidateRef c2 
)

Definition at line 34 of file makeCompositeCandidate.cc.

35  {
36  helpers::CompositeCandidateMaker cmp(std::make_unique<CompositeCandidate>());
38  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c2)));
39  return cmp;
40 }

References alignmentValidation::c1, and fileCollector::cmp.

◆ makeCompositeCandidateWithRefsToMaster() [2/4]

helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster ( const reco::CandidateRef c1,
const reco::CandidateRef c2,
const reco::CandidateRef c3 
)

Definition at line 42 of file makeCompositeCandidate.cc.

44  {
45  helpers::CompositeCandidateMaker cmp(std::make_unique<CompositeCandidate>());
47  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c2)));
48  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c3)));
49  return cmp;
50 }

References alignmentValidation::c1, and fileCollector::cmp.

◆ makeCompositeCandidateWithRefsToMaster() [3/4]

helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster ( const reco::CandidateRef c1,
const reco::CandidateRef c2,
const reco::CandidateRef c3,
const reco::CandidateRef c4 
)

Definition at line 52 of file makeCompositeCandidate.cc.

55  {
56  helpers::CompositeCandidateMaker cmp(std::make_unique<CompositeCandidate>());
58  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c2)));
59  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c3)));
60  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c4)));
61  return cmp;
62 }

References alignmentValidation::c1, and fileCollector::cmp.

◆ makeCompositeCandidateWithRefsToMaster() [4/4]

template<typename C >
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster ( const typename C::const_iterator &  begin,
const typename C::const_iterator &  end 
)

Definition at line 83 of file makeCompositeCandidate.h.

84  {
85  helpers::CompositeCandidateMaker cmp(std::unique_ptr<reco::CompositeCandidate>(new reco::CompositeCandidate));
86  for (typename C::const_iterator i = begin; i != end; ++i)
87  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(*i)));
88  return cmp;
89 }

References fileCollector::cmp, mps_fire::end, and mps_fire::i.

◆ makeCompositePtrCandidate() [1/3]

helpers::CompositePtrCandidateMaker makeCompositePtrCandidate ( const reco::CandidatePtr c1,
const reco::CandidatePtr c2 
)

Definition at line 64 of file makeCompositeCandidate.cc.

64  {
65  helpers::CompositePtrCandidateMaker cmp(std::make_unique<CompositePtrCandidate>());
66  cmp.addDaughter(c1);
67  cmp.addDaughter(c2);
68  return cmp;
69 }

References alignmentValidation::c1, and fileCollector::cmp.

◆ makeCompositePtrCandidate() [2/3]

helpers::CompositePtrCandidateMaker makeCompositePtrCandidate ( const reco::CandidatePtr c1,
const reco::CandidatePtr c2,
const reco::CandidatePtr c3 
)

Definition at line 71 of file makeCompositeCandidate.cc.

73  {
74  helpers::CompositePtrCandidateMaker cmp(std::make_unique<CompositePtrCandidate>());
75  cmp.addDaughter(c1);
76  cmp.addDaughter(c2);
77  cmp.addDaughter(c3);
78  return cmp;
79 }

References alignmentValidation::c1, and fileCollector::cmp.

◆ makeCompositePtrCandidate() [3/3]

helpers::CompositePtrCandidateMaker makeCompositePtrCandidate ( const reco::CandidatePtr c1,
const reco::CandidatePtr c2,
const reco::CandidatePtr c3,
const reco::CandidatePtr c4 
)

Definition at line 81 of file makeCompositeCandidate.cc.

84  {
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 }

References alignmentValidation::c1, and fileCollector::cmp.

mps_fire.i
i
Definition: mps_fire.py:428
helpers::CompositePtrCandidateMaker
Definition: makeCompositeCandidate.h:27
helpers::CompositeCandidateMaker
Definition: makeCompositeCandidate.h:9
mps_fire.end
end
Definition: mps_fire.py:242
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
fileCollector.cmp
cmp
Definition: fileCollector.py:125
reco::ShallowCloneCandidate
Definition: ShallowCloneCandidate.h:15
reco::CompositeCandidate
Definition: CompositeCandidate.h:21