66 _unifParams(
other._unifParams),
67 _gausParams(
other._gausParams)
84 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << param.
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << std::endl ;
105 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << param.
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << std::endl ;
131 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::sampleSumUniform() ERROR: input parameter " << arg->
GetName() <<
" is not a RooRealVar and is ignored" << std::endl ;
144 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::sampleSumUniform: variable " <<
arg2->GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << std::endl ;
180 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::sampleSumGauss() ERROR: input parameter " << arg->
GetName() <<
" is not a RooRealVar and is ignored" << std::endl ;
193 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::sampleSumUniform: variable " <<
arg2->GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << std::endl ;
218 std::list<UniParam>::iterator
uiter ;
224 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " <<
uiter->_param->GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << std::endl ;
231 std::string
parName = std::string(
uiter->_param->GetName()) +
"_gen";
232 std::string
parTitle = std::string(
uiter->_param->GetTitle()) +
" as generated";
237 std::list<GausParam>::iterator
giter ;
243 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " <<
giter->_param->GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << std::endl ;
250 std::string
parName = std::string(
giter->_param->GetName()) +
"_gen";
251 std::string
parTitle = std::string(
giter->_param->GetTitle()) +
" as generated";
257 std::list<UniParamSet>::iterator
usiter ;
265 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << arg->
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << std::endl ;
270 usiter->_pset.removeAll() ;
275 std::string
parName = std::string(param->GetName()) +
"_gen";
276 std::string
parTitle = std::string(param->GetTitle()) +
" as generated";
282 std::list<GausParamSet>::iterator
ugiter ;
290 oocoutW(
nullptr,InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << arg->
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << std::endl ;
296 ugiter->_pset.removeAll() ;
301 std::string
parName = std::string(param->GetName()) +
"_gen";
302 std::string
parTitle = std::string(param->GetTitle()) +
" as generated";
308 _data = std::make_unique<RooDataSet>(
"DeltaLLSigData",
"Additional data for Delta(-log(L)) study",
_genParSet) ;
333 std::list<UniParam>::iterator
uiter ;
336 oocoutE(
nullptr,Generation) <<
"RooRandomizeParamMCSModule::processBeforeGen: applying uniform smearing to generator parameter "
337 <<
uiter->_param->GetName() <<
" in range [" <<
uiter->_lo <<
"," <<
uiter->_hi <<
"], chosen value for this sample is " <<
newVal << std::endl ;
345 std::list<GausParam>::iterator
giter ;
348 oocoutI(
nullptr,Generation) <<
"RooRandomizeParamMCSModule::processBeforeGen: applying gaussian smearing to generator parameter "
349 <<
giter->_param->GetName() <<
" with a mean of " <<
giter->_mean <<
" and a width of " <<
giter->_sigma <<
", chosen value for this sample is " <<
newVal << std::endl ;
357 std::list<UniParamSet>::iterator
usiter ;
362 oocoutI(
nullptr,Generation) <<
"RooRandomizeParamMCSModule::processBeforeGen: applying uniform smearing to sum of set of generator parameters "
364 <<
" in range [" <<
usiter->_lo <<
"," <<
usiter->_hi <<
"], chosen sum value for this sample is " <<
newVal << std::endl ;
374 genpar->setVal(param->getVal()) ;
379 std::list<GausParamSet>::iterator
gsiter ;
384 oocoutI(
nullptr,Generation) <<
"RooRandomizeParamMCSModule::processBeforeGen: applying gaussian smearing to sum of set of generator parameters "
386 <<
" with a mean of " <<
gsiter->_mean <<
" and a width of " <<
gsiter->_sigma
387 <<
", chosen value for this sample is " <<
newVal << std::endl ;
397 genpar->setVal(param->getVal()) ;
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
const_iterator begin() const
const_iterator end() const
Common abstract base class for objects that represent a value and a "shape" in RooFit.
virtual bool addOwned(RooAbsArg &var, bool silent=false)
Add an argument and transfer the ownership to the collection.
RooAbsArg * find(const char *name) const
Find object with given name in list.
Base class for add-on modules to RooMCStudy that can perform additional calculations on each generate...
RooArgSet * genParams()
Return current value of generator model parameters.
Calculates the sum of a set of RooAbsReal terms, or when constructed with two sets,...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Container class to hold unbinned data.
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
Add-on module to RooMCStudy that allows you to randomize input generation parameters.
void sampleSumGauss(const RooArgSet ¶mSet, double lo, double hi)
Request gaussian smearing of sum of parameters in paramSet uniform smearing with mean 'mean' and widt...
std::unique_ptr< RooDataSet > _data
bool initializeRun(Int_t) override
Initialize module at beginning of RooCMStudy run.
std::list< GausParam > _gausParams
!
void sampleSumUniform(const RooArgSet ¶mSet, double lo, double hi)
Request uniform smearing of sum of parameters in paramSet uniform smearing in range [lo,...
std::list< UniParamSet > _unifParamSets
!
void sampleGaussian(RooRealVar ¶m, double mean, double sigma)
Request Gaussian smearing of param in with mean 'mean' and width 'sigma' in RooMCStudy generation cyc...
bool processBeforeGen(Int_t) override
Apply all smearings to generator parameters.
~RooRandomizeParamMCSModule() override
RooRandomizeParamMCSModule()
Constructor.
RooDataSet * finalizeRun() override
Return auxiliary data of this module so that it is merged with RooMCStudy::fitParDataSet()
bool initializeInstance() override
Initialize module after attachment to RooMCStudy object.
void sampleUniform(RooRealVar ¶m, double lo, double hi)
Request uniform smearing of param in range [lo,hi] in RooMCStudy generation cycle.
std::list< GausParamSet > _gausParamSets
!
std::list< UniParam > _unifParams
!
Variable that can be changed from the outside.
const char * GetName() const override
Returns name of object.