From f35edb8befc08617be44231c4a19ec59f59ba632 Mon Sep 17 00:00:00 2001 From: Aliya Nigamova Date: Tue, 20 Feb 2024 23:06:17 +0100 Subject: [PATCH] override getParameters() method --- interface/CachingNLL.h | 1 + src/CachingNLL.cc | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/interface/CachingNLL.h b/interface/CachingNLL.h index 6468bc1de4b..63ff92c58d3 100644 --- a/interface/CachingNLL.h +++ b/interface/CachingNLL.h @@ -169,6 +169,7 @@ class CachingSimNLL : public RooAbsReal { void setData(const RooAbsData &data) ; virtual RooArgSet* getObservables(const RooArgSet* depList, Bool_t valueOnly = kTRUE) const ; virtual RooArgSet* getParameters(const RooArgSet* depList, Bool_t stripDisconnected = kTRUE) const ; + virtual bool getParameters(const RooArgSet* depList, RooArgSet& outputSet, bool stripDisconnected=true) const; void splitWithWeights(const RooAbsData &data, const RooAbsCategory& splitCat, Bool_t createEmptyDataSets) ; static void setNoDeepLogEvalError(bool noDeep) { noDeepLEE_ = noDeep; } void setZeroPoint() ; diff --git a/src/CachingNLL.cc b/src/CachingNLL.cc index 55b550d04bc..9623b998c9d 100644 --- a/src/CachingNLL.cc +++ b/src/CachingNLL.cc @@ -1286,6 +1286,14 @@ cacheutils::CachingSimNLL::getParameters(const RooArgSet* depList, Bool_t stripD return ret; } +bool cacheutils::CachingSimNLL::getParameters(const RooArgSet* depList, + RooArgSet& outputSet, + bool stripDisconnected) const { + RooArgSet tempList = *getParameters(depList); + outputSet.add(tempList); + return true; +} + void cacheutils::CachingSimNLL::setMaskConstraints(bool flag) { double nllBefore = evaluate(); maskConstraints_ = flag;