16#ifndef RooFit_RooNLLVarNew_h
17#define RooFit_RooNLLVarNew_h
33 static constexpr const char *weightVarName =
"_weight";
34 static constexpr const char *weightVarNameSumW2 =
"_weight_sumW2";
36 RooNLLVarNew(
const char *
name,
const char *title,
RooAbsPdf &pdf,
RooArgSet const &observables,
bool isExtended,
38 RooNLLVarNew(
const RooNLLVarNew &other,
const char *
name =
nullptr);
39 TObject *clone(
const char *newname)
const override {
return new RooNLLVarNew(*
this, newname); }
42 double defaultErrorLevel()
const override {
return 0.5; }
45 bool canComputeBatchWithCuda()
const override {
return !_binnedL; }
46 bool isReducerNode()
const override {
return true; }
48 void setPrefix(std::string
const &prefix);
50 void applyWeightSquared(
bool flag)
override;
52 void enableOffsetting(
bool)
override;
54 void enableBinOffsetting(
bool on =
true) { _doBinOffset =
on; }
56 void setSimCount(
int simCount) { _simCount = simCount; }
58 RooAbsPdf const &pdf()
const {
return *_pdf; }
59 RooAbsReal const &weightVar()
const {
return *_weightVar; }
60 bool binnedL()
const {
return _binnedL; }
61 int simCount()
const {
return _simCount; }
62 RooAbsReal const *expectedEvents()
const {
return _expectedEvents ? &**_expectedEvents :
nullptr; }
65 double evaluate()
const override {
return _value; }
66 void resetWeightVarNames();
69 void doEvalBinnedL(
RooFit::EvalContext &, std::span<const double> preds, std::span<const double> weights)
const;
74 std::unique_ptr<RooTemplateProxy<RooAbsReal>> _expectedEvents;
75 std::unique_ptr<RooTemplateProxy<RooAbsPdf>> _offsetPdf;
76 mutable double _sumWeight = 0.0;
77 mutable double _sumWeight2 = 0.0;
78 bool _weightSquared =
false;
79 bool _binnedL =
false;
80 bool _doOffset =
false;
81 bool _doBinOffset =
false;
84 std::vector<double> _binw;
#define ClassDefOverride(name, id)
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.
Mother of all ROOT objects.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
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.