CMS 3D CMS Logo

PFAlgoBase.cc
Go to the documentation of this file.
2 
4 
5 using namespace l1tpf_impl;
6 
7 PFAlgoBase::PFAlgoBase(const edm::ParameterSet &iConfig) : debug_(iConfig.getUntrackedParameter<int>("debug", 0)) {}
8 
10 
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;
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;
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
l1tpf_impl::Region
Definition: Region.h:8
edm::ParameterSet
Definition: ParameterSet.h:47
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
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
calo
Definition: Common.h:9
l1t::PFCandidate::NeutralHadron
Definition: PFCandidate.h:15
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644