21 #include <momemta/Utils.h> 24 LorentzVector getRandom4Vector(
double maxE,
double m) {
25 static std::mt19937_64 generator;
26 std::uniform_real_distribution<double> dist(-maxE, maxE);
29 const double px = dist(generator);
30 const double py = dist(generator);
31 const double pz = dist(generator);
32 const double E = std::sqrt(
SQ(m) +
SQ(px) +
SQ(py) +
SQ(pz));
33 LorentzVector p4(px, py, pz, E);
34 if (E < maxE && p4.M() >= 0) {
45 std::string demangle(
const char* name) {
49 std::unique_ptr<char, void (*)(void*)> res{abi::__cxa_demangle(name, NULL, NULL, &status),
52 return (status == 0) ? res.get() : name;
58 std::string demangle(
const char* name) {
return name; }