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::PropagatedTrack &in, TkObj &out)
 
void convert (const l1tpf_impl::CaloCluster &in, HadCaloObj &out)
 
void convert (const l1tpf_impl::CaloCluster &in, EmCaloObj &out)
 
void convert (const l1tpf_impl::Muon &in, MuObj &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::PropagatedTrack in,
TkObj out 
)
inline

Definition at line 12 of file DiscretePF2Firmware.h.

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

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

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  }

◆ convert() [2/6]

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

Definition at line 27 of file DiscretePF2Firmware.h.

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

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  }

◆ convert() [3/6]

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

Definition at line 34 of file DiscretePF2Firmware.h.

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

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

◆ convert() [4/6]

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

Definition at line 40 of file DiscretePF2Firmware.h.

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

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  }

◆ 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.

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

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  }
void convert(unsigned int NMAX, const std::vector< In > &in, Out out[])
void clear(HadCaloObj &c)
Definition: data.h:124

◆ 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.

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

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  }
void convert(unsigned int NMAX, const std::vector< In > &in, Out out[])
void clear(HadCaloObj &c)
Definition: data.h:124

◆ transformConvert()

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

Definition at line 21 of file DiscretePF2Firmware.h.

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

21  {
22  TkObj out;
23  convert(in, out);
24  return out;
25  }
void convert(unsigned int NMAX, const std::vector< In > &in, Out out[])
Definition: data.h:143