#include "METOOLS/Main/Polarization_Tools.H" #include "ATOOLS/Org/Message.H" #include "ATOOLS/Org/Exception.H" #include "assert.h" #ifndef SQRT_05 #define SQRT_05 0.70710678118654757 #endif #ifndef sqrttwo #define sqrttwo 1.4142135623730950488 #endif using namespace METOOLS; using namespace ATOOLS; using namespace std; Polarization_Vector::Polarization_Vector(Vec4D p, bool anti, bool out) : std::vector() { Init(p); } Polarization_Vector::Polarization_Vector(Vec4D p, double m2, bool anti, bool out) : std::vector() { if(!IsZero((p.Abs2()-m2)/(fabs(p[0])+fabs(m2)), 1e-6)) { PRINT_INFO("Undefined for p.Abs2()="<0 && mu<4) return -1.0; return 0.0; } double S(int mu, int nu, Vec4D p) { return p[mu]*p[nu]/p.Abs2()-g(mu, nu); } void Polarization_Vector::Test(Vec4D p) { bool massless(IsZero(p.Mass(),1e-6)); std::cout<