i’m wondering if it’s possible to change the weights of a RooDataSet.
so what i have is a RooDataSet that i have written to a file. what i want to do is read the dataset, scan all events, change the value of the weight (for example multply by two), and then write to another file.
how can i do this?
fyi the dataset has one variable (“x”) and a weight variable (“w”). it has been created like this:
RooRealVar* x_ = new RooRealVar( “x”, “”, 0., xmax );
RooRealVar* w_ = new RooRealVar( “w”, “”, 0., 1000. );
RooDataSet* dataset = new RooDataSet( “datasetName”, “”, RooArgSet(*x_,*w_), w_->GetName() );
and then in each event it is filled like this:
dataset->add( RooArgList(*x_, *w_), this_w );
thanks a lot in advance!