Logo ROOT  
Reference Guide
RooRandomizeParamMCSModule.cxx
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * @(#)root/roofitcore:$Id$
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 
17 /**
18 \file RooRandomizeParamMCSModule.cxx
19 \class RooRandomizeParamMCSModule
20 \ingroup Roofitcore
21 
22 RooRandomizeParamMCSModule is an add-on modules to RooMCStudy that
23 allows you to randomize input generation parameters. Randomized generation
24 parameters can be sampled from a uniform or Gaussian distribution.
25 For every randomized parameter, an extra variable is added to
26 RooMCStudy::fitParDataSet() named <tt><parname>_gen</tt> that indicates the actual
27 value used for generation for each trial.
28 You can also choose to randomize the sum of N parameters, rather
29 than a single parameter. In that case common multiplicative scale
30 factor is applied to each component to bring the sum to the desired
31 target value taken from either uniform or Gaussian sampling. This
32 latter option is for example useful if you want to change the total
33 number of expected events of an extended p.d.f
34 **/
35 
36 
37 #include "Riostream.h"
38 #include "RooDataSet.h"
39 #include "RooRealVar.h"
40 #include "RooRandom.h"
41 #include "TString.h"
42 #include "RooFit.h"
43 #include "RooFitResult.h"
44 #include "RooAddition.h"
45 #include "RooMsgService.h"
47 
48 using namespace std ;
49 
51  ;
52 
53 
54 
55 ////////////////////////////////////////////////////////////////////////////////
56 /// Constructor
57 
59  RooAbsMCStudyModule("RooRandomizeParamMCSModule","RooRandomizeParamMCSModule"), _data(0)
60 {
61 }
62 
63 
64 
65 ////////////////////////////////////////////////////////////////////////////////
66 /// Copy constructor
67 
69  RooAbsMCStudyModule(other),
70  _unifParams(other._unifParams),
71  _gausParams(other._gausParams),
72  _data(0)
73 {
74 }
75 
76 
77 
78 ////////////////////////////////////////////////////////////////////////////////
79 /// Destructor
80 
82 {
83  if (_data) {
84  delete _data ;
85  }
86 }
87 
88 
89 
90 ////////////////////////////////////////////////////////////////////////////////
91 /// Request uniform smearing of param in range [lo,hi] in RooMCStudy
92 /// generation cycle
93 
95 {
96  // If we're already attached to a RooMCStudy, check that given param is actual generator model parameter
97  // If not attached, this check is repeated at the attachment moment
98  if (genParams()) {
99  RooRealVar* actualPar = static_cast<RooRealVar*>(genParams()->find(param.GetName())) ;
100  if (!actualPar) {
101  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::initializeInstance: variable " << param.GetName() << " is not a parameter of RooMCStudy model and is ignored!" << endl ;
102  return ;
103  }
104  }
105 
106  _unifParams.push_back(UniParam(&param,lo,hi)) ;
107 }
108 
109 
110 
111 ////////////////////////////////////////////////////////////////////////////////
112 /// Request Gaussian smearing of param in with mean 'mean' and width
113 /// 'sigma' in RooMCStudy generation cycle
114 
116 {
117  // If we're already attached to a RooMCStudy, check that given param is actual generator model parameter
118  // If not attached, this check is repeated at the attachment moment
119  if (genParams()) {
120  RooRealVar* actualPar = static_cast<RooRealVar*>(genParams()->find(param.GetName())) ;
121  if (!actualPar) {
122  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::initializeInstance: variable " << param.GetName() << " is not a parameter of RooMCStudy model and is ignored!" << endl ;
123  return ;
124  }
125  }
126 
127  _gausParams.push_back(GausParam(&param,mean,sigma)) ;
128 }
129 
130 
131 
132 
133 ////////////////////////////////////////////////////////////////////////////////
134 /// Request uniform smearing of sum of parameters in paramSet uniform
135 /// smearing in range [lo,hi] in RooMCStudy generation cycle. This
136 /// option applies a common multiplicative factor to each parameter
137 /// in paramSet to make the sum of the parameters add up to the
138 /// sampled value in the range [lo,hi]
139 
141 {
142  // Check that all args are RooRealVars
143  RooArgSet okset ;
144  TIterator* iter = paramSet.createIterator() ;
145  RooAbsArg* arg ;
146  while((arg=(RooAbsArg*)iter->Next())) {
147  // Check that arg is a RooRealVar
148  RooRealVar* rrv = dynamic_cast<RooRealVar*>(arg) ;
149  if (!rrv) {
150  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::sampleSumUniform() ERROR: input parameter " << arg->GetName() << " is not a RooRealVar and is ignored" << endl ;
151  continue;
152  }
153  okset.add(*rrv) ;
154  }
155  delete iter ;
156 
157  // If we're already attached to a RooMCStudy, check that given param is actual generator model parameter
158  // If not attached, this check is repeated at the attachment moment
159  RooArgSet okset2 ;
160  if (genParams()) {
161  TIterator* psiter = okset.createIterator() ;
162  RooAbsArg* arg2 ;
163  while ((arg2=(RooAbsArg*)psiter->Next())) {
164  RooRealVar* actualVar= static_cast<RooRealVar*>(genParams()->find(arg2->GetName())) ;
165  if (!actualVar) {
166  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::sampleSumUniform: variable " << arg2->GetName() << " is not a parameter of RooMCStudy model and is ignored!" << endl ;
167  } else {
168  okset2.add(*actualVar) ;
169  }
170  }
171  delete psiter ;
172  } else {
173 
174  // If genParams() are not available, skip this check for now
175  okset2.add(okset) ;
176 
177  }
178 
179 
180  _unifParamSets.push_back(UniParamSet(okset2,lo,hi)) ;
181 
182 }
183 
184 
185 
186 
187 ////////////////////////////////////////////////////////////////////////////////
188 /// Request gaussian smearing of sum of parameters in paramSet
189 /// uniform smearing with mean 'mean' and width 'sigma' in RooMCStudy
190 /// generation cycle. This option applies a common multiplicative
191 /// factor to each parameter in paramSet to make the sum of the
192 /// parameters add up to the sampled value from the
193 /// gaussian(mean,sigma)
194 
196 {
197  // Check that all args are RooRealVars
198  RooArgSet okset ;
199  TIter iter = paramSet.createIterator() ;
200  RooAbsArg* arg ;
201  while((arg=(RooAbsArg*)iter.Next())) {
202  // Check that arg is a RooRealVar
203  RooRealVar* rrv = dynamic_cast<RooRealVar*>(arg) ;
204  if (!rrv) {
205  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::sampleSumGauss() ERROR: input parameter " << arg->GetName() << " is not a RooRealVar and is ignored" << endl ;
206  continue;
207  }
208  okset.add(*rrv) ;
209  }
210 
211  // If we're already attached to a RooMCStudy, check that given param is actual generator model parameter
212  // If not attached, this check is repeated at the attachment moment
213  RooArgSet okset2 ;
214  if (genParams()) {
215  TIter psiter = okset.createIterator() ;
216  RooAbsArg* arg2 ;
217  while ((arg2=(RooAbsArg*)psiter.Next())) {
218  RooRealVar* actualVar= static_cast<RooRealVar*>(genParams()->find(arg2->GetName())) ;
219  if (!actualVar) {
220  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::sampleSumUniform: variable " << arg2->GetName() << " is not a parameter of RooMCStudy model and is ignored!" << endl ;
221  } else {
222  okset2.add(*actualVar) ;
223  }
224  }
225  } else {
226 
227  // If genParams() are not available, skip this check for now
228  okset2.add(okset) ;
229 
230  }
231 
232  _gausParamSets.push_back(GausParamSet(okset,mean,sigma)) ;
233 
234 }
235 
236 
237 
238 
239 ////////////////////////////////////////////////////////////////////////////////
240 /// Initialize module after attachment to RooMCStudy object
241 
243 {
244  // Loop over all uniform smearing parameters
245  std::list<UniParam>::iterator uiter ;
246  for (uiter= _unifParams.begin() ; uiter!= _unifParams.end() ; ++uiter) {
247 
248  // Check that listed variable is actual generator model parameter
249  RooRealVar* actualPar = static_cast<RooRealVar*>(genParams()->find(uiter->_param->GetName())) ;
250  if (!actualPar) {
251  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::initializeInstance: variable " << uiter->_param->GetName() << " is not a parameter of RooMCStudy model and is ignored!" << endl ;
252  uiter = _unifParams.erase(uiter) ;
253  continue ;
254  }
255  uiter->_param = actualPar ;
256 
257  // Add variable to summary dataset to hold generator value
258  TString parName = Form("%s_gen",uiter->_param->GetName()) ;
259  TString parTitle = Form("%s as generated",uiter->_param->GetTitle()) ;
260  RooRealVar* par_gen = new RooRealVar(parName.Data(),parTitle.Data(),0) ;
261  _genParSet.addOwned(*par_gen) ;
262  }
263 
264  // Loop over all gaussian smearing parameters
265  std::list<GausParam>::iterator giter ;
266  for (giter= _gausParams.begin() ; giter!= _gausParams.end() ; ++giter) {
267 
268  // Check that listed variable is actual generator model parameter
269  RooRealVar* actualPar = static_cast<RooRealVar*>(genParams()->find(giter->_param->GetName())) ;
270  if (!actualPar) {
271  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::initializeInstance: variable " << giter->_param->GetName() << " is not a parameter of RooMCStudy model and is ignored!" << endl ;
272  giter = _gausParams.erase(giter) ;
273  continue ;
274  }
275  giter->_param = actualPar ;
276 
277  // Add variable to summary dataset to hold generator value
278  TString parName = Form("%s_gen",giter->_param->GetName()) ;
279  TString parTitle = Form("%s as generated",giter->_param->GetTitle()) ;
280  RooRealVar* par_gen = new RooRealVar(parName.Data(),parTitle.Data(),0) ;
281  _genParSet.addOwned(*par_gen) ;
282  }
283 
284 
285  // Loop over all uniform smearing set of parameters
286  std::list<UniParamSet>::iterator usiter ;
287  for (usiter= _unifParamSets.begin() ; usiter!= _unifParamSets.end() ; ++usiter) {
288 
289  // Check that all listed variables are actual generator model parameters
290  RooArgSet actualPSet ;
291  TIterator* psiter = usiter->_pset.createIterator() ;
292  RooAbsArg* arg ;
293  while ((arg=(RooAbsArg*)psiter->Next())) {
294  RooRealVar* actualVar= static_cast<RooRealVar*>(genParams()->find(arg->GetName())) ;
295  if (!actualVar) {
296  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::initializeInstance: variable " << arg->GetName() << " is not a parameter of RooMCStudy model and is ignored!" << endl ;
297  } else {
298  actualPSet.add(*actualVar) ;
299  }
300  }
301  delete psiter ;
302  usiter->_pset.removeAll() ;
303  usiter->_pset.add(actualPSet) ;
304 
305  // Add variables to summary dataset to hold generator values
306  TIterator* iter = usiter->_pset.createIterator() ;
307  RooRealVar* param ;
308  while((param=(RooRealVar*)iter->Next())) {
309  TString parName = Form("%s_gen",param->GetName()) ;
310  TString parTitle = Form("%s as generated",param->GetTitle()) ;
311  RooRealVar* par_gen = new RooRealVar(parName.Data(),parTitle.Data(),0) ;
312  _genParSet.addOwned(*par_gen) ;
313  }
314  delete iter ;
315  }
316 
317  // Loop over all gaussian smearing set of parameters
318  std::list<GausParamSet>::iterator ugiter ;
319  for (ugiter= _gausParamSets.begin() ; ugiter!= _gausParamSets.end() ; ++ugiter) {
320 
321  // Check that all listed variables are actual generator model parameters
322  RooArgSet actualPSet ;
323  TIter psiter = ugiter->_pset.createIterator() ;
324  RooAbsArg* arg ;
325  while ((arg=(RooAbsArg*)psiter.Next())) {
326  RooRealVar* actualVar= static_cast<RooRealVar*>(genParams()->find(arg->GetName())) ;
327  if (!actualVar) {
328  oocoutW((TObject*)0,InputArguments) << "RooRandomizeParamMCSModule::initializeInstance: variable " << arg->GetName() << " is not a parameter of RooMCStudy model and is ignored!" << endl ;
329  } else {
330  actualPSet.add(*actualVar) ;
331  }
332  }
333 
334  ugiter->_pset.removeAll() ;
335  ugiter->_pset.add(actualPSet) ;
336 
337  // Add variables to summary dataset to hold generator values
338  TIter iter = ugiter->_pset.createIterator() ;
339  RooRealVar* param ;
340  while((param=(RooRealVar*)iter.Next())) {
341  TString parName = Form("%s_gen",param->GetName()) ;
342  TString parTitle = Form("%s as generated",param->GetTitle()) ;
343  RooRealVar* par_gen = new RooRealVar(parName.Data(),parTitle.Data(),0) ;
344  _genParSet.addOwned(*par_gen) ;
345  }
346  }
347 
348  // Create new dataset to be merged with RooMCStudy::fitParDataSet
349  _data = new RooDataSet("DeltaLLSigData","Additional data for Delta(-log(L)) study",_genParSet) ;
350 
351  return kTRUE ;
352 }
353 
354 
355 
356 ////////////////////////////////////////////////////////////////////////////////
357 /// Initialize module at beginning of RooCMStudy run
358 
360 {
361  // Clear dataset at beginning of run
362  _data->reset() ;
363  return kTRUE ;
364 }
365 
366 
367 
368 ////////////////////////////////////////////////////////////////////////////////
369 /// Apply all smearings to generator parameters
370 
372 {
373  // Apply uniform smearing to all generator parameters for which it is requested
374  std::list<UniParam>::iterator uiter ;
375  for (uiter= _unifParams.begin() ; uiter!= _unifParams.end() ; ++uiter) {
376  Double_t newVal = RooRandom::randomGenerator()->Uniform(uiter->_lo,uiter->_hi) ;
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) ;
380 
381  RooRealVar* genpar = static_cast<RooRealVar*>(_genParSet.find(Form("%s_gen",uiter->_param->GetName()))) ;
382  genpar->setVal(newVal) ;
383  }
384 
385  // Apply gaussian smearing to all generator parameters for which it is requested
386  std::list<GausParam>::iterator giter ;
387  for (giter= _gausParams.begin() ; giter!= _gausParams.end() ; ++giter) {
388  Double_t newVal = RooRandom::randomGenerator()->Gaus(giter->_mean,giter->_sigma) ;
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) ;
392 
393  RooRealVar* genpar = static_cast<RooRealVar*>(_genParSet.find(Form("%s_gen",giter->_param->GetName()))) ;
394  genpar->setVal(newVal) ;
395  }
396 
397  // Apply uniform smearing to all sets of generator parameters for which it is requested
398  std::list<UniParamSet>::iterator usiter ;
399  for (usiter= _unifParamSets.begin() ; usiter!= _unifParamSets.end() ; ++usiter) {
400 
401  // Calculate new value for sum
402  Double_t newVal = RooRandom::randomGenerator()->Uniform(usiter->_lo,usiter->_hi) ;
403  oocoutI((TObject*)0,Generation) << "RooRandomizeParamMCSModule::processBeforeGen: applying uniform smearing to sum of set of generator parameters "
404  << usiter->_pset
405  << " in range [" << usiter->_lo << "," << usiter->_hi << "], chosen sum value for this sample is " << newVal << endl ;
406 
407  // Determine original value of sum and calculate per-component scale factor to obtain new valye for sum
408  RooAddition sumVal("sumVal","sumVal",usiter->_pset) ;
409  Double_t compScaleFactor = newVal/sumVal.getVal() ;
410 
411  // Apply multiplicative correction to each term of the sum
412  TIterator* iter = usiter->_pset.createIterator() ;
413  RooRealVar* param ;
414  while((param=(RooRealVar*)iter->Next())) {
415  param->setVal(param->getVal()*compScaleFactor) ;
416  RooRealVar* genpar = static_cast<RooRealVar*>(_genParSet.find(Form("%s_gen",param->GetName()))) ;
417  genpar->setVal(param->getVal()) ;
418  }
419  delete iter ;
420  }
421 
422  // Apply gaussian smearing to all sets of generator parameters for which it is requested
423  std::list<GausParamSet>::iterator gsiter ;
424  for (gsiter= _gausParamSets.begin() ; gsiter!= _gausParamSets.end() ; ++gsiter) {
425 
426  // Calculate new value for sum
427  Double_t newVal = RooRandom::randomGenerator()->Gaus(gsiter->_mean,gsiter->_sigma) ;
428  oocoutI((TObject*)0,Generation) << "RooRandomizeParamMCSModule::processBeforeGen: applying gaussian smearing to sum of set of generator parameters "
429  << gsiter->_pset
430  << " with a mean of " << gsiter->_mean << " and a width of " << gsiter->_sigma
431  << ", chosen value for this sample is " << newVal << endl ;
432 
433  // Determine original value of sum and calculate per-component scale factor to obtain new valye for sum
434  RooAddition sumVal("sumVal","sumVal",gsiter->_pset) ;
435  Double_t compScaleFactor = newVal/sumVal.getVal() ;
436 
437  // Apply multiplicative correction to each term of the sum
438  TIter iter = gsiter->_pset.createIterator() ;
439  RooRealVar* param ;
440  while((param=(RooRealVar*)iter.Next())) {
441  param->setVal(param->getVal()*compScaleFactor) ;
442  RooRealVar* genpar = static_cast<RooRealVar*>(_genParSet.find(Form("%s_gen",param->GetName()))) ;
443  genpar->setVal(param->getVal()) ;
444  }
445  }
446 
447  // Store generator values for all modified parameters
448  _data->add(_genParSet) ;
449 
450  return kTRUE ;
451 }
452 
453 
454 
455 ////////////////////////////////////////////////////////////////////////////////
456 /// Return auxiliary data of this module so that it is merged with
457 /// RooMCStudy::fitParDataSet()
458 
460 {
461  return _data ;
462 }
463 
464 
RooRandomizeParamMCSModule::GausParamSet
Definition: RooRandomizeParamMCSModule.h:76
TRandom::Gaus
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...
Definition: TRandom.cxx:274
RooRealVar::setVal
virtual void setVal(Double_t value)
Set value of variable to 'value'.
Definition: RooRealVar.cxx:257
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
RooRandomizeParamMCSModule.h
RooMsgService.h
RooFit.h
RooFit::InputArguments
@ InputArguments
Definition: RooGlobalFunc.h:61
oocoutI
#define oocoutI(o, a)
Definition: RooMsgService.h:45
TString::Data
const char * Data() const
Definition: TString.h:369
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
Form
char * Form(const char *fmt,...)
TNamed::GetTitle
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48
RooRandomizeParamMCSModule::_gausParamSets
std::list< GausParamSet > _gausParamSets
Definition: RooRandomizeParamMCSModule.h:89
RooRandomizeParamMCSModule::_genParSet
RooArgSet _genParSet
Definition: RooRandomizeParamMCSModule.h:91
RooAbsReal::getVal
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Definition: RooAbsReal.h:91
RooRandomizeParamMCSModule::processBeforeGen
Bool_t processBeforeGen(Int_t)
Apply all smearings to generator parameters.
Definition: RooRandomizeParamMCSModule.cxx:371
TRandom::Uniform
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
Definition: TRandom.cxx:672
RooRandomizeParamMCSModule::_unifParams
std::list< UniParam > _unifParams
Definition: RooRandomizeParamMCSModule.h:86
RooAbsCollection::find
RooAbsArg * find(const char *name) const
Find object with given name in list.
Definition: RooAbsCollection.cxx:810
RooRandomizeParamMCSModule::initializeRun
Bool_t initializeRun(Int_t)
Initialize module at beginning of RooCMStudy run.
Definition: RooRandomizeParamMCSModule.cxx:359
RooRandomizeParamMCSModule::initializeInstance
Bool_t initializeInstance()
Initialize module after attachment to RooMCStudy object.
Definition: RooRandomizeParamMCSModule.cxx:242
oocoutE
#define oocoutE(o, a)
Definition: RooMsgService.h:48
TString
Basic string class.
Definition: TString.h:136
RooDataSet.h
TString.h
RooRandomizeParamMCSModule::sampleUniform
void sampleUniform(RooRealVar &param, Double_t lo, Double_t hi)
Request uniform smearing of param in range [lo,hi] in RooMCStudy generation cycle.
Definition: RooRandomizeParamMCSModule.cxx:94
RooRandomizeParamMCSModule::RooRandomizeParamMCSModule
RooRandomizeParamMCSModule()
Constructor.
Definition: RooRandomizeParamMCSModule.cxx:58
bool
TIterator
Iterator abstract base class.
Definition: TIterator.h:30
RooRandomizeParamMCSModule::GausParam
Definition: RooRandomizeParamMCSModule.h:66
hi
float type_of_call hi(const int &, const int &)
RooRandomizeParamMCSModule::~RooRandomizeParamMCSModule
virtual ~RooRandomizeParamMCSModule()
Destructor.
Definition: RooRandomizeParamMCSModule.cxx:81
RooRandomizeParamMCSModule::_unifParamSets
std::list< UniParamSet > _unifParamSets
Definition: RooRandomizeParamMCSModule.h:87
RooAbsMCStudyModule
RooAbsMCStudyModule is a base class for add-on modules to RooMCStudy that can perform additional calc...
Definition: RooAbsMCStudyModule.h:30
RooDataSet::add
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0) override
Add a data point, with its coordinates specified in the 'data' argset, to the data set.
Definition: RooDataSet.cxx:1156
Double_t
RooFit::Generation
@ Generation
Definition: RooGlobalFunc.h:60
RooRandomizeParamMCSModule::finalizeRun
RooDataSet * finalizeRun()
Return auxiliary data of this module so that it is merged with RooMCStudy::fitParDataSet()
Definition: RooRandomizeParamMCSModule.cxx:459
RooRandom.h
RooAbsCollection::createIterator
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
Definition: RooAbsCollection.h:178
RooRandomizeParamMCSModule::sampleSumGauss
void sampleSumGauss(const RooArgSet &paramSet, Double_t lo, Double_t hi)
Request gaussian smearing of sum of parameters in paramSet uniform smearing with mean 'mean' and widt...
Definition: RooRandomizeParamMCSModule.cxx:195
RooAddition
RooAddition calculates the sum of a set of RooAbsReal terms, or when constructed with two sets,...
Definition: RooAddition.h:27
RooRandomizeParamMCSModule::sampleGaussian
void sampleGaussian(RooRealVar &param, Double_t mean, Double_t sigma)
Request Gaussian smearing of param in with mean 'mean' and width 'sigma' in RooMCStudy generation cyc...
Definition: RooRandomizeParamMCSModule.cxx:115
RooAbsCollection::add
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Definition: RooAbsCollection.cxx:455
RooAddition.h
oocoutW
#define oocoutW(o, a)
Definition: RooMsgService.h:47
RooRealVar.h
RooAbsCollection::addOwned
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Definition: RooAbsCollection.cxx:403
RooFitResult.h
TIterator::Next
virtual TObject * Next()=0
RooRandomizeParamMCSModule::UniParam
Definition: RooRandomizeParamMCSModule.h:46
RooRandomizeParamMCSModule::UniParamSet
Definition: RooRandomizeParamMCSModule.h:56
sigma
const Double_t sigma
Definition: h1analysisProxy.h:11
TIter::Next
TObject * Next()
Definition: TCollection.h:249
RooRandomizeParamMCSModule
RooRandomizeParamMCSModule is an add-on modules to RooMCStudy that allows you to randomize input gene...
Definition: RooRandomizeParamMCSModule.h:24
RooRandomizeParamMCSModule::sampleSumUniform
void sampleSumUniform(const RooArgSet &paramSet, Double_t lo, Double_t hi)
Request uniform smearing of sum of parameters in paramSet uniform smearing in range [lo,...
Definition: RooRandomizeParamMCSModule.cxx:140
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
RooRandomizeParamMCSModule::_gausParams
std::list< GausParam > _gausParams
Definition: RooRandomizeParamMCSModule.h:88
TIter
Definition: TCollection.h:233
RooDataSet
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooAbsArg
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:72
RooRandom::randomGenerator
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
Definition: RooRandom.cxx:53
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
RooRealVar
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:39
Riostream.h
RooAbsMCStudyModule::genParams
RooArgSet * genParams()
Definition: RooAbsMCStudyModule.h:103
RooRandomizeParamMCSModule::_data
RooDataSet * _data
Definition: RooRandomizeParamMCSModule.h:92
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:33
int
RooAbsData::reset
virtual void reset()
Definition: RooAbsData.cxx:311