24 if (extension ==
"") extension =
"_Id";
27 cout <<
"Called macro \"correlationscatters\" for variable: \"" << var
28 <<
"\", transformation type \"" << dirName_
29 <<
"\" (extension: \"" << extension <<
"\")" << endl;
35 TString dirName = dirName_ +
"/CorrelationPlots";
40 cout <<
"ERROR: no such directory: \"InputVariables\"" << endl;
47 cout <<
"No information about " << extension <<
" available in " << fin << endl;
53 Int_t noPlots = noVars - 1;
55 cout <<
"noPlots: " << noPlots <<
" --> noVars: " << noVars << endl;
56 if (noVars !=
Int_t(noVars)) {
57 cout <<
"*** Warning: problem in inferred number of variables ... not an integer *** " << endl;
68 xPad = 1; yPad = 1; width = 400; height = width;
break;
70 xPad = 2; yPad = 1; width = 700; height = 0.55*width;
break;
72 xPad = 3; yPad = 1; width = 800; height = 0.4*width;
break;
74 xPad = 2; yPad = 2; width = 600; height = width;
break;
76 xPad = 3; yPad = 2; width = 800; height = 0.55*width;
break;
78 Int_t noPadPerCanv = xPad * yPad ;
81 Int_t countCanvas = 0;
84 TString thename[2] = {
"_Signal",
"_Background" };
85 if (isRegression) thename[0] =
"_Regression";
86 for (
UInt_t itype = 0; itype < 2; itype++) {
96 if (key->GetCycle() != 1)
continue;
101 TH1 *scat = (
TH1*)key->ReadObj();
105 if (! (hname.
EndsWith( thename[itype] + extension ) &&
114 if (countPad%noPadPerCanv==0) {
118 Form(
"Correlation profiles for '%s'-transformed %s variables",
119 ext.
Data(), (isRegression ?
"" : (itype==0) ?
"signal" :
"background")),
120 countCanvas*50+200, countCanvas*20, width, height );
126 canv->
cd(countPad++%noPadPerCanv+1);
133 cout <<
"ERROR!!! couldn't find background histo for" << hname << endl;
155 prof->
Draw(
"samee1");
157 scat->
Draw(
"sameaxis");
160 if (countPad%noPadPerCanv==0) {
163 TString fname =
Form(
"plots/correlationscatter_%s_%s_c%i",var.
Data(), extension.
Data(), countCanvas );
168 if (countPad%noPadPerCanv!=0) {
171 TString fname =
Form(
"plots/correlationscatter_%s_%s_c%i",var.
Data(), extension.
Data(), countCanvas );
virtual void SetLineWidth(Width_t lwidth)
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
Int_t GetNumberOfInputVariables(TDirectory *dir)
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
TString & ReplaceAll(const TString &s1, const TString &s2)
TFile * OpenFile(const TString &fin)
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)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
const char * Data() const
virtual void SetMarkerColor(Color_t mcolor=1)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void SetLineColor(Color_t lcolor)
virtual void Delete(Option_t *option="")
Delete this object.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
char * Form(const char *fmt,...)
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
virtual const char * GetName() const
Returns name of object.
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)
virtual void SetMarkerSize(Size_t msize=1)
TString & Remove(Ssiz_t pos)
void correlationscatters(TString fin, TString var="var3", TString dirName_="InputVariables_Id", TString title="TMVA Input Variable", Bool_t isRegression=kFALSE, Bool_t useTMVAStyle=kTRUE)
Describe directory structure in memory.
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.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual void Update()
Update canvas pad buffers.