Storing KDE distribution using RooWorkspace

Dear Experts,

I have modelled a distribution using a Kernel Density Estimation and I am trying to store it using RooWorkspace, so that I can use it in a fit later. The macro and the root file that I am using is
kde_ksks_extract.C (4.9 KB) and selected.root (598.8 KB).
The problem is that I would like to store the RooKeysPdf kest1 but when I try to store it, I get the error message:

kde_ksks_extract.C:113:14: error: use of undeclared identifier ‘ktest1’
w->import(ktest1);

even though I have ktest1 declared as:

RooKeysPdf kest1(“kest1”,“kest1”,max_sig,data,RooKeysPdf::MirrorBoth) ;

However, when I try w->import(sig); instead of w->import(ktest1); , then the code works.
Will you please have a look.

Grarefully,
Sanjeeda


ROOT Version: 6.24/06
Platform: Ubuntu
Compiler: Not Provided


Hi @sanjeeda!

Could this be just a typo? When you define the RooKeysPdf you are calling it kest1. Then, to the import statement, you are passing ktest1. I guess if you replace ktest1 with kest1 it will be fine!

thank you @jonas for pointing it out. It was indeed a typo. I should be more careful.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.