/***************************************************************************** * Project: RooFit * * Package: RooFitCore * * File: $Id: RooRandomizeParamMCSModule.h,v 1.2 2007/05/11 09:11:30 verkerke Exp $ * Authors: * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * * * Copyright (c) 2000-2005, Regents of the University of California * * and Stanford University. All rights reserved. * * * * Redistribution and use in source and binary forms, * * with or without modification, are permitted according to the terms * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * *****************************************************************************/ #ifndef ROO_RANDOMIZE_PARAM_MCS_MODULE #define ROO_RANDOMIZE_PARAM_MCS_MODULE #include "RooAbsMCStudyModule.h" #include "RooRealVar.h" #include class RooRandomizeParamMCSModule : public RooAbsMCStudyModule { public: RooRandomizeParamMCSModule() ; RooRandomizeParamMCSModule(const RooRandomizeParamMCSModule& other) ; virtual ~RooRandomizeParamMCSModule() ; void sampleUniform(RooRealVar& param, Double_t lo, Double_t hi) ; void sampleGaussian(RooRealVar& param, Double_t mean, Double_t sigma) ; void sampleSumUniform(const RooArgSet& paramSet, Double_t lo, Double_t hi) ; void sampleSumGauss(const RooArgSet& paramSet, Double_t lo, Double_t hi) ; Bool_t initializeInstance() ; Bool_t initializeRun(Int_t /*numSamples*/) ; RooDataSet* finalizeRun() ; Bool_t processBeforeGen(Int_t /*sampleNum*/) ; private: struct UniParam { UniParam() {} UniParam(RooRealVar* p, Double_t lo, Double_t hi) : _param(p), _lo(lo), _hi(hi) {} bool operator==(const UniParam& other) { return (_param==other._param) ; } bool operator<(const UniParam& other) { return (_lo _unifParams ; //! std::list _unifParamSets ; //! std::list _gausParams ; //! std::list _gausParamSets ; //! RooArgSet _genParSet ; RooDataSet* _data ; ClassDef(RooRandomizeParamMCSModule,0) // MCStudy module to vary one or more input parameters during fit/generation cycle } ; #endif