24 if (extension ==
"") extension =
"_Id";
27 cout <<
"Called macro \"correlationscattersMultiClass\" for variable: \"" << var
28 <<
"\", transformation type \"" << dirName_
29 <<
"\" (extension: \"" << extension <<
"\")" << endl;
34 TString dirName = dirName_ +
"/CorrelationPlots";
39 cout <<
"ERROR: no such directory: \"InputVariables\"" << endl;
46 cout <<
"No information about " << extension <<
" available in " << fin << endl;
52 Int_t noPlots = noVars - 1;
54 cout <<
"noPlots: " << noPlots <<
" --> noVars: " << noVars << endl;
55 if (noVars !=
Int_t(noVars)) {
56 cout <<
"*** Warning: problem in inferred number of variables ... not an integer *** " << endl;
67 xPad = 1; yPad = 1; width = 400; height =
width;
break;
69 xPad = 2; yPad = 1; width = 700; height = 0.55*
width;
break;
71 xPad = 3; yPad = 1; width = 800; height = 0.4*
width;
break;
73 xPad = 2; yPad = 2; width = 600; height =
width;
break;
75 xPad = 3; yPad = 2; width = 800; height = 0.55*
width;
break;
77 Int_t noPadPerCanv = xPad * yPad ;
80 Int_t countCanvas = 0;
85 UInt_t ncls = classnames.end()-classnames.begin();
87 for (
UInt_t itype = 0; itype < ncls; itype++) {
95 while ( (key = (
TKey*)next()) ) {
97 if (key->GetCycle() != 1)
continue;
102 TH1 *scat = (
TH1*)key->ReadObj();
107 if (! (hname.
EndsWith( classnames[itype] + extension ) &&
116 if (countPad%noPadPerCanv==0) {
120 Form(
"Correlation profiles for '%s'-transformed variables (%s)",
121 ext.
Data(), classnames[itype].Data()),
122 countCanvas*50+200, countCanvas*20, width, height );
128 canv->
cd(countPad++%noPadPerCanv+1);
135 cout <<
"ERROR!!! couldn't find profile plot for" << hname << endl;
159 prof->
Draw(
"samee1");
161 scat->
Draw(
"sameaxis");
164 if (countPad%noPadPerCanv==0) {
167 TString fname = dataset+
Form(
"/plots/correlationscatter_%s_%s_c%i",var.
Data(), extension.
Data(), countCanvas );
172 if (countPad%noPadPerCanv!=0) {
175 TString fname = dataset+
Form(
"/plots/correlationscatter_%s_%s_c%i",var.
Data(), extension.
Data(), countCanvas );
virtual const char * GetName() const
Returns name of object.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
void imgconv(TCanvas *c, const TString &fname)
virtual TList * GetListOfKeys() const
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
TString & ReplaceAll(const TString &s1, const TString &s2)
TFile * OpenFile(const TString &fin)
std::vector< TString > GetClassNames(TDirectory *dir)
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
void correlationscattersMultiClass(TString dataset, TString fin="TMVA.root", TString var="var3", TString dirName_="InputVariables_Id", TString title="TMVA Input Variable", Bool_t isRegression=kFALSE, Bool_t useTMVAStyle=kTRUE)
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void Delete(Option_t *option="")
Delete this object.
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
char * Form(const char *fmt,...)
The ROOT global object gROOT contains a list of all defined classes.
void plot_logo(Float_t v_scale=1.0, Float_t skew=1.0)
Int_t GetNumberOfInputVariablesMultiClass(TDirectory *dir)
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
TString & Remove(Ssiz_t pos)
Describe directory structure in memory.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
virtual void Update()
Update canvas pad buffers.
const char * Data() const