Hello experts,
I would like to perform an unbinned maximum likelihood fit, with weighted events in my measured data. At present the documentation says that there is a way to do this while also getting the uncertainty right. It is rf403_weightedevts.C from which I produce the following:
// C a l c u l a t e w e i g h t a n d m a k e d a t a s e t w e i g h t e d
// -----------------------------------------------------------------------------------
// Construct formula to calculate (fake) weight for events
RooFormulaVar wFunc("w","event weight","(x*x+10)",x) ;
// Add column with variable w to previously generated dataset
RooRealVar* w = (RooRealVar*) data->addColumn(wFunc) ;
// Instruct dataset wdata in interpret w as event weight rather than as observable
RooDataSet wdata(data->GetName(),data->GetTitle(),data,*data->get(),0,w->GetName()) ;
// Create a polynomial PDF for fitting
RooRealVar a0("a0","a0",1) ;
RooRealVar a1("a1","a1",0,-1,1) ;
RooPolynomial p("p","p",x,RooArgList(a0,a1),0) ;
RooFitResult* r_ml_wgt_corr = p.fitTo(wdata,Save(),SumW2Error(kTRUE)) ;
It is stated that this method provides “a first-order correction” to the estimated parameter errors. I also find however, a presentation (including Wouter Verkerke as an author) saying that the results are now fully correct. Here is a link to that presentation:
twiki.cern.ch/twiki/bin/viewfil … eights.pdf
Is the method in my “code” section a first-order correction or a full correction?
Many thanks for your help with my difficulty!