Logo ROOT   6.18/05
Reference Guide
RooRandomizeParamMCSModule.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooRandomizeParamMCSModule.h,v 1.2 2007/05/11 09:11:30 verkerke Exp $
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#ifndef ROO_RANDOMIZE_PARAM_MCS_MODULE
18#define ROO_RANDOMIZE_PARAM_MCS_MODULE
19
20#include "RooAbsMCStudyModule.h"
21#include "RooRealVar.h"
22#include <list>
23
25public:
26
30
31 void sampleUniform(RooRealVar& param, Double_t lo, Double_t hi) ;
32 void sampleGaussian(RooRealVar& param, Double_t mean, Double_t sigma) ;
33
34 void sampleSumUniform(const RooArgSet& paramSet, Double_t lo, Double_t hi) ;
35 void sampleSumGauss(const RooArgSet& paramSet, Double_t lo, Double_t hi) ;
36
38
39 Bool_t initializeRun(Int_t /*numSamples*/) ;
41
42 Bool_t processBeforeGen(Int_t /*sampleNum*/) ;
43
44private:
45
46 struct UniParam {
49 bool operator==(const UniParam& other) { return (_param==other._param) ; }
50 bool operator<(const UniParam& other) { return (_lo<other._lo) ; }
54 } ;
55
56 struct UniParamSet {
58 UniParamSet(const RooArgSet& pset, Double_t lo, Double_t hi) : _pset(pset), _lo(lo), _hi(hi) {}
59 bool operator==(const UniParamSet& other) { return (_lo==other._lo) ; }
60 bool operator<(const UniParamSet& other) { return (_lo<other._lo) ; }
64 } ;
65
66 struct GausParam {
69 bool operator==(const GausParam& other) { return (_param==other._param) ; }
70 bool operator<(const GausParam& other) { return (_mean<other._mean) ; }
74 } ;
75
76 struct GausParamSet {
78 GausParamSet(const RooArgSet& pset, Double_t mean, Double_t sigma) : _pset(pset), _mean(mean), _sigma(sigma) {}
79 bool operator==(const GausParamSet& other) { return (_mean==other._mean) ; }
80 bool operator<(const GausParamSet& other) { return (_mean<other._mean) ; }
84 } ;
85
86 std::list<UniParam> _unifParams ; //!
87 std::list<UniParamSet> _unifParamSets ; //!
88 std::list<GausParam> _gausParams ; //!
89 std::list<GausParamSet> _gausParamSets ; //!
90
93
94 ClassDef(RooRandomizeParamMCSModule,0) // MCStudy module to vary one or more input parameters during fit/generation cycle
95} ;
96
97
98#endif
99
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
#define ClassDef(name, id)
Definition: Rtypes.h:326
float type_of_call hi(const int &, const int &)
RooAbsMCStudyModule is a base class for add-on modules to RooMCStudy that can perform additional calc...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:31
RooRandomizeParamMCSModule is an add-on modules to RooMCStudy that allows you to randomize input gene...
void sampleUniform(RooRealVar &param, Double_t lo, Double_t hi)
Request uniform smearing of param in range [lo,hi] in RooMCStudy generation cycle.
Bool_t initializeInstance()
Initialize module after attachment to RooMCStudy object.
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...
virtual ~RooRandomizeParamMCSModule()
Destructor.
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...
std::list< UniParamSet > _unifParamSets
Bool_t processBeforeGen(Int_t)
Apply all smearings to generator parameters.
Bool_t initializeRun(Int_t)
Initialize module at beginning of RooCMStudy run.
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,...
RooDataSet * finalizeRun()
Return auxiliary data of this module so that it is merged with RooMCStudy::fitParDataSet()
std::list< GausParamSet > _gausParamSets
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
const Double_t sigma
GausParamSet(const RooArgSet &pset, Double_t mean, Double_t sigma)
GausParam(RooRealVar *p, Double_t mean, Double_t sigma)
UniParamSet(const RooArgSet &pset, Double_t lo, Double_t hi)
UniParam(RooRealVar *p, Double_t lo, Double_t hi)