Hey, I formatted the code, so it shows more nicely (tips for posting code).
It sounds like you want to do some kind of bootstrapping. I see two options:
-
if (i == j) continue;
, andj
is a number that you count up from 0 to 99. So you make 100 different datasets, where eventj
is missing. - You make weighted datasets, and set one weight to zero. This tutorial shows how to use event weights:
https://root.cern/doc/master/rf403__weightedevts_8C.html