TMVAMulticlass AddTree

Dear experts,
I do not see why when I run my TMVAMulticlass (1) in the output I (2) see 4 background instead of 3 and it calls tha last one “Background” and it does not have any entries? Do you see what is wrong?
Regards

(1)
http://calpas.web.cern.ch/calpas/TMVAMulticlass.C

(2)
http://calpas.web.cern.ch/calpas/log_mva

Dear experts,
any ideas?
Regards

Try changing the name Signal to something else.

Dear Kialbert,
it does not change anything.
Regards

It’s because of SetBackgroundWeightExpression. In multiclass, this function should only be called with AnalysisType=Classification. (This could be made more clear). Because of this, the function assumes a class named “Background” will exist.

If you want to have the same weight expression for a number of classes, you have to specify it several times.

dataloader->SetWeightExpression("expr", "bg0");
dataloader->SetWeightExpression("expr", "bg1");
dataloader->SetWeightExpression("expr", "bg2");

Cheers,
Kim