25 cout <<
"--- No TestTree saved in ROOT file. Parallel coordinates will not be plotted" << endl;
37 if (leafName !=
"type" && leafName !=
"weight" && leafName !=
"boostweight" &&
38 leafName !=
"class" && leafName !=
"className" && leafName !=
"classID" &&
42 mvas.push_back( leafName );
45 vars.push_back( leafName );
51 cout <<
"--- Found: " << vars.size() <<
" variables" << endl;
52 cout <<
"--- Found: " <<
mvas.size() <<
" MVA(s)" << endl;
56 for (
UInt_t imva=0; imva<
mvas.size(); imva++) {
57 cout <<
"--- Plotting parallel coordinates for : " <<
mvas[imva] <<
" & input variables" << endl;
59 for (
Int_t itype=0; itype<2; itype++) {
63 for (
UInt_t ivar=0; ivar<vars.size(); ivar++) varstr += vars[ivar] +
":";
69 Form(
"Parallel coordinate representation for %s and input variables (%s events)",
70 mvashort.
Data(),
type[itype].Data() ),
71 50*(itype), 50*(itype), 750, 500 );
72 tree->Draw( varstr.
Data(),
Form(
"classID==%i",1-itype) ,
"para" );
92 width = 0.2*(maxrange - minrange);
96 case 1: {
x1 = 0.5*(maxrange + minrange -
width)*0.02;
x2 =
x1 +
width*0.02;
break; }
101 parrange->
SetLineColor( ivar == 0 ? 2 : ivar == 1 ? 5 : 6 );
109 TString fname =
Form(
"%s/plots/paracoor_c%i_%s",dataset.
Data(), imva, itype == 0 ?
"S" :
"B" );
static const double x2[5]
static const double x1[5]
include TDocParser_001 C image html pict1_TDocParser_001 png width
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual const char * GetName() const
Returns name of object.
TObject * At(Int_t idx) const
A TParallelCoordRange is a range used for parallel coordinates plots.
virtual void SetLineColor(Color_t col)
Set the selection line color.
void AddRange(TParallelCoordRange *range)
Add a range to the current selection on the axis.
Parallel Coordinates class.
void AddSelection(const char *title)
Add a selection.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void SetOptTitle(Int_t tit=1)
A TTree represents a columnar dataset.
void Initialize(Bool_t useTMVAStyle=kTRUE)
Bool_t ExistMethodName(TString name, TDirectory *dir=0)
TFile * OpenFile(const TString &fin)
void imgconv(TCanvas *c, const TString &fname)
void paracoor(TString dataset, TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE)
void mvas(TString dataset, TString fin="TMVA.root", HistType htype=kMVAType, Bool_t useTMVAStyle=kTRUE)
Short_t Min(Short_t a, Short_t b)