RooFit Product returns 0x0

From: Stephan Zimmer <zimmerst_at_googlemail.com>
Date: Tue, 4 Jan 2000 11:06:50 +0100


> From: Stephan Zimmer <zimmerst_at_googlemail.com>
> Date: September 11, 2010 3:52:24 AM GMT+02:00
> To: roottalk_at_root.cern.ch
> Subject: RooFit Product returns 0x0
>

> Hi Rooters,
> after having worked with ROOT for quite some time, I now started
> exercising RooFit. It's quite impressive though in my opinion it
> lacks the clarity of the general ROOT program. Anyways, I'm trying
> to build up a Likelihood Ltot which is a product of 3 single
> Likelihood functions L1, L2, L3.
> suppose I have a model "model"
> RooDecay model("model","observed
> spectrum",t,tau,gaussm,RooDecay::SingleSided)
> and then I create 3 datasets from this model
>
> // create some data for the histogram to be filled...
> RooDataSet* data1 = model.generate(t,10000); // create a dataset
> from gauss-pd
> f
> RooDataSet* data2 = model.generate(t,10000); // create a dataset
> from gauss-pd
> f
> RooDataSet* data3 = model.generate(t,10000); // create a dataset
> from gauss-pd
> f
>
> Building the Negative-Log-Likelihood function for each of them works
> just fine
> RooAbsReal* nll1 = model.createNLL(*data1,NumCPU(2));
> RooAbsReal* nll2 = model.createNLL(*data2,NumCPU(2));
> RooAbsReal* nll3 = model.createNLL(*data3,NumCPU(2));
> The RooArgSet is still a pointer referencing to some real memory
> address
> RooArgSet *arg = new RooArgSet(*nll1,*nll2,*nll3);
> But the product then
> RooProduct *prod = new RooProduct("prod","product NLL",&arg)
> I get
> Error: Symbol null is not defined in current scope :0:
>
> Can some of you guys who are more proficient with RooFit help me
> figure out how to fix this? Your help is greatly appreciated.
>
> The general idea is to take N likelihood functions and multiply them
> for later subject to MINUIT minimization.
> Cheers,
> Stephan

--
Stephan Zimmer
Ph.D. student
Oskar Klein Center for Cosmoparticle and Astrophysics
Stockholm University
AlbaNova University Center
SE-10691 Stockholm, Sweden
Received on Sat Sep 11 2010 - 12:29:02 CEST

This archive was generated by hypermail 2.2.0 : Sat Sep 11 2010 - 23:50:02 CEST