Changing Signal and Bkg Weights in TMVA

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)

Hello Laurence,

The plots of the input variables in the GUI do not change because they are normalised independently for background and signal to allow a better shape comparison. This doesn’t mean however that TMVA would not properly take into account the weights for the variable training! You can try a simple game (here assuming the standard example):

factory->SetSignalWeightExpression(“abs(var4)”)

and then run the usual training. You should see that the input variable “var4” is now deformed for signal, and also the Fisher reponse distribusion should be modified, although the overall normalisation is equal for both species. BTW, Fisher ignores differences in global weights w/o event dependence (there is a renormalisation).

Cheers,
Andreas