Logo ROOT   6.14/05
Reference Guide
mvaeffs.h
Go to the documentation of this file.
1 #ifndef mvaeffs__HH
2 #define mvaeffs__HH
3 
4 #include "RQ_OBJECT.h"
5 #include "TCanvas.h"
6 #include "TFile.h"
7 #include "TGLabel.h"
8 #include "TGNumberEntry.h"
9 #include "TGWindow.h"
10 #include "TGaxis.h"
11 #include "TH1.h"
12 #include "TIterator.h"
13 #include "TLatex.h"
14 #include "TList.h"
15 
16 namespace TMVA{
17 
18  void mvaeffs(TString dataset, TString fin = "TMVA.root",
19  Bool_t useTMVAStyle = kTRUE, TString formula="S/sqrt(S+B)" );
20 
21  // this macro plots the signal and background efficiencies
22  // as a function of the MVA cut.
23 
24 
25  class MethodInfo : public TNamed {
26  public:
28  methodName(""),
29  methodTitle(""),
30  sig(0),
31  bgd(0),
32  origSigE(0),
33  origBgdE(0),
34  sigE(0),
35  bgdE(0),
36  purS(0),
37  sSig(0),
38  effpurS(0),
39  canvas(0),
40  line1(0),
41  line2(0),
42  rightAxis(0),
43  maxSignificance(0),
45  {}
46  virtual ~MethodInfo();
47 
50  TH1* sig;
51  TH1* bgd;
57  TH1* sSig;
65 
66  void SetResultHists();
67 
69  };
70 
72 
73  RQ_OBJECT("StatDialogMVAEffs")
74 
75  public:
76 
78  virtual ~StatDialogMVAEffs();
79 
80  void SetFormula(const TString& f) { fFormula = f; }
81  TString GetFormula();
82  TString GetFormulaString() { return fFormula; }
83  TString GetLatexFormula();
84 
85  void ReadHistograms(TFile* file);
86  void UpdateSignificanceHists();
87  void DrawHistograms();
88 
89  void RaiseDialog() { if (fMain) { fMain->RaiseWindow(); fMain->Layout(); fMain->MapWindow(); } }
90 
91  private:
92 
99 
102 
106 
108 
109  void UpdateCanvases();
110 
111  public:
112 
113  // slots
114  void SetNSignal(); //*SIGNAL*
115  void SetNBackground(); //*SIGNAL*
116  void Redraw(); //*SIGNAL*
117  void Close(); //*SIGNAL*
118 
119  // result printing
120  void PrintResults( const MethodInfo* info );
121  };
122 
123 }
124 #endif
TGNumberEntry * fBkgInput
Definition: mvaeffs.h:101
TH1 * effpurS
Definition: mvaeffs.h:58
float Float_t
Definition: RtypesCore.h:53
TLatex * line2
Definition: mvaeffs.h:61
void mvaeffs(TString dataset, TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE, TString formula="S/sqrt(S+B)")
TLatex * line1
Definition: mvaeffs.h:60
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:47
Basic string class.
Definition: TString.h:131
TCanvas * canvas
Definition: mvaeffs.h:59
#define f(i)
Definition: RSha256.hxx:104
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual ~MethodInfo()
Definition: mvaeffs.cxx:36
TString methodName
Definition: mvaeffs.h:48
#define ClassDef(name, id)
Definition: Rtypes.h:320
TGTextButton * fDrawButton
Definition: mvaeffs.h:104
TString methodTitle
Definition: mvaeffs.h:49
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
To draw Mathematical Formula.
Definition: TLatex.h:18
TString GetFormulaString()
Definition: mvaeffs.h:82
A doubly linked list.
Definition: TList.h:44
TGNumberEntry * fSigInput
Definition: mvaeffs.h:100
The axis painter class.
Definition: TGaxis.h:24
#define RQ_OBJECT(sender_class)
Definition: RQ_OBJECT.h:87
TGaxis * rightAxis
Definition: mvaeffs.h:62
void SetFormula(const TString &f)
Definition: mvaeffs.h:80
The Canvas class.
Definition: TCanvas.h:31
TH1 * origSigE
Definition: mvaeffs.h:52
double Double_t
Definition: RtypesCore.h:55
The TH1 histogram class.
Definition: TH1.h:56
Double_t maxSignificance
Definition: mvaeffs.h:63
TH1 * origBgdE
Definition: mvaeffs.h:53
TGTextButton * fCloseButton
Definition: mvaeffs.h:105
Abstract ClassifierFactory template that handles arbitrary types.
Definition: file.py:1
TGHorizontalFrame * fButtons
Definition: mvaeffs.h:103
TGMainFrame * fMain
Definition: mvaeffs.h:93
const Bool_t kTRUE
Definition: RtypesCore.h:87
static constexpr double ns
void SetResultHists()
Definition: mvaeffs.cxx:47
Double_t maxSignificanceErr
Definition: mvaeffs.h:64