Does anyone know if it is possible to create a multidimensional PDF using RooClassFactory? I need a PDF which fits 3 variables (x,y,z), and has 4 floated parameters (A0, A1, A2, A3). The form of the PDF is quite complicated and it does not factorize.
my understanding is that it will treat “x” as the variable to be fitted, while treating “y,z,A0,A1,A2,A3” as the parameters which are floated in the fit. Is this correct? If so, does anyone have any ideas on how to work around this?
can (and will) be used as a p.d.f. in observables x,y,z, if it is used in conjuction with a dataset with observables (x,y,z). Section 2 page 13 of the RooFit users manual
’Parameters and Observables’ explains the details.
Thank you for your quick reply. I have used RooClassFactory to create RooMyPdf.h and RooMyPdf.cxx. I edited the evaluate() function in the .cxx file to define the PDF; I made no other changes to the .h or .cxx files.
I compile the class using
root>.L RooMyPdf.cxx++
and I obtain RooMyPdf_cxx.so.
I then #include “RooMyPdf.h” in the program that I invoke the PDF. However, when I compile my module using g++, I get the following error at the point where I use RooMyPdf for the first (and only) time:
undefined reference to RooMyPdf::RooMyPdf(char const*, char const*, RooAbsReal&, RooAbsReal&, RooAbsReal&, RooAbsReal&, RooAbsReal&, RooAbsReal&, RooAbsReal&)' /bdata/tmp/ccLuahaD.o(.gnu.linkonce.t._ZN9RooMyPdfD1Ev+0xb): In functionRooMyPdf::~RooMyPdf()’:
/usr/include/c++/3.2.3/bits/basic_string.tcc:623: undefined reference to vtable for RooMyPdf' /bdata/tmp/ccLuahaD.o(.gnu.linkonce.t._ZN9RooMyPdfD1Ev+0x17): In functionRooMyPdf::~RooMyPdf()’:
/usr/include/c++/3.2.3/bits/char_traits.h:135: undefined reference to `vtable for RooMyPdf’
collect2: ld returned 1 exit status
I noticed another thread regarding a question about “undefined reference to a `vtable…”
Compiling my RooMyPdf.cxx module works fine for me as well. The problem I’m having occurs after, when I try to invoke the RooMyPdf in another program. In other words, I wrote a new program called analysis.C, which uses RooMyPdf.
In analysis.C I
#include “RooMyPdf.h”
then in the main() part of the program, I try to use RooMyPdf as follows:
I am not sure if this question ever got answered, but it looks like the problem comes from trying to compile CINT codes. If you run the script in CINT mode it seems to work fine (without the ++ or + at the end of the load command). I guess the RooClassFactory is only mean to be ran through CINT mode.