File indexing completed on 2025-01-18 10:10:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT_ROOFIT_TESTSTATISTICS_RooUnbinnedL
0014 #define ROOT_ROOFIT_TESTSTATISTICS_RooUnbinnedL
0015
0016 #include <RooFit/TestStatistics/RooAbsL.h>
0017 #include <RooGlobalFunc.h>
0018
0019 #include "Math/Util.h" // KahanSum
0020
0021
0022 class RooAbsPdf;
0023 class RooAbsData;
0024 class RooArgSet;
0025 class RooChangeTracker;
0026
0027 namespace RooFit {
0028
0029 class Evaluator;
0030
0031 namespace TestStatistics {
0032
0033 class RooUnbinnedL : public RooAbsL {
0034 public:
0035 RooUnbinnedL(RooAbsPdf *pdf, RooAbsData *data, RooAbsL::Extended extended = RooAbsL::Extended::Auto,
0036 RooFit::EvalBackend evalBackend = RooFit::EvalBackend::Legacy());
0037 RooUnbinnedL(const RooUnbinnedL &other);
0038 ~RooUnbinnedL() override;
0039 bool setApplyWeightSquared(bool flag);
0040
0041 ROOT::Math::KahanSum<double>
0042 evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override;
0043
0044 std::string GetClassName() const override { return "RooUnbinnedL"; }
0045
0046 private:
0047 bool apply_weight_squared = false;
0048 mutable bool _first = true;
0049 std::unique_ptr<RooChangeTracker> paramTracker_;
0050 Section lastSection_ = {0, 0};
0051 mutable ROOT::Math::KahanSum<double> cachedResult_{0.};
0052 std::shared_ptr<RooFit::Evaluator> evaluator_;
0053 std::stack<std::vector<double>> _vectorBuffers;
0054 };
0055
0056 }
0057 }
0058
0059 #endif