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 5 of file makeCompositeCandidate.cc.

5  {
6  helpers::CompositeCandidateMaker cmp(unique_ptr<CompositeCandidate>(new CompositeCandidate));
7  cmp.addDaughter(c1);
8  cmp.addDaughter(c2);
9  return cmp;
10 }

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 12 of file makeCompositeCandidate.cc.

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

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 20 of file makeCompositeCandidate.cc.

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

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 begin, fileCollector::cmp, end, and mps_fire::i.

◆ makeCompositeCandidateWithRefsToMaster() [1/4]

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

Definition at line 32 of file makeCompositeCandidate.cc.

33  {
34  helpers::CompositeCandidateMaker cmp(unique_ptr<CompositeCandidate>(new CompositeCandidate));
36  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c2)));
37  return cmp;
38 }

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 40 of file makeCompositeCandidate.cc.

42  {
43  helpers::CompositeCandidateMaker cmp(unique_ptr<CompositeCandidate>(new CompositeCandidate));
45  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c2)));
46  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c3)));
47  return cmp;
48 }

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 50 of file makeCompositeCandidate.cc.

53  {
54  helpers::CompositeCandidateMaker cmp(unique_ptr<CompositeCandidate>(new CompositeCandidate));
56  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c2)));
57  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c3)));
58  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c4)));
59  return cmp;
60 }

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 begin, fileCollector::cmp, end, and mps_fire::i.

◆ makeCompositePtrCandidate() [1/3]

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

Definition at line 62 of file makeCompositeCandidate.cc.

62  {
63  helpers::CompositePtrCandidateMaker cmp(unique_ptr<CompositePtrCandidate>(new CompositePtrCandidate));
64  cmp.addDaughter(c1);
65  cmp.addDaughter(c2);
66  return cmp;
67 }

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 69 of file makeCompositeCandidate.cc.

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

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 79 of file makeCompositeCandidate.cc.

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

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

mps_fire.i
i
Definition: mps_fire.py:355
end
#define end
Definition: vmac.h:39
helpers::CompositePtrCandidateMaker
Definition: makeCompositeCandidate.h:27
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
fileCollector.cmp
cmp
Definition: fileCollector.py:125
reco::CompositePtrCandidate
Definition: CompositePtrCandidate.h:17
reco::ShallowCloneCandidate
Definition: ShallowCloneCandidate.h:15
begin
#define begin
Definition: vmac.h:32
reco::CompositeCandidate
Definition: CompositeCandidate.h:21