/**
 * @file toystudy.hh
 * @author Christoph Langenbruch, Renata Kopecna

 * @date 2010-10-15
 *
 */

#ifndef TOYSTUDY_H
#define TOYSTUDY_H

#include <string>
#include <vector>

#include <multifit.hh>

namespace fcnc {
    class options;
    class pdf;
    class parameters;
    class generator;

///class to perform a toystudy, i.e. a repeated fit using generated toy data
//template <class params_type, class pdf_type, class generator_type, class plotter_type, class loader_type>
class toystudy: public multifit {
private:
    ///common parameters in different parameter sets
    std::vector< std::string > common_params;
public:
    ///constructor
    toystudy(options* o);
    /**
   * perform a toy study on generated toy data
   * @param nevents the number of events used per fit of the toy data
   * @param nruns the number of repeats
   * @param prob pointer to the pdf to use in the likelihood fit
   * @param params pointer to parameterset to use in the likelihood fit
   * @param gen pointer to the toy data generator to use
   **/
    void toy(unsigned int nevents, unsigned int nruns, pdf* prob, parameters* params, generator* gen);
    /**
   * perform a toy study on fully simulated mc data
   * @param nevents the number of events used per fit of the toy data
   * @param nruns the number of repeats
   * @param pdfs pointer to the pdfs to use in the likelihood fit
   * @param params pointer to parametersets to use in the likelihood fit
   * @param string filename to load
   **/
    void toy(std::vector<unsigned int> nevents, unsigned int nruns, std::vector<pdf*> pdfs, std::vector<parameters*> params, std::vector<generator*> gens);
    ///set common parameters
    void set_common_parameters(std::vector<std::string> common_pars) {
        common_params = common_pars;
    };
};

toystudy::toystudy(options* o):
    multifit(o)
{
};

}


#endif
