101 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << param.
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << endl ;
122 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << param.
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << endl ;
150 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::sampleSumUniform() ERROR: input parameter " << arg->
GetName() <<
" is not a RooRealVar and is ignored" << endl ;
166 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::sampleSumUniform: variable " << arg2->
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << endl ;
168 okset2.
add(*actualVar) ;
205 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::sampleSumGauss() ERROR: input parameter " << arg->
GetName() <<
" is not a RooRealVar and is ignored" << endl ;
220 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::sampleSumUniform: variable " << arg2->
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << endl ;
222 okset2.
add(*actualVar) ;
246 std::list<UniParam>::iterator uiter ;
252 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << uiter->_param->GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << endl ;
256 uiter->_param = actualPar ;
259 TString parName =
Form(
"%s_gen",uiter->_param->GetName()) ;
260 TString parTitle =
Form(
"%s as generated",uiter->_param->GetTitle()) ;
266 std::list<GausParam>::iterator giter ;
272 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << giter->_param->GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << endl ;
276 giter->_param = actualPar ;
279 TString parName =
Form(
"%s_gen",giter->_param->GetName()) ;
280 TString parTitle =
Form(
"%s as generated",giter->_param->GetTitle()) ;
287 std::list<UniParamSet>::iterator usiter ;
292 TIterator* psiter = usiter->_pset.createIterator() ;
297 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << arg->
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << endl ;
299 actualPSet.
add(*actualVar) ;
303 usiter->_pset.removeAll() ;
304 usiter->_pset.add(actualPSet) ;
307 TIterator* iter = usiter->_pset.createIterator() ;
310 TString parName =
Form(
"%s_gen",param->
GetName()) ;
311 TString parTitle =
Form(
"%s as generated",param->
GetTitle()) ;
319 std::list<GausParamSet>::iterator ugiter ;
324 TIterator* psiter = ugiter->_pset.createIterator() ;
329 oocoutW((
TObject*)0,
InputArguments) <<
"RooRandomizeParamMCSModule::initializeInstance: variable " << arg->
GetName() <<
" is not a parameter of RooMCStudy model and is ignored!" << endl ;
331 actualPSet.
add(*actualVar) ;
334 ugiter->_pset.removeAll() ;
335 ugiter->_pset.add(actualPSet) ;
338 TIterator* iter = ugiter->_pset.createIterator() ;
341 TString parName =
Form(
"%s_gen",param->
GetName()) ;
342 TString parTitle =
Form(
"%s as generated",param->
GetTitle()) ;
374 std::list<UniParam>::iterator uiter ;
377 oocoutE((
TObject*)0,
Generation) <<
"RooRandomizeParamMCSModule::processBeforeGen: applying uniform smearing to generator parameter " 378 << uiter->_param->GetName() <<
" in range [" << uiter->_lo <<
"," << uiter->_hi <<
"], chosen value for this sample is " << newVal << endl ;
379 uiter->_param->setVal(newVal) ;
386 std::list<GausParam>::iterator giter ;
389 oocoutI((
TObject*)0,
Generation) <<
"RooRandomizeParamMCSModule::processBeforeGen: applying gaussian smearing to generator parameter " 390 << giter->_param->GetName() <<
" with a mean of " << giter->_mean <<
" and a width of " << giter->_sigma <<
", chosen value for this sample is " << newVal << endl ;
391 giter->_param->setVal(newVal) ;
398 std::list<UniParamSet>::iterator usiter ;
403 oocoutI((
TObject*)0,
Generation) <<
"RooRandomizeParamMCSModule::processBeforeGen: applying uniform smearing to sum of set of generator parameters " 405 <<
" in range [" << usiter->_lo <<
"," << usiter->_hi <<
"], chosen sum value for this sample is " << newVal << endl ;
408 RooAddition sumVal(
"sumVal",
"sumVal",usiter->_pset) ;
412 TIterator* iter = usiter->_pset.createIterator() ;
423 std::list<GausParamSet>::iterator gsiter ;
428 oocoutI((
TObject*)0,
Generation) <<
"RooRandomizeParamMCSModule::processBeforeGen: applying gaussian smearing to sum of set of generator parameters " 430 <<
" with a mean of " << gsiter->_mean <<
" and a width of " << gsiter->_sigma
431 <<
", chosen value for this sample is " << newVal << endl ;
434 RooAddition sumVal(
"sumVal",
"sumVal",gsiter->_pset) ;
438 TIterator* iter = gsiter->_pset.createIterator() ;
virtual const char * GetName() const
Returns name of object.
void sampleSumUniform(const RooArgSet ¶mSet, Double_t lo, Double_t hi)
Request uniform smearing of sum of parameters in paramSet uniform smearing in range [lo...
TIterator * createIterator(Bool_t dir=kIterForward) const
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
RooAbsMCStudyModule is a base class for add-on modules to RooMCStudy that can perform additional calc...
Bool_t initializeInstance()
Initialize module after attachment to RooMCStudy object.
void sampleGaussian(RooRealVar ¶m, Double_t mean, Double_t sigma)
Request Gaussian smearing of param in with mean 'mean' and width 'sigma' in RooMCStudy generation cyc...
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
Double_t getVal(const RooArgSet *set=0) const
std::list< UniParam > _unifParams
Iterator abstract base class.
std::list< GausParam > _gausParams
RooRandomizeParamMCSModule()
Constructor.
Bool_t initializeRun(Int_t)
Initialize module at beginning of RooCMStudy run.
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
Bool_t processBeforeGen(Int_t)
Apply all smearings to generator parameters.
std::list< UniParamSet > _unifParamSets
RooRealVar represents a fundamental (non-derived) real valued object.
std::list< GausParamSet > _gausParamSets
virtual void setVal(Double_t value)
Set value of variable to 'value'.
virtual ~RooRandomizeParamMCSModule()
Destructor.
RooRandomizeParamMCSModule is an add-on modules to RooMCStudy that allows you to randomize input gene...
char * Form(const char *fmt,...)
virtual Bool_t addOwned(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
RooDataSet is a container class to hold unbinned data.
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0)
Add a data point, with its coordinates specified in the 'data' argset, to the data set...
RooDataSet * finalizeRun()
Return auxiliary data of this module so that it is merged with RooMCStudy::fitParDataSet() ...
void sampleUniform(RooRealVar ¶m, Double_t lo, Double_t hi)
Request uniform smearing of param in range [lo,hi] in RooMCStudy generation cycle.
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
Mother of all ROOT objects.
virtual TObject * Next()=0
float type_of_call hi(const int &, const int &)
RooAddition calculates the sum of a set of RooAbsReal terms, or when constructed with two sets...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
void sampleSumGauss(const RooArgSet ¶mSet, Double_t lo, Double_t hi)
Request gaussian smearing of sum of parameters in paramSet uniform smearing with mean 'mean' and widt...
virtual const char * GetTitle() const
Returns title of object.