CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
const edm::EventSetup & c
std::vector< CaloCluster > calo
void inputSort()
Definition: Region.cc:113
PFParticle & addCaloToPF(Region &r, const CaloCluster &calo) const
Definition: PFAlgoBase.h:21
const l1t::PFTrack * src
std::vector< PFParticle > puppi
Definition: Region.h:10
std::vector< PFParticle > pf
Definition: Region.h:9
void initRegion(Region &r) const
Definition: PFAlgoBase.cc:11
std::vector< PropagatedTrack > track
std::vector< CaloCluster > emcalo
const l1t::Muon * muonsrc
PFAlgoBase(const edm::ParameterSet &)
Definition: PFAlgoBase.cc:7
const l1t::PFCluster * src
PFParticle & addTrackToPF(Region &r, const PropagatedTrack &tk) const
Definition: PFAlgoBase.h:20