Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
}
l1tpf_impl::PropagatedTrack::muonLink
bool muonLink
Definition:
DiscretePFInputs.h:125
l1tpf_impl::PFParticle::hwVtxPhi
int16_t hwVtxPhi
Definition:
DiscretePFInputs.h:190
c
const edm::EventSetup & c
Definition:
SiStripLAProfileBooker.cc:66
l1tpf_impl::PFParticle::cluster
CaloCluster cluster
Definition:
DiscretePFInputs.h:192
l1t::PFCandidate::Photon
Definition:
PFCandidate.h:15
l1tpf_impl::Region
Definition:
Region.h:8
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
l1tpf_impl::PFParticle::track
PropagatedTrack track
Definition:
DiscretePFInputs.h:193
l1tpf_impl::CaloCluster::isEM
bool isEM
Definition:
DiscretePFInputs.h:32
l1tpf_impl::InputRegion::calo
std::vector< CaloCluster > calo
Definition:
DiscretePFInputs.h:226
l1tpf_impl::PFParticle::hwPt
int16_t hwPt
Definition:
DiscretePFInputs.h:185
l1tpf_impl::Region::inputSort
void inputSort()
Definition:
Region.cc:113
l1tpf_impl::PFParticle::hwVtxEta
int16_t hwVtxEta
Definition:
DiscretePFInputs.h:189
l1tpf_impl::PFParticle
Definition:
DiscretePFInputs.h:184
l1tpf_impl::PropagatedTrack
Definition:
DiscretePFInputs.h:119
l1t::PFCandidate::Muon
Definition:
PFCandidate.h:15
l1tpf_impl::PFAlgoBase::addCaloToPF
PFParticle & addCaloToPF(Region &r, const CaloCluster &calo) const
Definition:
PFAlgoBase.h:21
l1tpf_impl::CaloCluster
Definition:
DiscretePFInputs.h:25
l1tpf_impl::InputTrack::src
const l1t::PFTrack * src
Definition:
DiscretePFInputs.h:90
l1tpf_impl::Region::puppi
std::vector< PFParticle > puppi
Definition:
Region.h:10
l1tpf_impl::Region::pf
std::vector< PFParticle > pf
Definition:
Region.h:9
l1tpf_impl::PFParticle::hwStatus
uint16_t hwStatus
Definition:
DiscretePFInputs.h:196
l1tpf_impl::PropagatedTrack::hwPt
int16_t hwPt
Definition:
DiscretePFInputs.h:120
l1tpf_impl::CaloCluster::hwPhi
int16_t hwPhi
Definition:
DiscretePFInputs.h:30
l1tpf_impl::PFAlgoBase::initRegion
void initRegion(Region &r) const
Definition:
PFAlgoBase.cc:11
PFAlgoBase.h
l1tpf_impl::PFParticle::hwId
uint8_t hwId
Definition:
DiscretePFInputs.h:188
l1tpf_impl::CaloCluster::hwEta
int16_t hwEta
Definition:
DiscretePFInputs.h:29
l1tpf_impl::PropagatedTrack::hwPhi
int16_t hwPhi
Definition:
DiscretePFInputs.h:124
l1tpf_impl::PFAlgoBase::~PFAlgoBase
virtual ~PFAlgoBase()
Definition:
PFAlgoBase.cc:9
l1tpf_impl::InputRegion::track
std::vector< PropagatedTrack > track
Definition:
DiscretePFInputs.h:228
l1t::PFCandidate::NeutralHadron
Definition:
PFCandidate.h:15
l1tpf_impl::InputRegion::emcalo
std::vector< CaloCluster > emcalo
Definition:
DiscretePFInputs.h:227
l1tpf_impl::PFParticle::muonsrc
const l1t::Muon * muonsrc
Definition:
DiscretePFInputs.h:197
l1tpf_impl::PFAlgoBase::PFAlgoBase
PFAlgoBase(const edm::ParameterSet &)
Definition:
PFAlgoBase.cc:7
alignCSCRings.r
list r
Definition:
alignCSCRings.py:93
edm::ParameterSet
Definition:
ParameterSet.h:47
l1tpf_impl::PFParticle::hwPhi
int16_t hwPhi
Definition:
DiscretePFInputs.h:187
iConfig
iConfig
Definition:
TSGFromPropagation.cc:56
l1t::PFCandidate::ChargedHadron
Definition:
PFCandidate.h:15
l1tpf_impl::PFParticle::hwEta
int16_t hwEta
Definition:
DiscretePFInputs.h:186
l1tpf_impl::CaloCluster::src
const l1t::PFCluster * src
Definition:
DiscretePFInputs.h:33
PFCandidate.h
l1tpf_impl::PFAlgoBase::addTrackToPF
PFParticle & addTrackToPF(Region &r, const PropagatedTrack &tk) const
Definition:
PFAlgoBase.h:20
debug_
debug_
Definition:
DTTrigPhase2Prod.cc:175
l1tpf_impl::PropagatedTrack::hwEta
int16_t hwEta
Definition:
DiscretePFInputs.h:123
l1tpf_impl::CaloCluster::hwPt
int16_t hwPt
Definition:
DiscretePFInputs.h:26
Generated for CMSSW Reference Manual by
1.8.5