diff --git a/Doc/Doxyfile b/Doc/Doxyfile index adb70ae85..e1918b6f4 100644 --- a/Doc/Doxyfile +++ b/Doc/Doxyfile @@ -741,7 +741,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = . Doc/mainpage.md manager splines samplePDF mcmc Diagnostics plotting plotting/plottingUtils Diagnostics/Diagnostics_utils covariance +INPUT = . Doc/mainpage.md manager splines samplePDF mcmc Diagnostics plotting plotting/plottingUtils Diagnostics/Diagnostics_utils covariance python # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/cmake/Templates/Doxyfile.in b/cmake/Templates/Doxyfile.in index 7377d2b6b..a751518b1 100644 --- a/cmake/Templates/Doxyfile.in +++ b/cmake/Templates/Doxyfile.in @@ -741,7 +741,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = . Doc/mainpage.md manager splines samplePDF mcmc Diagnostics plotting plotting/plottingUtils Diagnostics/Diagnostics_utils covariance +INPUT = . Doc/mainpage.md manager splines samplePDF mcmc Diagnostics plotting plotting/plottingUtils Diagnostics/Diagnostics_utils covariance python # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/covariance/covarianceBase.h b/covariance/covarianceBase.h index 1d05ff66d..36172436a 100644 --- a/covariance/covarianceBase.h +++ b/covariance/covarianceBase.h @@ -12,6 +12,9 @@ constexpr static const double _LARGE_LOGL_ = 1234567890.0; /// @brief Base class responsible for handling of systematic error parameters. Capable of using PCA or using adaptive throw matrix /// @see For more details, visit the [Wiki](https://github.com/mach3-software/MaCh3/wiki/02.-Implementation-of-Systematic). +/// @author Dan Barrow +/// @author Ed Atkin +/// @author Kamil Skwarczynski class covarianceBase { public: /// @brief ETA - constructor for a YAML file diff --git a/covariance/covarianceOsc.h b/covariance/covarianceOsc.h index 43e98f168..332428042 100644 --- a/covariance/covarianceOsc.h +++ b/covariance/covarianceOsc.h @@ -4,6 +4,8 @@ #include "covariance/covarianceBase.h" /// @brief Class responsible for handling of neutrino oscillation parameters. +/// @author Richard Calland +/// @author Asher Kaboth class covarianceOsc : public covarianceBase { public: @@ -29,10 +31,8 @@ class covarianceOsc : public covarianceBase void Print(); protected: - /// Do we flip DeltaM23 or not bool flipdelM; - /// There is special treatment for delta CP, therefore store enum keeping track when to apply special treatment int kDeltaCP; /// There is special treatment for DeltaM23, therefore store enum keeping track when to apply special treatment diff --git a/manager/MaCh3Logger.h b/manager/MaCh3Logger.h index ed3dd7697..2f728625f 100644 --- a/manager/MaCh3Logger.h +++ b/manager/MaCh3Logger.h @@ -9,7 +9,8 @@ #include #include -//KS: Based on this https://github.com/gabime/spdlog/blob/a2b4262090fd3f005c2315dcb5be2f0f1774a005/include/spdlog/spdlog.h#L284 +/// @file MaCh3Logger.h +/// @brief KS: Based on this https://github.com/gabime/spdlog/blob/a2b4262090fd3f005c2315dcb5be2f0f1774a005/include/spdlog/spdlog.h#L284 #define MACH3LOG_TRACE SPDLOG_TRACE #define MACH3LOG_DEBUG SPDLOG_DEBUG diff --git a/manager/Monitor.h b/manager/Monitor.h index dba876f5e..5c9954b82 100644 --- a/manager/Monitor.h +++ b/manager/Monitor.h @@ -22,6 +22,7 @@ /// @file Monitor.h /// @brief System and monitoring utilities for printing system information and status updates. +/// @author Kamil Skwarczynski namespace MaCh3Utils { /// @brief KS: Prints welcome message with MaCh3 logo diff --git a/manager/YamlHelper.h b/manager/YamlHelper.h index 428087a40..4a21a0320 100644 --- a/manager/YamlHelper.h +++ b/manager/YamlHelper.h @@ -15,6 +15,7 @@ /// @file YamlHelper.h /// @brief Utility functions for handling YAML nodes +/// @author Kamil Skwarczynski // ********************** /// @brief Get content of config file if node is not found take default value specified diff --git a/python/pyMaCh3.cpp b/python/pyMaCh3.cpp index 072c7e6b3..d3663549e 100644 --- a/python/pyMaCh3.cpp +++ b/python/pyMaCh3.cpp @@ -1,6 +1,9 @@ #include #include +/// @file pyMaCh3.cpp +/// @author Ewan Miller + namespace py = pybind11; void initPlotting(py::module &); // <- defined in python/plotting.cpp @@ -17,4 +20,4 @@ PYBIND11_MODULE( _pyMaCh3, m ) { initManager(m); initCovariance(m); initSplines(m); -} \ No newline at end of file +} diff --git a/python/splines.cpp b/python/splines.cpp index 8706e90d3..49588f895 100644 --- a/python/splines.cpp +++ b/python/splines.cpp @@ -244,4 +244,4 @@ void initSplines(py::module &m){ .doc() = "This 'monolith' deals with event by event weighting using splines." ; // End of binding for EventSplineMonolith -} \ No newline at end of file +} diff --git a/samplePDF/HistogramUtils.cpp b/samplePDF/HistogramUtils.cpp index c3062427e..73e70c5b7 100644 --- a/samplePDF/HistogramUtils.cpp +++ b/samplePDF/HistogramUtils.cpp @@ -128,7 +128,6 @@ TH1D* PolyProjectionX(TObject* poly, std::string TempName, const std::vector& ybins, const bool computeErrors) { // ************************************************** - TH1D* hProjY = new TH1D((TempName+"_y").c_str(),(TempName+"_y").c_str(),int(ybins.size()-1),&ybins[0]); //KS: Temp Histogram to store error, use double as this is thread safe std::vector hProjY_Error(hProjY->GetXaxis()->GetNbins() + 1, 0.0); @@ -327,6 +326,29 @@ double PolyIntegralWidth(TH2Poly *Histogram) { return integral; } +// ********************* +TH2Poly* MakePolyHist(const std::string& name, const std::vector& BinArray_x, const std::vector& BinArray_y) { +// ********************* + TH2Poly* poly = new TH2Poly(); + poly->SetName(name.c_str()); + poly->SetTitle(name.c_str()); + double xmax, xmin, ymax, ymin; + for(unsigned int iy = 0; iy < BinArray_y.size()-1; iy++) + { + ymax = BinArray_y[iy+1]; + ymin = BinArray_y[iy]; + for(unsigned int ix = 0; ix < BinArray_x.size()-1; ix++) + { + xmax = BinArray_x[ix+1]; + xmin = BinArray_x[ix]; + double binofx[] = {xmin, xmax, xmax, xmin}; + double binofy[] = {ymin, ymin, ymax, ymax}; + poly->AddBin(4,binofx,binofy); + } + } + return poly; +} + // ********************* //KS: Remove fitted TF1 from hist to make comparison easier void RemoveFitter(TH1D* hist, const std::string& name) { diff --git a/samplePDF/HistogramUtils.h b/samplePDF/HistogramUtils.h index 4303567a6..e956656ce 100644 --- a/samplePDF/HistogramUtils.h +++ b/samplePDF/HistogramUtils.h @@ -8,6 +8,9 @@ // MaCh3 inlcudes #include "samplePDF/Structs.h" +/// @file HistogramUtils.h +/// @author Will Parker + /// @brief WP: Helper function for calculating unbinned Integral of TH2Poly i.e including overflow double OverflowIntegral(TH2Poly* poly); @@ -32,6 +35,12 @@ TH2Poly* PolyScaleWidth(TH2Poly *Histogram, double scale); /// @brief WP: Helper to calc integral of th2poly analogous to th2d integra; with option "width" double PolyIntegralWidth(TH2Poly *Histogram); +/// @brief WP: Helper function to create TH2Poly histogram with uniform binning +/// @param name This will be tittle of output histogram +/// @param BinArray_x Bin edges for X axis +/// @param BinArray_y Bin edges for Y axis +TH2Poly* MakePolyHist(const std::string& name, const std::vector& BinArray_x, const std::vector& BinArray_y); + /// @brief KS: ROOT changes something with binning when moving from ROOT 5 to ROOT 6. If you open ROOT5 produced file with ROOT6 you will be missing 9 last bins /// @brief However if you use ROOT6 and have ROOT6 file exactly the same code will work. Something have changed with how TH2Poly bins are stored in TFile /// @param file ROOT file that we will make version checks diff --git a/samplePDF/Structs.h b/samplePDF/Structs.h index ce6885fa0..9bccdd958 100644 --- a/samplePDF/Structs.h +++ b/samplePDF/Structs.h @@ -78,6 +78,15 @@ constexpr static const int Unity_Int = 1; #include "Constants/OscillatorConstants.h" #pragma GCC diagnostic pop + +/// @file Structs.h +/// @author Asher Kaboth +/// @author Clarence Wret +/// @author Patrick Dunne +/// @author Dan Barrow +/// @author Ed Atkin +/// @author Kamil Skwarczynski + // ******************* /// @brief Template to make vector out of an array of any length template< typename T, size_t N > diff --git a/splines/SplineCommon.h b/splines/SplineCommon.h index 54f94bb21..a1ca378e3 100644 --- a/splines/SplineCommon.h +++ b/splines/SplineCommon.h @@ -6,6 +6,8 @@ /// @details This file includes macros and enums for defining spline coefficients. /// It is designed to be compatible with older CUDA versions, so be cautious /// when adding new features or including other headers. +/// @author Clarence Wret +/// @author Kamil Skwarczynski #ifndef _BAD_SPLINE_ #define _BAD_SPLINE_ 123456789 @@ -25,7 +27,6 @@ enum SplineSegmentCoeffs kCoeffD = 3 ///< Coefficient D }; - // ******************* /// @brief KS: Struct storing information for spline monolith /// @details This structure holds the X coefficients, other spline coefficients, diff --git a/splines/SplineStructs.h b/splines/SplineStructs.h index 1584f0a13..f85019184 100644 --- a/splines/SplineStructs.h +++ b/splines/SplineStructs.h @@ -13,6 +13,8 @@ /// @file SplineStructs.h /// @brief Contains structures and helper functions for handling spline representations of systematic parameters in the MaCh3. +/// @author Clarence Wret +/// @author Kamil Skwarczynski // ******************* /// @brief CW: Add a struct to hold info about the splinified xsec parameters and help with FindSplineSegment