Skip to content

Commit

Permalink
update top pT reweighting (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
nfaltermann authored Jun 10, 2024
1 parent ca0ef40 commit 6ada18f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/reweighting.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,20 @@ ROOT::RDF::RNode topptreweighting(ROOT::RDF::RNode df,
std::cout << top_pts.size();
Logger::get("topptreweighting")
->error("TTbar reweighting applied to event with not exactly "
"two top quarks. Probably due to wrong sample type.");
"two top quarks. Probably due to wrong sample type. "
"n_top: {}",
top_pts.size());
throw std::runtime_error("Bad number of top quarks.");
}
if (top_pts[0] > 472.0)
top_pts[0] = 472.0;
if (top_pts[1] > 472.0)
top_pts[1] = 472.0;
const float parameter_a = 0.088;
const float parameter_b = -0.00087;
const float parameter_c = 0.00000092;
return sqrt(exp(parameter_a + parameter_b * top_pts[0] +
parameter_c * top_pts[0] * top_pts[0]) *
exp(parameter_a + parameter_b * top_pts[1] +
parameter_c * top_pts[1] * top_pts[1]));

if (top_pts[0] > 500.0)
top_pts[0] = 500.0;
if (top_pts[1] > 500.0)
top_pts[1] = 500.0;
const float parameter_a = 0.0615;
const float parameter_b = -0.0005;
return sqrt(exp(parameter_a + parameter_b * top_pts[0]) *
exp(parameter_a + parameter_b * top_pts[1]));
};
auto df1 = df.Define(weightname, ttbarreweightlambda,
{gen_pdgids, gen_status, gen_pt});
Expand Down Expand Up @@ -244,4 +244,4 @@ ROOT::RDF::RNode lhe_scale_weights(ROOT::RDF::RNode df,
return df1;
}
} // namespace reweighting
#endif /* GUARD_REWEIGHTING_H */
#endif /* GUARD_REWEIGHTING_H */

0 comments on commit 6ada18f

Please sign in to comment.