本文整理汇总了C++中Jet::Mass方法的典型用法代码示例。如果您正苦于以下问题:C++ Jet::Mass方法的具体用法?C++ Jet::Mass怎么用?C++ Jet::Mass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jet
的用法示例。
在下文中一共展示了Jet::Mass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Result
Jet MuXboostedBTagging::Result(std::vector<Lepton> const &muons, Jet const &jet, Jet &core) const
{
INFO0;
// Keep track of the smallest x for any muon
auto min_x = std::numeric_limits<double>::max(); // Large enough, simple significand
// Iterate through each muon, add it to the core, and calculate the resulting boost invariant
auto p4_neutrino_correction = Jet {};
for (auto const &muon : muons) {
// Add back the muon and the neutrino
core += 2 * muon;
// Set a hard ceiling on subjet mass, for poor reconstruction
auto dot = muon.Spatial().Dot(core.Spatial());
auto min = std::min(core.Mass(), MaxSubJetMass());
if (dot == 0_eV * eV || min == 0_eV) continue;
auto cross = muon.Spatial().Cross(core.Spatial()).Mag();
auto x_core = static_cast<double>(core.Energy() * cross / dot / min);
CHECK(x_core >= 0, x_core);
if (x_core < 0) return jet;
// Add the neutrino to original jet IFF the muon passes the boosted test
if (x_core <= XMax()) p4_neutrino_correction += muon;
min_x = std::min(min_x, x_core);
}
auto result = jet + p4_neutrino_correction;
CHECK(result.Pt() > 0_eV, result.Pt());
CHECK(!(result.Pt() != result.Pt()), result.Pt())
CHECK(!(core.Pt() != core.Pt()), core.Pt())
CHECK(!(min_x != min_x), min_x)
if (result.Pt() <= 0_eV) return jet;
result.SetInfo(jet.Info());
result.Info().SetMuBTag(min_x, core.Pt() / result.Pt());
return result;
}