CMS 3D CMS Logo

Functions
dpf2fw Namespace Reference

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

Functions

void convert (const l1tpf_impl::CaloCluster &in, EmCaloObj &out)
 
void convert (const l1tpf_impl::CaloCluster &in, HadCaloObj &out)
 
void convert (const l1tpf_impl::Muon &in, MuObj &out)
 
void convert (const l1tpf_impl::PropagatedTrack &in, TkObj &out)
 
template<unsigned int NMAX, typename In , typename Out >
void convert (const std::vector< In > &in, Out out[NMAX])
 
template<typename In , typename Out >
void convert (unsigned int NMAX, const std::vector< In > &in, Out out[])
 
TkObj transformConvert (const l1tpf_impl::PropagatedTrack &in)
 

Detailed Description

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

Function Documentation

◆ convert() [1/6]

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

Definition at line 34 of file DiscretePF2Firmware.h.

34  {
35  out.hwPt = in.hwPt;
36  out.hwPtErr = in.hwPtErr;
37  out.hwEta = in.hwEta;
38  out.hwPhi = in.hwPhi;
39  }

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

◆ convert() [2/6]

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

Definition at line 27 of file DiscretePF2Firmware.h.

27  {
28  out.hwPt = in.hwPt;
29  out.hwEmPt = in.hwEmPt;
30  out.hwEta = in.hwEta;
31  out.hwPhi = in.hwPhi;
32  out.hwIsEM = in.isEM;
33  }

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

◆ convert() [3/6]

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

Definition at line 40 of file DiscretePF2Firmware.h.

40  {
41  out.hwPt = in.hwPt;
42  out.hwPtErr = 0; // does not exist in input
43  out.hwEta = in.hwEta; // @calo
44  out.hwPhi = in.hwPhi; // @calo
45  }

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

◆ convert() [4/6]

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

Definition at line 12 of file DiscretePF2Firmware.h.

12  {
13  out.hwPt = in.hwPt;
14  out.hwPtErr = in.hwCaloPtErr;
15  out.hwEta = in.hwEta; // @calo
16  out.hwPhi = in.hwPhi; // @calo
17  out.hwZ0 = in.hwZ0;
18  out.hwTightQuality = (in.hwStubs >= 6 && in.hwChi2 < 500);
19  }

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

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

◆ convert() [5/6]

template<unsigned int NMAX, typename In , typename Out >
void dpf2fw::convert ( const std::vector< In > &  in,
Out  out[NMAX] 
)

Definition at line 48 of file DiscretePF2Firmware.h.

48  {
49  for (unsigned int i = 0, n = std::min<unsigned int>(NMAX, in.size()); i < n; ++i) {
50  convert(in[i], out[i]);
51  }
52  for (unsigned int i = in.size(); i < NMAX; ++i) {
53  clear(out[i]);
54  }
55  }

References clear(), convert(), mps_fire::i, recoMuon::in, dqmiodumpmetadata::n, and MillePedeFileConverter_cfg::out.

◆ convert() [6/6]

template<typename In , typename Out >
void dpf2fw::convert ( unsigned int  NMAX,
const std::vector< In > &  in,
Out  out[] 
)

Definition at line 58 of file DiscretePF2Firmware.h.

58  {
59  for (unsigned int i = 0, n = std::min<unsigned int>(NMAX, in.size()); i < n; ++i) {
60  convert(in[i], out[i]);
61  }
62  for (unsigned int i = in.size(); i < NMAX; ++i) {
63  clear(out[i]);
64  }
65  }

References clear(), convert(), mps_fire::i, recoMuon::in, dqmiodumpmetadata::n, and MillePedeFileConverter_cfg::out.

◆ transformConvert()

TkObj dpf2fw::transformConvert ( const l1tpf_impl::PropagatedTrack in)

Definition at line 21 of file DiscretePF2Firmware.h.

21  {
22  TkObj out;
23  convert(in, out);
24  return out;
25  }

References convert(), recoMuon::in, and MillePedeFileConverter_cfg::out.

mps_fire.i
i
Definition: mps_fire.py:355
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
dpf2fw::convert
void convert(unsigned int NMAX, const std::vector< In > &in, Out out[])
Definition: DiscretePF2Firmware.h:58
clear
void clear(HadCaloObj &c)
Definition: data.h:124
TkObj
Definition: data.h:143
recoMuon::in
Definition: RecoMuonEnumerators.h:6
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31