Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F9501350
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
25 KB
Subscribers
None
View Options
diff --git a/t/test_classify.cc b/t/test_classify.cc
index 3ff98c0..a412145 100644
--- a/t/test_classify.cc
+++ b/t/test_classify.cc
@@ -1,511 +1,518 @@
/**
* \authors The HEJ collaboration (see AUTHORS for details)
* \date 2019-2020
* \copyright GPLv2 or later
*/
#include "hej_test.hh"
#include <array>
#include <cstdlib>
#include <iostream>
#include <random>
#include <string>
#include <vector>
#include "fastjet/JetDefinition.hh"
#include "HEJ/Event.hh"
#include "HEJ/event_types.hh"
#include "HEJ/exceptions.hh"
#include "HEJ/PDG_codes.hh"
namespace {
const fastjet::JetDefinition jet_def{fastjet::JetAlgorithm::antikt_algorithm, 0.4};
const double min_jet_pt{30.};
const std::vector<std::string> all_quarks{"-4","-1","1","2","3","4"};
const std::vector<std::string> all_partons{"g","-2","-1","1","2","3","4"};
const std::vector<std::string> all_bosons{"h", "Wp", "Wm", "Z_photon_mix"};
const std::vector<std::string> all_gZ{"photon", "Z"};
const std::vector<std::string> all_w{"W+", "W-"};
static std::mt19937_64 ran{0};
bool couple_quark(std::string const & boson, std::string & quark){
if(std::abs(HEJ::to_ParticleID(boson)) == HEJ::ParticleID::Wp){
auto qflav{ HEJ::to_ParticleID(quark) };
if(!HEJ::is_anyquark(qflav)) return false;
const int W_charge = HEJ::to_ParticleID(boson)>0?1:-1;
if(W_charge*qflav < 0 && !(std::abs(qflav)%2)) return false; // not anti-down
if(W_charge*qflav > 0 && (std::abs(qflav)%2)) return false; // not up
quark=std::to_string(qflav-W_charge);
}
if(HEJ::to_ParticleID(boson) == HEJ::ParticleID::Z_photon_mix){
auto qflav{ HEJ::to_ParticleID(quark) };
if(!HEJ::is_anyquark(qflav)) return false;
}
return true;
}
- bool match_expectation( HEJ::event_type::EventType expected,
- std::array<std::string,2> const & in, std::vector<std::string> const & out,
- int const overwrite_boson = 0
+ //! Upon clustering does EventData match the expected classification
+ bool match_expectation(HEJ::event_type::EventType expected,
+ HEJ::Event::EventData evd
){
- HEJ::Event ev{ parse_configuration(
- in,out,overwrite_boson ).cluster(jet_def, min_jet_pt)};
+ HEJ::Event ev { evd.cluster(jet_def, min_jet_pt) };
if(ev.type() != expected){
std::cerr << "Expected type " << name(expected)
<< " but found " << name(ev.type()) << "\n" << ev;
auto jet_idx{ ev.particle_jet_indices() };
std::cout << "Particle Jet indices: ";
for(int const i: jet_idx)
std::cout << i << " ";
std::cout << std::endl;
return false;
}
return true;
}
+ //! Does match_expectation for EventData from parse_configuration
+ bool match_expectation( HEJ::event_type::EventType expected,
+ std::array<std::string,2> const & in, std::vector<std::string> const & out,
+ int const overwrite_boson = 0
+ ){
+ return match_expectation(expected, parse_configuration( in,out,overwrite_boson ));
+ }
+
//! test FKL configurations
//! if implemented==false : check processes that are not in HEJ yet
bool check_fkl( bool const implemented=true ){
using namespace HEJ;
auto const type{ implemented?event_type::FKL:event_type::non_resummable };
std::vector<std::string> bosons;
if(implemented)
bosons = all_bosons;
else {
bosons = all_gZ;
}
for(std::string const & first: all_partons) // all quark flavours
for(std::string const & last: all_partons){
for(int njet=2; njet<=6; ++njet){ // all multiplicities
if(njet==5) continue;
std::array<std::string,2> base_in{first,last};
std::vector<std::string> base_out(njet, "g");
base_out.front() = first;
base_out.back() = last;
if(implemented && !match_expectation(type, base_in, base_out))
return false;
for(auto const & boson: bosons) // any boson
for(int pos=0; pos<=njet; ++pos){ // at any position
auto in{base_in};
auto out{base_out};
// change quark flavours for W
const bool couple_idx = std::uniform_int_distribution<int>{0,1}(ran);
if(!couple_quark(boson, couple_idx?out.back():out.front()))
continue;
out.insert(out.begin()+pos, boson);
if(!match_expectation(type, in, out))
return false;
}
}
}
return true;
}
//! test unordered configurations
//! if implemented==false : check processes that are not in HEJ yet
bool check_uno( bool const implemented=true ){
using namespace HEJ;
auto const b{ implemented?event_type::unob:event_type::non_resummable };
auto const f{ implemented?event_type::unof:event_type::non_resummable };
std::vector<std::string> bosons;
if(implemented) {
bosons = all_bosons;
} else {
bosons = all_gZ;
}
for(std::string const & uno: all_quarks) // all quark flavours
for(std::string const & fkl: all_partons){
for(int njet=3; njet<=6; ++njet){ // all multiplicities >2
if(njet==5) continue;
for(int i=0; i<2; ++i){ // forward & backwards
std::array<std::string,2> base_in;
std::vector<std::string> base_out(njet, "g");
const int uno_pos = i?1:(njet-2);
const int fkl_pos = i?(njet-1):0;
base_in[i?0:1] = uno;
base_in[i?1:0] = fkl;
base_out[uno_pos] = uno;
base_out[fkl_pos] = fkl;
auto expectation{ i?b:f };
if( implemented
&& !match_expectation(expectation, base_in, base_out) )
return false;
for(auto const & boson: bosons){ // any boson
// at any position (higgs only inside FKL chain)
int start = 0;
int end = njet;
if(to_ParticleID(boson) == pid::higgs){
start = i?(uno_pos+1):fkl_pos;
end = i?(fkl_pos+1):uno_pos;
}
for(int pos=start; pos<=end; ++pos){
auto in{base_in};
auto out{base_out};
// change quark flavours for W
const bool couple_idx = std::uniform_int_distribution<int>{0,1}(ran);
if(!couple_quark(boson, couple_idx?out[fkl_pos]:out[uno_pos]))
continue;
out.insert(out.begin()+pos, boson);
if(!match_expectation(expectation, in, out))
return false;
}
}
}
}
}
return true;
}
//! test extremal qqx configurations
//! if implemented==false : check processes that are not in HEJ yet
bool check_extremal_qqx( bool const implemented=true ){
using namespace HEJ;
auto const b{ implemented?event_type::qqxexb:event_type::non_resummable };
auto const f{ implemented?event_type::qqxexf:event_type::non_resummable };
std::vector<std::string> bosons;
if(implemented)
bosons = all_w;
else {
bosons = all_gZ;
bosons.push_back("h");
bosons.push_back("Z_photon_mix");
}
for(std::string const & qqx: all_quarks) // all quark flavours
for(std::string const & fkl: all_partons){
std::string const qqx2{ std::to_string(HEJ::to_ParticleID(qqx)*-1) };
for(int njet=3; njet<=6; ++njet){ // all multiplicities >2
if(njet==5) continue;
for(int i=0; i<2; ++i){ // forward & backwards
std::array<std::string,2> base_in;
std::vector<std::string> base_out(njet, "g");
const int qqx_pos = i?0:(njet-2);
const int fkl_pos = i?(njet-1):0;
base_in[i?0:1] = "g";
base_in[i?1:0] = fkl;
base_out[fkl_pos] = fkl;
base_out[qqx_pos] = qqx;
base_out[qqx_pos+1] = qqx2;
auto expectation{ i?b:f };
if( implemented
&& !match_expectation(expectation, base_in, base_out) )
return false;
for(auto const & boson: bosons){ // all bosons
// at any position (higgs only inside FKL chain)
int start = 0;
int end = njet;
if(to_ParticleID(boson) == pid::higgs){
start = i?(qqx_pos+2):fkl_pos;
end = i?(fkl_pos+1):qqx_pos;
}
for(int pos=start; pos<=end; ++pos){
auto in{base_in};
auto out{base_out};
// change quark flavours for W
const bool couple_idx = std::uniform_int_distribution<int>{0,1}(ran);
if(couple_idx || !couple_quark(boson, out[fkl_pos]) ){
// (randomly) try couple to FKL, else fall-back to qqx
if(!couple_quark(boson, out[qqx_pos]))
couple_quark(boson, out[qqx_pos+1]);
}
out.insert(out.begin()+pos, boson);
if(!match_expectation(expectation, in, out))
return false;
}
}
}
}
// test allowed jet configurations
if( implemented){
if( !( match_expectation(f,{fkl,"g"},{fkl,"g","g","g","g",qqx,qqx2}, -3)
&& match_expectation(b,{"g",fkl},{qqx,qqx2,"g","g","g","g",fkl}, -4)
&& match_expectation(f,{fkl,"g"},{fkl,"g","g","g","g",qqx,qqx2}, -5)
&& match_expectation(b,{"g",fkl},{qqx,qqx2,"g","g","g","g",fkl}, -5)
&& match_expectation(f,{fkl,"g"},{fkl,"g","g","g","g",qqx,qqx2}, -6)
&& match_expectation(f,{fkl,"g"},{fkl,"g","g","g","g",qqx,qqx2}, -7)
&& match_expectation(b,{"g",fkl},{qqx,qqx2,"g","g","g","g",fkl}, -7)
&& match_expectation(f,{fkl,"g"},{fkl,"g","g","g","g",qqx,qqx2}, -8)
&& match_expectation(b,{"g",fkl},{qqx,qqx2,"g","g","g","g",fkl}, -8)
&& match_expectation(b,{"g",fkl},{qqx,qqx2,"g","g","g","g",fkl}, -9)
&& match_expectation(f,{fkl,"g"},{fkl,"g","g","g","g",qqx,qqx2}, -10)
&& match_expectation(f,{fkl,"g"},{fkl,"g","g","g","g",qqx,qqx2}, -11)
&& match_expectation(b,{"g",fkl},{qqx,qqx2,"g","g","g","g",fkl}, -11)
&& match_expectation(f,{fkl,"g"},{fkl,"g","g","g","g",qqx,qqx2}, -12)
&& match_expectation(b,{"g",fkl},{qqx,qqx2,"g","g","g","g",fkl}, -12)
))
return false;
if (fkl == "2") {
if( !( match_expectation(f,{"2","g"},{"1","Wp","g","g","g",qqx,qqx2}, -3)
&& match_expectation(b,{"g","2"},{qqx,qqx2,"g","Wp","g","g","1"}, -4)
&& match_expectation(f,{"2","g"},{"1","Wp","g","g","g",qqx,qqx2}, -5)
&& match_expectation(b,{"g","2"},{qqx,qqx2,"g","Wp","g","g","1"}, -5)
&& match_expectation(f,{"2","g"},{"1","g","Wp","g","g",qqx,qqx2}, -6)
&& match_expectation(f,{"2","g"},{"1","g","g","g","Wp",qqx,qqx2}, -7)
&& match_expectation(b,{"g","2"},{qqx,qqx2,"g","g","g","Wp","1"}, -7)
&& match_expectation(f,{"2","g"},{"1","Wp","g","g","g",qqx,qqx2}, -8)
&& match_expectation(b,{"g","2"},{qqx,qqx2,"Wp","g","g","g","1"}, -8)
&& match_expectation(b,{"g","2"},{qqx,qqx2,"g","Wp","g","g","1"}, -9)
&& match_expectation(f,{"2","g"},{"1","g","g","g","Wp",qqx,qqx2}, -10)
&& match_expectation(f,{"2","g"},{"1","g","g","g","Wp",qqx,qqx2}, -11)
&& match_expectation(b,{"g","2"},{qqx,qqx2,"g","g","g","Wp","1"}, -11)
&& match_expectation(f,{"2","g"},{"1","g","g","g","Wp",qqx,qqx2}, -12)
&& match_expectation(b,{"g","2"},{qqx,qqx2,"g","Wp","g","g","1"}, -12)
))
return false;
}
}
}
return true;
}
//! test central qqx configurations
//! if implemented==false : check processes that are not in HEJ yet
bool check_central_qqx(bool const implemented=true){
using namespace HEJ;
auto const t{ implemented?event_type::qqxmid:event_type::non_resummable };
std::vector<std::string> bosons;
if(implemented)
bosons = all_w;
else {
bosons = all_gZ;
bosons.push_back("h");
bosons.push_back("Z_photon_mix");
}
for(std::string const & qqx: all_quarks) // all quark flavours
for(std::string const & fkl1: all_partons)
for(std::string const & fkl2: all_partons){
std::string const qqx2{ std::to_string(HEJ::to_ParticleID(qqx)*-1) };
for(int njet=4; njet<=6; ++njet){ // all multiplicities >3
if(njet==5) continue;
for(int qqx_pos=1; qqx_pos<njet-2; ++qqx_pos){ // any qqx position
std::array<std::string,2> base_in;
std::vector<std::string> base_out(njet, "g");
base_in[0] = fkl1;
base_in[1] = fkl2;
base_out.front() = fkl1;
base_out.back() = fkl2;
base_out[qqx_pos] = qqx;
base_out[qqx_pos+1] = qqx2;
if( implemented && !match_expectation(t, base_in, base_out) )
return false;
for(auto const & boson: bosons) // any boson
for(int pos=0; pos<=njet; ++pos){ // at any position
if( to_ParticleID(boson) == pid::higgs
&& (pos==qqx_pos || pos==qqx_pos+1) )
continue;
auto in{base_in};
auto out{base_out};
// change quark flavours for W
const int couple_idx{ std::uniform_int_distribution<int>{0,2}(ran) };
// (randomly) try couple to FKL, else fall-back to qqx
if( couple_idx == 0 && couple_quark(boson, out.front()) ){}
else if( couple_idx == 1 && couple_quark(boson, out.back()) ){}
else {
if(!couple_quark(boson, out[qqx_pos]))
couple_quark(boson, out[qqx_pos+1]);
}
out.insert(out.begin()+pos, boson);
if(!match_expectation(t, in, out))
return false;
}
}
}
}
return true;
}
// this checks a (non excessive) list of non-resummable states
bool check_non_resummable(){
auto type{ HEJ::event_type::non_resummable};
return
// 2j - crossing lines
match_expectation(type, {"g","2"}, {"2","g"})
&& match_expectation(type, {"-1","g"}, {"g","-1"})
&& match_expectation(type, {"1","-1"}, {"-1","1"})
&& match_expectation(type, {"g","2"}, {"2","g","h"})
&& match_expectation(type, {"1","2"}, {"2","h","1"})
&& match_expectation(type, {"1","-1"}, {"h","-1","1"})
&& match_expectation(type, {"g","2"}, {"Wp","1","g"})
&& match_expectation(type, {"1","-1"}, {"-2","Wp","1"})
&& match_expectation(type, {"4","g"}, {"g","3","Wp"})
&& match_expectation(type, {"1","-2"}, {"-1","Wm","1"})
&& match_expectation(type, {"g","3"}, {"4","g","Wm"})
&& match_expectation(type, {"1","3"}, {"Wm","4","1"})
&& match_expectation(type, {"g","2"}, {"Z_photon_mix","2","g"})
&& match_expectation(type, {"1","-1"}, {"-1","Z_photon_mix","1"})
&& match_expectation(type, {"4","g"}, {"g","4","Z_photon_mix"})
// 2j - qqx
&& match_expectation(type, {"g","g"}, {"1","-1"})
&& match_expectation(type, {"g","g"}, {"-2","2","h"})
&& match_expectation(type, {"g","g"}, {"-4","Wp","3"})
&& match_expectation(type, {"g","g"}, {"Wm","-1","2"})
&& match_expectation(type, {"g","g"}, {"-3","Z_photon_mix","3"})
// 3j - crossing lines
&& match_expectation(type, {"g","4"}, {"4","g","g"})
&& match_expectation(type, {"-1","g"}, {"g","g","-1"})
&& match_expectation(type, {"1","3"}, {"3","g","1"})
&& match_expectation(type, {"-2","2"}, {"2","g","-2","h"})
&& match_expectation(type, {"-3","g"}, {"g","g","Wp","-4"})
&& match_expectation(type, {"1","-2"}, {"Wm","-1","g","1"})
&& match_expectation(type, {"-1","g"}, {"1","-1","-1"})
&& match_expectation(type, {"1","-4"}, {"Z_photon_mix","-4","g","1"})
// higgs inside uno
&& match_expectation(type, {"-1","g"}, {"g","h","-1","g"})
&& match_expectation(type, {"-1","1"}, {"g","h","-1","1"})
&& match_expectation(type, {"g","2"}, {"g","2","h","g"})
&& match_expectation(type, {"-1","1"}, {"-1","1","h","g"})
// higgs outside uno
&& match_expectation(type, {"-1","g"}, {"h","g","-1","g"})
&& match_expectation(type, {"-1","1"}, {"-1","1","g","h"})
// higgs inside qqx
&& match_expectation(type, {"g","g"}, {"-1","h","1","g","g"})
&& match_expectation(type, {"g","g"}, {"g","-1","h","1","g"})
&& match_expectation(type, {"g","g"}, {"g","g","2","h","-2"})
// higgs outside qqx
&& match_expectation(type, {"g","g"}, {"h","-1","1","g","g"})
&& match_expectation(type, {"g","g"}, {"g","g","2","-2","h"})
// 4j - two uno
&& match_expectation(type, {"-2","2"}, {"g","-2","2","g"})
&& match_expectation(type, {"1","3"}, {"g","1","h","3","g"})
&& match_expectation(type, {"1","2"}, {"g","1","3","Wp","g"})
&& match_expectation(type, {"1","-2"}, {"g","Wm","1","-1","g"})
&& match_expectation(type, {"3","2"}, {"g","3","Z_photon_mix","2","g"})
// 4j - two gluon outside
&& match_expectation(type, {"g","4"}, {"g","4","g","g"})
&& match_expectation(type, {"1","3"}, {"1","3","h","g","g"})
&& match_expectation(type, {"1","2"}, {"1","3","g","Wp","g"})
&& match_expectation(type, {"1","-2"}, {"1","Wm","-1","g","g"})
&& match_expectation(type, {"-1","g"}, {"g","g","-1","g"})
&& match_expectation(type, {"1","3"}, {"g","g","1","3","h"})
&& match_expectation(type, {"1","2"}, {"g","g","1","Wp","3"})
&& match_expectation(type, {"1","-2"}, {"Wm","g","g","1","-1"})
&& match_expectation(type, {"-1","2"}, {"g","g","-1","Z_photon_mix","2"})
// 4j - ggx+uno
&& match_expectation(type, {"g","4"}, {"1","-1","4","g"})
&& match_expectation(type, {"2","g"}, {"g","2","-3","3"})
&& match_expectation(type, {"g","4"}, {"1","-1","h","4","g"})
&& match_expectation(type, {"2","g"}, {"g","2","-3","3","h"})
&& match_expectation(type, {"g","4"}, {"Wp","1","-1","3","g"})
&& match_expectation(type, {"2","g"}, {"g","2","-4","Wp","3"})
&& match_expectation(type, {"g","4"}, {"2","Wm","-1","4","g"})
&& match_expectation(type, {"2","g"}, {"g","2","Wp","-3","4"})
&& match_expectation(type, {"-4","g"}, {"g","-4","-3","3","Z_photon_mix"})
// 3j - crossing+uno
&& match_expectation(type, {"1","4"}, {"g","4","1"})
&& match_expectation(type, {"1","4"}, {"4","1","g"})
&& match_expectation(type, {"1","4"}, {"g","h","4","1"})
&& match_expectation(type, {"-1","-3"},{"Wm","g","-4","-1"})
&& match_expectation(type, {"1","4"}, {"3","1","Wp","g"})
&& match_expectation(type, {"1","4"}, {"3","1","g","h"})
&& match_expectation(type, {"2","3"}, {"3","2","Z_photon_mix","g"})
// 3j - crossing+qqx
&& match_expectation(type, {"1","g"}, {"-1","1","g","1"})
&& match_expectation(type, {"1","g"}, {"-1","1","1","g"})
&& match_expectation(type, {"g","1"}, {"1","g","1","-1"})
&& match_expectation(type, {"g","1"}, {"g","1","1","-1"})
&& match_expectation(type, {"1","g"}, {"2","-2","g","1"})
&& match_expectation(type, {"1","g"}, {"2","-2","1","g"})
&& match_expectation(type, {"g","1"}, {"1","g","-2","2"})
&& match_expectation(type, {"g","1"}, {"g","1","-2","2"})
&& match_expectation(type, {"1","g"}, {"-1","1","h","g","1"})
&& match_expectation(type, {"1","g"}, {"-1","h","1","1","g"})
&& match_expectation(type, {"g","1"}, {"1","g","1","h","-1"})
&& match_expectation(type, {"g","1"}, {"h","g","1","1","-1"})
&& match_expectation(type, {"1","g"}, {"2","-2","1","g","h"})
&& match_expectation(type, {"g","1"}, {"g","h","1","-2","2"})
&& match_expectation(type, {"1","g"}, {"Wp","3","-4","g","1"})
&& match_expectation(type, {"3","g"}, {"-2","Wm","1","3","g"})
&& match_expectation(type, {"g","1"}, {"1","g","Wm","-3","4"})
&& match_expectation(type, {"g","-3"}, {"g","-3","-1","Wp","2"})
&& match_expectation(type, {"g","2"}, {"2","g","Z_photon_mix","4","-4"})
// 4j- gluon in qqx
&& match_expectation(type, {"g","1"}, {"1","g","-1","1"})
&& match_expectation(type, {"1","g"}, {"1","-1","g","1"})
&& match_expectation(type, {"g","1"}, {"1","g","Wm","-2","1"})
&& match_expectation(type, {"2","g"}, {"2","-2","g","Wp","1"})
&& match_expectation(type, {"g","g"}, {"Wp","3","g","-4","g"})
&& match_expectation(type, {"1","g"}, {"1","h","-1","g","1"})
&& match_expectation(type, {"3","g"}, {"3","1","g","Z_photon_mix","-1"})
// 6j - two qqx
&& match_expectation(type, {"g","g"}, {"1","-1","g","g","1","-1"})
&& match_expectation(type, {"g","g"}, {"1","-1","g","1","-1","g"})
&& match_expectation(type, {"g","g"}, {"g","1","-1","g","1","-1"})
&& match_expectation(type, {"g","g"}, {"g","1","-1","1","-1","g"})
&& match_expectation(type, {"g","g"}, {"g","1","1","-1","-1","g"})
&& match_expectation(type, {"g","g"}, {"h","1","-1","g","g","1","-1"})
&& match_expectation(type, {"g","g"}, {"1","Wp","-2","g","1","-1","g"})
&& match_expectation(type, {"g","g"}, {"g","1","Wp","-1","g","1","-2"})
&& match_expectation(type, {"g","g"}, {"g","1","-1","Wm","2","-1","g"})
&& match_expectation(type, {"g","g"}, {"g","1","2","-1","Wm","-1","g"})
&& match_expectation(type, {"g","g"}, {"2","-2","g","-1","1","Z_photon_mix","g"})
// random stuff (can be non-physical)
&& match_expectation(type, {"g","g"}, {"1","-2","2","-1"}) // != 2 qqx
&& match_expectation(type, {"g","g"}, {"1","-2","2","g"}) // could be qqx
&& match_expectation(type, {"e+","e-"},{"1","-1"}) // bad initial state
&& match_expectation(type, {"1","e-"}, {"g","1","Wm"}) // bad initial state
&& match_expectation(type, {"h","g"}, {"g","g"}) // bad initial state
&& match_expectation(type, {"-1","g"}, {"-1","1","1"}) // bad qqx
&& match_expectation(type, {"-1","g"}, {"1","1","-1"}) // crossing in bad qqx
&& match_expectation(type, {"-1","g"}, {"-2","1","1","Wp"}) // bad qqx
&& match_expectation(type, {"1","2"}, {"1","-1","g","g","g","2"}) // bad qqx
&& match_expectation(type, {"1","2"}, {"1","-1","-2","g","g","2"}) // gluon in bad qqx
&& match_expectation(type, {"g","g"}, {"-1","2","g","g"}) // wrong back qqx
&& match_expectation(type, {"g","g"}, {"g","g","2","1"}) // wrong forward qqx
&& match_expectation(type, {"g","g"}, {"g","-2","1","g"}) // wrong central qqx
&& match_expectation(type, {"1","g"}, {"1","-2","g","g","Wp"}) // extra quark
&& match_expectation(type, {"g","1"}, {"g","g","-2","1","Wp"}) // extra quark
&& match_expectation(type, {"g","1"}, {"g","g","Wp","-2","1"}) // extra quark
&& match_expectation(type, {"g","1"}, {"g","-2","1","g","Wp"}) // extra quark
&& match_expectation(type, {"g","g"}, {"g","g","g","-2","1","-1","Wp"}) // extra quark
&& match_expectation(type, {"1","g"}, {"g","Wp","1","-2","g"}) // extra quark
&& match_expectation(type, {"g","g"}, {"1","-1","-2","g","g","g","Wp"}) // extra quark
;
}
// Two boson states, that are currently not implemented
bool check_bad_FS(){
auto type{ HEJ::event_type::bad_final_state};
return
match_expectation(type, {"g","g"}, {"g","p","p","g"}) // protons
&& match_expectation(type, {"-4","-1"},{"-4","g","11","-11","-2"}) // leptons should be in decay
&& match_expectation(type, {"-4","-1"},{"-4","g","-13","g","-2"}) // leptons should be in decay
;
}
// not 2 jets
bool check_not_2_jets(){
auto type{ HEJ::event_type::no_2_jets};
return
match_expectation(type, {"g","g"}, {})
&& match_expectation(type, {"1","-1"}, {})
&& match_expectation(type, {"g","-1"}, {"-1"})
&& match_expectation(type, {"g","g"}, {"g"})
;
}
// not implemented processes
bool check_not_implemented(){
return check_fkl(false)
&& check_uno(false)
&& check_extremal_qqx(false)
&& check_central_qqx(false);
}
}
int main() {
// tests for "no false negatives"
// i.e. all HEJ-configurations get classified correctly
if(!check_fkl()) return EXIT_FAILURE;
if(!check_uno()) return EXIT_FAILURE;
if(!check_extremal_qqx()) return EXIT_FAILURE;
if(!check_central_qqx()) return EXIT_FAILURE;
// test for "no false positive"
// i.e. non-resummable gives non-resummable
if(!check_non_resummable()) return EXIT_FAILURE;
if(!check_bad_FS()) return EXIT_FAILURE;
if(!check_not_2_jets()) return EXIT_FAILURE;
if(!check_not_implemented()) return EXIT_FAILURE;
return EXIT_SUCCESS;
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Feb 23, 2:22 PM (2 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486188
Default Alt Text
(25 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment