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(nullptr),
32 bgd(nullptr),
33 origSigE(nullptr),
34 origBgdE(nullptr),
35 sigE(nullptr),
36 bgdE(nullptr),
37 purS(nullptr),
38 sSig(nullptr),
39 effpurS(nullptr),
40 canvas(nullptr),
41 line1(nullptr),
42 line2(nullptr),
43 rightAxis(nullptr),
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
86 void ReadHistograms(TFile* file);
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
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
#define ClassDef(name, id)
Definition Rtypes.h:342
winID h TVirtualViewer3D TVirtualGLPainter p
The Canvas class.
Definition TCanvas.h:23
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Definition TFile.h:53
void Layout() override
Layout the elements of the composite frame.
Definition TGFrame.cxx:1257
void MapWindow() override
map window
Definition TGFrame.h:204
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:385
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:397
TGNumberEntry is a number entry input widget with up/down buttons.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
ROOT GUI Window base class.
Definition TGWindow.h:23
virtual void RaiseWindow()
raise window
Definition TGWindow.cxx:208
The axis painter class.
Definition TGaxis.h:24
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:59
To draw Mathematical Formula.
Definition TLatex.h:18
A doubly linked list.
Definition TList.h:38
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
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:139
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)")