8 init_invert_table<pt_t, inv_pt_t, N_table_inv_pt>(
inv_pt_table_);
26 bool ret = deta * deta + dphi * dphi <
rCone2_;
30 dbgCout() <<
" part eta, seed eta: " <<
part.hwEta <<
", " <<
seed.hwEta << std::endl;
31 dbgCout() <<
" part phi, seed phi: " <<
part.hwPhi <<
", " <<
seed.hwPhi << std::endl;
32 dbgCout() <<
" pt, deta, dphi, r2, cone2, lt: " <<
part.hwPt <<
", " << deta <<
", " << dphi <<
", " 33 << deta * deta + dphi * dphi <<
", " <<
rCone2_ <<
", " <<
ret << std::endl;
50 std::vector<pt_etaphi_t> pt_deta;
51 pt_deta.resize(
parts.size());
61 std::vector<pt_etaphi_t> pt_dphi;
62 pt_dphi.resize(
parts.size());
78 std::for_each(pt_dphi.begin(), pt_dphi.end(), [](
pt_etaphi_t&
x) {
dbgCout() <<
"pt_dphi: " <<
x << std::endl; });
79 std::for_each(pt_deta.begin(), pt_deta.end(), [](
pt_etaphi_t&
x) {
dbgCout() <<
"pt_deta: " <<
x << std::endl; });
80 dbgCout() <<
" sum_pt_eta: " << sum_pt_eta <<
", 1/pt: " << inv_pt
81 <<
", sum_pt_eta * 1/pt: " <<
etaphi_t(sum_pt_eta * inv_pt) << std::endl;
82 dbgCout() <<
" sum_pt_phi: " << sum_pt_phi <<
", 1/pt: " << inv_pt
83 <<
", sum_pt_phi * 1/pt: " <<
etaphi_t(sum_pt_phi * inv_pt) << std::endl;
84 dbgCout() <<
" uncorr eta: " <<
seed.hwEta <<
", phi: " <<
seed.hwPhi << std::endl;
85 dbgCout() <<
" corr eta: " <<
eta <<
", phi: " <<
phi << std::endl;
94 std::vector<Particle>
work;
98 std::vector<Jet>
jets;
107 std::vector<Particle> particlesInCone;
108 std::copy_if(
work.begin(),
work.end(), std::back_inserter(particlesInCone), [&](
const Particle&
part) {
112 dbgCout() <<
"Seed: " <<
seed.hwPt <<
", " <<
seed.hwEta <<
", " <<
seed.hwPhi << std::endl;
113 std::for_each(particlesInCone.begin(), particlesInCone.end(), [&](
Particle&
part) {
114 dbgCout() <<
" Part: " <<
part.hwPt <<
", " <<
part.hwEta <<
", " <<
part.hwPhi << std::endl;
static T reduce(std::vector< T > x, Op op)
ret
prodAgent to be discontinued
static constexpr int nJets
constexpr float ETAPHI_LSB
L1SCJetEmu(bool debug, float coneSize, unsigned nJets)
ap_fixed< 18, 23 > detaphi2_t
ap_ufixed< 18, -2 > inv_pt_t
std::vector< Jet > emulateEvent(std::vector< Particle > &parts) const
static detaphi_t deltaPhi(Particle a, Particle b)
static constexpr OpPuppiObjMax op_max
Jet makeJet_HW(const std::vector< Particle > &parts) const
inv_pt_t inv_pt_table_[N_table_inv_pt]
constexpr int INTPHI_TWOPI
bool inCone(Particle seed, Particle part) const
ap_fixed< 22, 22 > pt_etaphi_t