Hi all,
Is is possible to use the contents of a TTree to define a PDF in Roofit? I have an experimental data set accessed (as per the manual):
[code][
TFile *f_exp = TFile::Open(expFileName);
TTree expTree=(TTree)f_exp->Get(“myTree”);
RooRealVar x(“x”,“x”,-10,10);
RooDataSet ds(“ds”,“ds”,RooArgSet(x),Import(*expTree));
/code]
Is there an analogous way of defining a model? My model is too complex for a functional representation–it needs to come from a simulation program (geant). Maybe some option like the code like below exists?
[code][
TFile *f_sim = TFile::Open(simFileName);
TTree sig1=(TTree)f_sim->Get(“sig1”);
RooAbsPdf xs(“xs”,“xs”,x,Import(*sig1));
TTree bkg1=(TTree)f_sim->Get(“bkg1”);
RooAbsPdf xb(“xb”,“xb”,x,Import(*bkg1));
/code]
The parameter extraction method is extended maximum likelihood–there are no internal parameters to the model, only relative rates.