15 TStyle *TMVAStyle =
gROOT->GetStyle(
"Plain");
19 TString varx =
"var3";
20 TString vary =
"var4";
28 cout <<
"Cannot open flie: " << fin << endl;
33 const Int_t width = 500;
39 Int_t countCanvas = 0;
42 TTree *tree = (TTree*)file->
Get(
"TestTree" );
47 TBranch*
b = (TBranch*)(*branches)[imva];
48 TString methodS =
b->GetName();
49 cout <<
"Use MVA output of Method " << methodS <<endl;
52 if (methodS.
Contains(
"Cuts") )
continue;
55 cout <<
"--- Found variable: \"" << methodS <<
"\"" << endl;
60 countCanvas*50+200, countCanvas*20, width, width*1.0 );
70 TH2F* frame =
new TH2F(
"frame",
"frame", nbin,
xmin,
xmax, nbin,
ymin,
ymax );
71 TH2F* frameS =
new TH2F(
"DataS",
"DataS", nbin,
xmin,
xmax, nbin,
ymin,
ymax );
72 TH2F* frameB =
new TH2F(
"DataB",
"DataB", nbin,
xmin,
xmax, nbin,
ymin,
ymax );
73 TH2F* frameRS =
new TH2F(
"DataRS",
"DataRS", nbin,
xmin,
xmax, nbin,
ymin,
ymax );
74 TH2F* frameRB =
new TH2F(
"DataRB",
"DataRB", nbin,
xmin,
xmax, nbin,
ymin,
ymax );
77 TH2F* refS =
new TH2F(
"RefS",
"RefS", nbinC,
xmin,
xmax, nbinC,
ymin,
ymax );
78 TH2F* refB =
new TH2F(
"RefB",
"RefB", nbinC,
xmin,
xmax, nbinC,
ymin,
ymax );
84 TString expr =
TString::Format(
"((MVA_%s-(%f))/(%f-(%f)))", methodS.
Data(), mvaMin, mvaMax, mvaMin );
85 cout <<
"Expression = " << expr << endl;
95 "type==1",
"", 500000 );
97 "type==0",
"", 500000, 10000 );
104 for (
Int_t i=1; i<=nbin; i++) {
105 for (
Int_t j=1; j<=nbin; j++) {
129 for (
Int_t i=1; i<=nbin; i++) {
130 for (
Int_t j=1; j<=nbin; j++) {
165 const Int_t nlevels = 3;
191 const Int_t nlevelsR = 1;
212 frameS->
Draw(
"contsame" );
213 refS->
Draw(
"cont3same" );
214 refB->
Draw(
"cont3same" );
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Set the axis' title size.
void SetTitle(const char *title) override
Change/set the title.
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
virtual void SetMaximum(Double_t maximum=-1111)
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetMinimum(Double_t minimum=-1111)
virtual void SetContour(Int_t nlevels, const Double_t *levels=nullptr)
Set the number and values of contour levels.
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Set size of axis' labels.
void SetBinContent(Int_t bin, Double_t content) override
Set bin content.
Double_t GetBinContent(Int_t binx, Int_t biny) const override
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Int_t GetEntries() const override
Return the number of objects in array (i.e.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void SetTitleW(Float_t w=0)
void SetTitleH(Float_t h=0)
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
virtual TObjArray * GetListOfBranches()
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
virtual Long64_t Project(const char *hname, const char *varexp, const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Make a projection of a tree using selections.
void Initialize(Bool_t useTMVAStyle=kTRUE)
TFile * OpenFile(const TString &fin)
void imgconv(TCanvas *c, const TString &fname)
void mvaweights(TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE)