I have a branch “PUWeight” that has different values for each event.
So i tried the fallowing implementation:
RooDataSet* data = new RooDataSet("data","data",t1_data,arg_list);
RooRealVar PUWeight = *(ws.var("PUWeight"));
RooRealVar* w = (RooRealVar*) data->addColumn(PUWeight);
where “ws” is a worksapce.
In this point the RooDataSet seems to be weighted (I used the command “Print()” to confirm that).
But when compare a distribution (invariant mass e.g) before and after the weighting, the distribution seems only multiplied by a constant c=5. I expected a slightly different distribution, because each event has a different weight value.