Skip to content
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

Open
wants to merge 7 commits into
base: run3
Choose a base branch
from
Open

Conversation

DelloStritto
Copy link
Contributor

  • Extend roofit fit to hadron analyzer
  • implement Significance and S/B calculation in the fitter

Comment on lines +40 to +53

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))

Copy link
Member

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines +79 to +80
histonorm.SetBinContent(2, neventsafterevtsel)
histonorm.GetXaxis().SetBinLabel(2, "tot events after evt sel")
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants