1 #ifndef PFALGO_COMMON_REF_H 2 #define PFALGO_COMMON_REF_H 23 unsigned int dR2Max_Tk_Mu,
24 unsigned int dR2Max_Tk_Calo,
25 pt_t tk_MaxInvPt_Loose,
26 pt_t tk_MaxInvPt_Tight)
40 unsigned int nbins,
const float absetas[],
const float scales[],
const float offs[],
bool verbose =
false);
69 template <
typename COV>
72 template <
typename TV>
87 template <
typename COV>
91 const pt_t& trackCaloPtErr)
const {
92 pt_t caloPtMin =
track.hwPt - 2 * trackCaloPtErr;
97 int dr2min = 0, ibest = -1;
98 for (
int ic = 0, nCAL =
calo.size(); ic < nCAL; ++ic) {
105 dr2 +=
int((dpt * dpt) * dptscale);
106 if (ibest == -1 || dr2 < dr2min) {
114 template <
typename TV>
117 for (
int iout = 0; iout <
nOut; ++iout) {
121 for (
int iout = 0; iout <
nOut; ++iout) {
unsigned int dR2MAX_TK_MU_
unsigned int dR2MAX_TK_CALO_
void setDebug(bool debug=true)
int dr2_int(eta_t eta1, phi_t phi1, eta_t eta2, phi_t phi2)
virtual void mergeNeutrals(OutputRegion &out) const =0
moves all objects from out.pfphoton to the beginning of out.pfneutral
constexpr float INTPT_LSB
virtual ~PFAlgoEmulatorBase()
PFAlgoEmulatorBase(unsigned int nTrack, unsigned int nCalo, unsigned int nMu, unsigned int nSelCalo, unsigned int dR2Max_Tk_Mu, unsigned int dR2Max_Tk_Calo, pt_t tk_MaxInvPt_Loose, pt_t tk_MaxInvPt_Tight)
static void addCaloResolutionParameterSetDescription(edm::ParameterSetDescription &to)
void loadPtErrBins(unsigned int nbins, const float absetas[], const float scales[], const float offs[], bool verbose=false)
void ptsort_ref(int nIn, int nOut, const TV &in, TV &out) const
ap_fixed< 10, 6 > ptErrOffs_t
ap_ufixed< 9, 1 > ptErrScale_t
std::vector< ptErrBin > ptErrBins_
virtual void run(const PFInputRegion &in, OutputRegion &out) const =0
ap_ufixed< 14, 12, AP_TRN, AP_SAT > pt_t
int best_match_with_pt_ref(int dR2MAX, const COV &calo, const TkObjEmu &track, const pt_t &trackCaloPtErr) const
pt_t ptErr_ref(const PFRegionEmu ®ion, const TkObjEmu &track) const
void pfalgo_mu_ref(const PFInputRegion &in, OutputRegion &out, std::vector< int > &iMu) const
ap_ufixed< 17, 17 - 4, AP_TRN, AP_SAT > ptscale_t
void fillPFCand(const TkObjEmu &track, PFChargedObjEmu &pf, bool isMu, bool isEle) const