28 cout <<
"Cannot open flie: " << fin << endl;
33 const Int_t width = 500;
39 Int_t countCanvas = 0;
49 cout <<
"Use MVA output of Method " << methodS <<endl;
52 if (methodS.
Contains(
"Cuts") )
continue;
55 cout <<
"--- Found variable: \"" << methodS <<
"\"" << endl;
59 c =
new TCanvas(
Form(
"canvas%d", countCanvas+1), cname,
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 =
Form(
"((MVA_%s-(%f))/(%f-(%f)))", methodS.
Data(), mvaMin, mvaMax, mvaMin );
85 cout <<
"Expression = " << expr << endl;
87 Form(
"%s*(type==1)", expr.
Data() ) );
89 Form(
"%s*(type==0)", expr.
Data() ) );
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++) {
108 z = (z - zminS)/(zmaxS - zminS);
116 z = (z - zminB)/(zmaxB - zminB);
129 for (
Int_t i=1; i<=nbin; i++) {
130 for (
Int_t j=1; j<=nbin; j++) {
133 z = 1*(z - zminS)/(zmaxS - zminS) - 0;
138 z = 1*(z - zminB)/(zmaxB - zminB) - 0;
150 frame->
SetTitle(
Form(
"Signal and background distributions weighted by %s output",
165 const Int_t nlevels = 3;
191 const Int_t nlevelsR = 1;
212 frameS->
Draw(
"contsame" );
213 refS->
Draw(
"cont3same" );
214 refB->
Draw(
"cont3same" );
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 SetLineWidth(Width_t lwidth)
void imgconv(TCanvas *c, const TString &fname)
virtual void SetMaximum(Double_t maximum=-1111)
void SetTitleW(Float_t w=0)
virtual void SetContour(Int_t nlevels, const Double_t *levels=0)
Set the number and values of contour levels.
TFile * OpenFile(const TString &fin)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual void SetMinimum(Double_t minimum=-1111)
void mvaweights(TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE)
virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Set size of axis' labels.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
const char * Data() const
virtual TObjArray * GetListOfBranches()
virtual void SetMarkerColor(Color_t mcolor=1)
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
TStyle objects may be created to define special styles.
virtual void SetLineColor(Color_t lcolor)
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)
2-D histogram with a float per channel (see TH1 documentation)}
char * Form(const char *fmt,...)
virtual const char * GetName() const
Returns name of object.
void SetTitleH(Float_t h=0)
virtual void SetMarkerSize(Size_t msize=1)
TString & Remove(Ssiz_t pos)
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
The the axis' title size.
Int_t GetEntries() const
Return the number of objects in array (i.e.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A TTree object has a header with a name and a title.
virtual void SetTitle(const char *title)
Change (i.e.
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content.
A TTree is a list of TBranches.
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 SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
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.
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...