I (a novice) was looking to do a profile likelihood fit using RooStat/RooFit and extract a limit on a certain quantity. As of now I have three different energy spectrums to work with, one is an expected signal (already normalized to be a pdf), one is the observed background, and one is the fitted background (with statistical uncertainties). Using these three I realize I must create a Workspace and then move on to using something like https://root.cern.ch/root/html/tutorials/roostats/StandardProfileLikelihoodDemo.C.html ?
Does anyone have a barebones template I could work with since the tutorial example is a bit too complex to parse through? All the examples I’ve read through already have workspaces created, and some of the other tutorials like this (https://twiki.cern.ch/twiki/bin/view/RooStats/RooStatsTutorialsAugust2012) do not go into using your own dataset, MC fit and signal.
To use the ProfileLikelihood calculator of RooStats and make a Profile likelihood fit you need to build a workspace. The input for the workspace is your full model pdf and the data set.
Is building the workspace your problem ?
If I have understood you well, you want to model 3 different spectrums and making a simultaneous fit to them.
Once you have built your pdf is trivial to import in the workspace, you just need to call RooWorkspace::import
Lorenzo thanks for your response. I think yes. perhaps building the workspace is the real issue. So given that I have three histogram objects (TH1F*) one each for model background (h_bg), model signal (h_sig) and observed data (h_obs) I can import them into a RooWorkSpace?