The name of the coeffSet must match the name of one of the resonances in the DP model.
The supplied order of coefficients will be rearranged to match the order in which the resonances are stored in the dynamics, see LauIsobarDynamics::addResonance.
std::cout << "INFO in LauAbsFitModel::createFitToyMC : Generating toy MC in " << fileName << " to compare fit with data...\n";
std::cout << " : Number of experiments to generate = " << fitToyMCScale_ << "\n";
std::cout << " : This is to allow the toy MC to be made with reduced statistical fluctuations\n";
std::cout << " : Number of events in each experiment will be " << (fitToyMCPoissonSmear_ ? "fluctuated according to a Poisson distribution" : "exactly the same") << std::endl;
// Set the genValue of each parameter to its current (fitted) value
// but first store the original genValues for restoring later
for (LauParameterPList::iterator iter = fitVars_.begin(); iter != fitVars_.end(); ++iter) {
origGenValues.push_back((*iter)->genValue());
(*iter)->genValue((*iter)->unblindValue());
if ( (*iter)->blind() ) {
blind = kTRUE;
}
}
if ( blind ) {
std::cerr << "WARNING in LauAbsFitModel::createFitToyMC : One or more parameters are blind but the toy will be created using the unblind values - use with caution!!" << std::endl;
}
// If we're asked to generate more than 100 experiments then split it
// up into multiple files since otherwise can run into memory issues
// when building the index
// TODO - this obviously depends on the number of events per experiment as well, so should do this properly
UInt_t totalExpts = fitToyMCScale_;
if ( totalExpts > 100 ) {
UInt_t nFiles = totalExpts/100;
if ( totalExpts%100 ) {
nFiles += 1;
}
TString fileNameBase {fileName};
for ( UInt_t iFile(0); iFile < nFiles; ++iFile ) {
UInt_t firstExp( iFile*100 );
// Set number of experiments and first experiment to generate