Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
HLFactory.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id$
2
3/*************************************************************************
4 * Project: RooStats *
5 * Package: RooFit/RooStats *
6 * Authors: *
7 * Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke *
8 *************************************************************************
9 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#ifndef RooStats_HLFactory
17#define RooStats_HLFactory
18
19#include "TString.h"
20#include "RooAbsPdf.h"
21#include "RooCategory.h"
22#include "RooDataSet.h"
23#include "RooWorkspace.h"
24
25
26// class TString;
27// class RooDataSet;
28
29namespace RooStats {
30
31 class HLFactory : public TNamed {
32
33 public:
34
35 /// Constructor
36 HLFactory(const char *name,
37 const char *fileName=0,
38 bool isVerbose = false);
39
40 /// Constructor with external RooWorkspace
41 HLFactory(const char* name,
42 RooWorkspace* externalWs,
43 bool isVerbose = false);
44
45 /// Default Constructor
46 HLFactory();
47
48 /// Default Destructor
49 ~HLFactory();
50
51 /// Add channel for the combination
52 int AddChannel(const char* label,
53 const char* SigBkgPdfName,
54 const char* BkgPdfName=0,
55 const char* datasetName=0);
56
57 /// Dump the Workspace content as configuration file
58 /* It needs some workspace object list or something..*/
59 void DumpCfg(const char* /*cardname*/ ){ /* t.b.i. */ }; // Dump the factory content as configuration file
60
61 /// Get the combined signal plus background pdf
62 RooAbsPdf* GetTotSigBkgPdf(); // Get the Signal and Background combined model
63
64 /// Get the combined background pdf
65 RooAbsPdf* GetTotBkgPdf(); // Get the Background combined model
66
67 /// Get the combined dataset
68 RooDataSet* GetTotDataSet(); // Get the combined dataset
69
70 /// Get the combined dataset
71 RooCategory* GetTotCategory(); // Get the category
72
73 /// Get the RooWorkspace containing the models and variables
74 RooWorkspace* GetWs(){return fWs;}; // Expose the internal Workspace
75
76 /// Process a configuration file
77 int ProcessCard(const char* filename);
78
79 private:
80
81 /// The category of the combination
83
84 /// The background model combination
86
87 /// The signal plus background model combination
89
90 /// The datasets combination
92
93 /// Flag to keep trace of the status of the combination
95
96 /// Create the category for the combinations
97 void fCreateCategory();
98
99 /// Check the length of the lists
101
102 /// List of channels names to combine for the signal plus background pdfs
104
105 /// List of channels names to combine for the background pdfs
107
108 /// List of channels names to combine for the datasets
110
111 /// List of channels names to combine for the datasets
113
114 /// The verbosity flag
116
117 /// Keep trace of the inclusion deepness
119
120 /// The RooWorkspace containing the models and variables
122
123 /// Owns workspace
124 bool fOwnWs;
125
126 /// Read the actual cfg file
127 int fReadFile(const char*fileName, bool is_included = false);
128
129 /// Parse a single line an puts the content in the RooWorkSpace
130 int fParseLine(TString& line);
131
132
133 ClassDef(HLFactory,1) // The high Level Model Factory to create models from datacards
134
135 };
136}
137
138#endif
#define ClassDef(name, id)
Definition Rtypes.h:325
char name[80]
Definition TGX11.cxx:110
RooCategory is an object to represent discrete states.
Definition RooCategory.h:27
RooDataSet is a container class to hold unbinned data.
Definition RooDataSet.h:33
HLFactory is an High Level model Factory allows you to describe your models in a configuration file (...
Definition HLFactory.h:31
TList fSigBkgPdfNames
List of channels names to combine for the signal plus background pdfs.
Definition HLFactory.h:103
RooWorkspace * fWs
The RooWorkspace containing the models and variables.
Definition HLFactory.h:121
TList fBkgPdfNames
List of channels names to combine for the background pdfs.
Definition HLFactory.h:106
int fInclusionLevel
Keep trace of the inclusion deepness.
Definition HLFactory.h:118
RooAbsPdf * fComboBkgPdf
The background model combination.
Definition HLFactory.h:85
TList fLabelsNames
List of channels names to combine for the datasets.
Definition HLFactory.h:112
RooDataSet * GetTotDataSet()
Get the combined dataset.
int fParseLine(TString &line)
Parse a single line an puts the content in the RooWorkSpace.
HLFactory()
Default Constructor.
Definition HLFactory.cxx:98
RooCategory * fComboCat
The category of the combination.
Definition HLFactory.h:82
RooDataSet * fComboDataset
The datasets combination.
Definition HLFactory.h:91
TList fDatasetsNames
List of channels names to combine for the datasets.
Definition HLFactory.h:109
RooAbsPdf * GetTotBkgPdf()
Get the combined background pdf.
~HLFactory()
Default Destructor.
void DumpCfg(const char *)
Dump the Workspace content as configuration file.
Definition HLFactory.h:59
int AddChannel(const char *label, const char *SigBkgPdfName, const char *BkgPdfName=0, const char *datasetName=0)
Add channel for the combination.
RooAbsPdf * fComboSigBkgPdf
The signal plus background model combination.
Definition HLFactory.h:88
bool fNamesListsConsistent()
Check the length of the lists.
bool fCombinationDone
Flag to keep trace of the status of the combination.
Definition HLFactory.h:94
RooAbsPdf * GetTotSigBkgPdf()
Get the combined signal plus background pdf.
int ProcessCard(const char *filename)
Process a configuration file.
RooCategory * GetTotCategory()
Get the combined dataset.
bool fOwnWs
Owns workspace.
Definition HLFactory.h:124
RooWorkspace * GetWs()
Get the RooWorkspace containing the models and variables.
Definition HLFactory.h:74
void fCreateCategory()
Create the category for the combinations.
bool fVerbose
The verbosity flag.
Definition HLFactory.h:115
int fReadFile(const char *fileName, bool is_included=false)
Read the actual cfg file.
The RooWorkspace is a persistable container for RooFit projects.
A doubly linked list.
Definition TList.h:44
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Basic string class.
Definition TString.h:136
TLine * line
Namespace for the RooStats classes.
Definition Asimov.h:19