Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
16namespace TMVA{
17
18 void mvaeffs(TString dataset, TString fin = "TMVA.root",
19 Float_t nSignal = 1000, Float_t nBackground = 1000,
20 Bool_t useTMVAStyle = kTRUE, TString formula="S/sqrt(S+B)" );
21
22 // this macro plots the signal and background efficiencies
23 // as a function of the MVA cut.
24
25
26 class MethodInfo : public TNamed {
27 public:
29 methodName(""),
30 methodTitle(""),
31 sig(0),
32 bgd(0),
33 origSigE(0),
34 origBgdE(0),
35 sigE(0),
36 bgdE(0),
37 purS(0),
38 sSig(0),
39 effpurS(0),
40 canvas(0),
41 line1(0),
42 line2(0),
43 rightAxis(0),
46 {}
47 virtual ~MethodInfo();
48
66
67 void SetResultHists();
68
70 };
71
73
74 RQ_OBJECT("StatDialogMVAEffs")
75
76 public:
77
79 virtual ~StatDialogMVAEffs();
80
81 void SetFormula(const TString& f) { fFormula = f; }
85
88 void DrawHistograms();
89
90 void RaiseDialog() { if (fMain) { fMain->RaiseWindow(); fMain->Layout(); fMain->MapWindow(); } }
91
92 private:
93
100
103
107
109
110 void UpdateCanvases();
111
112 public:
113
114 // slots
115 void SetNSignal(); //*SIGNAL*
116 void SetNBackground(); //*SIGNAL*
117 void Redraw(); //*SIGNAL*
118 void Close(); //*SIGNAL*
119
120 // result printing
121 void PrintResults( const MethodInfo* info );
122 };
123
124}
125#endif
#define RQ_OBJECT(sender_class)
Definition RQ_OBJECT.h:87
#define f(i)
Definition RSha256.hxx:104
bool Bool_t
Definition RtypesCore.h:63
double Double_t
Definition RtypesCore.h:59
float Float_t
Definition RtypesCore.h:57
const Bool_t kTRUE
Definition RtypesCore.h:91
#define ClassDef(name, id)
Definition Rtypes.h:325
The Canvas class.
Definition TCanvas.h:23
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition TFile.h:54
virtual void Layout()
Layout the elements of the composite frame.
Definition TGFrame.cxx:1242
virtual void MapWindow()
map window
Definition TGFrame.h:228
virtual void RaiseWindow()
raise window
Definition TGWindow.cxx:207
The axis painter class.
Definition TGaxis.h:23
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
To draw Mathematical Formula.
Definition TLatex.h:18
A doubly linked list.
Definition TList.h:44
virtual ~MethodInfo()
Definition mvaeffs.cxx:33
TString methodTitle
Definition mvaeffs.h:50
TCanvas * canvas
Definition mvaeffs.h:60
TGaxis * rightAxis
Definition mvaeffs.h:63
TLatex * line1
Definition mvaeffs.h:61
void SetResultHists()
Definition mvaeffs.cxx:44
Double_t maxSignificanceErr
Definition mvaeffs.h:65
TLatex * line2
Definition mvaeffs.h:62
Double_t maxSignificance
Definition mvaeffs.h:64
TString methodName
Definition mvaeffs.h:49
TString GetFormulaString()
Definition mvaeffs.h:83
TGTextButton * fCloseButton
Definition mvaeffs.h:106
void ReadHistograms(TFile *file)
Definition mvaeffs.cxx:291
virtual ~StatDialogMVAEffs()
Definition mvaeffs.cxx:140
void PrintResults(const MethodInfo *info)
Definition mvaeffs.cxx:480
TGHorizontalFrame * fButtons
Definition mvaeffs.h:104
TGNumberEntry * fSigInput
Definition mvaeffs.h:101
TGMainFrame * fMain
Definition mvaeffs.h:94
TGTextButton * fDrawButton
Definition mvaeffs.h:105
void SetFormula(const TString &f)
Definition mvaeffs.h:81
TGNumberEntry * fBkgInput
Definition mvaeffs.h:102
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Basic string class.
Definition TString.h:136
create variable transformations
void mvaeffs(TString dataset, TString fin="TMVA.root", Float_t nSignal=1000, Float_t nBackground=1000, Bool_t useTMVAStyle=kTRUE, TString formula="S/sqrt(S+B)")
Definition file.py:1