Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ToyMCStudy.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id$
2// Author: Sven Kreiss and Kyle Cranmer June 2010
3/*************************************************************************
4 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOSTATS_ToyMCStudy
12#define ROOSTATS_ToyMCStudy
13
14#include "Rtypes.h"
15
16#include "RooAbsStudy.h"
17
20
21#include "RooWorkspace.h"
22#include "RooArgSet.h"
23
24#include "RooDataSet.h"
25#include "RooLinkedList.h"
26#include "RooLinkedListIter.h"
27
28namespace RooStats {
29
30class ToyMCStudy: public RooAbsStudy {
31
32 public:
33 /// need to have constructor without arguments for proof
34 ToyMCStudy(const char *name = "ToyMCStudy", const char *title = "ToyMCStudy") :
35 RooAbsStudy(name, title),
36 fRandomSeed(0),
37 fToyMCSampler(nullptr)
38 {
39 // In this case, this is the normal output. The SamplingDistribution
40 // instances are stored as detailed output.
42 }
43
44 RooAbsStudy* clone(const char* /*newname*/="") const override { return new ToyMCStudy(*this) ; }
45
46 // RooAbsStudy interfaces
47 bool initialize(void) override;
48 bool execute(void) override;
49 bool finalize(void) override;
50
52
54 void SetParamPoint(const RooArgSet& paramPoint) { fParamPoint.add(paramPoint); }
55
56 void SetRandomSeed(unsigned int seed) { fRandomSeed = seed; }
57
58 protected:
59
60 unsigned int fRandomSeed;
63
64 protected:
65 ClassDefOverride(ToyMCStudy,2); // toy MC study for parallel processing
66
67};
68
69
70class ToyMCPayload : public TNamed {
71
72 public:
74 {
75 // proof constructor, do not use
76 }
77
79
81 {
82 return fDataSet;
83 }
84
85 private:
87
88 protected:
90};
91
92
93}
94
95
96#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Abstract base class for RooStudyManager modules.
Definition RooAbsStudy.h:33
void storeDetailedOutput(bool flag)
Definition RooAbsStudy.h:47
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
Container class to hold unbinned data.
Definition RooDataSet.h:57
RooDataSet * GetSamplingDistributions()
Definition ToyMCStudy.h:80
RooDataSet * fDataSet
Definition ToyMCStudy.h:86
ToyMCPayload(RooDataSet *sd)
Definition ToyMCStudy.h:78
ToyMCSampler is an implementation of the TestStatSampler interface.
ToyMCStudy is an implementation of RooAbsStudy for toy Monte Carlo sampling.
Definition ToyMCStudy.h:30
void SetToyMCSampler(ToyMCSampler &t)
Definition ToyMCStudy.h:53
unsigned int fRandomSeed
Definition ToyMCStudy.h:60
bool execute(void) override
bool finalize(void) override
ToyMCSampler * fToyMCSampler
Definition ToyMCStudy.h:61
void SetParamPoint(const RooArgSet &paramPoint)
Definition ToyMCStudy.h:54
RooArgSet fParamPoint
Definition ToyMCStudy.h:62
RooAbsStudy * clone(const char *="") const override
Definition ToyMCStudy.h:44
void SetRandomSeed(unsigned int seed)
Definition ToyMCStudy.h:56
RooDataSet * merge()
ToyMCStudy(const char *name="ToyMCStudy", const char *title="ToyMCStudy")
need to have constructor without arguments for proof
Definition ToyMCStudy.h:34
bool initialize(void) override
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Namespace for the RooStats classes.
Definition Asimov.h:19