How to perform fit on (n-1) data events by dropping one event each time

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:

  1. if (i == j) continue;, and j is a number that you count up from 0 to 99. So you make 100 different datasets, where event j is missing.
  2. 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