ROOT  6.06/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 
59  Int_t nbins = sigE->GetNbinsX();
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  fInfoList(0),
156  fSigInput(0),
157  fBkgInput(0),
158  fButtons(0),
159  fDrawButton(0),
160  fCloseButton(0),
161  maxLenTitle(0)
162 {
163  UInt_t totalWidth = 500;
164  UInt_t totalHeight = 300;
165 
166  // main frame
167  fMain = new TGMainFrame(p, totalWidth, totalHeight, kMainFrame | kVerticalFrame);
168 
169  TGLabel *sigLab = new TGLabel(fMain,"Signal events");
170  fMain->AddFrame(sigLab, new TGLayoutHints(kLHintsLeft | kLHintsTop,5,5,5,5));
171 
175  fSigInput->Resize(100,24);
176 
177  TGLabel *bkgLab = new TGLabel(fMain, "Background events");
178  fMain->AddFrame(bkgLab, new TGLayoutHints(kLHintsLeft | kLHintsTop,5,5,5,5));
179 
183  fBkgInput->Resize(100,24);
184 
185  fButtons = new TGHorizontalFrame(fMain, totalWidth,30);
186 
187  fCloseButton = new TGTextButton(fButtons,"&Close");
189 
190  fDrawButton = new TGTextButton(fButtons,"&Draw");
192 
194 
195  fMain->SetWindowName("Significance");
196  fMain->SetWMPosition(0,0);
197  fMain->MapSubwindows();
199  fMain->MapWindow();
200 
201  fSigInput->Connect("ValueSet(Long_t)","TMVA::StatDialogMVAEffs",this, "SetNSignal()");
202  fBkgInput->Connect("ValueSet(Long_t)","TMVA::StatDialogMVAEffs",this, "SetNBackground()");
203 
204 // fDrawButton->Connect("Clicked()","TGNumberEntry",fSigInput, "ValueSet(Long_t)");
205 // fDrawButton->Connect("Clicked()","TGNumberEntry",fBkgInput, "ValueSet(Long_t)");
206  fDrawButton->Connect("Clicked()", "TMVA::StatDialogMVAEffs", this, "Redraw()");
207 
208  fCloseButton->Connect("Clicked()", "TMVA::StatDialogMVAEffs", this, "Close()");
209 }
210 
212 {
213  if (fInfoList==0) return;
214  if (fInfoList->First()==0) return;
215  MethodInfo* info = (MethodInfo*)fInfoList->First();
216  if ( info->canvas==0 ) {
217  DrawHistograms();
218  return;
219  }
220  TIter next(fInfoList);
221  while ( (info = (MethodInfo*)next()) ) {
222  info->canvas->Update();
223  info->rightAxis->SetWmax(1.1*info->maxSignificance);
224  info->canvas->Modified(kTRUE);
225  info->canvas->Update();
226  info->canvas->Paint();
227  }
228 }
229 
231 {
232  TFormula f("sigf",GetFormula());
233  TIter next(fInfoList);
234  MethodInfo* info(0);
235  TString cname = "Classifier";
236  if (cname.Length() > maxLenTitle) maxLenTitle = cname.Length();
237  TString str = Form( "%*s ( #signal, #backgr.) Optimal-cut %s NSig NBkg EffSig EffBkg",
238  maxLenTitle, cname.Data(), GetFormulaString().Data() );
239  cout << "--- " << setfill('=') << setw(str.Length()) << "" << setfill(' ') << endl;
240  cout << "--- " << str << endl;
241  cout << "--- " << setfill('-') << setw(str.Length()) << "" << setfill(' ') << endl;
242  Double_t maxSig = -1;
243  Double_t maxSigErr = -1;
244  while ((info = (MethodInfo*)next())) {
245  for (Int_t i=1; i<=info->origSigE->GetNbinsX(); i++) {
246  Float_t eS = info->origSigE->GetBinContent( i );
247  Float_t S = eS * fNSignal;
248  Float_t B = info->origBgdE->GetBinContent( i ) * fNBackground;
249  info->purS->SetBinContent( i, (S+B==0)?0:S/(S+B) );
250 
251  Double_t sig = f.Eval(S,B);
252  if (sig > maxSig) {
253  maxSig = sig;
254  if (GetFormulaString() == "S/sqrt(B)") {
255  maxSigErr = sig * sqrt( 1./S + 1./(2.*B));
256  }
257  }
258  info->sSig->SetBinContent( i, sig );
259  info->effpurS->SetBinContent( i, eS*info->purS->GetBinContent( i ) );
260  }
261 
262  info->maxSignificance = info->sSig->GetMaximum();
263  info->maxSignificanceErr = (maxSigErr > 0) ? maxSigErr : 0;
264  info->sSig->Scale(1/info->maxSignificance);
265 
266  // update the text in the lower left corner
267  PrintResults( info );
268  }
269  cout << "--- " << setfill('-') << setw(str.Length()) << "" << setfill(' ') << endl << endl;
270 }
271 
273 {
274  if (fInfoList) {
275  TIter next(fInfoList);
276  MethodInfo *info(0);
277  while ( (info = (MethodInfo*)next()) ) {
278  delete info;
279  }
280  delete fInfoList;
281  fInfoList=0;
282  }
283  fInfoList = new TList;
284 
285  // search for the right histograms in full list of keys
286  TIter next(file->GetListOfKeys());
287  TKey *key(0);
288  while( (key = (TKey*)next()) ) {
289 
290  if (!TString(key->GetName()).BeginsWith("Method_")) continue;
291  if( ! gROOT->GetClass(key->GetClassName())->InheritsFrom("TDirectory") ) continue;
292 
293  cout << "--- Found directory: " << ((TDirectory*)key->ReadObj())->GetName() << endl;
294 
295  TDirectory* mDir = (TDirectory*)key->ReadObj();
296 
297  TIter keyIt(mDir->GetListOfKeys());
298  TKey *titkey;
299  while((titkey = (TKey*)keyIt())) {
300  if( ! gROOT->GetClass(titkey->GetClassName())->InheritsFrom("TDirectory") ) continue;
301 
302  MethodInfo* info = new MethodInfo();
303  TDirectory* titDir = (TDirectory *)titkey->ReadObj();
304 
306  TMVAGlob::GetMethodTitle(info->methodTitle,titDir);
307  if (info->methodTitle.Length() > maxLenTitle) maxLenTitle = info->methodTitle.Length();
308  TString hname = "MVA_" + info->methodTitle;
309 
310  cout << "--- Classifier: " << info->methodTitle << endl;
311 
312  info->sig = dynamic_cast<TH1*>(titDir->Get( hname + "_S" ));
313  info->bgd = dynamic_cast<TH1*>(titDir->Get( hname + "_B" ));
314  info->origSigE = dynamic_cast<TH1*>(titDir->Get( hname + "_effS" ));
315  info->origBgdE = dynamic_cast<TH1*>(titDir->Get( hname + "_effB" ));
316  if (info->origSigE==0 || info->origBgdE==0) { delete info; continue; }
317 
318  info->SetResultHists();
319  fInfoList->Add(info);
320  }
321  }
322  return;
323 }
324 
326 {
327  // counter variables
328  Int_t countCanvas = 0;
329 
330  // define Canvas layout here!
331  const Int_t width = 600; // size of canvas
332  Int_t signifColor = TColor::GetColor( "#00aa00" );
333 
334  TIter next(fInfoList);
335  MethodInfo* info(0);
336  while ( (info = (MethodInfo*)next()) ) {
337 
338  // create new canvas
339  TCanvas *c = new TCanvas( Form("canvas%d", countCanvas+1),
340  Form("Cut efficiencies for %s classifier",info->methodTitle.Data()),
341  countCanvas*50+200, countCanvas*20, width, Int_t(width*0.78) );
342  info->canvas = c;
343 
344  // draw grid
345  c->SetGrid(1);
346  c->SetTickx(0);
347  c->SetTicky(0);
348 
349  TStyle *TMVAStyle = gROOT->GetStyle("Plain"); // our style is based on Plain
350  TMVAStyle->SetLineStyleString( 5, "[32 22]" );
351  TMVAStyle->SetLineStyleString( 6, "[12 22]" );
352 
353  c->SetTopMargin(.2);
354 
355  // and the signal purity and quality
356  info->effpurS->SetTitle("Cut efficiencies and optimal cut value");
357  if (info->methodTitle.Contains("Cuts")) {
358  info->effpurS->GetXaxis()->SetTitle( "Signal Efficiency" );
359  }
360  else {
361  info->effpurS->GetXaxis()->SetTitle( TString("Cut value applied on ") + info->methodTitle + " output" );
362  }
363  info->effpurS->GetYaxis()->SetTitle( "Efficiency (Purity)" );
365 
366  c->SetTicks(0,0);
367  c->SetRightMargin ( 2.0 );
368 
369  info->effpurS->SetMaximum(1.1);
370  info->effpurS->Draw("histl");
371 
372  info->purS->Draw("samehistl");
373 
374  // overlay signal and background histograms
375  info->sigE->Draw("samehistl");
376  info->bgdE->Draw("samehistl");
377 
378  info->sSig->SetLineColor( signifColor );
379  info->sSig->Draw("samehistl");
380 
381  // redraw axes
382  info->effpurS->Draw( "sameaxis" );
383 
384  // Draw legend
385  TLegend *legend1= new TLegend( c->GetLeftMargin(), 1 - c->GetTopMargin(),
386  c->GetLeftMargin() + 0.4, 1 - c->GetTopMargin() + 0.12 );
387  legend1->SetFillStyle( 1 );
388  legend1->AddEntry(info->sigE,"Signal efficiency","L");
389  legend1->AddEntry(info->bgdE,"Background efficiency","L");
390  legend1->Draw("same");
391  legend1->SetBorderSize(1);
392  legend1->SetMargin( 0.3 );
393 
394  TLegend *legend2= new TLegend( c->GetLeftMargin() + 0.4, 1 - c->GetTopMargin(),
395  1 - c->GetRightMargin(), 1 - c->GetTopMargin() + 0.12 );
396  legend2->SetFillStyle( 1 );
397  legend2->AddEntry(info->purS,"Signal purity","L");
398  legend2->AddEntry(info->effpurS,"Signal efficiency*purity","L");
399  legend2->AddEntry(info->sSig,GetLatexFormula().Data(),"L");
400  legend2->Draw("same");
401  legend2->SetBorderSize(1);
402  legend2->SetMargin( 0.3 );
403 
404  // line to indicate maximum efficiency
405  TLine* effline = new TLine( info->sSig->GetXaxis()->GetXmin(), 1, info->sSig->GetXaxis()->GetXmax(), 1 );
406  effline->SetLineWidth( 1 );
407  effline->SetLineColor( 1 );
408  effline->Draw();
409 
410  // print comments
411  TLatex tl;
412  tl.SetNDC();
413  tl.SetTextSize( 0.033 );
414  Int_t maxbin = info->sSig->GetMaximumBin();
415  info->line1 = tl.DrawLatex( 0.15, 0.23, Form("For %1.0f signal and %1.0f background", fNSignal, fNBackground));
416  tl.DrawLatex( 0.15, 0.19, "events the maximum "+GetLatexFormula()+" is");
417 
418  if (info->maxSignificanceErr > 0) {
419  info->line2 = tl.DrawLatex( 0.15, 0.15, Form("%5.2f +- %4.2f when cutting at %5.2f",
420  info->maxSignificance,
421  info->maxSignificanceErr,
422  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
423  }
424  else {
425  info->line2 = tl.DrawLatex( 0.15, 0.15, Form("%4.2f when cutting at %5.2f",
426  info->maxSignificance,
427  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
428  }
429 
430  // add comment for Method cuts
431  if (info->methodTitle.Contains("Cuts")){
432  tl.DrawLatex( 0.13, 0.77, "Method Cuts provides a bundle of cut selections, each tuned to a");
433  tl.DrawLatex(0.13, 0.74, "different signal efficiency. Shown is the purity for each cut selection.");
434  }
435  // save canvas to file
436  c->Update();
437 
438  // Draw second axes
439  info->rightAxis = new TGaxis(c->GetUxmax(), c->GetUymin(),
440  c->GetUxmax(), c->GetUymax(),0,1.1*info->maxSignificance,510,"+L");
441  info->rightAxis->SetLineColor ( signifColor );
442  info->rightAxis->SetLabelColor( signifColor );
443  info->rightAxis->SetTitleColor( signifColor );
444 
445  info->rightAxis->SetTitleSize( info->sSig->GetXaxis()->GetTitleSize() );
446  info->rightAxis->SetTitle( "Significance" );
447  info->rightAxis->Draw();
448 
449  c->Update();
450 
451  // switches
452  const Bool_t Save_Images = kTRUE;
453 
454  if (Save_Images) {
455  TMVAGlob::imgconv( c, Form("plots/mvaeffs_%s", info->methodTitle.Data()) );
456  }
457  countCanvas++;
458  }
459 }
460 
462 {
463  Int_t maxbin = info->sSig->GetMaximumBin();
464  if (info->line1 !=0 )
465  info->line1->SetText( 0.15, 0.23, Form("For %1.0f signal and %1.0f background", fNSignal, fNBackground));
466 
467  if (info->line2 !=0 ) {
468  if (info->maxSignificanceErr > 0) {
469  info->line2->SetText( 0.15, 0.15, Form("%3.2g +- %3.2g when cutting at %3.2g",
470  info->maxSignificance,
471  info->maxSignificanceErr,
472  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
473  }
474  else {
475  info->line2->SetText( 0.15, 0.15, Form("%3.4f when cutting at %3.4f", info->maxSignificance,
476  info->sSig->GetXaxis()->GetBinCenter(maxbin)) );
477  }
478 
479  }
480 
481  if (info->maxSignificanceErr <= 0) {
482  TString opt = Form( "%%%is: (%%9.8g,%%9.8g) %%9.4f %%10.6g %%8.7g %%8.7g %%8.4g %%8.4g",
483  maxLenTitle );
484  cout << "--- "
485  << Form( opt.Data(),
486  info->methodTitle.Data(), fNSignal, fNBackground,
487  info->sSig->GetXaxis()->GetBinCenter( maxbin ),
488  info->maxSignificance,
489  info->origSigE->GetBinContent( maxbin )*fNSignal,
490  info->origBgdE->GetBinContent( maxbin )*fNBackground,
491  info->origSigE->GetBinContent( maxbin ),
492  info->origBgdE->GetBinContent( maxbin ) )
493  << endl;
494  }
495  else {
496  TString opt = Form( "%%%is: (%%9.8g,%%9.8g) %%9.4f (%%8.3g +-%%6.3g) %%8.7g %%8.7g %%8.4g %%8.4g",
497  maxLenTitle );
498  cout << "--- "
499  << Form( opt.Data(),
500  info->methodTitle.Data(), fNSignal, fNBackground,
501  info->sSig->GetXaxis()->GetBinCenter( maxbin ),
502  info->maxSignificance,
503  info->maxSignificanceErr,
504  info->origSigE->GetBinContent( maxbin )*fNSignal,
505  info->origBgdE->GetBinContent( maxbin )*fNBackground,
506  info->origSigE->GetBinContent( maxbin ),
507  info->origBgdE->GetBinContent( maxbin ) )
508  << endl;
509  }
510 }
511 
512 void TMVA::mvaeffs( TString fin ,
513  Bool_t useTMVAStyle, TString formula )
514 {
515  TMVAGlob::Initialize( useTMVAStyle );
516 
517  StatDialogMVAEffs* gGui = new StatDialogMVAEffs(gClient->GetRoot(), 1000, 1000);
518 
519  TFile* file = TMVAGlob::OpenFile( fin );
520  gGui->ReadHistograms(file);
521  gGui->SetFormula(formula);
522  gGui->UpdateSignificanceHists();
523  gGui->DrawHistograms();
524  gGui->RaiseDialog();
525 }
virtual void SetLineWidth(Width_t lwidth)
Definition: TAttLine.h:57
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:6174
static double B[]
virtual void SetTickx(Int_t value=1)
Definition: TPad.h:347
void imgconv(TCanvas *c, const TString &fname)
Definition: tmvaglob.cxx:212
TGNumberEntry * fBkgInput
Definition: mvaeffs.h:119
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4629
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:394
This class displays a legend box (TPaveText) containing several legend entries.
Definition: TLegend.h:35
TH1 * effpurS
Definition: mvaeffs.h:77
Double_t Eval(Double_t x) const
Definition: TFormula.cxx:2538
virtual TList * GetListOfKeys() const
Definition: TDirectory.h:155
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
Definition: TDirectory.cxx:727
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Ssiz_t Length() const
Definition: TString.h:390
float Float_t
Definition: RtypesCore.h:53
TLatex * line2
Definition: mvaeffs.h:80
TLatex * line1
Definition: mvaeffs.h:79
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Definition: TH1.cxx:7952
void SetTitleColor(Int_t titlecolor)
Definition: TGaxis.h:134
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:635
TFile * OpenFile(const TString &fin)
Definition: tmvaglob.cxx:192
virtual TList * GetListOfKeys() const
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
Definition: TLegend.cxx:373
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:45
void mvaeffs(TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE, TString formula="S/sqrt(S+B)")
Definition: mvaeffs.cxx:512
void Clone(Ssiz_t nc)
Make self a distinct copy with capacity of at least tot, where tot cannot be smaller than the current...
Definition: TString.cxx:1175
Double_t GetUymax() const
Definition: TPad.h:229
THist< 1, float > TH1F
Definition: THist.h:315
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
Definition: tmvaglob.cxx:8
#define gROOT
Definition: TROOT.h:340
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:2280
Basic string class.
Definition: TString.h:137
#define gClient
Definition: TGClient.h:174
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:80
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Definition: TObject.cxx:254
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetFillStyle(Style_t fstyle)
Definition: TAttFill.h:52
int nbins[3]
virtual Int_t GetNbinsX() const
Definition: TH1.h:296
virtual ~MethodInfo()
Definition: mvaeffs.cxx:39
virtual ~StatDialogMVAEffs()
Definition: mvaeffs.cxx:128
virtual Float_t GetTitleSize() const
Definition: TAttAxis.h:57
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
Definition: TStyle.cxx:1102
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
Definition: TAttPad.cxx:127
TString methodName
Definition: mvaeffs.h:67
void UpdateSignificanceHists()
Definition: mvaeffs.cxx:230
const char * Data() const
Definition: TString.h:349
void SetTitleSize(Float_t titlesize)
Definition: TGaxis.h:132
double sqrt(double)
Float_t GetTopMargin() const
Definition: TAttPad.h:56
virtual void SetText(Double_t x, Double_t y, const char *text)
Definition: TText.h:89
Float_t GetRightMargin() const
Definition: TAttPad.h:55
virtual void Paint(Option_t *option="")
Paint canvas.
Definition: TCanvas.cxx:1440
TGTextButton * fDrawButton
Definition: mvaeffs.h:122
TString methodTitle
Definition: mvaeffs.h:68
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
Definition: TPad.h:326
To draw Mathematical Formula.
Definition: TLatex.h:33
bool BeginsWith(const std::string &theString, const std::string &theSubstring)
void GetMethodTitle(TString &name, TKey *ikey)
Definition: tmvaglob.cxx:341
StatDialogMVAEffs(const TGWindow *p, Float_t ns, Float_t nb)
Definition: mvaeffs.cxx:151
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:1901
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:809
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:30
Double_t GetXmin() const
Definition: TAxis.h:137
A doubly linked list.
Definition: TList.h:47
TStyle objects may be created to define special styles.
Definition: TStyle.h:52
virtual void SetLineColor(Color_t lcolor)
Definition: TAttLine.h:54
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:1135
void PrintResults(const MethodInfo *info)
Definition: mvaeffs.cxx:461
void Initialize(Bool_t useTMVAStyle=kTRUE)
Definition: tmvaglob.cxx:176
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2878
TGNumberEntry * fSigInput
Definition: mvaeffs.h:118
virtual void SetTicky(Int_t value=1)
Definition: TPad.h:348
The F O R M U L A class.
Definition: TFormula.h:89
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:8543
unsigned int UInt_t
Definition: RtypesCore.h:42
char * Form(const char *fmt,...)
A simple line.
Definition: TLine.h:41
void ReadHistograms(TFile *file)
Definition: mvaeffs.cxx:272
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:1666
The axis painter class.
Definition: TGaxis.h:39
TAxis * GetYaxis()
Definition: TH1.h:320
Double_t GetUxmax() const
Definition: TPad.h:228
void SetWmax(Double_t wmax)
Definition: TGaxis.h:136
TGaxis * rightAxis
Definition: mvaeffs.h:81
void SetFormula(const TString &f)
Definition: mvaeffs.h:99
Float_t GetLeftMargin() const
Definition: TAttPad.h:54
The Canvas class.
Definition: TCanvas.h:48
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:280
Describe directory structure in memory.
Definition: TDirectory.h:41
static const float S
Definition: mandel.cpp:113
Double_t GetXmax() const
Definition: TAxis.h:138
Double_t GetUymin() const
Definition: TPad.h:227
The TH1 histogram class.
Definition: TH1.h:80
Double_t maxSignificance
Definition: mvaeffs.h:82
TH1 * origBgdE
Definition: mvaeffs.h:72
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 SetTicks(Int_t valuex=1, Int_t valuey=1)
Definition: TPad.h:346
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:117
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
Definition: TAxis.cxx:449
TGTextButton * fCloseButton
Definition: mvaeffs.h:123
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1837
virtual void MapWindow()
Definition: TGFrame.h:267
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:567
TGHorizontalFrame * fButtons
Definition: mvaeffs.h:121
void SetLabelColor(Int_t labelcolor)
Definition: TGaxis.h:115
virtual void SetTitle(const char *title)
Change (i.e.
Definition: TH1.cxx:6268
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:391
TGMainFrame * fMain
Definition: mvaeffs.h:112
virtual void SetTextSize(Float_t tsize=1)
Definition: TAttText.h:60
virtual void Update()
Update canvas pad buffers.
Definition: TCanvas.cxx:2179
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:7921
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
Definition: TNamed.cxx:152
void SetResultHists()
Definition: mvaeffs.cxx:50
void Modified(Bool_t flag=1)
Definition: TPad.h:407
virtual void SetBorderSize(Int_t bordersize=4)
Definition: TPave.h:82
TAxis * GetXaxis()
Definition: TH1.h:319
Double_t maxSignificanceErr
Definition: mvaeffs.h:83
TString GetLatexFormula()
Definition: mvaeffs.cxx:108