-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RooFit in hadron analyzer #955
Conversation
DelloStritto
commented
Sep 29, 2024
- Extend roofit fit to hadron analyzer
- implement Significance and S/B calculation in the fitter
|
||
if level == "data": | ||
signal_pdf = ws.pdf("sigrefl") | ||
if not signal_pdf: | ||
print('"sigrefl" PDF not found, using "sig" instead.') | ||
signal_pdf = ws.pdf("sig") | ||
if not signal_pdf: | ||
print('"sig" PDF not found.') | ||
background_pdf = ws.pdf("bkg") | ||
model = RooAddPdf("model", | ||
"Total model", | ||
RooArgList(signal_pdf, background_pdf), | ||
RooArgList(n_signal, n_background)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is based on assumptions about what names are used in the DB and I am not convinced that this is the best way of dealing with this. If we decide to rely on names from the DB, we should use sig
and bkg
there. But I would actually prefer to pass the names of the pdfs to be used for signal and background as parameters in the function call such that the roofitter
stays free of assumptions on naming. In addition, we should avoid print
in parts that behave like a library and, instead, throw an exception if there is an unrecoverable error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this db used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main db for the Lc hadron analysis. Maybe We can delete the old format dbs and rename this one
histonorm.SetBinContent(2, neventsafterevtsel) | ||
histonorm.GetXaxis().SetBinLabel(2, "tot events after evt sel") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the normalisation. Why is it needed?