#include "ATOOLS/Org/Run_Parameter.H" #include "ATOOLS/Org/Message.H" #include "ATOOLS/Org/Exception.H" #include "ATOOLS/Org/MyStrStream.H" #include #include "PDF/Main/PDF_Base.H" #include "ATOOLS/Phys/Flavour.H" #include "ATOOLS/Org/My_MPI.H" using namespace PDF; using namespace ATOOLS; extern "C" { void setct10_(int &); double ct10pdf_(int &,double &, double &); void shabrt_() { Abort(); } } namespace PDF { class CT10_Fortran_Interface : public PDF_Base { private: int m_anti, m_nf; double m_f[11], m_x, m_Q; bool m_calculated[11]; public: CT10_Fortran_Interface(const ATOOLS::Flavour bunch, std::string set, int member) : m_anti(1) { m_xmin=1.e-8; m_xmax=1.; m_q2min=1.69; m_q2max=1.e10; m_set=set; m_type=m_set; m_bunch=bunch; m_member=member; if (m_bunch==Flavour(kf_p_plus).Bar()) m_anti=-1; int iset = 0; std::string path = rpa->gen.Variable("SHERPA_SHARE_PATH")+"/CT10Grid"; if (m_set==std::string("ct10")) { iset = 100+m_member; m_asinfo.m_order=1; m_asinfo.m_nf=5; m_asinfo.m_asmz=0.118; if (m_member==0) m_lhef_number=10800; else m_lhef_number=10801; } double asmz[10] = {0.116, 0.117, 0.119, 0.120, 0.113, 0.114, 0.115, 0.121, 0.122, 0.123}; for (size_t i=0; i<10; ++i) { if (m_set==std::string("ct10.as"+ToString(i)) && m_member==0) { iset = 10+i; m_asinfo.m_order=1; m_asinfo.m_nf=5; m_asinfo.m_asmz=asmz[i]; } } if (m_set==std::string("ct10.3f") && m_member==0) { iset = 30; m_asinfo.m_order=1; m_asinfo.m_nf=3; m_asinfo.m_asmz=0.118; } if (m_set==std::string("ct10.4f") && m_member==0) { iset = 31; m_asinfo.m_order=1; m_asinfo.m_nf=4; m_asinfo.m_asmz=0.118; } if (m_set==std::string("ct10w")) { iset = 200+m_member; m_asinfo.m_order=1; m_asinfo.m_nf=5; m_asinfo.m_asmz=0.118; } for (size_t i=0; i<10; ++i) { if (m_set==std::string("ct10was"+ToString(i)) && m_member==0) { iset = 20+i; m_asinfo.m_order=1; m_asinfo.m_nf=5; m_asinfo.m_asmz=asmz[i]; } } if (m_set==std::string("ct10w3f") && m_member==0) { iset = 32; m_asinfo.m_order=1; m_asinfo.m_nf=3; m_asinfo.m_asmz=0.118; } if (m_set==std::string("ct10w4f") && m_member==0) { iset = 33; m_asinfo.m_order=1; m_asinfo.m_nf=4; m_asinfo.m_asmz=0.118; } if (iset==0) { THROW(fatal_error, "PDF set "+m_set+" ("+ToString(m_member)+") not found."); } m_asinfo.m_mz2=sqr(91.1876); m_nf=m_asinfo.m_nf; char buffer[1024]; char * err = getcwd(buffer,1024); if (err==NULL) { msg_Error()<<"Error in CT10_Fortran_Interface.C "<m_xmax || m_rescale<0.) return 0.; if (!(m_x>=0.0 && m_x<=1.0)) { PRINT_INFO("PDF called with x="<m_xmax) return 0.; if (!(m_x>=0.0 && m_x<=1.0)) { PRINT_INFO("PDF called with x="<