/* * Project: RooFit * Authors: * PB, Patrick Bos, Netherlands eScience Center, p.bos@esciencecenter.nl * * Copyright (c) 2021, CERN * * Redistribution and use in source and binary forms, * with or without modification, are permitted according to the terms * listed in LICENSE (http://roofit.sourceforge.net/license.txt) */ #ifndef ROOT_ROOFIT_TESTSTATISTICS_RooSumL #define ROOT_ROOFIT_TESTSTATISTICS_RooSumL #include #include "Math/Util.h" // KahanSum #include namespace RooFit { namespace TestStatistics { class RooSumL : public RooAbsL { public: RooSumL(RooAbsPdf *pdf, RooAbsData *data, std::vector> components, RooAbsL::Extended extended = RooAbsL::Extended::Auto); // Note: when above ctor is called without std::moving components, you get a really obscure error. Pass as // std::move(components)! ROOT::Math::KahanSum evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override; // necessary only for legacy offsetting mode in LikelihoodWrapper; TODO: remove this if legacy mode is ever removed ROOT::Math::KahanSum getSubsidiaryValue(); void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override; std::string GetClassName() const override { return "RooSumL"; } const std::vector> &GetComponents() const { return components_; }; private: std::vector> components_; }; } // namespace TestStatistics } // namespace RooFit #endif // ROOT_ROOFIT_TESTSTATISTICS_RooSumL