Dear RooStats experts,
I have started using the SPlot tool to make plots of control variables in my analysis.
I build a model PDF out of 3 components (1 signal + 2 backgrounds), which I build as RooAddPdf, containing 3 RooHistPdf objects for the 3 components.
The signal and background processes have very different cross-sections, so I want to use event weights.
I build a RooDataSet from a TTree, specifying a weight variable in the constructor
RooDataSet(const char* name, const char* title, TTree* ntuple, const RooArgSet& vars, 0, const char* wgtVarName)
I have verified that RooDataSet::isWeighted() returns true.
I then build an instance of the RooStats::SPlot object via
SPlot(const char* name, const char* title, RooDataSet& data, RooAbsPdf* pdf, const RooArgList& yieldsList)
The SPlot class does not seem to take the event weights into account though: in the stdout, I see messages
[#1] INFO:InputArguments – yield in pdf: QCD_norm 1031.7
[#1] INFO:InputArguments – yield in pdf: WplusJets_norm 2517.02
[#1] INFO:InputArguments – yield in pdf: Ztautau_norm 10039.3
[#1] INFO:Eval – Checking Likelihood normalization:
[#1] INFO:Eval – Yield of specie Sum of Row in Matrix Norm
[#1] INFO:Eval – 1031.7 1031.6 1.00001
[#1] INFO:Eval – 2517.02 2517 1
[#1] INFO:Eval – 10039.3 10039.4 0.999998
[#1] INFO:Eval – Calculating sWeight
which correspond to the number of entries in the TTrees (no event weights applied) and the method SPlot::GetYieldFromSWeight(yieldVarName) returns numbers as well which do not seem to take the event weights into account.
Is there a “trick” which I am missing in order to tell the SPlot algorithm to take event weights into account ?
Thank you very much for your help,