14 Int_t FillStyle__S = 1001;
16 Int_t LineWidth__S = 2;
21 Int_t FillStyle__B = 3554;
23 Int_t LineWidth__B = 2;
64 Int_t FillColors[10] = {38,2,3,6,7,8,9,11};
65 Int_t LineColors[10] = {4,2,3,6,7,8,9,11};
66 Int_t FillStyles[5] = {1001,3554,3003,3545,0};
91 gPad->SetLeftMargin ( 0.108*scale );
92 gPad->SetRightMargin ( 0.050*scale );
93 gPad->SetBottomMargin( 0.120*scale );
100 gROOT->SetStyle(
"TMVA");
106 TMVAStyle->
SetTitle(
"TMVA style based on \"Plain\" with modifications defined in tmvaglob.C");
107 gROOT->GetListOfStyles()->Add(TMVAStyle);
108 gROOT->SetStyle(
"TMVA");
135 if (!
gConfig().fVariablePlotting.fUsePaperStyle) {
172 while ((o = itc()))
delete o;
183 gROOT->SetStyle(
"Plain");
195 if (
file==0 || fin !=
file->GetName()) {
200 cout <<
"--- Opening root file " << fin <<
" in read mode" << endl;
216 cout <<
"*** Error in TMVAGlob::imgconv: canvas is NULL" << endl;
221 TString dir =
f.Remove(
f.Last(
'/' ),
f.Length() -
f.Last(
'/' ) );
224 TString pngName = fname +
".png";
225 TString gifName = fname +
".gif";
226 TString epsName = fname +
".eps";
230 if (
gConfig().fVariablePlotting.fUsePaperStyle) {
234 cout <<
"--- --------------------------------------------------------------------" << endl;
235 cout <<
"--- If you want to save the image as eps, gif or png, please comment out " << endl;
236 cout <<
"--- the corresponding lines (line no. 239-241) in tmvaglob.C" << endl;
237 cout <<
"--- --------------------------------------------------------------------" << endl;
249 TString tutorialPath = getenv (
"ROOTSYS");
250 tutorialPath+=
"/tutorials/tmva";
258 cout <<
"+++ Could not open image: " << fullName << endl;
268 cout <<
"+++ Could not open image tmva_logo.gif" << endl;
288 if (y1T>0.99) y1T = 0.99;
290 TPad *p1 =
new TPad(
"imgpad",
"imgpad", x1L, y1B, x1R, y1T );
299 if (xSizeInPixel<=25 || ySizeInPixel<=25) {
311 if (
h->GetSumw2N() == 0)
h->Sumw2();
312 if(
h->GetSumOfWeights()!=0) {
313 Float_t dx = (
h->GetXaxis()->GetXmax() -
h->GetXaxis()->GetXmin())/
h->GetNbinsX();
314 h->Scale( 1.0/
h->GetSumOfWeights()/dx );
338 name.ReplaceAll(
"Method_",
"");
349 name.ReplaceAll(
"Method_",
"");
369 if (key==0) loop =
kFALSE;
385 while ((mkey = (
TKey*)mnext())) {
399 cout <<
"tmvaglob::GetNumberOfTargets is called with *dir==NULL :( " << endl;
406 while ((key = (
TKey*)next())) {
419 while ((key = (
TKey*)next())) {
433 std::vector<TString> names;
435 while ((key = (
TKey*)next())) {
445 std::vector<TString>::const_iterator iter = names.begin();
446 while(iter != names.end()){
447 if(
name.CompareTo(*iter)==0)
452 names.push_back(
name);
459 return names.end() - names.begin();
468 std::vector<TString> names;
470 while ((key = (
TKey*)next())) {
478 name.ReplaceAll(
"_Deco",
"");
479 name.ReplaceAll(
"_Gauss",
"");
480 name.ReplaceAll(
"_PCA",
"");
481 name.ReplaceAll(
"_Id",
"");
482 name.ReplaceAll(
"_vs_",
"");
483 name.Remove(0, pos + 2);
499 std::vector<TString>::const_iterator iter = names.begin();
500 while(iter != names.end()){
501 if(
name.CompareTo(*iter)==0)
506 names.push_back(
name);
521 mkey = (
TKey*)mnext();
549 mkey = (
TKey*)mnext();
561 cout <<
"HUUUGE TROUBLES IN TMVAGlob::ExistMethodName() --> contact authors" << endl;
567 while ((mkey_ = (
TKey*)mnext_())) {
593 while ((mkey = (
TKey*)mnext())) {
604 cout <<
"--- Found " << ni <<
" classifier types" << endl;
614 while ((key = (
TKey*)next())) {
623 while ((jobkey = (
TKey*)keyIt())) {
624 if (!
gROOT->GetClass(jobkey->
GetClassName())->InheritsFrom(
"TDirectory"))
continue;
627 cout <<
"jobdir name " << jobDir->
GetName() << endl;
640 if (rfdir==0)
return 0;
643 cout <<
"+++ Directory '" << rfdir->
GetName() <<
"' contains no keys" << endl;
651 while ((rfkey = (
TKey*)rfnext())) {
659 cout <<
"--- Found " << ni <<
" instance(s) of the method " << rfdir->
GetName() << endl;
672 cout <<
"+++ Could not locate directory '" << methodName << endl;
680 cout <<
"+++ Directory '" << methodName <<
"' contains no keys" << endl;
688 while ((rfkey = (
TKey*)rfnext())) {
696 cout <<
"--- Found " << ni <<
" instance(s) of the method " << methodName << endl;
704 "InputVariables_Deco",
705 "InputVariables_PCA",
706 "InputVariables_Gauss_Deco" };
712 cout <<
"+++ Could not locate input variable directory '" << directories[
type] << endl;
722 if (dir==0)
return 0;
726 cout <<
"+++ Could not find CorrelationPlots directory 'CorrelationPlots'" << endl;
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels The size is expressed in per cent of the pad width.
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title The size is expressed in per cent of the pad width.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetConstRatio(Bool_t constRatio=kTRUE)
Set (constRatio = kTRUE) or unset (constRadio = kFALSE) the ratio flag.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetBottomMargin(Float_t bottommargin)
Set Pad bottom margin in fraction of the pad height.
virtual void SetLeftMargin(Float_t leftmargin)
Set Pad left margin in fraction of the pad width.
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Describe directory structure in memory.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual TList * GetListOfKeys() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseGeneralPurpose, Int_t netopt=0)
Create / open a file.
virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis' labels.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Int_t GetNbinsX() const
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
virtual Int_t GetSumw2N() const
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
An abstract interface to image processing library.
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
virtual UInt_t GetWidth() const
virtual UInt_t GetHeight() const
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
Short_t GetCycle() const
Return cycle number associated to this key.
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual void Add(TObject *obj)
virtual void Clear(Option_t *option="")
Remove all objects from the list.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntriesFast() const
Mother of all ROOT objects.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The most important graphics class in the ROOT system.
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
Int_t VtoAbsPixel(Double_t v) const
Int_t UtoAbsPixel(Double_t u) const
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TStyle objects may be created to define special styles.
void SetPadBorderMode(Int_t mode=1)
void SetOptTitle(Int_t tit=1)
void SetPadTopMargin(Float_t margin=0.1)
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
void SetPadBottomMargin(Float_t margin=0.1)
void SetFrameFillColor(Color_t color=1)
void SetPadRightMargin(Float_t margin=0.1)
void SetCanvasColor(Color_t color=19)
Float_t GetPadRightMargin() const
void SetTitleBorderSize(Width_t size=2)
void SetCanvasBorderMode(Int_t mode=1)
void SetFrameBorderMode(Int_t mode=1)
void SetPalette(Int_t ncolors=kBird, Int_t *colors=0, Float_t alpha=1.)
See TColor::SetPalette.
void SetPadTickY(Int_t ticky)
void SetPadTickX(Int_t tickx)
void SetTitleTextColor(Color_t color=1)
void SetPadLeftMargin(Float_t margin=0.1)
void SetLegendBorderSize(Width_t size=4)
void SetTitleFillColor(Color_t color=1)
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
void SetPaperSize(EPaperSize size)
Set paper size for PostScript output.
void SetPadColor(Color_t color=19)
void SetTitleH(Float_t h=0)
void SetHistLineWidth(Width_t width=1)
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
Float_t GetPadTopMargin() const
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
UInt_t GetListOfJobs(TFile *file, TList &jobdirs)
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)
void Initialize(Bool_t useTMVAStyle=kTRUE)
void NormalizeHists(TH1 *sig, TH1 *bkg=0)
Int_t GetNumberOfInputVariablesMultiClass(TDirectory *dir)
Int_t GetNumberOfInputVariables(TDirectory *dir)
TKey * FindMethod(TString name, TDirectory *dir=0)
Bool_t ExistMethodName(TString name, TDirectory *dir=0)
TKey * NextKey(TIter &keyIter, TString className)
void GetMethodTitle(TString &name, TKey *ikey)
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
TDirectory * GetCorrelationPlotsDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=0)
Int_t getBackgroundFill()
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
TFile * OpenFile(const TString &fin)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
Int_t getBackgroundLine()
TDirectory * GetInputVariablesDir(TMVAGlob::TypeOfPlot type, TDirectory *dir=0)
void GetMethodName(TString &name, TKey *mkey)
Int_t GetNumberOfTargets(TDirectory *dir)
TImage * findImage(const char *imageName)
UInt_t GetListOfMethods(TList &methods, TDirectory *dir=0)
std::vector< TString > GetInputVariableNames(TDirectory *dir)
void SetMultiClassStyle(TObjArray *hists)
void NormalizeHist(TH1 *h)
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
std::vector< TString > GetClassNames(TDirectory *dir)
void imgconv(TCanvas *c, const TString &fname)