CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
fw2dpf Namespace Reference

NOTE: this include is not standalone, since the path to DiscretePFInputs is different in CMSSW & Vivado_HLS. More...

Functions

void convert (const PFChargedObj &src, const l1tpf_impl::PropagatedTrack &track, std::vector< l1tpf_impl::PFParticle > &out)
 
void convert (const TkObj &in, l1tpf_impl::PropagatedTrack &out)
 
void convert (const PFChargedObj &src, const TkObj &track, std::vector< l1tpf_impl::PFParticle > &out)
 
void convert (const PFNeutralObj &src, std::vector< l1tpf_impl::PFParticle > &out)
 
void convert (const HadCaloObj &in, l1tpf_impl::CaloCluster &out)
 
void convert (const EmCaloObj &in, l1tpf_impl::CaloCluster &out)
 
void convert (const MuObj &in, l1tpf_impl::Muon &out)
 
template<unsigned int NMAX, typename In >
void convert (const In in[NMAX], std::vector< l1tpf_impl::PFParticle > &out)
 
template<typename In >
void convert (unsigned int NMAX, const In in[], std::vector< l1tpf_impl::PFParticle > &out)
 
template<unsigned int NMAX>
void convert (const PFChargedObj in[NMAX], std::vector< l1tpf_impl::PropagatedTrack > srctracks, std::vector< l1tpf_impl::PFParticle > &out)
 
void convert (unsigned int NMAX, const PFChargedObj in[], std::vector< l1tpf_impl::PropagatedTrack > srctracks, std::vector< l1tpf_impl::PFParticle > &out)
 

Detailed Description

NOTE: this include is not standalone, since the path to DiscretePFInputs is different in CMSSW & Vivado_HLS.

Function Documentation

void fw2dpf::convert ( const PFChargedObj src,
const l1tpf_impl::PropagatedTrack track,
std::vector< l1tpf_impl::PFParticle > &  out 
)
inline

Definition at line 13 of file Firmware2DiscretePF.h.

References l1tpf_impl::PFParticle::cluster, PFChargedObj::hwEta, l1tpf_impl::PFParticle::hwEta, PFChargedObj::hwId, l1tpf_impl::PFParticle::hwId, PFChargedObj::hwPhi, l1tpf_impl::PFParticle::hwPhi, l1tpf_impl::CaloCluster::hwPt, PFChargedObj::hwPt, l1tpf_impl::PFParticle::hwPt, l1tpf_impl::PFParticle::hwStatus, l1tpf_impl::PFParticle::hwVtxEta, l1tpf_impl::PFParticle::hwVtxPhi, l1tpf_impl::PFParticle::muonsrc, PID_Electron, PID_Muon, l1tpf_impl::CaloCluster::src, l1tpf_impl::PFParticle::track, and HLT_FULL_cff::track.

Referenced by convert(), and l1tpf_impl::BitwisePFAlgo::runPF().

15  {
17  pf.hwPt = src.hwPt;
18  pf.hwEta = src.hwEta;
19  pf.hwPhi = src.hwPhi;
20  pf.hwVtxEta = src.hwEta; // FIXME: get from the track
21  pf.hwVtxPhi = src.hwPhi; // before propagation
22  pf.track = track; // FIXME: ok only as long as there is a 1-1 mapping
23  pf.cluster.hwPt = 0;
24  pf.cluster.src = nullptr;
25  pf.muonsrc = nullptr;
26  switch (src.hwId) {
27  case PID_Electron:
28  pf.hwId = 1;
29  break;
30  case PID_Muon:
31  pf.hwId = 4;
32  break;
33  default:
34  pf.hwId = 0;
35  break;
36  };
37  pf.hwStatus = 0;
38  out.push_back(pf);
39  }
etaphi_t hwEta
Definition: data.h:171
particleid_t hwId
Definition: data.h:172
pt_t hwPt
Definition: data.h:170
etaphi_t hwPhi
Definition: data.h:171
Definition: data.h:16
const l1t::Muon * muonsrc
const l1t::PFCluster * src
void fw2dpf::convert ( const TkObj in,
l1tpf_impl::PropagatedTrack out 
)
inline
void fw2dpf::convert ( const PFChargedObj src,
const TkObj track,
std::vector< l1tpf_impl::PFParticle > &  out 
)
inline

Definition at line 42 of file Firmware2DiscretePF.h.

References l1tpf_impl::PFParticle::cluster, convert(), PFChargedObj::hwEta, l1tpf_impl::PFParticle::hwEta, PFChargedObj::hwId, l1tpf_impl::PFParticle::hwId, PFChargedObj::hwPhi, l1tpf_impl::PFParticle::hwPhi, l1tpf_impl::CaloCluster::hwPt, PFChargedObj::hwPt, l1tpf_impl::PFParticle::hwPt, l1tpf_impl::PFParticle::hwStatus, l1tpf_impl::PFParticle::hwVtxEta, l1tpf_impl::PFParticle::hwVtxPhi, l1tpf_impl::PFParticle::muonsrc, PID_Electron, PID_Muon, l1tpf_impl::CaloCluster::src, and l1tpf_impl::PFParticle::track.

42  {
44  pf.hwPt = src.hwPt;
45  pf.hwEta = src.hwEta;
46  pf.hwPhi = src.hwPhi;
47  pf.hwVtxEta = src.hwEta; // FIXME: get from the track
48  pf.hwVtxPhi = src.hwPhi; // before propagation
49  convert(track, pf.track); // FIXME: ok only as long as there is a 1-1 mapping
50  pf.cluster.hwPt = 0;
51  pf.cluster.src = nullptr;
52  pf.muonsrc = nullptr;
53  switch (src.hwId) {
54  case PID_Electron:
55  pf.hwId = 1;
56  break;
57  case PID_Muon:
58  pf.hwId = 4;
59  break;
60  default:
61  pf.hwId = 0;
62  break;
63  };
64  pf.hwStatus = 0;
65  out.push_back(pf);
66  }
etaphi_t hwEta
Definition: data.h:171
particleid_t hwId
Definition: data.h:172
pt_t hwPt
Definition: data.h:170
etaphi_t hwPhi
Definition: data.h:171
Definition: data.h:16
const l1t::Muon * muonsrc
const l1t::PFCluster * src
void fw2dpf::convert ( const PFNeutralObj src,
std::vector< l1tpf_impl::PFParticle > &  out 
)
inline

Definition at line 67 of file Firmware2DiscretePF.h.

References l1tpf_impl::PFParticle::cluster, PFNeutralObj::hwEta, l1tpf_impl::PFParticle::hwEta, PFNeutralObj::hwId, l1tpf_impl::PFParticle::hwId, PFNeutralObj::hwPhi, l1tpf_impl::PFParticle::hwPhi, l1tpf_impl::CaloCluster::hwPt, l1tpf_impl::PropagatedTrack::hwPt, PFNeutralObj::hwPt, l1tpf_impl::PFParticle::hwPt, l1tpf_impl::PFParticle::hwStatus, l1tpf_impl::PFParticle::hwVtxEta, l1tpf_impl::PFParticle::hwVtxPhi, l1tpf_impl::PFParticle::muonsrc, PID_Photon, l1tpf_impl::CaloCluster::src, l1tpf_impl::InputTrack::src, and l1tpf_impl::PFParticle::track.

67  {
69  pf.hwPt = src.hwPt;
70  pf.hwEta = src.hwEta;
71  pf.hwPhi = src.hwPhi;
72  pf.hwVtxEta = src.hwEta;
73  pf.hwVtxPhi = src.hwPhi;
74  pf.track.hwPt = 0;
75  pf.track.src = nullptr;
76  pf.cluster.hwPt = src.hwPt;
77  pf.cluster.src = nullptr;
78  pf.muonsrc = nullptr;
79  switch (src.hwId) {
80  case PID_Photon:
81  pf.hwId = 3;
82  break;
83  default:
84  pf.hwId = 2;
85  break;
86  }
87  pf.hwStatus = 0;
88  out.push_back(pf);
89  }
etaphi_t hwEta
Definition: data.h:185
pt_t hwPt
Definition: data.h:184
particleid_t hwId
Definition: data.h:186
etaphi_t hwPhi
Definition: data.h:185
const l1t::PFTrack * src
const l1t::Muon * muonsrc
const l1t::PFCluster * src
void fw2dpf::convert ( const HadCaloObj in,
l1tpf_impl::CaloCluster out 
)
inline
void fw2dpf::convert ( const EmCaloObj in,
l1tpf_impl::CaloCluster out 
)
inline
void fw2dpf::convert ( const MuObj in,
l1tpf_impl::Muon out 
)
inline

Definition at line 115 of file Firmware2DiscretePF.h.

References l1tpf_impl::Muon::hwEta, MuObj::hwEta, l1tpf_impl::Muon::hwPhi, MuObj::hwPhi, l1tpf_impl::Muon::hwPt, MuObj::hwPt, and l1tpf_impl::Muon::src.

115  {
116  out.hwPt = in.hwPt;
117  out.hwEta = in.hwEta; // @calo
118  out.hwPhi = in.hwPhi; // @calo
119  out.src = nullptr;
120  }
const l1t::Muon * src
etaphi_t hwEta
Definition: data.h:160
pt_t hwPt
Definition: data.h:159
etaphi_t hwPhi
Definition: data.h:160
template<unsigned int NMAX, typename In >
void fw2dpf::convert ( const In  in[NMAX],
std::vector< l1tpf_impl::PFParticle > &  out 
)

Definition at line 123 of file Firmware2DiscretePF.h.

References convert(), mps_fire::i, and recoMuon::in.

123  {
124  for (unsigned int i = 0; i < NMAX; ++i) {
125  if (in[i].hwPt > 0)
126  convert(in[i], out);
127  }
128  }
template<typename In >
void fw2dpf::convert ( unsigned int  NMAX,
const In  in[],
std::vector< l1tpf_impl::PFParticle > &  out 
)

Definition at line 130 of file Firmware2DiscretePF.h.

References convert(), and mps_fire::i.

130  {
131  for (unsigned int i = 0; i < NMAX; ++i) {
132  if (in[i].hwPt > 0)
133  convert(in[i], out);
134  }
135  }
template<unsigned int NMAX>
void fw2dpf::convert ( const PFChargedObj  in[NMAX],
std::vector< l1tpf_impl::PropagatedTrack srctracks,
std::vector< l1tpf_impl::PFParticle > &  out 
)

Definition at line 137 of file Firmware2DiscretePF.h.

References cms::cuda::assert(), convert(), mps_fire::i, and recoMuon::in.

139  {
140  for (unsigned int i = 0; i < NMAX; ++i) {
141  if (in[i].hwPt > 0) {
142  assert(i < srctracks.size());
143  convert(in[i], srctracks[i], out);
144  }
145  }
146  }
assert(be >=bs)
void fw2dpf::convert ( unsigned int  NMAX,
const PFChargedObj  in[],
std::vector< l1tpf_impl::PropagatedTrack srctracks,
std::vector< l1tpf_impl::PFParticle > &  out 
)
inline

Definition at line 147 of file Firmware2DiscretePF.h.

References cms::cuda::assert(), convert(), and mps_fire::i.

150  {
151  for (unsigned int i = 0; i < NMAX; ++i) {
152  if (in[i].hwPt > 0) {
153  assert(i < srctracks.size());
154  convert(in[i], srctracks[i], out);
155  }
156  }
157  }
assert(be >=bs)