Hello,
I am using TMVA to help come up with a selection for a rare B decay. I am using the default macro TMVAnalysis.C, and ROOT v5.14/00b.
I would like to change the signal and background weights to account for the different branching ratios of signal and bkg. However I am unable to get any effect by doing this.
For example if I have
TFile f = new TFile(“Bd2PPbar_47kevts_WithERR.root”);
f->cd(“Bd2PPbar_47kevts_WithERR.root:/Bd2PPbar”);
TTree signal = (TTree*)gDirectory->Get(“BHHTuple”);
TFile *gA = new TFile("B2KK_40K.root");
gA->cd("B2KK_40K.root:/NtupleB2PPbar");
TTree* backgroundA = (TTree*)gDirectory->Get("B2PPbar");
Double_t signalWeight = 1.0;
Double_t backgroundWeightA = 1.0;
factory->AddSignalTree ( signal, signalWeight );
factory->AddBackgroundTree( backgroundA, backgroundWeightA );
And I use the Fisher discriminant method, I get (for example) an invariant mass distribution and bkg rejection vs. signal eff. plots as attached.
This is fine. BUT if I then change the weights to (for example)
Double_t signalWeight = 1.0;
Double_t backgroundWeightA = 10.0;
instead, all the plots stay exactly the same. How can I make TMVA weight the number of signal and bkg events to what I want?
Thanks,
Laurence
RejectionVsEff.ps (1.27 MB)
SignalWeightEqualsBkgWeight_Mass.ps (1.27 MB)