Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Properties
_
a
c
d
e
f
l
m
o
p
s
t
u
v
+
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
CommonTools
ParticleFlow
interface
PFCandidateFwdPtrFactory.h
Go to the documentation of this file.
1
#ifndef CommonTools_ParticleFlow_PFCandidateFwdPtrFactory_h
2
#define CommonTools_ParticleFlow_PFCandidateFwdPtrFactory_h
3
13
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidate.h
"
14
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
15
16
namespace
reco
{
17
struct
PFCandidateFwdPtrFactory
{
18
edm::FwdPtr<reco::PFCandidate>
operator()
(
edm::View<reco::PFCandidate>
const
&
view
,
unsigned
int
i
)
const
{
19
edm::Ptr<reco::PFCandidate>
ptr =
view
.ptrAt(
i
);
20
edm::Ptr<reco::PFCandidate>
backPtr = ptr;
21
if
(ptr.
isNonnull
() && ptr.
isAvailable
() && ptr->
numberOfSourceCandidatePtrs
() > 0) {
22
edm::Ptr<reco::Candidate>
basePtr = ptr->
sourceCandidatePtr
(0);
23
if
(basePtr.
isNonnull
() && basePtr.
isAvailable
())
24
backPtr =
edm::Ptr<reco::PFCandidate>
(basePtr);
//this cast works only for available stuff
25
}
26
return
edm::FwdPtr<reco::PFCandidate>
(ptr, backPtr);
27
}
28
};
29
}
// namespace reco
30
31
#endif
mps_fire.i
i
Definition:
mps_fire.py:429
pv::view
view
Definition:
PreparePVTrends.h:58
edm::Ptr::isAvailable
bool isAvailable() const
Definition:
Ptr.h:232
edm::View< reco::PFCandidate >
edm::Ptr::isNonnull
bool isNonnull() const
Checks for non-null.
Definition:
Ptr.h:146
edm::Ptr
Definition:
AssociationVector.h:31
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
reco::PFCandidateFwdPtrFactory::operator()
edm::FwdPtr< reco::PFCandidate > operator()(edm::View< reco::PFCandidate > const &view, unsigned int i) const
Definition:
PFCandidateFwdPtrFactory.h:18
reco::PFCandidateFwdPtrFactory
Creates a FwdPtr<PFCandidate> from an input PFCandidate. If the PFCandidate has a valid sourceCandida...
Definition:
PFCandidateFwdPtrFactory.h:17
PFCandidate.h
PFCandidateFwd.h
reco::PFCandidate::sourceCandidatePtr
CandidatePtr sourceCandidatePtr(size_type i) const override
Definition:
PFCandidate.h:124
reco::PFCandidate::numberOfSourceCandidatePtrs
size_t numberOfSourceCandidatePtrs() const override
Definition:
PFCandidate.h:122
edm::FwdPtr
Definition:
FwdPtr.h:40
Generated for CMSSW Reference Manual by
1.8.14