L1Trigger
Phase2L1ParticleFlow
src
PFAlgoBase.cc
Go to the documentation of this file.
1
#include "
L1Trigger/Phase2L1ParticleFlow/interface/PFAlgoBase.h
"
2
3
#include "
DataFormats/L1TParticleFlow/interface/PFCandidate.h
"
4
5
using namespace
l1tpf_impl
;
6
7
PFAlgoBase::PFAlgoBase
(
const
edm::ParameterSet
&iConfig) : debug_(iConfig.getUntrackedParameter<
int
>(
"debug"
, 0)) {}
8
9
PFAlgoBase::~PFAlgoBase
() {}
10
11
void
PFAlgoBase::initRegion
(
Region
&
r
)
const
{
12
r
.inputSort();
13
r
.pf.clear();
14
r
.puppi.clear();
15
for
(
auto
&
c
:
r
.calo)
16
c
.used =
false
;
17
for
(
auto
&
c
:
r
.emcalo)
18
c
.used =
false
;
19
for
(
auto
&
t
:
r
.track) {
20
t
.used =
false
;
21
t
.muonLink =
false
;
22
}
23
}
24
25
PFParticle
&
PFAlgoBase::addTrackToPF
(std::vector<PFParticle> &pfs,
const
PropagatedTrack
&tk)
const
{
26
PFParticle
pf
;
27
pf
.hwPt = tk.
hwPt
;
28
pf
.hwEta = tk.
hwEta
;
29
pf
.hwPhi = tk.
hwPhi
;
30
pf
.hwVtxEta = tk.
hwEta
;
// FIXME: get from the track
31
pf
.hwVtxPhi = tk.
hwPhi
;
// before propagation
32
pf
.track = tk;
33
pf
.cluster.hwPt = 0;
34
pf
.cluster.src =
nullptr
;
35
pf
.muonsrc =
nullptr
;
36
pf
.hwId = (tk.
muonLink
?
l1t::PFCandidate::Muon
:
l1t::PFCandidate::ChargedHadron
);
37
pf
.hwStatus = 0;
38
pfs.push_back(
pf
);
39
return
pfs.back();
40
}
41
42
PFParticle
&
PFAlgoBase::addCaloToPF
(std::vector<PFParticle> &pfs,
const
CaloCluster
&
calo
)
const
{
43
PFParticle
pf
;
44
pf
.hwPt =
calo
.hwPt;
45
pf
.hwEta =
calo
.hwEta;
46
pf
.hwPhi =
calo
.hwPhi;
47
pf
.hwVtxEta =
calo
.hwEta;
48
pf
.hwVtxPhi =
calo
.hwPhi;
49
pf
.track.hwPt = 0;
50
pf
.track.src =
nullptr
;
51
pf
.cluster =
calo
;
52
pf
.muonsrc =
nullptr
;
53
pf
.hwId = (
calo
.isEM ?
l1t::PFCandidate::Photon
:
l1t::PFCandidate::NeutralHadron
);
54
pf
.hwStatus = 0;
55
pfs.push_back(
pf
);
56
return
pfs.back();
57
}
l1t::PFCandidate::Photon
Definition:
PFCandidate.h:15
PFCandidate.h
l1tpf_impl::PropagatedTrack::muonLink
bool muonLink
Definition:
DiscretePFInputs.h:125
l1tpf_impl::PropagatedTrack
Definition:
DiscretePFInputs.h:119
l1tpf_impl
Definition:
BitwisePFAlgo.h:8
L1TowerCalibrationProducer_cfi.calo
calo
Definition:
L1TowerCalibrationProducer_cfi.py:59
l1tpf_impl::PropagatedTrack::hwPhi
int16_t hwPhi
Definition:
DiscretePFInputs.h:124
l1tpf_impl::PFAlgoBase::addCaloToPF
PFParticle & addCaloToPF(Region &r, const CaloCluster &calo) const
Definition:
PFAlgoBase.h:21
l1tpf_impl::PropagatedTrack::hwPt
int16_t hwPt
Definition:
DiscretePFInputs.h:120
PFAlgoBase.h
l1tpf_impl::PFParticle
Definition:
DiscretePFInputs.h:184
l1tpf_impl::PFAlgoBase::PFAlgoBase
PFAlgoBase(const edm::ParameterSet &)
Definition:
PFAlgoBase.cc:7
l1tpf_impl::PFAlgoBase::~PFAlgoBase
virtual ~PFAlgoBase()
Definition:
PFAlgoBase.cc:9
OrderedSet.t
t
Definition:
OrderedSet.py:90
l1tpf_impl::Region
Definition:
Region.h:8
edm::ParameterSet
Definition:
ParameterSet.h:36
l1t::PFCandidate::ChargedHadron
Definition:
PFCandidate.h:15
createfilelist.int
int
Definition:
createfilelist.py:10
l1tpf_impl::PFAlgoBase::initRegion
void initRegion(Region &r) const
Definition:
PFAlgoBase.cc:11
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
l1tpf_impl::PFAlgoBase::addTrackToPF
PFParticle & addTrackToPF(Region &r, const PropagatedTrack &tk) const
Definition:
PFAlgoBase.h:20
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
l1t::PFCandidate::Muon
Definition:
PFCandidate.h:15
l1tpf_impl::CaloCluster
Definition:
DiscretePFInputs.h:25
packedPFCandidateRefMixer_cfi.pf
pf
Definition:
packedPFCandidateRefMixer_cfi.py:4
l1tpf_impl::PropagatedTrack::hwEta
int16_t hwEta
Definition:
DiscretePFInputs.h:123
l1t::PFCandidate::NeutralHadron
Definition:
PFCandidate.h:15
Generated for CMSSW Reference Manual by
1.8.16