Skip to content

bbtautau v6: control channels, background-only fit and faster evaluation - #5

Merged
SimonSPD merged 10 commits into
mainfrom
feat/v6
Oct 14, 2026
Merged

SimonSPD merged 10 commits into
mainfrom
feat/v6

Conversation

@SimonSPD

Copy link
Copy Markdown
Contributor

This pull request adds the functions that the bbtautau v6 analysis uses. It also corrects the ML export and makes the evaluation of expressions faster.

New functions

  • FriendConfig.channels: ShapeSmith reads a friend only in the listed channels. The default is all channels. A channel without this friend production does not look for the friend files.
  • Analysis.control_channels: datacards and fit add the control channels to each final state. A control channel is never a final state of its own. Example: em as the ttbar control channel of the tau channels.
  • target of DataMinus and ABCD: the estimator writes its output to this region. The default is the nominal region. Example: QCD in a diagnostic region.
  • shapesmith fit --background-only: this command fits the data with r set to 0 and frozen (combine -M FitDiagnostics). It writes datacards/background_fit.{json,md}. The summary shows the fit status, the pull and constraint of each
    nuisance, and the prefit and postfit yields.

Corrections

  • The ML export writes for each channel only the processes and estimator outputs of that channel. Before, it could write data for a process that the channel does not have.
  • ml-export does not export the control channels.
  • The background-only fit uses --cminDefaultMinimizerStrategy 0 --robustHesse 1. Before, Minuit forced the covariance to be positive definite when normalisations were degenerate. The fit then showed uncertainties that were too small.

Performance

  • expressions.evaluate gives only the columns of the expression to pd.eval. Before, DataFrame.eval copied the index on each call. This copy used 90–95 % of the run time.
  • estimate finds the inputs of DataMinus in one pass over the histograms. Before, it did one search for each variable and process.
  • On sm2018_binned_v6, the fake-factor measurement takes 28 min instead of 180 min. estimate takes 9 min instead of approximately 45 min.

@SimonSPD
SimonSPD merged commit 050ed2b into main Oct 14, 2026
2 checks passed
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.

1 participant