Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8723854
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
View Options
diff --git a/t/test_ME_jets.cc b/t/test_ME_jets.cc
deleted file mode 100644
index c26f1df..0000000
--- a/t/test_ME_jets.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-#include "LHEF/LHEF.h"
-#include "HEJ/MatrixElement.hh"
-#include "HEJ/Event.hh"
-
-struct Event{
- double weight;
- std::array<HEJ::Particle, 2> incoming;
- std::vector<HEJ::Particle> outgoing;
-
- Event(
- double wt,
- HEJ::Particle in1, HEJ::Particle in2,
- std::initializer_list<HEJ::Particle> out
- ):
- weight{wt},
- incoming{std::move(in1), std::move(in2)},
- outgoing{out}
- {}
-};
-
-constexpr
-HEJ::pid::ParticleID PDG(int id){
- return static_cast<HEJ::pid::ParticleID>(id);
-}
-
-constexpr double alpha_s = 0.119002421608181;
-constexpr double mu = 91.188;
-constexpr double R = 0.4;
-constexpr double min_jet_pt = 20.;
-constexpr auto jet_def = fastjet::antikt_algorithm;
-constexpr double ep = 1e-9;
-
-void dump(Event const & ev){
- LHEF::Writer writer{std::cerr};
- std::cerr << std::setprecision(15);
- HEJ::UnclusteredEvent tmp;
- tmp.incoming = ev.incoming;
- tmp.outgoing = ev.outgoing;
- tmp.central = {mu, mu, 0.};
- HEJ::Event out_ev{std::move(tmp), {jet_def, R}, min_jet_pt};
- writer.hepeup = to_HEPEUP(std::move(out_ev), nullptr);
- writer.writeEvent();
-}
-
-int main(){
- std::vector<Event> events = {
- /*
- * reference matrix elements obtained from traditional HEJ
- * weights correspond to wt the end of MEt2 in Jets.cxx
- */
-#include "ME_jets.dat"
- };
-
- HEJ::MatrixElementConfig config;
- config.jet_param.def = fastjet::JetDefinition(jet_def, R);
- config.jet_param.min_pt = min_jet_pt;
- config.log_correction = false;
-
- HEJ::MatrixElement ME{
- [](double){ return alpha_s; },
- config
- };
- for(size_t i = 0; i < events.size(); ++i){
- std::sort(
- begin(events[i].outgoing), end(events[i].outgoing),
- HEJ::rapidity_less{}
- );
- const double our_ME = ME.tree(
- mu, events[i].incoming, events[i].outgoing, true
- );
- const double deviation = our_ME/events[i].weight - 1.;
- if(std::abs(deviation) > ep){
- std::cerr
- << "Matrix element deviates by factor of " << 1+deviation << ":\n"
- "Is " << our_ME << ", should be " << events[i].weight << "\n"
- "Event:\n";
- dump(events[i]);
- return EXIT_FAILURE;
- }
- }
-}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Jan 20, 9:48 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4231835
Default Alt Text
(2 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment