CMS 3D CMS Logo

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

◆ convert() [1/11]

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 MillePedeFileConverter_cfg::out, packedPFCandidateRefMixer_cfi::pf, PID_Electron, PID_Muon, TrackRefitter_38T_cff::src, and HLT_2022v11_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  }
Definition: data.h:16

◆ convert() [2/11]

void fw2dpf::convert ( const TkObj in,
l1tpf_impl::PropagatedTrack out 
)
inline

Definition at line 92 of file Firmware2DiscretePF.h.

References recoMuon::in, and MillePedeFileConverter_cfg::out.

92  {
93  out.hwPt = in.hwPt;
94  out.hwCaloPtErr = in.hwPtErr;
95  out.hwEta = in.hwEta; // @calo
96  out.hwPhi = in.hwPhi; // @calo
97  out.hwZ0 = in.hwZ0;
98  out.src = nullptr;
99  }

◆ convert() [3/11]

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 convert(), MillePedeFileConverter_cfg::out, packedPFCandidateRefMixer_cfi::pf, PID_Electron, PID_Muon, TrackRefitter_38T_cff::src, and HLT_2022v11_cff::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  }
void convert(unsigned int NMAX, const PFChargedObj in[], std::vector< l1tpf_impl::PropagatedTrack > srctracks, std::vector< l1tpf_impl::PFParticle > &out)
Definition: data.h:16

◆ convert() [4/11]

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

Definition at line 67 of file Firmware2DiscretePF.h.

References MillePedeFileConverter_cfg::out, packedPFCandidateRefMixer_cfi::pf, PID_Photon, and TrackRefitter_38T_cff::src.

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  }

◆ convert() [5/11]

void fw2dpf::convert ( const HadCaloObj in,
l1tpf_impl::CaloCluster out 
)
inline

Definition at line 100 of file Firmware2DiscretePF.h.

References recoMuon::in, and MillePedeFileConverter_cfg::out.

100  {
101  out.hwPt = in.hwPt;
102  out.hwEmPt = in.hwEmPt;
103  out.hwEta = in.hwEta;
104  out.hwPhi = in.hwPhi;
105  out.isEM = in.hwIsEM;
106  out.src = nullptr;
107  }

◆ convert() [6/11]

void fw2dpf::convert ( const EmCaloObj in,
l1tpf_impl::CaloCluster out 
)
inline

Definition at line 108 of file Firmware2DiscretePF.h.

References recoMuon::in, and MillePedeFileConverter_cfg::out.

108  {
109  out.hwPt = in.hwPt;
110  out.hwPtErr = in.hwPtErr;
111  out.hwEta = in.hwEta;
112  out.hwPhi = in.hwPhi;
113  out.src = nullptr;
114  }

◆ convert() [7/11]

void fw2dpf::convert ( const MuObj in,
l1tpf_impl::Muon out 
)
inline

Definition at line 115 of file Firmware2DiscretePF.h.

References recoMuon::in, and MillePedeFileConverter_cfg::out.

115  {
116  out.hwPt = in.hwPt;
117  out.hwEta = in.hwEta; // @calo
118  out.hwPhi = in.hwPhi; // @calo
119  out.src = nullptr;
120  }

◆ convert() [8/11]

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, recoMuon::in, and MillePedeFileConverter_cfg::out.

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

◆ convert() [9/11]

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(), mps_fire::i, recoMuon::in, and MillePedeFileConverter_cfg::out.

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

◆ convert() [10/11]

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, recoMuon::in, and MillePedeFileConverter_cfg::out.

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  }
void convert(unsigned int NMAX, const PFChargedObj in[], std::vector< l1tpf_impl::PropagatedTrack > srctracks, std::vector< l1tpf_impl::PFParticle > &out)
assert(be >=bs)

◆ convert() [11/11]

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(), mps_fire::i, recoMuon::in, and MillePedeFileConverter_cfg::out.

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  }
void convert(unsigned int NMAX, const PFChargedObj in[], std::vector< l1tpf_impl::PropagatedTrack > srctracks, std::vector< l1tpf_impl::PFParticle > &out)
assert(be >=bs)