16#ifndef RooFit_RooNLLVarNew_h
17#define RooFit_RooNLLVarNew_h
30 static constexpr const char *weightVarName =
"_weight";
31 static constexpr const char *weightVarNameSumW2 =
"_weight_sumW2";
33 RooNLLVarNew(
const char *
name,
const char *title,
RooAbsPdf &pdf,
RooArgSet const &observables,
bool isExtended,
35 RooNLLVarNew(
const RooNLLVarNew &other,
const char *
name =
nullptr);
36 TObject *clone(
const char *newname)
const override {
return new RooNLLVarNew(*
this, newname); }
39 double defaultErrorLevel()
const override {
return 0.5; }
42 bool canComputeBatchWithCuda()
const override {
return !_binnedL; }
43 bool isReducerNode()
const override {
return true; }
45 void setPrefix(std::string
const &prefix);
47 void applyWeightSquared(
bool flag)
override;
49 void enableOffsetting(
bool)
override;
51 void enableBinOffsetting(
bool on =
true) { _doBinOffset =
on; }
53 void setSimCount(
int simCount) { _simCount = simCount; }
58 double evaluate()
const override {
return _value; }
59 void resetWeightVarNames();
62 void doEvalBinnedL(
RooFit::EvalContext &, std::span<const double> preds, std::span<const double> weights)
const;
67 std::unique_ptr<RooTemplateProxy<RooAbsReal>> _expectedEvents;
68 std::unique_ptr<RooTemplateProxy<RooAbsPdf>> _offsetPdf;
69 mutable double _sumWeight = 0.0;
70 mutable double _sumWeight2 = 0.0;
71 bool _weightSquared =
false;
72 bool _binnedL =
false;
73 bool _doOffset =
false;
74 bool _doBinOffset =
false;
77 std::vector<double> _binw;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
A class to maintain the context for squashing of RooFit models into code.
Mother of all ROOT objects.
OffsetMode
For setting the offset mode with the Offset() command argument to RooAbsPdf::fitTo()
void evaluate(typename Architecture_t::Tensor_t &A, EActivationFunction f)
Apply the given activation function to each value in the given tensor A.