CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
l1tpf_impl::PFAlgoBase Class Referenceabstract

#include <PFAlgoBase.h>

Inheritance diagram for l1tpf_impl::PFAlgoBase:
l1tpf_impl::BitwisePFAlgo l1tpf_impl::PFAlgo2HGC l1tpf_impl::PFAlgo3

Public Member Functions

 PFAlgoBase (const edm::ParameterSet &)
 
virtual void runPF (Region &r) const =0
 
virtual ~PFAlgoBase ()
 

Protected Member Functions

PFParticleaddCaloToPF (Region &r, const CaloCluster &calo) const
 
PFParticleaddCaloToPF (std::vector< PFParticle > &pfs, const CaloCluster &calo) const
 
PFParticleaddTrackToPF (Region &r, const PropagatedTrack &tk) const
 
PFParticleaddTrackToPF (std::vector< PFParticle > &pfs, const PropagatedTrack &tk) const
 
void initRegion (Region &r) const
 

Protected Attributes

int debug_
 

Detailed Description

Definition at line 11 of file PFAlgoBase.h.

Constructor & Destructor Documentation

PFAlgoBase::PFAlgoBase ( const edm::ParameterSet iConfig)

Definition at line 7 of file PFAlgoBase.cc.

7 : debug_(iConfig.getUntrackedParameter<int>("debug", 0)) {}
T getUntrackedParameter(std::string const &, T const &) const
PFAlgoBase::~PFAlgoBase ( )
virtual

Definition at line 9 of file PFAlgoBase.cc.

9 {}

Member Function Documentation

PFParticle& l1tpf_impl::PFAlgoBase::addCaloToPF ( Region r,
const CaloCluster calo 
) const
inlineprotected
PFParticle & PFAlgoBase::addCaloToPF ( std::vector< PFParticle > &  pfs,
const CaloCluster calo 
) const
protected

Definition at line 42 of file PFAlgoBase.cc.

References l1tpf_impl::PFParticle::cluster, l1tpf_impl::CaloCluster::hwEta, l1tpf_impl::PFParticle::hwEta, l1tpf_impl::PFParticle::hwId, l1tpf_impl::CaloCluster::hwPhi, l1tpf_impl::PFParticle::hwPhi, l1tpf_impl::CaloCluster::hwPt, l1tpf_impl::PropagatedTrack::hwPt, l1tpf_impl::PFParticle::hwPt, l1tpf_impl::PFParticle::hwStatus, l1tpf_impl::PFParticle::hwVtxEta, l1tpf_impl::PFParticle::hwVtxPhi, l1tpf_impl::CaloCluster::isEM, l1tpf_impl::PFParticle::muonsrc, l1t::PFCandidate::NeutralHadron, l1t::PFCandidate::Photon, l1tpf_impl::InputTrack::src, and l1tpf_impl::PFParticle::track.

42  {
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 l1t::PFTrack * src
const l1t::Muon * muonsrc
PFParticle& l1tpf_impl::PFAlgoBase::addTrackToPF ( Region r,
const PropagatedTrack tk 
) const
inlineprotected
PFParticle & PFAlgoBase::addTrackToPF ( std::vector< PFParticle > &  pfs,
const PropagatedTrack tk 
) const
protected

Definition at line 25 of file PFAlgoBase.cc.

References l1t::PFCandidate::ChargedHadron, l1tpf_impl::PFParticle::cluster, l1tpf_impl::PropagatedTrack::hwEta, l1tpf_impl::PFParticle::hwEta, l1tpf_impl::PFParticle::hwId, l1tpf_impl::PropagatedTrack::hwPhi, l1tpf_impl::PFParticle::hwPhi, l1tpf_impl::CaloCluster::hwPt, l1tpf_impl::PropagatedTrack::hwPt, l1tpf_impl::PFParticle::hwPt, l1tpf_impl::PFParticle::hwStatus, l1tpf_impl::PFParticle::hwVtxEta, l1tpf_impl::PFParticle::hwVtxPhi, l1t::PFCandidate::Muon, l1tpf_impl::PropagatedTrack::muonLink, l1tpf_impl::PFParticle::muonsrc, l1tpf_impl::CaloCluster::src, and l1tpf_impl::PFParticle::track.

25  {
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 }
const l1t::Muon * muonsrc
const l1t::PFCluster * src
void PFAlgoBase::initRegion ( Region r) const
protected

Definition at line 11 of file PFAlgoBase.cc.

References c, l1tpf_impl::InputRegion::calo, l1tpf_impl::InputRegion::emcalo, l1tpf_impl::Region::inputSort(), l1tpf_impl::Region::pf, l1tpf_impl::Region::puppi, submitPVValidationJobs::t, and l1tpf_impl::InputRegion::track.

Referenced by l1tpf_impl::PFAlgo2HGC::runPF(), l1tpf_impl::PFAlgo3::runPF(), and l1tpf_impl::BitwisePFAlgo::runPF().

11  {
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 }
const edm::EventSetup & c
std::vector< CaloCluster > calo
void inputSort()
Definition: Region.cc:113
std::vector< PFParticle > puppi
Definition: Region.h:10
std::vector< PFParticle > pf
Definition: Region.h:9
std::vector< PropagatedTrack > track
std::vector< CaloCluster > emcalo
virtual void l1tpf_impl::PFAlgoBase::runPF ( Region r) const
pure virtual

Member Data Documentation

int l1tpf_impl::PFAlgoBase::debug_
protected