Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update top pT reweighting #270

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 */
Loading