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
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
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
RecoParticleFlow
PFProducer
plugins
linkers
GSFAndECALLinker.cc
Go to the documentation of this file.
1
#include "
RecoParticleFlow/PFProducer/interface/BlockElementLinkerBase.h
"
2
#include "
DataFormats/ParticleFlowReco/interface/PFCluster.h
"
3
#include "
DataFormats/ParticleFlowReco/interface/PFBlockElementCluster.h
"
4
#include "
DataFormats/ParticleFlowReco/interface/PFBlockElementGsfTrack.h
"
5
#include "
RecoParticleFlow/PFClusterTools/interface/LinkByRecHit.h
"
6
7
class
GSFAndECALLinker
:
public
BlockElementLinkerBase
{
8
public
:
9
GSFAndECALLinker
(
const
edm::ParameterSet
& conf)
10
:
BlockElementLinkerBase
(conf),
11
useKDTree_
(conf.getParameter<
bool
>(
"useKDTree"
)),
12
debug_
(conf.getUntrackedParameter<
bool
>(
"debug"
,
false
)) {}
13
14
double
testLink
(
const
reco::PFBlockElement
*,
const
reco::PFBlockElement
*)
const override
;
15
16
private
:
17
bool
useKDTree_
,
debug_
;
18
};
19
20
DEFINE_EDM_PLUGIN
(
BlockElementLinkerFactory
,
GSFAndECALLinker
,
"GSFAndECALLinker"
);
21
22
double
GSFAndECALLinker::testLink
(
const
reco::PFBlockElement
* elem1,
const
reco::PFBlockElement
* elem2)
const
{
23
constexpr
reco::PFTrajectoryPoint::LayerType
ECALShowerMax =
reco::PFTrajectoryPoint::ECALShowerMax
;
24
const
reco::PFBlockElementCluster
* ecalelem(
nullptr
);
25
const
reco::PFBlockElementGsfTrack
* gsfelem(
nullptr
);
26
double
dist(-1.0);
27
if
(elem1->
type
() < elem2->
type
()) {
28
ecalelem = static_cast<const reco::PFBlockElementCluster*>(elem1);
29
gsfelem = static_cast<const reco::PFBlockElementGsfTrack*>(elem2);
30
}
else
{
31
ecalelem = static_cast<const reco::PFBlockElementCluster*>(elem2);
32
gsfelem = static_cast<const reco::PFBlockElementGsfTrack*>(elem1);
33
}
34
const
reco::PFRecTrack
&
track
= gsfelem->
GsftrackPF
();
35
const
reco::PFClusterRef
& clusterref = ecalelem->
clusterRef
();
36
const
reco::PFTrajectoryPoint
& tkAtECAL =
track
.extrapolatedPoint(ECALShowerMax);
37
if
(tkAtECAL.
isValid
()) {
38
dist =
LinkByRecHit::testTrackAndClusterByRecHit
(
track
, *clusterref,
false
,
debug_
);
39
}
40
if
(
debug_
) {
41
if
(dist > 0.) {
42
std::cout
<<
" Here a link has been established"
43
<<
" between a GSF track an Ecal with dist "
<< dist << std::endl;
44
}
else
{
45
if
(
debug_
)
46
std::cout
<<
" No link found "
<< std::endl;
47
}
48
}
49
50
return
dist;
51
}
electrons_cff.bool
bool
Definition:
electrons_cff.py:366
GSFAndECALLinker::testLink
double testLink(const reco::PFBlockElement *, const reco::PFBlockElement *) const override
Definition:
GSFAndECALLinker.cc:22
HLT_FULL_cff.track
track
Definition:
HLT_FULL_cff.py:11724
funct::false
false
Definition:
Factorize.h:29
PFBlockElementCluster.h
GSFAndECALLinker::debug_
bool debug_
Definition:
GSFAndECALLinker.cc:17
reco::PFBlockElementGsfTrack::GsftrackPF
const GsfPFRecTrack & GsftrackPF() const
Definition:
PFBlockElementGsfTrack.h:54
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
LinkByRecHit::testTrackAndClusterByRecHit
static double testTrackAndClusterByRecHit(const reco::PFRecTrack &track, const reco::PFCluster &cluster, bool isBrem=false, bool debug=false)
Definition:
LinkByRecHit.cc:18
BlockElementLinkerBase
Definition:
BlockElementLinkerBase.h:10
edm::Ref< PFClusterCollection >
reco::PFTrajectoryPoint::ECALShowerMax
Definition:
PFTrajectoryPoint.h:46
PFCluster.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
edm::ParameterSet
Definition:
ParameterSet.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
GSFAndECALLinker::useKDTree_
bool useKDTree_
Definition:
GSFAndECALLinker.cc:17
LinkByRecHit.h
reco::PFTrajectoryPoint::LayerType
LayerType
Define the different layers where the track can be propagated.
Definition:
PFTrajectoryPoint.h:34
GSFAndECALLinker
Definition:
GSFAndECALLinker.cc:7
GSFAndECALLinker::GSFAndECALLinker
GSFAndECALLinker(const edm::ParameterSet &conf)
Definition:
GSFAndECALLinker.cc:9
reco::PFTrajectoryPoint::isValid
bool isValid() const
is this point valid ?
Definition:
PFTrajectoryPoint.h:84
reco::PFBlockElement
Abstract base class for a PFBlock element (track, cluster...)
Definition:
PFBlockElement.h:26
reco::PFBlockElementGsfTrack
Track Element.
Definition:
PFBlockElementGsfTrack.h:18
reco::PFRecTrack
reconstructed track used as an input to particle flow
Definition:
PFRecTrack.h:20
reco::PFTrajectoryPoint
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
Definition:
PFTrajectoryPoint.h:26
reco::PFBlockElementCluster
Cluster Element.
Definition:
PFBlockElementCluster.h:16
BlockElementLinkerBase.h
reco::PFBlockElementCluster::clusterRef
const PFClusterRef & clusterRef() const override
Definition:
PFBlockElementCluster.h:29
reco::PFBlockElement::type
Type type() const
Definition:
PFBlockElement.h:69
PFBlockElementGsfTrack.h
Generated for CMSSW Reference Manual by
1.8.16