Logo ROOT   6.14/05
Reference Guide
mvaeffs.cxx
Go to the documentation of this file.
1 #include "TApplication.h"
2 #include "TCanvas.h"
3 #include "TClass.h"
4 #include "TFile.h"
5 #include "TFormula.h"
6 #include "TGButton.h"
7 #include "TGLabel.h"
8 #include "TGNumberEntry.h"
9 #include "TGWindow.h"
10 #include "TGaxis.h"
11 #include "TH1.h"
12 #include "TH2.h"
13 #include "TIterator.h"
14 #include "TKey.h"
15 #include "TLatex.h"
16 #include "TLegend.h"
17 #include "TLine.h"
18 #include "TList.h"
19 #include "TMVA/mvaeffs.h"
20 #include "TMVA/tmvaglob.h"
21 #include "TPad.h"
22 #include "TROOT.h"
23 #include "TStyle.h"
24 
25 #include <iomanip>
26 #include <iostream>
27 
28 using std::cout;
29 using std::endl;
30 using std::setfill;
31 using std::setw;
32 
33 // this macro plots the signal and background efficiencies
34 // as a function of the MVA cut.
35 
37 {
38  delete sigE;
39  delete bgdE;
40  delete purS;
41  delete sSig;
42  delete effpurS;
43  if(gROOT->GetListOfCanvases()->FindObject(canvas))
44  delete canvas;
45 }
46 
48 {
49  TString pname = "purS_" + methodTitle;
50  TString epname = "effpurS_" + methodTitle;
51  TString ssigname = "significance_" + methodTitle;
52 
53  sigE = (TH1*)origSigE->Clone("sigEffi");
54  bgdE = (TH1*)origBgdE->Clone("bgdEffi");
55 
56  Int_t nbins = sigE->GetNbinsX();
57  Double_t low = sigE->GetBinLowEdge(1);
58  Double_t high = sigE->GetBinLowEdge(nbins+1);
59  purS = new TH1F(pname, pname, nbins, low, high);
60  sSig = new TH1F(ssigname, ssigname, nbins, low, high);
61  effpurS = new TH1F(epname, epname, nbins, low, high);
62 
63  // chop off useless stuff
64  sigE->SetTitle( Form("Cut efficiencies for %s classifier", methodTitle.Data()) );
65 
66  // set the histogram style
70  sigE->SetFillStyle( 0 );
71  bgdE->SetFillStyle( 0 );
72  sSig->SetFillStyle( 0 );
73  sigE->SetLineWidth( 3 );
74  bgdE->SetLineWidth( 3 );
75  sSig->SetLineWidth( 3 );
76 
77  // the purity and quality
78  purS->SetFillStyle( 0 );
79  purS->SetLineWidth( 2 );
80  purS->SetLineStyle( 5 );
81  effpurS->SetFillStyle( 0 );
82  effpurS->SetLineWidth( 2 );
83  effpurS->SetLineStyle( 6 );
84 }
85 
87 {
88  fNSignal = fSigInput->GetNumber();
89 }
90 
92 {
93  fNBackground = fBkgInput->GetNumber();
94 }
95 
97 {
98  TString f = fFormula;
99  f.ReplaceAll("S","x");
100  f.ReplaceAll("B","y");
101  return f;
102 }
103 
104 
106 {
107  TString f = fFormula;
108  f.ReplaceAll("(","{");
109  f.ReplaceAll(")","}");
110  f.ReplaceAll("sqrt","#sqrt");
111  return f;
112 }
113 
115 {
116  UpdateSignificanceHists();
117  UpdateCanvases();
118 }
119 
121 {
122  delete this;
123 }
124 
126 {
127  if (fInfoList) {
128  TIter next(fInfoList);
129  MethodInfo *info(0);
130  while ( (info = (MethodInfo*)next()) ) {
131  delete info;
132  }
133  delete fInfoList;
134  fInfoList=0;
135  }
136 
137 
138  fSigInput->Disconnect();
139  fBkgInput->Disconnect();
140  fDrawButton->Disconnect();
141  fCloseButton->Disconnect();
142 
143  fMain->CloseWindow();
144  fMain->Cleanup();
145  fMain = 0;
146 }
147 
149  fNSignal(ns),
150  fNBackground(nb),
151  fFormula(""),
152  dataset(ds),
153  fInfoList(0),
154  fSigInput(0),
155  fBkgInput(0),
156  fButtons(0),
157  fDrawButton(0),
158  fCloseButton(0),
159  maxLenTitle(0)
160 {
161  UInt_t totalWidth = 500;
162  UInt_t totalHeight = 300;
163 
164  // main frame
165  fMain = new TGMainFrame(p, totalWidth, totalHeight, kMainFrame | kVerticalFrame);
166 
167  TGLabel *sigLab = new TGLabel(fMain,"Signal events");
168  fMain->AddFrame(sigLab, new TGLayoutHints(kLHintsLeft | kLHintsTop,5,5,5,5));
169 
173  fSigInput->Resize(100,24);
174 
175  TGLabel *bkgLab = new TGLabel(fMain, "Background events");
176  fMain->AddFrame(bkgLab, new TGLayoutHints(kLHintsLeft | kLHintsTop,5,5,5,5));
177 
181  fBkgInput->Resize(100,24);
182 
183  fButtons = new TGHorizontalFrame(fMain, totalWidth,30);
184 
185  fCloseButton = new TGTextButton(fButtons,"&Close");
187 
188  fDrawButton = new TGTextButton(fButtons,"&Draw");
190 
192 
193  fMain->SetWindowName("Significance");
194  fMain->SetWMPosition(0,0);
195  fMain->MapSubwindows();
197  fMain->MapWindow();
198 
199  fSigInput->Connect("ValueSet(Long_t)","TMVA::StatDialogMVAEffs",this, "SetNSignal()");
200  fBkgInput->Connect("ValueSet(Long_t)","TMVA::StatDialogMVAEffs",this, "SetNBackground()");
201 
202 // fDrawButton->Connect("Clicked()","TGNumberEntry",fSigInput, "ValueSet(Long_t)");
203 // fDrawButton->Connect("Clicked()","TGNumberEntry",fBkgInput, "ValueSet(Long_t)");
204  fDrawButton->Connect("Clicked()", "TMVA::StatDialogMVAEffs", this, "Redraw()");
205 
206  fCloseButton->Connect("Clicked()", "TMVA::StatDialogMVAEffs", this, "Close()");
207 }
208 
210 {
211  if (fInfoList==0) return;
212  if (fInfoList->First()==0) return;
213  MethodInfo* info = (MethodInfo*)fInfoList->First();
214  if ( info->canvas==0 ) {
215  DrawHistograms();
216  return;
217  }
218  TIter next(fInfoList);
219  while ( (info = (MethodInfo*)next()) ) {
220  info->canvas->Update();
221  info->rightAxis->SetWmax(1.1*info->maxSignificance);
222  info->canvas->Modified(kTRUE);
223  info->canvas->Update();
224  info->canvas->Paint();
225  }
226 }
227 
229 {
230  TFormula f("sigf",GetFormula());
231  TIter next(fInfoList);
232  MethodInfo* info(0);
233  TString cname = "Classifier";
234  if (cname.Length() > maxLenTitle) maxLenTitle = cname.Length();
235  TString str = Form( "%*s ( #signal, #backgr.) Optimal-cut %s NSig NBkg EffSig EffBkg",
236  maxLenTitle, cname.Data(), GetFormulaString().Data() );
237  cout << "--- " << setfill('=') << setw(str.Length()) << "" << setfill(' ') << endl;
238  cout << "--- " << str << endl;
239  cout << "--- " << setfill('-') << setw(str.Length()) << "" << setfill(' ') << endl;
240  Double_t maxSig = -1;
241  Double_t maxSigErr = -1;
242  while ((info = (MethodInfo*)next())) {
243  for (Int_t i=1; i<=info->origSigE->GetNbinsX(); i++) {
244  Float_t eS = info->origSigE->GetBinContent( i );
245  Float_t S = eS * fNSignal;
246  Float_t B = info->origBgdE->GetBinContent( i ) * fNBackground;
247  info->purS->SetBinContent( i, (S+B==0)?0:S/(S+B) );
248 
249  Double_t sig = f.Eval(S,B);
250  if (sig > maxSig) {
251  maxSig = sig;
252  if (GetFormulaString() == "S/sqrt(B)") {
253  maxSigErr = sig * sqrt( 1./S + 1./(2.*B));
254  }
255  }
256  info->sSig->SetBinContent( i, sig );
257  info->effpurS->SetBinContent( i, eS*info->purS->GetBinContent( i ) );
258  }
259 
260  info->maxSignificance = info->sSig->GetMaximum();
261  info->maxSignificanceErr = (maxSigErr > 0) ? maxSigErr : 0;
262  info->sSig->Scale(1/info->maxSignificance);
263 
264  // update the text in the lower left corner
265  PrintResults( info );
266  }
267  cout << "--- " << setfill('-') << setw(str.Length()) << "" << setfill(' ') << endl << endl;
268 }
269 
271 {
272  if (fInfoList) {
273  TIter next(fInfoList);
274  MethodInfo *info(0);
275  while ( (info = (MethodInfo*)next()) ) {
276  delete info;
277  }
278  delete fInfoList;
279  fInfoList=0;
280  }
281  fInfoList = new TList;
282 
283  // search for the right histograms in full list of keys
284  TIter next(file->GetDirectory(dataset.Data())->GetListOfKeys());
285  TKey *key(0);
286  while( (key = (TKey*)next()) ) {
287 
288  if (!TString(key->GetName()).BeginsWith("Method_")) continue;
289  if( ! gROOT->GetClass(key->GetClassName())->InheritsFrom("TDirectory") ) continue;
290 
291  cout << "--- Found directory: " << ((TDirectory*)key->ReadObj())->GetName() << endl;
292 
293  TDirectory* mDir = (TDirectory*)key->ReadObj();
294 
295  TIter keyIt(mDir->GetListOfKeys());
296  TKey *titkey;
297  while((titkey = (TKey*)keyIt())) {
298  if( ! gROOT->GetClass(titkey->GetClassName())->InheritsFrom("TDirectory") ) continue;
299 
300  MethodInfo* info = new MethodInfo();
301  TDirectory* titDir = (TDirectory *)titkey->ReadObj();
302 
304  TMVAGlob::GetMethodTitle(info->methodTitle,titDir);
305  if (info->methodTitle.Length() > maxLenTitle) maxLenTitle = info->methodTitle.Length();
306  TString hname = "MVA_" + info->methodTitle;
307 
308  cout << "--- Classifier: " << info->methodTitle << endl;
309 
310  info->sig = dynamic_cast<TH1*>(titDir->Get( hname + "_S" ));
311  info->bgd = dynamic_cast<TH1*>(titDir->Get( hname + "_B" ));
312  info->origSigE = dynamic_cast<TH1*>(titDir->Get( hname + "_effS" ));
313  info->origBgdE = dynamic_cast<TH1*>(titDir->Get( hname + "_effB" ));
314  if (info->origSigE==0 || info->origBgdE==0) { delete info; continue; }
315 
316  info->SetResultHists();
317  fInfoList->Add(info);
318  }
319  }
320  return;
321 }
322 
324 {
325  // counter variables
326  Int_t countCanvas = 0;
327 
328  // define Canvas layout here!
329  const Int_t width = 600; // size of canvas
330  Int_t signifColor = TColor::GetColor( "#00aa00" );
331 
332  TIter next(fInfoList);
333  MethodInfo* info(0);
334  while ( (info = (MethodInfo*)next()) ) {
335 
336  // create new canvas
337  TCanvas *c = new TCanvas( Form("canvas%d", countCanvas+1),
338  Form("Cut efficiencies for %s classifier",info->methodTitle.Data()),
339  countCanvas*50+200, countCanvas*20, width, Int_t(width*0.78) );
340  info->canvas = c;
341 
342  // draw grid
343  c->SetGrid(1);
344  c->SetTickx(0);
345  c->SetTicky(0);
346 
347  TStyle *TMVAStyle = gROOT->GetStyle("Plain"); // our style is based on Plain
348  TMVAStyle->SetLineStyleString( 5, "[32 22]" );
349  TMVAStyle->SetLineStyleString( 6, "[12 22]" );
350 
351  c->SetTopMargin(.2);
352 
353  // and the signal purity and quality
354  info->effpurS->SetTitle("Cut efficiencies and optimal cut value");
355  if (info->methodTitle.Contains("Cuts")) {
356  info->effpurS->GetXaxis()->SetTitle( "Signal Efficiency" );
357  }
358  else {
359  info->effpurS->GetXaxis()->SetTitle( TString("Cut value applied on ") + info->methodTitle + " output" );
360  }
361  info->effpurS->GetYaxis()->SetTitle( "Efficiency (Purity)" );
363 
364  c->SetTicks(0,0);
365  c->SetRightMargin ( 2.0 );
366 
367  info->effpurS->SetMaximum(1.1);
368  info->effpurS->Draw("histl");
369 
370  info->purS->Draw("samehistl");
371 
372  // overlay signal and background histograms
373  info->sigE->Draw("samehistl");
374  info->bgdE->Draw("samehistl");
375 
376  info->sSig->SetLineColor( signifColor );
377  info->sSig->Draw("samehistl");
378 
379  // redraw axes
380  info->effpurS->Draw( "sameaxis" );
381 
382  // Draw legend
383  TLegend *legend1= new TLegend( c->GetLeftMargin(), 1 - c->GetTopMargin(),
384  c->GetLeftMargin() + 0.4, 1 - c->GetTopMargin() + 0.12 );
385  legend1->SetFillStyle( 1 );
386  legend1->AddEntry(info->sigE,"Signal efficiency","L");
387  legend1->AddEntry(info->bgdE,"Background efficiency","L");
388  legend1->Draw("same");
389  legend1->SetBorderSize(1);
390  legend1->SetMargin( 0.3 );
391 
392  TLegend *legend2= new TLegend( c->GetLeftMargin() + 0.4, 1 - c->GetTopMargin(),
393  1 - c->GetRightMargin(), 1 - c->GetTopMargin() + 0.12 );
394  legend2->SetFillStyle( 1 );
395  legend2->AddEntry(info->purS,"Signal purity","L");
396  legend2->AddEntry(info->effpurS,"Signal efficiency*purity","L");
397  legend2->AddEntry(info->sSig,GetLatexFormula().Data(),"L");
398  legend2->Draw("same");
399  legend2->SetBorderSize(1);
400  legend2->SetMargin( 0.3 );
401 
402  // line to indicate maximum efficiency
403  TLine* effline = new TLine( info->sSig->GetXaxis()->GetXmin(), 1, info->sSig->GetXaxis()->GetXmax(), 1 );
404  effline->SetLineWidth( 1 );
405  effline->SetLineColor( 1 );
406  effline->Draw();
407 
408  // print comments
409  TLatex tl;
410  tl.SetNDC();
411  tl.SetTextSize( 0.033 );
412  Int_t maxbin = info->sSig->GetMaximumBin();
413  info->line1 = tl.DrawLatex( 0.15, 0.23, Form("For %1.0f signal and %1.0f background", fNSignal, fNBackground));
414  tl.DrawLatex( 0.15, 0.19, "events the maximum "+GetLatexFormula()+" is");
415 
416  if (info->maxSignificanceErr > 0) {
417  info->line2 = tl.DrawLatex( 0.15, 0.15, Form("%5.2f +- %4.2f when cutting at %5.2f",
418  info->maxSignificance,
419  info->maxSignificanceErr,
420  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
421  }
422  else {
423  info->line2 = tl.DrawLatex( 0.15, 0.15, Form("%4.2f when cutting at %5.2f",
424  info->maxSignificance,
425  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
426  }
427 
428  // add comment for Method cuts
429  if (info->methodTitle.Contains("Cuts")){
430  tl.DrawLatex( 0.13, 0.77, "Method Cuts provides a bundle of cut selections, each tuned to a");
431  tl.DrawLatex(0.13, 0.74, "different signal efficiency. Shown is the purity for each cut selection.");
432  }
433  // save canvas to file
434  c->Update();
435 
436  // Draw second axes
437  info->rightAxis = new TGaxis(c->GetUxmax(), c->GetUymin(),
438  c->GetUxmax(), c->GetUymax(),0,1.1*info->maxSignificance,510,"+L");
439  info->rightAxis->SetLineColor ( signifColor );
440  info->rightAxis->SetLabelColor( signifColor );
441  info->rightAxis->SetTitleColor( signifColor );
442 
443  info->rightAxis->SetTitleSize( info->sSig->GetXaxis()->GetTitleSize() );
444  info->rightAxis->SetTitle( "Significance" );
445  info->rightAxis->Draw();
446 
447  c->Update();
448 
449  // switches
450  const Bool_t Save_Images = kTRUE;
451 
452  if (Save_Images) {
453  TMVAGlob::imgconv( c, Form("%s/plots/mvaeffs_%s",dataset.Data(), info->methodTitle.Data()) );
454  }
455  countCanvas++;
456  }
457 }
458 
460 {
461  Int_t maxbin = info->sSig->GetMaximumBin();
462  if (info->line1 !=0 )
463  info->line1->SetText( 0.15, 0.23, Form("For %1.0f signal and %1.0f background", fNSignal, fNBackground));
464 
465  if (info->line2 !=0 ) {
466  if (info->maxSignificanceErr > 0) {
467  info->line2->SetText( 0.15, 0.15, Form("%3.2g +- %3.2g when cutting at %3.2g",
468  info->maxSignificance,
469  info->maxSignificanceErr,
470  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
471  }
472  else {
473  info->line2->SetText( 0.15, 0.15, Form("%3.4f when cutting at %3.4f", info->maxSignificance,
474  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
475  }
476 
477  }
478 
479  if (info->maxSignificanceErr <= 0) {
480  TString opt = Form( "%%%is: (%%9.8g,%%9.8g) %%9.4f %%10.6g %%8.7g %%8.7g %%8.4g %%8.4g",
481  maxLenTitle );
482  cout << "--- "
483  << Form( opt.Data(),
485  info->sSig->GetXaxis()->GetBinCenter( maxbin ),
486  info->maxSignificance,
487  info->origSigE->GetBinContent( maxbin )*fNSignal,
488  info->origBgdE->GetBinContent( maxbin )*fNBackground,
489  info->origSigE->GetBinContent( maxbin ),
490  info->origBgdE->GetBinContent( maxbin ) )
491  << endl;
492  }
493  else {
494  TString opt = Form( "%%%is: (%%9.8g,%%9.8g) %%9.4f (%%8.3g +-%%6.3g) %%8.7g %%8.7g %%8.4g %%8.4g",
495  maxLenTitle );
496  cout << "--- "
497  << Form( opt.Data(),
499  info->sSig->GetXaxis()->GetBinCenter( maxbin ),
500  info->maxSignificance,
501  info->maxSignificanceErr,
502  info->origSigE->GetBinContent( maxbin )*fNSignal,
503  info->origBgdE->GetBinContent( maxbin )*fNBackground,
504  info->origSigE->GetBinContent( maxbin ),
505  info->origBgdE->GetBinContent( maxbin ) )
506  << endl;
507  }
508 }
509 
511  Bool_t useTMVAStyle, TString formula )
512 {
513  TMVAGlob::Initialize( useTMVAStyle );
514 
515  StatDialogMVAEffs* gGui = new StatDialogMVAEffs(dataset,gClient->GetRoot(), 1000, 1000);
516 
517  TFile* file = TMVAGlob::OpenFile( fin );
518  gGui->ReadHistograms(file);
519  gGui->SetFormula(formula);
520  gGui->UpdateSignificanceHists();
521  gGui->DrawHistograms();
522  gGui->RaiseDialog();
523 }
std::string GetName(const std::string &scope_name)
Definition: Cppyy.cxx:145
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
Definition: TH1.cxx:6101
static double B[]
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
Definition: TH1.cxx:7844
virtual void SetTickx(Int_t value=1)
Definition: TPad.h:348
void imgconv(TCanvas *c, const TString &fname)
Definition: tmvaglob.cxx:212
TGNumberEntry * fBkgInput
Definition: mvaeffs.h:101
Float_t GetLeftMargin() const
Definition: TAttPad.h:44
virtual TList * GetListOfKeys() const
Definition: TDirectory.h:150
Double_t Eval(Double_t x) const
Sets first variable (e.g. x) and evaluate formula.
Definition: TFormula.cxx:3170
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:390
This class displays a legend box (TPaveText) containing several legend entries.
Definition: TLegend.h:23
TH1 * effpurS
Definition: mvaeffs.h:58
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
Definition: TDirectory.cxx:805
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
void SetTitleColor(Int_t titlecolor)
Definition: TGaxis.h:128
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1746
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:687
TFile * OpenFile(const TString &fin)
Definition: tmvaglob.cxx:192
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
Definition: TLegend.cxx:423
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
Definition: THist.hxx:285
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4770
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:47
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
Definition: tmvaglob.cxx:8
#define gROOT
Definition: TROOT.h:410
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
Definition: tmvaglob.cxx:77
virtual void SetTitle(const char *title="")
Change the title of the axis.
Definition: TGaxis.cxx:2690
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
Definition: tmvaglob.cxx:375
Basic string class.
Definition: TString.h:131
#define gClient
Definition: TGClient.h:166
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
void SetMargin(Float_t margin)
Definition: TLegend.h:69
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Definition: TObject.cxx:195
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition: TAttFill.h:39
Double_t GetUxmax() const
Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition: TPad.h:227
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
Definition: TH1.cxx:8445
virtual ~MethodInfo()
Definition: mvaeffs.cxx:36
virtual ~StatDialogMVAEffs()
Definition: mvaeffs.cxx:125
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
Definition: TStyle.cxx:1289
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
Definition: TAttPad.cxx:130
TString methodName
Definition: mvaeffs.h:48
void UpdateSignificanceHists()
Definition: mvaeffs.cxx:228
void SetTitleSize(Float_t titlesize)
Definition: TGaxis.h:126
double sqrt(double)
Double_t GetXmin() const
Definition: TAxis.h:133
virtual void SetText(Double_t x, Double_t y, const char *text)
Definition: TText.h:72
virtual void Paint(Option_t *option="")
Paint canvas.
Definition: TCanvas.cxx:1471
TGTextButton * fDrawButton
Definition: mvaeffs.h:104
TString methodTitle
Definition: mvaeffs.h:49
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
Definition: TPad.h:327
To draw Mathematical Formula.
Definition: TLatex.h:18
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
Definition: TAxis.cxx:464
void GetMethodTitle(TString &name, TKey *ikey)
Definition: tmvaglob.cxx:341
TLatex * DrawLatex(Double_t x, Double_t y, const char *text)
Make a copy of this object with the new parameters And copy object attributes.
Definition: TLatex.cxx:1914
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
Definition: TText.cxx:814
void GetMethodName(TString &name, TKey *mkey)
Definition: tmvaglob.cxx:335
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Definition: TKey.h:24
TString GetFormulaString()
Definition: mvaeffs.h:82
A doubly linked list.
Definition: TList.h:44
TStyle objects may be created to define special styles.
Definition: TStyle.h:27
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TAttLine.h:40
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
Definition: TQObject.cxx:867
RooArgSet S(const RooAbsArg &v1)
void PrintResults(const MethodInfo *info)
Definition: mvaeffs.cxx:459
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition: TList.cxx:655
void Initialize(Bool_t useTMVAStyle=kTRUE)
Definition: tmvaglob.cxx:176
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2974
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:375
TGNumberEntry * fSigInput
Definition: mvaeffs.h:100
virtual void SetTicky(Int_t value=1)
Definition: TPad.h:349
The Formula class.
Definition: TFormula.h:83
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
Definition: TH1.cxx:8514
unsigned int UInt_t
Definition: RtypesCore.h:42
char * Form(const char *fmt,...)
Ssiz_t Length() const
Definition: TString.h:405
A simple line.
Definition: TLine.h:23
void ReadHistograms(TFile *file)
Definition: mvaeffs.cxx:270
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
Definition: TColor.cxx:1758
The axis painter class.
Definition: TGaxis.h:24
TAxis * GetYaxis()
Definition: TH1.h:316
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
void SetWmax(Double_t wmax)
Definition: TGaxis.h:130
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
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
Definition: TLegend.cxx:330
Describe directory structure in memory.
Definition: TDirectory.h:34
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:619
The TH1 histogram class.
Definition: TH1.h:56
Double_t maxSignificance
Definition: mvaeffs.h:63
TH1 * origBgdE
Definition: mvaeffs.h:53
virtual Float_t GetTitleSize() const
Definition: TAttAxis.h:43
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition: TAttLine.h:42
virtual void SetTicks(Int_t valuex=1, Int_t valuey=1)
Definition: TPad.h:347
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1146
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
Definition: TAttPad.cxx:120
TGTextButton * fCloseButton
Definition: mvaeffs.h:105
StatDialogMVAEffs(TString ds, const TGWindow *p, Float_t ns, Float_t nb)
Definition: mvaeffs.cxx:148
Double_t GetUymax() const
Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition: TPad.h:229
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1837
Float_t GetTopMargin() const
Definition: TAttPad.h:46
virtual void Add(TObject *obj)
Definition: TList.h:87
Definition: file.py:1
virtual void MapWindow()
Definition: TGFrame.h:251
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
Definition: TH1.cxx:2657
TGHorizontalFrame * fButtons
Definition: mvaeffs.h:103
void SetLabelColor(Int_t labelcolor)
Definition: TGaxis.h:105
#define c(i)
Definition: RSha256.hxx:101
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
Definition: TH1.cxx:6192
TGMainFrame * fMain
Definition: mvaeffs.h:93
virtual Int_t GetNbinsX() const
Definition: TH1.h:291
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Definition: TAttText.h:46
virtual void Update()
Update canvas pad buffers.
Definition: TCanvas.cxx:2248
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
const Bool_t kTRUE
Definition: RtypesCore.h:87
Double_t GetXmax() const
Definition: TAxis.h:134
static constexpr double ns
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Definition: TH1.cxx:7874
Double_t GetUymin() const
Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition: TPad.h:225
void SetResultHists()
Definition: mvaeffs.cxx:47
Float_t GetRightMargin() const
Definition: TAttPad.h:45
void Modified(Bool_t flag=1)
Definition: TPad.h:414
virtual void SetBorderSize(Int_t bordersize=4)
Definition: TPave.h:70
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
Definition: TH1.h:315
const char * Data() const
Definition: TString.h:364
Double_t maxSignificanceErr
Definition: mvaeffs.h:64
TString GetLatexFormula()
Definition: mvaeffs.cxx:105