CMS 3D CMS Logo

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::PFAlgoBase ( const edm::ParameterSet iConfig)

Definition at line 7 of file PFAlgoBase.cc.

7 : debug_(iConfig.getUntrackedParameter<int>("debug", 0)) {}

◆ ~PFAlgoBase()

PFAlgoBase::~PFAlgoBase ( )
virtual

Definition at line 9 of file PFAlgoBase.cc.

9 {}

Member Function Documentation

◆ addCaloToPF() [1/2]

PFParticle& l1tpf_impl::PFAlgoBase::addCaloToPF ( Region r,
const CaloCluster calo 
) const
inlineprotected

◆ addCaloToPF() [2/2]

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

Definition at line 42 of file PFAlgoBase.cc.

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 }

References L1TowerCalibrationProducer_cfi::calo, l1t::PFCandidate::NeutralHadron, packedPFCandidateRefMixer_cfi::pf, and l1t::PFCandidate::Photon.

◆ addTrackToPF() [1/2]

PFParticle& l1tpf_impl::PFAlgoBase::addTrackToPF ( Region r,
const PropagatedTrack tk 
) const
inlineprotected

◆ addTrackToPF() [2/2]

PFParticle & PFAlgoBase::addTrackToPF ( std::vector< PFParticle > &  pfs,
const PropagatedTrack tk 
) const
protected

Definition at line 25 of file PFAlgoBase.cc.

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 }

References l1t::PFCandidate::ChargedHadron, l1tpf_impl::PropagatedTrack::hwEta, l1tpf_impl::PropagatedTrack::hwPhi, l1tpf_impl::PropagatedTrack::hwPt, l1t::PFCandidate::Muon, l1tpf_impl::PropagatedTrack::muonLink, and packedPFCandidateRefMixer_cfi::pf.

◆ initRegion()

void PFAlgoBase::initRegion ( Region r) const
protected

Definition at line 11 of file PFAlgoBase.cc.

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 }

References HltBtagPostValidation_cff::c, alignCSCRings::r, and submitPVValidationJobs::t.

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

◆ runPF()

virtual void l1tpf_impl::PFAlgoBase::runPF ( Region r) const
pure virtual

Member Data Documentation

◆ debug_

int l1tpf_impl::PFAlgoBase::debug_
protected
l1t::PFCandidate::Photon
Definition: PFCandidate.h:15
l1tpf_impl::PropagatedTrack::muonLink
bool muonLink
Definition: DiscretePFInputs.h:125
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
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
l1tpf_impl::PropagatedTrack::hwPt
int16_t hwPt
Definition: DiscretePFInputs.h:120
l1tpf_impl::PFParticle
Definition: DiscretePFInputs.h:184
l1t::PFCandidate::ChargedHadron
Definition: PFCandidate.h:15
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
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
l1tpf_impl::PFAlgoBase::debug_
int debug_
Definition: PFAlgoBase.h:18
l1tpf_impl::PropagatedTrack::hwEta
int16_t hwEta
Definition: DiscretePFInputs.h:123
calo
Definition: Common.h:9
l1t::PFCandidate::NeutralHadron
Definition: PFCandidate.h:15
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644