tmvaglob.C
Go to the documentation of this file.
1 // global TMVA style settings
2 #ifndef TMVA_TMVAGLOB
3 #define TMVA_TMVAGLOB
4 
5 #include <iostream>
6 
7 #include "TPad.h"
8 #include "TCanvas.h"
9 #include "TColor.h"
10 #include "TSystem.h"
11 #include "TImage.h"
12 #include "TKey.h"
13 #include "TH1.h"
14 #include "TROOT.h"
15 #include "TStyle.h"
16 #include "TFile.h"
17 #include "TDirectory.h"
18 
19 
20 #include "RVersion.h"
21 
22 using std::cout;
23 using std::endl;
24 
25 namespace TMVAGlob {
26 
27  // --------- S t y l e ---------------------------
28  static Bool_t UsePaperStyle = 0;
29  // -----------------------------------------------
30 
31  enum TypeOfPlot { kId = 0,
37 
38  static Int_t c_Canvas = TColor::GetColor( "#e9e6da" );
39  static Int_t c_FrameFill = TColor::GetColor( "#fffffd" );
40  static Int_t c_TitleBox = TColor::GetColor( "#dae1e6" );
41  static Int_t c_SignalLine = TColor::GetColor( "#0000ee" );
42  static Int_t c_SignalFill = TColor::GetColor( "#7d99d1" );
43  static Int_t c_BackgroundLine = TColor::GetColor( "#ff0000" );
44  static Int_t c_BackgroundFill = TColor::GetColor( "#ff0000" );
45  static Int_t c_NovelBlue = TColor::GetColor( "#2244a5" );
46 
47  // set the style
48  void SetSignalAndBackgroundStyle( TH1* sig, TH1* bkg, TH1* all = 0 )
49  {
50  //signal
51  // const Int_t FillColor__S = 38 + 150; // change of Color Scheme in ROOT-5.16.
52  // convince yourself with gROOT->GetListOfColors()->Print()
53  Int_t FillColor__S = c_SignalFill;
54  Int_t FillStyle__S = 1001;
55  Int_t LineColor__S = c_SignalLine;
56  Int_t LineWidth__S = 2;
57 
58  // background
59  //Int_t icolor = UsePaperStyle ? 2 + 100 : 2;
60  Int_t FillColor__B = c_BackgroundFill;
61  Int_t FillStyle__B = 3554;
62  Int_t LineColor__B = c_BackgroundLine;
63  Int_t LineWidth__B = 2;
64 
65  if (sig != NULL) {
66  sig->SetLineColor( LineColor__S );
67  sig->SetLineWidth( LineWidth__S );
68  sig->SetFillStyle( FillStyle__S );
69  sig->SetFillColor( FillColor__S );
70  }
71 
72  if (bkg != NULL) {
73  bkg->SetLineColor( LineColor__B );
74  bkg->SetLineWidth( LineWidth__B );
75  bkg->SetFillStyle( FillStyle__B );
76  bkg->SetFillColor( FillColor__B );
77  }
78 
79  if (all != NULL) {
80  all->SetLineColor( LineColor__S );
81  all->SetLineWidth( LineWidth__S );
82  all->SetFillStyle( FillStyle__S );
83  all->SetFillColor( FillColor__S );
84  }
85  }
86 
87  // set frame styles
88  void SetFrameStyle( TH1* frame, Float_t scale = 1.0 )
89  {
90  frame->SetLabelOffset( 0.012, "X" );// label offset on x axis
91  frame->SetLabelOffset( 0.012, "Y" );// label offset on x axis
92  frame->GetXaxis()->SetTitleOffset( 1.25 );
93  frame->GetYaxis()->SetTitleOffset( 1.22 );
94  frame->GetXaxis()->SetTitleSize( 0.045*scale );
95  frame->GetYaxis()->SetTitleSize( 0.045*scale );
96  Float_t labelSize = 0.04*scale;
97  frame->GetXaxis()->SetLabelSize( labelSize );
98  frame->GetYaxis()->SetLabelSize( labelSize );
99 
100  // global style settings
101  gPad->SetTicks();
102  gPad->SetLeftMargin ( 0.108*scale );
103  gPad->SetRightMargin ( 0.050*scale );
104  gPad->SetBottomMargin( 0.120*scale );
105  }
106 
107  void SetTMVAStyle() {
108 
109  TStyle *TMVAStyle = gROOT->GetStyle("TMVA");
110  if(TMVAStyle!=0) {
111  gROOT->SetStyle("TMVA");
112  return;
113  }
114 
115  TMVAStyle = new TStyle(*gROOT->GetStyle("Plain")); // our style is based on Plain
116  TMVAStyle->SetName("TMVA");
117  TMVAStyle->SetTitle("TMVA style based on \"Plain\" with modifications defined in tmvaglob.C");
118  gROOT->GetListOfStyles()->Add(TMVAStyle);
119  gROOT->SetStyle("TMVA");
120 
121  TMVAStyle->SetLineStyleString( 5, "[52 12]" );
122  TMVAStyle->SetLineStyleString( 6, "[22 12]" );
123  TMVAStyle->SetLineStyleString( 7, "[22 10 7 10]" );
124 
125  // the pretty color palette of old
126  TMVAStyle->SetPalette((UsePaperStyle ? 18 : 1),0);
127 
128  // use plain black on white colors
129  TMVAStyle->SetFrameBorderMode(0);
130  TMVAStyle->SetCanvasBorderMode(0);
131  TMVAStyle->SetPadBorderMode(0);
132  TMVAStyle->SetPadColor(0);
133  TMVAStyle->SetFillStyle(0);
134 
135  TMVAStyle->SetLegendBorderSize(0);
136 
137  // title properties
138  // TMVAStyle->SetTitleW(.4);
139  // TMVAStyle->SetTitleH(.10);
140  // MVAStyle->SetTitleX(.5);
141  // TMVAStyle->SetTitleY(.9);
142  TMVAStyle->SetTitleFillColor( c_TitleBox );
143  if (!UsePaperStyle) {
144  TMVAStyle->SetFrameFillColor( c_FrameFill );
145  TMVAStyle->SetCanvasColor( c_Canvas );
146  }
147 
148  // set the paper & margin sizes
149  TMVAStyle->SetPaperSize(20,26);
150  TMVAStyle->SetPadTopMargin(0.10);
151  TMVAStyle->SetPadRightMargin(0.05);
152  TMVAStyle->SetPadBottomMargin(0.11);
153  TMVAStyle->SetPadLeftMargin(0.12);
154 
155  // use bold lines and markers
156  TMVAStyle->SetMarkerStyle(21);
157  TMVAStyle->SetMarkerSize(0.3);
158  TMVAStyle->SetHistLineWidth(2);
159  TMVAStyle->SetLineStyleString(2,"[12 12]"); // postscript dashes
160 
161  // do not display any of the standard histogram decorations
162  TMVAStyle->SetOptTitle(1);
163  TMVAStyle->SetTitleH(0.052);
164 
165  TMVAStyle->SetOptStat(0);
166  TMVAStyle->SetOptFit(0);
167 
168  // put tick marks on top and RHS of plots
169  TMVAStyle->SetPadTickX(1);
170  TMVAStyle->SetPadTickY(1);
171 
172  }
173 
175  {
176 
177  TList* loc = (TList*)gROOT->GetListOfCanvases();
178  TListIter itc(loc);
179  TObject *o(0);
180  while ((o = itc())) delete o;
181  }
182 
183  // set style and remove existing canvas'
184  void Initialize( Bool_t useTMVAStyle = kTRUE )
185  {
186  // destroy canvas'
187  DestroyCanvases();
188 
189  // set style
190  if (!useTMVAStyle) {
191  gROOT->SetStyle("Plain");
192  gStyle->SetOptStat(0);
193  return;
194  }
195 
196  SetTMVAStyle();
197  }
198 
199  // checks if file with name "fin" is already open, and if not opens one
200  TFile* OpenFile( const TString& fin )
201  {
202  TFile* file = gDirectory->GetFile();
203  if (file==0 || fin != file->GetName()) {
204  if (file != 0) {
205  gROOT->cd();
206  file->Close();
207  }
208  cout << "--- Opening root file " << fin << " in read mode" << endl;
209  file = TFile::Open( fin, "READ" );
210  }
211  else {
212  file = gDirectory->GetFile();
213  }
214 
215  file->cd();
216  return file;
217  }
218 
219  // used to create output file for canvas
220  void imgconv( TCanvas* c, const TString & fname )
221  {
222  // return;
223  if (NULL == c) {
224  cout << "*** Error in TMVAGlob::imgconv: canvas is NULL" << endl;
225  }
226  else {
227  // create directory if not existing
228  TString f = fname;
229  TString dir = f.Remove( f.Last( '/' ), f.Length() - f.Last( '/' ) );
230  gSystem->mkdir( dir );
231 
232  TString pngName = fname + ".png";
233  TString gifName = fname + ".gif";
234  TString epsName = fname + ".eps";
235  c->cd();
236 
237  // create eps (other option: c->Print( epsName ))
238  if (UsePaperStyle) {
239  c->Print(epsName);
240  }
241  else {
242  cout << "--- --------------------------------------------------------------------" << endl;
243  cout << "--- If you want to save the image as eps, gif or png, please comment out " << endl;
244  cout << "--- the corresponding lines (line no. 239-241) in tmvaglob.C" << endl;
245  cout << "--- --------------------------------------------------------------------" << endl;
246  c->Print(epsName);
247  c->Print(pngName);
248  // c->Print(gifName);
249  }
250  }
251  }
252 
253  TImage * findImage(const char * imageName)
254  {
255  // looks for the image in macropath
256  TString macroPath(gROOT->GetMacroPath()); // look for the image in here
257  Ssiz_t curIndex(0);
258  TImage *img(0);
259  while(1) {
260  Ssiz_t pathStart = curIndex;
261  curIndex = macroPath.Index(":",curIndex);
262  Ssiz_t pathEnd = (curIndex==-1)?macroPath.Length():curIndex;
263  TString path(macroPath(pathStart,pathEnd-pathStart));
264 
265  gSystem->ExpandPathName(path);
266  const char* fullName = Form("%s/%s", path.Data(), imageName);
267 
268  Bool_t fileFound = ! gSystem->AccessPathName(fullName);
269 
270  if(fileFound) {
271  img = TImage::Open(fullName);
272  break;
273  }
274  if(curIndex==-1) break;
275  curIndex++;
276  }
277  return img;
278  }
279 
280  void plot_logo( Float_t v_scale = 1.0, Float_t skew = 1.0 )
281  {
282 
283  TImage *img = findImage("tmva_logo.gif");
284  if (!img) {
285  cout << "+++ Could not open image tmva_logo.gif" << endl;
286  return;
287  }
288 
289  img->SetConstRatio(kFALSE);
290  UInt_t h_ = img->GetHeight();
291  UInt_t w_ = img->GetWidth();
292 
293  Float_t r = w_/h_;
294  gPad->Update();
295  Float_t rpad = Double_t(gPad->VtoAbsPixel(0) - gPad->VtoAbsPixel(1))/(gPad->UtoAbsPixel(1) - gPad->UtoAbsPixel(0));
296  r *= rpad;
297 
298  Float_t d = 0.055;
299  // absolute coordinates
300  Float_t x1R = 1 - gStyle->GetPadRightMargin();
301  Float_t y1B = 1 - gStyle->GetPadTopMargin()+.01; // we like the logo to sit a bit above the histo
302 
303  Float_t x1L = x1R - d*r/skew;
304  Float_t y1T = y1B + d*v_scale*skew;
305  if (y1T>0.99) y1T = 0.99;
306 
307  TPad *p1 = new TPad("imgpad", "imgpad", x1L, y1B, x1R, y1T );
308  p1->SetRightMargin(0);
309  p1->SetBottomMargin(0);
310  p1->SetLeftMargin(0);
311  p1->SetTopMargin(0);
312  p1->Draw();
313 
314  Int_t xSizeInPixel = p1->UtoAbsPixel(1) - p1->UtoAbsPixel(0);
315  Int_t ySizeInPixel = p1->VtoAbsPixel(0) - p1->VtoAbsPixel(1);
316  if (xSizeInPixel<=25 || ySizeInPixel<=25) {
317  delete p1;
318  return; // ROOT doesn't draw smaller than this
319  }
320 
321  p1->cd();
322  img->Draw();
323  }
324 
325  void NormalizeHist( TH1* h )
326  {
327  if (h==0) return;
328  if (h->GetSumw2N() == 0) h->Sumw2();
329  if(h->GetSumOfWeights()!=0) {
330  Float_t dx = (h->GetXaxis()->GetXmax() - h->GetXaxis()->GetXmin())/h->GetNbinsX();
331  h->Scale( 1.0/h->GetSumOfWeights()/dx );
332  }
333  }
334  void NormalizeHists( TH1* sig, TH1* bkg = 0 )
335  {
336  if (sig->GetSumw2N() == 0) sig->Sumw2();
337  if (bkg && bkg->GetSumw2N() == 0) bkg->Sumw2();
338 
339  if(sig->GetSumOfWeights()!=0) {
340  Float_t dx = (sig->GetXaxis()->GetXmax() - sig->GetXaxis()->GetXmin())/sig->GetNbinsX();
341  sig->Scale( 1.0/sig->GetSumOfWeights()/dx );
342  }
343  if (bkg != 0 && bkg->GetSumOfWeights()!=0) {
344  Float_t dx = (bkg->GetXaxis()->GetXmax() - bkg->GetXaxis()->GetXmin())/bkg->GetNbinsX();
345  bkg->Scale( 1.0/bkg->GetSumOfWeights()/dx );
346  }
347  }
348 
349  // the following are tools to help handling different methods and titles
350 
351 
352  void GetMethodName( TString & name, TKey * mkey ) {
353  if (mkey==0) return;
354  name = mkey->GetName();
355  name.ReplaceAll("Method_","");
356  }
357 
358  void GetMethodTitle( TString & name, TKey * ikey ) {
359  if (ikey==0) return;
360  name = ikey->GetName();
361  }
362 
363  void GetMethodName( TString & name, TDirectory * mdir ) {
364  if (mdir==0) return;
365  name = mdir->GetName();
366  name.ReplaceAll("Method_","");
367  }
368 
369  void GetMethodTitle( TString & name, TDirectory * idir ) {
370  if (idir==0) return;
371  name = idir->GetName();
372  }
373 
374  TKey *NextKey( TIter & keyIter, TString className) {
375  TKey *key=(TKey *)keyIter.Next();
376  TKey *rkey=0;
377  Bool_t loop=(key!=0);
378  //
379  while (loop) {
380  TClass *cl = gROOT->GetClass(key->GetClassName());
381  if (cl->InheritsFrom(className.Data())) {
382  loop = kFALSE;
383  rkey = key;
384  } else {
385  key = (TKey *)keyIter.Next();
386  if (key==0) loop = kFALSE;
387  }
388  }
389  return rkey;
390  }
391 
392  UInt_t GetListOfKeys( TList& keys, TString inherits, TDirectory *dir=0 )
393  {
394  // get a list of keys with a given inheritance
395  // the list contains TKey objects
396  if (dir==0) dir = gDirectory;
397  TIter mnext(dir->GetListOfKeys());
398  TKey *mkey;
399  keys.Clear();
400  keys.SetOwner(kFALSE);
401  UInt_t ni=0;
402  while ((mkey = (TKey*)mnext())) {
403  // make sure, that we only look at TDirectory with name Method_<xxx>
404  TClass *cl = gROOT->GetClass(mkey->GetClassName());
405  if (cl->InheritsFrom(inherits)) {
406  keys.Add(mkey);
407  ni++;
408  }
409  }
410  return ni;
411  }
412 
413  Int_t GetNumberOfTargets( TDirectory *dir )
414  {
415  TIter next(dir->GetListOfKeys());
416  TKey* key = 0;
417  Int_t noTrgts = 0;
418 
419  while ((key = (TKey*)next())) {
420  if (key->GetCycle() != 1) continue;
421  if (TString(key->GetName()).Contains("__Regression_target")) noTrgts++;
422  }
423  return noTrgts;
424  }
425 
426  Int_t GetNumberOfInputVariables( TDirectory *dir )
427  {
428  TIter next(dir->GetListOfKeys());
429  TKey* key = 0;
430  Int_t noVars = 0;
431 
432  while ((key = (TKey*)next())) {
433  if (key->GetCycle() != 1) continue;
434 
435  // count number of variables (signal is sufficient), exclude target(s)
436  if (TString(key->GetName()).Contains("__Signal") || (TString(key->GetName()).Contains("__Regression") && !(TString(key->GetName()).Contains("__Regression_target")))) noVars++;
437  }
438 
439  return noVars;
440  }
441 
442  TKey* FindMethod( TString name, TDirectory *dir=0 )
443  {
444  // find the key for a method
445  if (dir==0) dir = gDirectory;
446  TIter mnext(dir->GetListOfKeys());
447  TKey *mkey;
448  TKey *retkey=0;
449  Bool_t loop=kTRUE;
450  while (loop) {
451  mkey = (TKey*)mnext();
452  if (mkey==0) {
453  loop = kFALSE;
454  }
455  else {
456  TString clname = mkey->GetClassName();
457  TClass *cl = gROOT->GetClass(clname);
458  if (cl->InheritsFrom("TDirectory")) {
459  TString mname = mkey->GetName(); // method name
460  TString tname = "Method_"+name; // target name
461  if (mname==tname) { // target found!
462  loop = kFALSE;
463  retkey = mkey;
464  }
465  }
466  }
467  }
468  return retkey;
469  }
470 
471  Bool_t ExistMethodName( TString name, TDirectory *dir=0 )
472  {
473  // find the key for a method
474  if (dir==0) dir = gDirectory;
475  TIter mnext(dir->GetListOfKeys());
476  TKey *mkey;
477  Bool_t loop=kTRUE;
478  while (loop) {
479  mkey = (TKey*)mnext();
480  if (mkey==0) {
481  loop = kFALSE;
482  }
483  else {
484  TString clname = mkey->GetClassName();
485  TString keyname = mkey->GetName();
486  TClass *cl = gROOT->GetClass(clname);
487  if (keyname.Contains("Method") && cl->InheritsFrom("TDirectory")) {
488 
489  TDirectory* d_ = (TDirectory*)dir->Get( keyname );
490  if (!d_) {
491  cout << "HUUUGE TROUBLES IN TMVAGlob::ExistMethodName() --> contact authors" << endl;
492  return kFALSE;
493  }
494 
495  TIter mnext_(d_->GetListOfKeys());
496  TKey *mkey_;
497  while ((mkey_ = (TKey*)mnext_())) {
498  TString clname_ = mkey_->GetClassName();
499  TClass *cl_ = gROOT->GetClass(clname_);
500  if (cl_->InheritsFrom("TDirectory")) {
501  TString mname = mkey_->GetName(); // method name
502  if (mname==name) { // target found!
503  return kTRUE;
504  }
505  }
506  }
507  }
508  }
509  }
510  return kFALSE;
511  }
512 
513  UInt_t GetListOfMethods( TList & methods, TDirectory *dir=0 )
514  {
515  // get a list of methods
516  // the list contains TKey objects
517  if (dir==0) dir = gDirectory;
518  TIter mnext(dir->GetListOfKeys());
519  TKey *mkey;
520  methods.Clear();
521  methods.SetOwner(kFALSE);
522  UInt_t ni=0;
523  while ((mkey = (TKey*)mnext())) {
524  // make sure, that we only look at TDirectory with name Method_<xxx>
525  TString name = mkey->GetClassName();
526  TClass *cl = gROOT->GetClass(name);
527  if (cl->InheritsFrom("TDirectory")) {
528  if (TString(mkey->GetName()).BeginsWith("Method_")) {
529  methods.Add(mkey);
530  ni++;
531  }
532  }
533  }
534  cout << "--- Found " << ni << " classifier types" << endl;
535  return ni;
536  }
537 
538  UInt_t GetListOfJobs( TFile* file, TList& jobdirs)
539  {
540  // get a list of all jobs in all method directories
541  // based on ideas by Peter and Joerg found in macro deviations.C
542  TIter next(file->GetListOfKeys());
543  TKey *key(0);
544  while ((key = (TKey*)next())) {
545 
546  if (TString(key->GetName()).BeginsWith("Method_")) {
547  if (gROOT->GetClass(key->GetClassName())->InheritsFrom("TDirectory")) {
548 
549  TDirectory* mDir = (TDirectory*)key->ReadObj();
550 
551  TIter keyIt(mDir->GetListOfKeys());
552  TKey *jobkey;
553  while ((jobkey = (TKey*)keyIt())) {
554  if (!gROOT->GetClass(jobkey->GetClassName())->InheritsFrom("TDirectory")) continue;
555 
556  TDirectory *jobDir = (TDirectory *)jobkey->ReadObj();
557  cout << "jobdir name " << jobDir->GetName() << endl;
558  jobdirs.Add(jobDir);
559  }
560  }
561  }
562  }
563  return jobdirs.GetSize();
564  }
565 
566  UInt_t GetListOfTitles( TDirectory *rfdir, TList & titles )
567  {
568  // get a list of titles (i.e TDirectory) given a method dir
569  UInt_t ni=0;
570  if (rfdir==0) return 0;
571  TList *keys = rfdir->GetListOfKeys();
572  if (keys==0) {
573  cout << "+++ Directory '" << rfdir->GetName() << "' contains no keys" << endl;
574  return 0;
575  }
576  //
577  TIter rfnext(rfdir->GetListOfKeys());
578  TKey *rfkey;
579  titles.Clear();
580  titles.SetOwner(kFALSE);
581  while ((rfkey = (TKey*)rfnext())) {
582  // make sure, that we only look at histograms
583  TClass *cl = gROOT->GetClass(rfkey->GetClassName());
584  if (cl->InheritsFrom("TDirectory")) {
585  titles.Add(rfkey);
586  ni++;
587  }
588  }
589  cout << "--- Found " << ni << " instance(s) of the method " << rfdir->GetName() << endl;
590  return ni;
591  }
592 
593  UInt_t GetListOfTitles( TString & methodName, TList & titles, TDirectory *dir=0 )
594  {
595  // get the list of all titles for a given method
596  // if the input dir is 0, gDirectory is used
597  // returns a list of keys
598  UInt_t ni=0;
599  if (dir==0) dir = gDirectory;
600  TDirectory* rfdir = (TDirectory*)dir->Get( methodName );
601  if (rfdir==0) {
602  cout << "+++ Could not locate directory '" << methodName << endl;
603  return 0;
604  }
605 
606  return GetListOfTitles( rfdir, titles );
607 
608  TList *keys = rfdir->GetListOfKeys();
609  if (keys==0) {
610  cout << "+++ Directory '" << methodName << "' contains no keys" << endl;
611  return 0;
612  }
613  //
614  TIter rfnext(rfdir->GetListOfKeys());
615  TKey *rfkey;
616  titles.Clear();
617  titles.SetOwner(kFALSE);
618  while ((rfkey = (TKey*)rfnext())) {
619  // make sure, that we only look at histograms
620  TClass *cl = gROOT->GetClass(rfkey->GetClassName());
621  if (cl->InheritsFrom("TDirectory")) {
622  titles.Add(rfkey);
623  ni++;
624  }
625  }
626  cout << "--- Found " << ni << " instance(s) of the method " << methodName << endl;
627  return ni;
628  }
629 
630  TDirectory *GetInputVariablesDir( TMVAGlob::TypeOfPlot type, TDirectory *dir=0 )
631  {
632  // get the InputVariables directory
633  const TString directories[TMVAGlob::kNumOfMethods] = { "InputVariables_Id",
634  "InputVariables_Deco",
635  "InputVariables_PCA",
636  "InputVariables_Gauss_Deco" };
637  if (dir==0) dir = gDirectory;
638 
639  // get top dir containing all hists of the variables
640  dir = (TDirectory*)gDirectory->Get( directories[type] );
641  if (dir==0) {
642  cout << "+++ Could not locate input variable directory '" << directories[type] << endl;
643  return 0;
644  }
645  return dir;
646  }
647 
648  TDirectory *GetCorrelationPlotsDir( TMVAGlob::TypeOfPlot type, TDirectory *dir=0 )
649  {
650  // get the CorrelationPlots directory
651  if (dir==0) dir = GetInputVariablesDir( type, 0 );
652  if (dir==0) return 0;
653  //
654  TDirectory* corrdir = (TDirectory*)dir->Get( "CorrelationPlots" );
655  if (corrdir==0) {
656  cout << "+++ Could not find CorrelationPlots directory 'CorrelationPlots'" << endl;
657  return 0;
658  }
659  return corrdir;
660  }
661 
662 }
663 
664 #endif
TString fin
Definition: Style.C:24
const XML_Char * name
Definition: expat.h:151
keys
Reco plots.
Definition: caf_analysis.py:46
static Int_t c_FrameFill
Definition: tmvaglob.C:39
void GetMethodTitle(TString &name, TKey *ikey)
Definition: tmvaglob.C:358
TImage * findImage(const char *imageName)
Definition: tmvaglob.C:253
void NormalizeHist(TH1 *h)
Definition: tmvaglob.C:325
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
Definition: tmvaglob.C:280
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
Definition: tmvaglob.C:88
UInt_t GetListOfMethods(TList &methods, TDirectory *dir=0)
Definition: tmvaglob.C:513
std::string rpad(std::string const &pad_me, std::string::size_type wanted_size, char char_to_pad_with= ' ')
void imgconv(TCanvas *c, const TString &fname)
Definition: tmvaglob.C:220
void Initialize(Bool_t useTMVAStyle=kTRUE)
Definition: tmvaglob.C:184
static Int_t c_SignalLine
Definition: tmvaglob.C:41
Double_t scale
Definition: plot.C:25
Bool_t ExistMethodName(TString name, TDirectory *dir=0)
Definition: tmvaglob.C:471
static Int_t c_Canvas
Definition: tmvaglob.C:38
double dx[NP][NC]
TDirectory * GetInputVariablesDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=0)
Definition: tmvaglob.C:630
TypeOfPlot
Definition: tmvaglob.C:31
TDirectory * GetCorrelationPlotsDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=0)
Definition: tmvaglob.C:648
static Int_t c_BackgroundLine
Definition: tmvaglob.C:43
UInt_t GetListOfJobs(TFile *file, TList &jobdirs)
Definition: tmvaglob.C:538
Float_t d
Definition: plot.C:236
def img(path, mouseover="")
Definition: HTMLTools.py:36
static Int_t c_NovelBlue
Definition: tmvaglob.C:45
Int_t GetNumberOfInputVariables(TDirectory *dir)
Definition: tmvaglob.C:426
static Int_t c_SignalFill
Definition: tmvaglob.C:42
Int_t GetNumberOfTargets(TDirectory *dir)
Definition: tmvaglob.C:413
OStream cout
Definition: OStream.cxx:6
static Int_t c_TitleBox
Definition: tmvaglob.C:40
const std::string path
Definition: plot_BEN.C:43
static Int_t c_BackgroundFill
Definition: tmvaglob.C:44
void GetMethodName(TString &name, TKey *mkey)
Definition: tmvaglob.C:352
TFile * OpenFile(const TString &fin)
Definition: tmvaglob.C:200
TDirectory * dir
Definition: macro.C:5
void SetTMVAStyle()
Definition: tmvaglob.C:107
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
Definition: tmvaglob.C:48
TFile * file
Definition: cellShifts.C:17
TRandom3 r(0)
TKey * FindMethod(TString name, TDirectory *dir=0)
Definition: tmvaglob.C:442
static Bool_t UsePaperStyle
Definition: tmvaglob.C:28
TKey * NextKey(TIter &keyIter, TString className)
Definition: tmvaglob.C:374
void DestroyCanvases()
Definition: tmvaglob.C:174
void next()
Definition: show_event.C:84
void NormalizeHists(TH1 *sig, TH1 *bkg=0)
Definition: tmvaglob.C:334
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
Definition: tmvaglob.C:392
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)
Definition: tmvaglob.C:566