Modifications to include management of statistical uncertainties in TransferFactorSample #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes the capability to add statistical uncertainties in TransferFactorSample. This is essential when defining transfer factors as ratios of MCs. In those case, the statistical uncertainty can be computed via the propagation of error using the sumw2 of the numerator and denominator and it needs to be added. At the same time, it also needs to be included in the computation of the bin-by-bin BB-lite uncertainty in each channel, as suggested by J. Conway (https://indico.cern.ch/event/107747/contributions/32677/). This approach has been tested in the context of the dark Higgs boson search (SUS-23-013).
Independently from the source, this PR allows TransferFactorSample to take an array that represents the statistical uncertainty in input:
https://github.com/mcremone/rhalphalib/blob/master/rhalphalib/sample.py#L643
Which is then incorporated:
https://github.com/mcremone/rhalphalib/blob/master/rhalphalib/sample.py#L671-L684
The capability to define "nominal values" for the TransferFactorSample is also implemented:
https://github.com/mcremone/rhalphalib/blob/master/rhalphalib/sample.py#L642
This is needed to then add the TransferFactorSample statistical uncertainty to the BB-lite parameters. This is achieved here:
https://github.com/mcremone/rhalphalib/blob/master/rhalphalib/model.py#L374-L397
Other modifications included in this PR are to enable the usage of DependentParameter in the measurement of double-b tagging scale factors performed in the context of the dark Higgs analysis.