Logo ROOT   6.10/09
Reference Guide
mvaeffs.cxx
Go to the documentation of this file.
1 #include "TMVA/mvaeffs.h"
2 #include <iostream>
3 #include <iomanip>
4 using std::cout;
5 using std::endl;
6 using std::setfill;
7 using std::setw;
8 
9 
10 
11 #include "RQ_OBJECT.h"
12 
13 #include "TH1.h"
14 #include "TROOT.h"
15 #include "TList.h"
16 #include "TIterator.h"
17 #include "TStyle.h"
18 #include "TPad.h"
19 #include "TCanvas.h"
20 #include "TLatex.h"
21 #include "TLegend.h"
22 #include "TLine.h"
23 #include "TH2.h"
24 #include "TFormula.h"
25 #include "TFile.h"
26 #include "TApplication.h"
27 #include "TKey.h"
28 #include "TClass.h"
29 #include "TGaxis.h"
30 
31 #include "TGWindow.h"
32 #include "TGButton.h"
33 #include "TGLabel.h"
34 #include "TGNumberEntry.h"
35 
36 // this macro plots the signal and background efficiencies
37 // as a function of the MVA cut.
38 
40 {
41  delete sigE;
42  delete bgdE;
43  delete purS;
44  delete sSig;
45  delete effpurS;
46  if(gROOT->GetListOfCanvases()->FindObject(canvas))
47  delete canvas;
48 }
49 
51 {
52  TString pname = "purS_" + methodTitle;
53  TString epname = "effpurS_" + methodTitle;
54  TString ssigname = "significance_" + methodTitle;
55 
56  sigE = (TH1*)origSigE->Clone("sigEffi");
57  bgdE = (TH1*)origBgdE->Clone("bgdEffi");
58 
60  Double_t low = sigE->GetBinLowEdge(1);
61  Double_t high = sigE->GetBinLowEdge(nbins+1);
62  purS = new TH1F(pname, pname, nbins, low, high);
63  sSig = new TH1F(ssigname, ssigname, nbins, low, high);
64  effpurS = new TH1F(epname, epname, nbins, low, high);
65 
66  // chop off useless stuff
67  sigE->SetTitle( Form("Cut efficiencies for %s classifier", methodTitle.Data()) );
68 
69  // set the histogram style
73  sigE->SetFillStyle( 0 );
74  bgdE->SetFillStyle( 0 );
75  sSig->SetFillStyle( 0 );
76  sigE->SetLineWidth( 3 );
77  bgdE->SetLineWidth( 3 );
78  sSig->SetLineWidth( 3 );
79 
80  // the purity and quality
81  purS->SetFillStyle( 0 );
82  purS->SetLineWidth( 2 );
83  purS->SetLineStyle( 5 );
84  effpurS->SetFillStyle( 0 );
85  effpurS->SetLineWidth( 2 );
86  effpurS->SetLineStyle( 6 );
87 }
88 
90 {
91  fNSignal = fSigInput->GetNumber();
92 }
93 
95 {
96  fNBackground = fBkgInput->GetNumber();
97 }
98 
100 {
101  TString f = fFormula;
102  f.ReplaceAll("S","x");
103  f.ReplaceAll("B","y");
104  return f;
105 }
106 
107 
109 {
110  TString f = fFormula;
111  f.ReplaceAll("(","{");
112  f.ReplaceAll(")","}");
113  f.ReplaceAll("sqrt","#sqrt");
114  return f;
115 }
116 
118 {
119  UpdateSignificanceHists();
120  UpdateCanvases();
121 }
122 
124 {
125  delete this;
126 }
127 
129 {
130  if (fInfoList) {
131  TIter next(fInfoList);
132  MethodInfo *info(0);
133  while ( (info = (MethodInfo*)next()) ) {
134  delete info;
135  }
136  delete fInfoList;
137  fInfoList=0;
138  }
139 
140 
141  fSigInput->Disconnect();
142  fBkgInput->Disconnect();
143  fDrawButton->Disconnect();
144  fCloseButton->Disconnect();
145 
146  fMain->CloseWindow();
147  fMain->Cleanup();
148  fMain = 0;
149 }
150 
152  fNSignal(ns),
153  fNBackground(nb),
154  fFormula(""),
155  dataset(ds),
156  fInfoList(0),
157  fSigInput(0),
158  fBkgInput(0),
159  fButtons(0),
160  fDrawButton(0),
161  fCloseButton(0),
162  maxLenTitle(0)
163 {
164  UInt_t totalWidth = 500;
165  UInt_t totalHeight = 300;
166 
167  // main frame
168  fMain = new TGMainFrame(p, totalWidth, totalHeight, kMainFrame | kVerticalFrame);
169 
170  TGLabel *sigLab = new TGLabel(fMain,"Signal events");
171  fMain->AddFrame(sigLab, new TGLayoutHints(kLHintsLeft | kLHintsTop,5,5,5,5));
172 
176  fSigInput->Resize(100,24);
177 
178  TGLabel *bkgLab = new TGLabel(fMain, "Background events");
179  fMain->AddFrame(bkgLab, new TGLayoutHints(kLHintsLeft | kLHintsTop,5,5,5,5));
180 
184  fBkgInput->Resize(100,24);
185 
186  fButtons = new TGHorizontalFrame(fMain, totalWidth,30);
187 
188  fCloseButton = new TGTextButton(fButtons,"&Close");
190 
191  fDrawButton = new TGTextButton(fButtons,"&Draw");
193 
195 
196  fMain->SetWindowName("Significance");
197  fMain->SetWMPosition(0,0);
198  fMain->MapSubwindows();
200  fMain->MapWindow();
201 
202  fSigInput->Connect("ValueSet(Long_t)","TMVA::StatDialogMVAEffs",this, "SetNSignal()");
203  fBkgInput->Connect("ValueSet(Long_t)","TMVA::StatDialogMVAEffs",this, "SetNBackground()");
204 
205 // fDrawButton->Connect("Clicked()","TGNumberEntry",fSigInput, "ValueSet(Long_t)");
206 // fDrawButton->Connect("Clicked()","TGNumberEntry",fBkgInput, "ValueSet(Long_t)");
207  fDrawButton->Connect("Clicked()", "TMVA::StatDialogMVAEffs", this, "Redraw()");
208 
209  fCloseButton->Connect("Clicked()", "TMVA::StatDialogMVAEffs", this, "Close()");
210 }
211 
213 {
214  if (fInfoList==0) return;
215  if (fInfoList->First()==0) return;
216  MethodInfo* info = (MethodInfo*)fInfoList->First();
217  if ( info->canvas==0 ) {
218  DrawHistograms();
219  return;
220  }
221  TIter next(fInfoList);
222  while ( (info = (MethodInfo*)next()) ) {
223  info->canvas->Update();
224  info->rightAxis->SetWmax(1.1*info->maxSignificance);
225  info->canvas->Modified(kTRUE);
226  info->canvas->Update();
227  info->canvas->Paint();
228  }
229 }
230 
232 {
233  TFormula f("sigf",GetFormula());
234  TIter next(fInfoList);
235  MethodInfo* info(0);
236  TString cname = "Classifier";
237  if (cname.Length() > maxLenTitle) maxLenTitle = cname.Length();
238  TString str = Form( "%*s ( #signal, #backgr.) Optimal-cut %s NSig NBkg EffSig EffBkg",
239  maxLenTitle, cname.Data(), GetFormulaString().Data() );
240  cout << "--- " << setfill('=') << setw(str.Length()) << "" << setfill(' ') << endl;
241  cout << "--- " << str << endl;
242  cout << "--- " << setfill('-') << setw(str.Length()) << "" << setfill(' ') << endl;
243  Double_t maxSig = -1;
244  Double_t maxSigErr = -1;
245  while ((info = (MethodInfo*)next())) {
246  for (Int_t i=1; i<=info->origSigE->GetNbinsX(); i++) {
247  Float_t eS = info->origSigE->GetBinContent( i );
248  Float_t S = eS * fNSignal;
249  Float_t B = info->origBgdE->GetBinContent( i ) * fNBackground;
250  info->purS->SetBinContent( i, (S+B==0)?0:S/(S+B) );
251 
252  Double_t sig = f.Eval(S,B);
253  if (sig > maxSig) {
254  maxSig = sig;
255  if (GetFormulaString() == "S/sqrt(B)") {
256  maxSigErr = sig * sqrt( 1./S + 1./(2.*B));
257  }
258  }
259  info->sSig->SetBinContent( i, sig );
260  info->effpurS->SetBinContent( i, eS*info->purS->GetBinContent( i ) );
261  }
262 
263  info->maxSignificance = info->sSig->GetMaximum();
264  info->maxSignificanceErr = (maxSigErr > 0) ? maxSigErr : 0;
265  info->sSig->Scale(1/info->maxSignificance);
266 
267  // update the text in the lower left corner
268  PrintResults( info );
269  }
270  cout << "--- " << setfill('-') << setw(str.Length()) << "" << setfill(' ') << endl << endl;
271 }
272 
274 {
275  if (fInfoList) {
276  TIter next(fInfoList);
277  MethodInfo *info(0);
278  while ( (info = (MethodInfo*)next()) ) {
279  delete info;
280  }
281  delete fInfoList;
282  fInfoList=0;
283  }
284  fInfoList = new TList;
285 
286  // search for the right histograms in full list of keys
287  TIter next(file->GetDirectory(dataset.Data())->GetListOfKeys());
288  TKey *key(0);
289  while( (key = (TKey*)next()) ) {
290 
291  if (!TString(key->GetName()).BeginsWith("Method_")) continue;
292  if( ! gROOT->GetClass(key->GetClassName())->InheritsFrom("TDirectory") ) continue;
293 
294  cout << "--- Found directory: " << ((TDirectory*)key->ReadObj())->GetName() << endl;
295 
296  TDirectory* mDir = (TDirectory*)key->ReadObj();
297 
298  TIter keyIt(mDir->GetListOfKeys());
299  TKey *titkey;
300  while((titkey = (TKey*)keyIt())) {
301  if( ! gROOT->GetClass(titkey->GetClassName())->InheritsFrom("TDirectory") ) continue;
302 
303  MethodInfo* info = new MethodInfo();
304  TDirectory* titDir = (TDirectory *)titkey->ReadObj();
305 
307  TMVAGlob::GetMethodTitle(info->methodTitle,titDir);
308  if (info->methodTitle.Length() > maxLenTitle) maxLenTitle = info->methodTitle.Length();
309  TString hname = "MVA_" + info->methodTitle;
310 
311  cout << "--- Classifier: " << info->methodTitle << endl;
312 
313  info->sig = dynamic_cast<TH1*>(titDir->Get( hname + "_S" ));
314  info->bgd = dynamic_cast<TH1*>(titDir->Get( hname + "_B" ));
315  info->origSigE = dynamic_cast<TH1*>(titDir->Get( hname + "_effS" ));
316  info->origBgdE = dynamic_cast<TH1*>(titDir->Get( hname + "_effB" ));
317  if (info->origSigE==0 || info->origBgdE==0) { delete info; continue; }
318 
319  info->SetResultHists();
320  fInfoList->Add(info);
321  }
322  }
323  return;
324 }
325 
327 {
328  // counter variables
329  Int_t countCanvas = 0;
330 
331  // define Canvas layout here!
332  const Int_t width = 600; // size of canvas
333  Int_t signifColor = TColor::GetColor( "#00aa00" );
334 
335  TIter next(fInfoList);
336  MethodInfo* info(0);
337  while ( (info = (MethodInfo*)next()) ) {
338 
339  // create new canvas
340  TCanvas *c = new TCanvas( Form("canvas%d", countCanvas+1),
341  Form("Cut efficiencies for %s classifier",info->methodTitle.Data()),
342  countCanvas*50+200, countCanvas*20, width, Int_t(width*0.78) );
343  info->canvas = c;
344 
345  // draw grid
346  c->SetGrid(1);
347  c->SetTickx(0);
348  c->SetTicky(0);
349 
350  TStyle *TMVAStyle = gROOT->GetStyle("Plain"); // our style is based on Plain
351  TMVAStyle->SetLineStyleString( 5, "[32 22]" );
352  TMVAStyle->SetLineStyleString( 6, "[12 22]" );
353 
354  c->SetTopMargin(.2);
355 
356  // and the signal purity and quality
357  info->effpurS->SetTitle("Cut efficiencies and optimal cut value");
358  if (info->methodTitle.Contains("Cuts")) {
359  info->effpurS->GetXaxis()->SetTitle( "Signal Efficiency" );
360  }
361  else {
362  info->effpurS->GetXaxis()->SetTitle( TString("Cut value applied on ") + info->methodTitle + " output" );
363  }
364  info->effpurS->GetYaxis()->SetTitle( "Efficiency (Purity)" );
366 
367  c->SetTicks(0,0);
368  c->SetRightMargin ( 2.0 );
369 
370  info->effpurS->SetMaximum(1.1);
371  info->effpurS->Draw("histl");
372 
373  info->purS->Draw("samehistl");
374 
375  // overlay signal and background histograms
376  info->sigE->Draw("samehistl");
377  info->bgdE->Draw("samehistl");
378 
379  info->sSig->SetLineColor( signifColor );
380  info->sSig->Draw("samehistl");
381 
382  // redraw axes
383  info->effpurS->Draw( "sameaxis" );
384 
385  // Draw legend
386  TLegend *legend1= new TLegend( c->GetLeftMargin(), 1 - c->GetTopMargin(),
387  c->GetLeftMargin() + 0.4, 1 - c->GetTopMargin() + 0.12 );
388  legend1->SetFillStyle( 1 );
389  legend1->AddEntry(info->sigE,"Signal efficiency","L");
390  legend1->AddEntry(info->bgdE,"Background efficiency","L");
391  legend1->Draw("same");
392  legend1->SetBorderSize(1);
393  legend1->SetMargin( 0.3 );
394 
395  TLegend *legend2= new TLegend( c->GetLeftMargin() + 0.4, 1 - c->GetTopMargin(),
396  1 - c->GetRightMargin(), 1 - c->GetTopMargin() + 0.12 );
397  legend2->SetFillStyle( 1 );
398  legend2->AddEntry(info->purS,"Signal purity","L");
399  legend2->AddEntry(info->effpurS,"Signal efficiency*purity","L");
400  legend2->AddEntry(info->sSig,GetLatexFormula().Data(),"L");
401  legend2->Draw("same");
402  legend2->SetBorderSize(1);
403  legend2->SetMargin( 0.3 );
404 
405  // line to indicate maximum efficiency
406  TLine* effline = new TLine( info->sSig->GetXaxis()->GetXmin(), 1, info->sSig->GetXaxis()->GetXmax(), 1 );
407  effline->SetLineWidth( 1 );
408  effline->SetLineColor( 1 );
409  effline->Draw();
410 
411  // print comments
412  TLatex tl;
413  tl.SetNDC();
414  tl.SetTextSize( 0.033 );
415  Int_t maxbin = info->sSig->GetMaximumBin();
416  info->line1 = tl.DrawLatex( 0.15, 0.23, Form("For %1.0f signal and %1.0f background", fNSignal, fNBackground));
417  tl.DrawLatex( 0.15, 0.19, "events the maximum "+GetLatexFormula()+" is");
418 
419  if (info->maxSignificanceErr > 0) {
420  info->line2 = tl.DrawLatex( 0.15, 0.15, Form("%5.2f +- %4.2f when cutting at %5.2f",
421  info->maxSignificance,
422  info->maxSignificanceErr,
423  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
424  }
425  else {
426  info->line2 = tl.DrawLatex( 0.15, 0.15, Form("%4.2f when cutting at %5.2f",
427  info->maxSignificance,
428  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
429  }
430 
431  // add comment for Method cuts
432  if (info->methodTitle.Contains("Cuts")){
433  tl.DrawLatex( 0.13, 0.77, "Method Cuts provides a bundle of cut selections, each tuned to a");
434  tl.DrawLatex(0.13, 0.74, "different signal efficiency. Shown is the purity for each cut selection.");
435  }
436  // save canvas to file
437  c->Update();
438 
439  // Draw second axes
440  info->rightAxis = new TGaxis(c->GetUxmax(), c->GetUymin(),
441  c->GetUxmax(), c->GetUymax(),0,1.1*info->maxSignificance,510,"+L");
442  info->rightAxis->SetLineColor ( signifColor );
443  info->rightAxis->SetLabelColor( signifColor );
444  info->rightAxis->SetTitleColor( signifColor );
445 
446  info->rightAxis->SetTitleSize( info->sSig->GetXaxis()->GetTitleSize() );
447  info->rightAxis->SetTitle( "Significance" );
448  info->rightAxis->Draw();
449 
450  c->Update();
451 
452  // switches
453  const Bool_t Save_Images = kTRUE;
454 
455  if (Save_Images) {
456  TMVAGlob::imgconv( c, Form("%s/plots/mvaeffs_%s",dataset.Data(), info->methodTitle.Data()) );
457  }
458  countCanvas++;
459  }
460 }
461 
463 {
464  Int_t maxbin = info->sSig->GetMaximumBin();
465  if (info->line1 !=0 )
466  info->line1->SetText( 0.15, 0.23, Form("For %1.0f signal and %1.0f background", fNSignal, fNBackground));
467 
468  if (info->line2 !=0 ) {
469  if (info->maxSignificanceErr > 0) {
470  info->line2->SetText( 0.15, 0.15, Form("%3.2g +- %3.2g when cutting at %3.2g",
471  info->maxSignificance,
472  info->maxSignificanceErr,
473  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
474  }
475  else {
476  info->line2->SetText( 0.15, 0.15, Form("%3.4f when cutting at %3.4f", info->maxSignificance,
477  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
478  }
479 
480  }
481 
482  if (info->maxSignificanceErr <= 0) {
483  TString opt = Form( "%%%is: (%%9.8g,%%9.8g) %%9.4f %%10.6g %%8.7g %%8.7g %%8.4g %%8.4g",
484  maxLenTitle );
485  cout << "--- "
486  << Form( opt.Data(),
488  info->sSig->GetXaxis()->GetBinCenter( maxbin ),
489  info->maxSignificance,
490  info->origSigE->GetBinContent( maxbin )*fNSignal,
491  info->origBgdE->GetBinContent( maxbin )*fNBackground,
492  info->origSigE->GetBinContent( maxbin ),
493  info->origBgdE->GetBinContent( maxbin ) )
494  << endl;
495  }
496  else {
497  TString opt = Form( "%%%is: (%%9.8g,%%9.8g) %%9.4f (%%8.3g +-%%6.3g) %%8.7g %%8.7g %%8.4g %%8.4g",
498  maxLenTitle );
499  cout << "--- "
500  << Form( opt.Data(),
502  info->sSig->GetXaxis()->GetBinCenter( maxbin ),
503  info->maxSignificance,
504  info->maxSignificanceErr,
505  info->origSigE->GetBinContent( maxbin )*fNSignal,
506  info->origBgdE->GetBinContent( maxbin )*fNBackground,
507  info->origSigE->GetBinContent( maxbin ),
508  info->origBgdE->GetBinContent( maxbin ) )
509  << endl;
510  }
511 }
512 
514  Bool_t useTMVAStyle, TString formula )
515 {
516  TMVAGlob::Initialize( useTMVAStyle );
517 
518  StatDialogMVAEffs* gGui = new StatDialogMVAEffs(dataset,gClient->GetRoot(), 1000, 1000);
519 
520  TFile* file = TMVAGlob::OpenFile( fin );
521  gGui->ReadHistograms(file);
522  gGui->SetFormula(formula);
523  gGui->UpdateSignificanceHists();
524  gGui->DrawHistograms();
525  gGui->RaiseDialog();
526 }
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:5937
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:7666
virtual void SetTickx(Int_t value=1)
Definition: TPad.h:344
void imgconv(TCanvas *c, const TString &fname)
Definition: tmvaglob.cxx:212
TGNumberEntry * fBkgInput
Definition: mvaeffs.h:120
Float_t GetLeftMargin() const
Definition: TAttPad.h:44
virtual TList * GetListOfKeys() const
Definition: TDirectory.h:148
Double_t Eval(Double_t x) const
Sets first variable (e.g. x) and evaluate formula.
Definition: TFormula.cxx:2642
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:375
This class displays a legend box (TPaveText) containing several legend entries.
Definition: TLegend.h:23
TH1 * effpurS
Definition: mvaeffs.h:77
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
Definition: TDirectory.cxx:729
float Float_t
Definition: RtypesCore.h:53
TLatex * line2
Definition: mvaeffs.h:80
void mvaeffs(TString dataset, TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE, TString formula="S/sqrt(S+B)")
TLatex * line1
Definition: mvaeffs.h:79
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
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:640
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:452
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
Definition: THist.hxx:311
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4639
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:46
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
Definition: tmvaglob.cxx:8
#define gROOT
Definition: TROOT.h:375
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:2468
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
Definition: tmvaglob.cxx:375
Basic string class.
Definition: TString.h:129
#define gClient
Definition: TGClient.h:166
TCanvas * canvas
Definition: mvaeffs.h:78
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:202
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
Definition: TPad.h:224
int nbins[3]
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
Definition: TH1.cxx:8264
virtual ~MethodInfo()
Definition: mvaeffs.cxx:39
virtual ~StatDialogMVAEffs()
Definition: mvaeffs.cxx:128
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
Definition: TStyle.cxx:1112
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:67
void UpdateSignificanceHists()
Definition: mvaeffs.cxx:231
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:1462
TGTextButton * fDrawButton
Definition: mvaeffs.h:123
TString methodTitle
Definition: mvaeffs.h:68
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
Definition: TPad.h:323
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:1918
std::vector< std::vector< double > > Data
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:101
A doubly linked list.
Definition: TList.h:43
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:462
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition: TList.cxx:561
void Initialize(Bool_t useTMVAStyle=kTRUE)
Definition: tmvaglob.cxx:176
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2851
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:375
TGNumberEntry * fSigInput
Definition: mvaeffs.h:119
virtual void SetTicky(Int_t value=1)
Definition: TPad.h:345
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:8325
unsigned int UInt_t
Definition: RtypesCore.h:42
char * Form(const char *fmt,...)
Ssiz_t Length() const
Definition: TString.h:388
A simple line.
Definition: TLine.h:23
void ReadHistograms(TFile *file)
Definition: mvaeffs.cxx:273
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:1707
The axis painter class.
Definition: TGaxis.h:24
TAxis * GetYaxis()
Definition: TH1.h:301
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:81
void SetFormula(const TString &f)
Definition: mvaeffs.h:99
The Canvas class.
Definition: TCanvas.h:31
double f(double x)
TH1 * origSigE
Definition: mvaeffs.h:71
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:359
Describe directory structure in memory.
Definition: TDirectory.h:34
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:572
The TH1 histogram class.
Definition: TH1.h:56
Double_t maxSignificance
Definition: mvaeffs.h:82
TH1 * origBgdE
Definition: mvaeffs.h:72
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:343
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:124
StatDialogMVAEffs(TString ds, const TGWindow *p, Float_t ns, Float_t nb)
Definition: mvaeffs.cxx:151
Double_t GetUymax() const
Definition: TPad.h:225
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:77
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:2544
TGHorizontalFrame * fButtons
Definition: mvaeffs.h:122
void SetLabelColor(Int_t labelcolor)
Definition: TGaxis.h:105
virtual void SetTitle(const char *title)
Change (i.e.
Definition: TH1.cxx:6028
TGMainFrame * fMain
Definition: mvaeffs.h:112
virtual Int_t GetNbinsX() const
Definition: TH1.h:277
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:2208
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:155
const Bool_t kTRUE
Definition: RtypesCore.h:91
Double_t GetXmax() const
Definition: TAxis.h:134
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Definition: TH1.cxx:7696
Double_t GetUymin() const
Definition: TPad.h:223
void SetResultHists()
Definition: mvaeffs.cxx:50
Float_t GetRightMargin() const
Definition: TAttPad.h:45
void Modified(Bool_t flag=1)
Definition: TPad.h:410
virtual void SetBorderSize(Int_t bordersize=4)
Definition: TPave.h:70
TAxis * GetXaxis()
Definition: TH1.h:300
const char * Data() const
Definition: TString.h:347
Double_t maxSignificanceErr
Definition: mvaeffs.h:83
TString GetLatexFormula()
Definition: mvaeffs.cxx:108