diff --git a/src/fnlo-tk-statunc.cc b/src/fnlo-tk-statunc.cc index 62d1eec..ad62cac 100644 --- a/src/fnlo-tk-statunc.cc +++ b/src/fnlo-tk-statunc.cc @@ -30,7 +30,16 @@ #include "fastnlotk/fastNLOLHAPDF.h" #include "fastnlotk/speaker.h" #ifdef WITH_YODA +#if defined __has_include +#if !__has_include("YODA/WriterAIDA.h") +#define WITH_YODA2 +#endif +#endif +#ifdef WITH_YODA2 +#include "YODA/Scatter.h" +#else #include "YODA/Scatter2D.h" +#endif #include "YODA/WriterYODA.h" #endif @@ -493,28 +502,25 @@ int main(int argc, char** argv) { //! --- 1D if (NDim == 1) { - //! Vectors to fill 2D scatter plot - vector < double > x; - vector < double > y; - vector < double > exminus; - vector < double > explus; - vector < double > eyminus; - vector < double > eyplus; + //! Vector to fill 2D scatter plot + vector points; //! Loop over bins in outer (1st) dimension for (unsigned int k =0 ; k x; - vector < double > y; - vector < double > exminus; - vector < double > explus; - vector < double > eyminus; - vector < double > eyplus; + //! Vector to fill 2D scatter plot + vector points; //! Loop over bins in inner (2nd) dimension NDimBins[1] = fnlo.GetNDim1Bins(j); for (unsigned int k = 0; k x; - vector < double > y; - vector < double > exminus; - vector < double > explus; - vector < double > eyminus; - vector < double > eyplus; + //! Vector to fill 2D scatter plot + vector < YODA::Point2D > points; //! Loop over bins in outer (1st) dimension for (unsigned int k =0 ; k x; - vector < double > y; - vector < double > exminus; - vector < double > explus; - vector < double > eyminus; - vector < double > eyplus; + vector < YODA::Point2D > points; //! Loop over bins in inner (2nd) dimension NDimBins[1] = fnlo->GetNDim1Bins(j); for (unsigned int k = 0; kGetNDim1Bins(j); for (unsigned int k = 0; k x; - vector < double > y; - vector < double > exminus; - vector < double > explus; - vector < double > eyminus; - vector < double > eyplus; + vector < YODA::Point2D > points; //! Loop over bins in inner (3rd) dimension NDimBins[2] = fnlo->GetNDim2Bins(j,k); for (unsigned int l = 0; l