59 purS =
new TH1F(pname, pname, nbins, low, high);
60 sSig =
new TH1F(ssigname, ssigname, nbins, low, high);
61 effpurS =
new TH1F(epname, epname, nbins, low, high);
88 fNSignal = fSigInput->GetNumber();
93 fNBackground = fBkgInput->GetNumber();
116 UpdateSignificanceHists();
128 TIter next(fInfoList);
138 fSigInput->Disconnect();
139 fBkgInput->Disconnect();
140 fDrawButton->Disconnect();
141 fCloseButton->Disconnect();
143 fMain->CloseWindow();
199 fSigInput->
Connect(
"ValueSet(Long_t)",
"TMVA::StatDialogMVAEffs",
this,
"SetNSignal()");
200 fBkgInput->
Connect(
"ValueSet(Long_t)",
"TMVA::StatDialogMVAEffs",
this,
"SetNBackground()");
235 TString str =
Form(
"%*s ( #signal, #backgr.) Optimal-cut %s NSig NBkg EffSig EffBkg",
237 cout <<
"--- " << setfill(
'=') << setw(str.
Length()) <<
"" << setfill(
' ') << endl;
238 cout <<
"--- " << str << endl;
239 cout <<
"--- " << setfill(
'-') << setw(str.
Length()) <<
"" << setfill(
' ') << endl;
253 maxSigErr = sig *
sqrt( 1./S + 1./(2.*B));
267 cout <<
"--- " << setfill(
'-') << setw(str.
Length()) <<
"" << setfill(
' ') << endl << endl;
286 while( (key = (
TKey*)next()) ) {
288 if (!
TString(key->GetName()).BeginsWith(
"Method_"))
continue;
289 if( !
gROOT->GetClass(key->GetClassName())->InheritsFrom(
"TDirectory") )
continue;
291 cout <<
"--- Found directory: " << ((
TDirectory*)key->ReadObj())->
GetName() << endl;
297 while((titkey = (
TKey*)keyIt())) {
298 if( !
gROOT->GetClass(titkey->GetClassName())->InheritsFrom(
"TDirectory") )
continue;
308 cout <<
"--- Classifier: " << info->
methodTitle << endl;
310 info->
sig =
dynamic_cast<TH1*
>(titDir->
Get( hname +
"_S" ));
311 info->
bgd =
dynamic_cast<TH1*
>(titDir->
Get( hname +
"_B" ));
312 info->
origSigE =
dynamic_cast<TH1*
>(titDir->
Get( hname +
"_effS" ));
313 info->
origBgdE =
dynamic_cast<TH1*
>(titDir->
Get( hname +
"_effB" ));
326 Int_t countCanvas = 0;
339 countCanvas*50+200, countCanvas*20, width,
Int_t(width*0.78) );
387 legend1->
AddEntry(info->
bgdE,
"Background efficiency",
"L");
388 legend1->
Draw(
"same");
398 legend2->
Draw(
"same");
430 tl.
DrawLatex( 0.13, 0.77,
"Method Cuts provides a bundle of cut selections, each tuned to a");
431 tl.
DrawLatex(0.13, 0.74,
"different signal efficiency. Shown is the purity for each cut selection.");
462 if (info->
line1 !=0 )
465 if (info->
line2 !=0 ) {
467 info->
line2->
SetText( 0.15, 0.15,
Form(
"%3.2g +- %3.2g when cutting at %3.2g",
480 TString opt =
Form(
"%%%is: (%%9.8g,%%9.8g) %%9.4f %%10.6g %%8.7g %%8.7g %%8.4g %%8.4g",
494 TString opt =
Form(
"%%%is: (%%9.8g,%%9.8g) %%9.4f (%%8.3g +-%%6.3g) %%8.7g %%8.7g %%8.4g %%8.4g",
std::string GetName(const std::string &scope_name)
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
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 SetTickx(Int_t value=1)
void imgconv(TCanvas *c, const TString &fname)
TGNumberEntry * fBkgInput
Float_t GetLeftMargin() const
virtual TList * GetListOfKeys() const
virtual void SetMaximum(Double_t maximum=-1111)
This class displays a legend box (TPaveText) containing several legend entries.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
void mvaeffs(TString dataset, TString fin="TMVA.root", Bool_t useTMVAStyle=kTRUE, TString formula="S/sqrt(S+B)")
void SetTitleColor(Int_t titlecolor)
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
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)
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void SetSignalAndBackgroundStyle(TH1 *sig, TH1 *bkg, TH1 *all=0)
void SetFrameStyle(TH1 *frame, Float_t scale=1.0)
virtual void SetTitle(const char *title="")
Change the title of the axis.
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
void SetMargin(Float_t margin)
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Double_t GetUxmax() const
Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decad...
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
virtual ~StatDialogMVAEffs()
void SetLineStyleString(Int_t i, const char *text)
Set line style string using the PostScript convention.
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
void UpdateSignificanceHists()
void SetTitleSize(Float_t titlesize)
virtual void SetText(Double_t x, Double_t y, const char *text)
virtual void Paint(Option_t *option="")
Paint canvas.
TGTextButton * fDrawButton
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
To draw Mathematical Formula.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
void GetMethodTitle(TString &name, TKey *ikey)
TLatex * DrawLatex(Double_t x, Double_t y, const char *text)
Make a copy of this object with the new parameters And copy object attributes.
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
void GetMethodName(TString &name, TKey *mkey)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TString GetFormulaString()
TStyle objects may be created to define special styles.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
RooArgSet S(const RooAbsArg &v1)
void PrintResults(const MethodInfo *info)
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
void Initialize(Bool_t useTMVAStyle=kTRUE)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
TGNumberEntry * fSigInput
virtual void SetTicky(Int_t value=1)
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
char * Form(const char *fmt,...)
void ReadHistograms(TFile *file)
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
void SetWmax(Double_t wmax)
void SetFormula(const TString &f)
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
Describe directory structure in memory.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Float_t GetTitleSize() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetTicks(Int_t valuex=1, Int_t valuey=1)
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
TGTextButton * fCloseButton
StatDialogMVAEffs(TString ds, const TGWindow *p, Float_t ns, Float_t nb)
Double_t GetUymax() const
Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decad...
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Float_t GetTopMargin() const
virtual void Add(TObject *obj)
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
TGHorizontalFrame * fButtons
void SetLabelColor(Int_t labelcolor)
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
virtual Int_t GetNbinsX() const
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void Update()
Update canvas pad buffers.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
static constexpr double ns
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Double_t GetUymin() const
Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decad...
Float_t GetRightMargin() const
void Modified(Bool_t flag=1)
virtual void SetBorderSize(Int_t bordersize=4)
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
const char * Data() const
Double_t maxSignificanceErr
TString GetLatexFormula()