I am using RooMCStudy to run over 5000 toy sets
mcs->generateAndFit(5000,nFullAllEvents,kTRUE,"data/toymc_%04d.dat");
I’m checking how often the null hypothesis fluctuations will fake signal. Some rare fluctuations push fake signal up to 40 events based on the plot nX v.s. numGenerated. I’d like to see this distribution. I understand you can save the generated toy sets to data files, which I do above. I then grab the file which has more than 40 events with:
for(Int_t i=1;i<5000;i++){
if((mcs->fitParDataSet().get(i)->getRealValue("numGamma")) > 40){
cout << "i: " << i << " " << mcs->fitParDataSet().get(i)->getRealValue("numGamma") << endl;
}
}
This gives the iteration of the file. But when I try and fit the data in this dat file I don’t get the +40 events from the fit that I expect.
Is there some way to save the results of these 5000 fits as images?
If not, is there a better way for me to pinpoint these extreme distributions and see what the resulting fit looks like?
Thanks,
james