Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RF] Enable streaming of RooLagrangianMorphFunc and other improvements #11023

Merged
merged 4 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roofit/roofit/inc/LinkDef1.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#pragma link C++ class RooJeffreysPrior+ ;
#pragma link C++ class RooJohnson+;
#pragma link C++ class RooLagrangianMorphFunc+;
#pragma link C++ class RooLagrangianMorphFunc::Config+;
#pragma link C++ class RooFunctorBinding+ ;
#pragma link C++ class RooFunctor1DBinding+ ;
#pragma link C++ class RooFunctorPdfBinding+ ;
Expand Down
13 changes: 4 additions & 9 deletions roofit/roofit/inc/RooLagrangianMorphFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ class RooLagrangianMorphFunc : public RooAbsReal {
std::list<double> *plotSamplingHint(RooAbsRealLValue & /*obs*/, double /*xlo*/, double /*xhi*/) const override;
bool isBinnedDistribution(const RooArgSet &obs) const override;
double evaluate() const override;
TObject *clone(const char *newname) const override;
double getValV(const RooArgSet *set = 0) const override;
TObject *clone(const char *newname) const override { return new RooLagrangianMorphFunc(*this, newname); }

bool checkObservables(const RooArgSet *nset) const override;
bool forceAnalyticalInt(const RooAbsArg &arg) const override;
Expand Down Expand Up @@ -179,16 +178,13 @@ class RooLagrangianMorphFunc : public RooAbsReal {
class CacheElem;
void init();
void setup(bool ownParams = true);
bool _ownParameters = false;
void disableInterference(const std::vector<const char *> &nonInterfering);
void disableInterferences(const std::vector<std::vector<const char *>> &nonInterfering);

mutable RooObjCacheManager _cacheMgr; //! The cache manager

void addFolders(const RooArgList &folders);

bool hasCache() const;
RooLagrangianMorphFunc::CacheElem *getCache(const RooArgSet *nset) const;
RooLagrangianMorphFunc::CacheElem *getCache() const;
void updateSampleWeights();

RooRealVar *setupObservable(const char *obsname, TClass *mode, TObject *inputExample);
Expand Down Expand Up @@ -251,7 +247,8 @@ class RooLagrangianMorphFunc : public RooAbsReal {
static std::unique_ptr<RooRatio> makeRatio(const char *name, const char *title, RooArgList &nr, RooArgList &dr);

private:
double _scale = 1;
mutable RooObjCacheManager _cacheMgr; //! The cache manager
double _scale = 1.0;
std::map<std::string, int> _sampleMap;
RooListProxy _physics;
RooSetProxy _operators;
Expand All @@ -260,8 +257,6 @@ class RooLagrangianMorphFunc : public RooAbsReal {
RooListProxy _flags;
Config _config;
std::vector<std::vector<RooListProxy *>> _diagrams;
mutable const RooArgSet *_curNormSet = nullptr; //!

std::vector<RooListProxy *> _nonInterfering;

ClassDefOverride(RooLagrangianMorphFunc, 1)
Expand Down
Loading