Apply sPlot weights twice

I want to s-weight data that is already s-weighted. That is, I do a fit to observable1 and extract s-weights1 from that; then, I apply those s-weights to my dataset and fit to observable2; then, I extract s-weights2 from my second fit.

How do I properly reweight observable3 accounting for both sets of s-weights?

Example snippet:

# declare data
data = ROOT.RooDataSet('data', 'data', observables)
# do first fit
# extract first s-weights
ROOT.RooStats.SPlot('sPlot', 'An sPlot', data, model1, ROOT.RooArgList(nsig1, nbkg1))
# create s-weighted dataset
data_s = ROOT.RooDataSet('dataWithSWeights', 'data s-weighted', data.get(), RooFit.Import(data), RooFit.WeightVar(nsig1.GetName() + '_sw'))
# do second fit to s-weighted data
# extract second s-weights
ROOT.RooStats.SPlot('sPlot', 'An sPlot', data_s, model2, ROOT.RooArgList(nsig2, nbkg2))
# then what? 
# data_s2 = ROOT.RooDataSet('dataWithSWeights2', 'data s-weighted2', data_s.get(), RooFit.Import(data_s), RooFit.WeightVar(nsig2.GetName() + '_sw'))? 
# Does that account for both s-weights? The set of s-weights2 do not sum to 1...

Good question …
I invited @moneta to have a look.

Some thoughts: As far as I understand, s weights are a technique to do a kind of background subtraction on an unbinned data sample. With two sets of s weights, you might get into trouble, though, because just multiplying them might be wrong.

  • Would it be an option to go to a binned distribution? A double background subtraction should be possible.
  • Would it be possible to make a combined model that extracts s weights in a single fit? Maybe something like a 2D model?

Hello, @StephanH,

We would really prefer to stick with unbinned if possible.

2D fits pose their own challenges, complicating what should be a simple fit.

Multiplying them is certainly wrong as s-weights can be negative. It is, in my understanding, also incorrect to multiply s-weights with already-applied weights in general, however, because they are already factored into the weights output by SPlot. I am asking the forum primarily because I am not sure whether this is still true in the case of s-weights (I noticed the set of s-weights2 does not sum to 1, for instance) and because I am not 100% sure of my reading of the source code.

Any update on this? I wanted to check in to ensure the topic doesn’t close.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.