Change of entry in RooDataSet is not persistent

Hello,

using a RooDataSet, i do a change of value, but this is not persistent : when i reread the event, the change disappears.

Is there an option ?

thank you

here is an example :

for (int i=0;i<2;i++) {
cout << “i=” << i << " ";
RooArgSet *argset=(RooArgSet *)roodataset_Shape_InvariantMass[index_mass][index_process]->get(i);
cout << “invariant_mass=” << argset->getRealValue(“invariant_mass”) << " ";
double current_value=argset->getRealValue(“invariant_mass”);
argset->setRealValue(“invariant_mass”,current_value-2);
cout << “after shift : invariant_mass=” << argset->getRealValue(“invariant_mass”) << endl;
cout << “let’s get the information again” << endl;

  RooArgSet *argset2=(RooArgSet *)roodataset_Shape_InvariantMass[index_mass][index_process]->get(i);
  cout << "invariant_mass2=" << argset2->getRealValue("invariant_mass") << " " << endl;

}

–>
i=0 invariant_mass=97.3553 after shift : invariant_mass=95.3553
let’s get the information again
invariant_mass2=97.3553 <----------we have lost the information