CMS 3D CMS Logo

convertToL1TFormat.cc
Go to the documentation of this file.
2 
3 namespace l1ScoutingRun3 {
4 
6  return l1t::Muon(
8  muon.hwPt(),
9  muon.hwEta(),
10  muon.hwPhi(),
11  muon.hwQual(),
12  muon.hwCharge(),
13  muon.hwChargeValid(),
14  0,
15  muon.tfMuonIndex(),
16  0,
17  false,
18  0,
19  0,
20  0,
21  0,
22  muon.hwEtaAtVtx(),
23  muon.hwPhiAtVtx(),
24  ugmt::fEtaAtVtx(muon.hwEtaAtVtx()),
25  ugmt::fPhiAtVtx(muon.hwPhiAtVtx()),
26  muon.hwPtUnconstrained(),
27  ugmt::fPtUnconstrained(muon.hwPtUnconstrained()),
28  muon.hwDXY());
29  }
30 
32  return l1t::Jet(
33  math::PtEtaPhiMLorentzVector(demux::fEt(jet.hwEt()), demux::fEta(jet.hwEta()), demux::fPhi(jet.hwPhi()), 0.),
34  jet.hwEt(),
35  jet.hwEta(),
36  jet.hwPhi(),
37  jet.hwIso());
38  }
39 
40  l1t::EGamma getL1TEGamma(const EGamma& eGamma) {
42  demux::fEt(eGamma.hwEt()), demux::fEta(eGamma.hwEta()), demux::fPhi(eGamma.hwPhi()), 0.),
43  eGamma.hwEt(),
44  eGamma.hwEta(),
45  eGamma.hwPhi(),
46  0,
47  eGamma.hwIso());
48  }
49 
51  return l1t::Tau(
52  math::PtEtaPhiMLorentzVector(demux::fEt(tau.hwEt()), demux::fEta(tau.hwEta()), demux::fPhi(tau.hwPhi()), 0.),
53  tau.hwEt(),
54  tau.hwEta(),
55  tau.hwPhi(),
56  0,
57  tau.hwIso());
58  }
59 
61  switch (sumType) {
63  return l1t::EtSum(
64  math::PtEtaPhiMLorentzVector(demux::fEt(sums.hwTotalEt()), 0., 0., 0.), sumType, sums.hwTotalEt(), 0, 0, 0);
67  sumType,
68  sums.hwTotalEtEm(),
69  0,
70  0,
71  0);
73  return l1t::EtSum(
74  math::PtEtaPhiMLorentzVector(demux::fEt(sums.hwTotalHt()), 0., 0., 0.), sumType, sums.hwTotalHt(), 0, 0, 0);
76  return l1t::EtSum(
78  sumType,
79  sums.hwMissEt(),
80  0,
81  sums.hwMissEtPhi(),
82  0);
84  return l1t::EtSum(
86  sumType,
87  sums.hwMissHt(),
88  0,
89  sums.hwMissHtPhi(),
90  0);
92  return l1t::EtSum(
94  sumType,
95  sums.hwMissEtHF(),
96  0,
97  sums.hwMissEtHFPhi(),
98  0);
100  return l1t::EtSum(
102  sumType,
103  sums.hwMissHtHF(),
104  0,
105  sums.hwMissHtHFPhi(),
106  0);
107  case l1t::EtSum::kAsymEt:
108  return l1t::EtSum(
109  math::PtEtaPhiMLorentzVector(demux::fEt(sums.hwAsymEt()), 0., 0., 0.), sumType, sums.hwAsymEt(), 0, 0, 0);
110  case l1t::EtSum::kAsymHt:
111  return l1t::EtSum(
112  math::PtEtaPhiMLorentzVector(demux::fEt(sums.hwAsymHt()), 0., 0., 0.), sumType, sums.hwAsymHt(), 0, 0, 0);
114  return l1t::EtSum(math::PtEtaPhiMLorentzVector(demux::fEt(sums.hwAsymEtHF()), 0., 0., 0.),
115  sumType,
116  sums.hwAsymEtHF(),
117  0,
118  0,
119  0);
121  return l1t::EtSum(math::PtEtaPhiMLorentzVector(demux::fEt(sums.hwAsymHtHF()), 0., 0., 0.),
122  sumType,
123  sums.hwAsymHtHF(),
124  0,
125  0,
126  0);
128  return l1t::EtSum(math::PtEtaPhiMLorentzVector(0., 0., 0., 0.), sumType, sums.minBiasHFP0(), 0, 0, 0);
130  return l1t::EtSum(math::PtEtaPhiMLorentzVector(0., 0., 0., 0.), sumType, sums.minBiasHFP1(), 0, 0, 0);
132  return l1t::EtSum(math::PtEtaPhiMLorentzVector(0., 0., 0., 0.), sumType, sums.minBiasHFM0(), 0, 0, 0);
134  return l1t::EtSum(math::PtEtaPhiMLorentzVector(0., 0., 0., 0.), sumType, sums.minBiasHFM1(), 0, 0, 0);
136  return l1t::EtSum(math::PtEtaPhiMLorentzVector(0., 0., 0., 0.), sumType, sums.centrality(), 0, 0, 0);
138  return l1t::EtSum(math::PtEtaPhiMLorentzVector(0., 0., 0., 0.), sumType, sums.towerCount(), 0, 0, 0);
139  default:
140  return l1t::EtSum(math::PtEtaPhiMLorentzVector(0., 0., 0., 0.), l1t::EtSum::kUninitialized, 0, 0, 0, 0);
141  }
142  }
143 
144 } // namespace l1ScoutingRun3
const int hwTotalEt() const
l1t::Muon getL1TMuon(const Muon &muon)
const int minBiasHFM0() const
const int hwAsymEt() const
const int minBiasHFP0() const
l1t::EtSum getL1TEtSum(const BxSums &sums, l1t::EtSum::EtSumType)
const int minBiasHFM1() const
Definition: Tau.h:20
const int hwTotalHt() const
float fEta(int hwEta)
Definition: conversion.h:30
const int minBiasHFP1() const
const int hwMissEt() const
float fEt(int hwEt)
Definition: conversion.h:29
const int hwMissHtHF() const
float fPtUnconstrained(int hwPtUnconstrained)
Definition: conversion.h:19
float fEtaAtVtx(int hwEtaAtVtx)
Definition: conversion.h:22
const int centrality() const
l1t::Tau getL1TTau(const Tau &scTau)
const int hwMissEtHFPhi() const
const int hwAsymHt() const
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
Definition: Jet.h:20
float fPhiAtVtx(int hwPhiAtVtx)
Definition: conversion.h:23
const int hwMissHt() const
const int hwAsymEtHF() const
Definition: Muon.py:1
Definition: Jet.py:1
const int hwAsymHtHF() const
l1t::EGamma getL1TEGamma(const EGamma &eGamma)
const int hwMissEtHF() const
float fPhi(int hwPhi)
Definition: conversion.h:18
l1t::Jet getL1TJet(const Jet &jet)
const int hwTotalEtEm() const
Definition: Muon.h:21
Definition: Tau.py:1
float fPhi(int hwPhi)
Definition: conversion.h:31
const int towerCount() const
float fPt(int hwPt)
Definition: conversion.h:16
const int hwMissHtPhi() const
const int hwMissEtPhi() const
const int hwMissHtHFPhi() const
EtSumType
Definition: EtSum.h:27
float fEta(int hwEta)
Definition: conversion.h:17