18 const UInt_t maxCanvas = 200;
24 std::vector<std::string> hasBeenUsed;
37 for (
UInt_t j = 0; j < hasBeenUsed.size(); j++) {
38 if (hasBeenUsed[j] == hname.Data()) found =
kTRUE;
43 if (hname.EndsWith(
"_sig_nice")) {
47 sprintf( cn,
"cv%d_%s", ic+1, titName.
Data() );
50 c[ic] =
new TCanvas( cn,
Form(
"%s reference for variable: %s",
51 titName.
Data(),(
n.ReplaceAll(
"_sig",
"")).Data() ),
52 ic*50+50, ic*20,
width, height );
62 h->SetMaximum(
h->GetMaximum()*1.3);
64 h->SetMarkerColor(color);
65 h->SetMarkerSize( 0.7 );
66 h->SetMarkerStyle( 24 );
68 h->SetLineColor(color);
71 Double_t hSscale = 1.0/(
h->GetSumOfWeights()*
h->GetBinWidth(1));
78 legS->
AddEntry(
h,
"Input data (signal)",
"p");
82 b = (
TH1F*)lhdir->
Get( bname.ReplaceAll(
"_sig",
"_bgd") );
83 cPad = (
TPad*)
c[ic]->cd(2);
85 b->SetMaximum(
b->GetMaximum()*1.3);
88 b->SetLineColor(color);
89 b->SetMarkerColor(color);
90 b->SetMarkerSize( 0.7 );
91 b->SetMarkerStyle( 24 );
93 Double_t hBscale = 1.0/(
b->GetSumOfWeights()*
b->GetBinWidth(1));
99 legB->
AddEntry(
b,
"Input data (backgr.)",
"p");
102 hasBeenUsed.push_back( bname.Data() );
110 for (
int i=0; i<= 5; i++) {
111 TString hspline = pname +
Form(
"_smoothed_hist_from_spline%i", i );
120 if (
h == 0 &&
b == 0) {
121 TString hspline = pname +
"_smoothed_hist_from_KDE";
129 if (
h == 0 ||
b == 0) {
130 cout <<
"--- likelihoodrefs.C: did not find spline for histogram: " << pname.
Data() << endl;
134 Double_t pSscale = 1.0/(
h->GetSumOfWeights()*
h->GetBinWidth(1));
135 h->Scale( pSscale/hSscale );
139 h->SetLineColor(color);
140 legS->
AddEntry(
h,
"Estimated PDF (norm. signal)",
"l");
144 Double_t pBscale = 1.0/(
b->GetSumOfWeights()*
b->GetBinWidth(1));
145 b->Scale( pBscale/hBscale );
148 b->SetLineColor(color);
150 legB->
AddEntry(
b,
"Estimated PDF (norm. backgr.)",
"l");
156 hasBeenUsed.push_back( pname.
Data() );
166 hasBeenUsed.push_back( hname.Data() );
184 TString metlike=
"Method_Likelihood";
187 cout <<
"Could not locate directory 'Method_Likelihood' in file " << fin << endl;
191 TIter keyIter(&titles);
include TDocParser_001 C image html pict1_TDocParser_001 png width
char * Form(const char *fmt,...)
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Float_t GetLeftMargin() const
Float_t GetTopMargin() const
Describe directory structure in memory.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual TList * GetListOfKeys() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
1-D histogram with a float per channel (see TH1 documentation)}
TH1 is the base class of all histogram classes in ROOT.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual TObject * ReadObj()
To read a TObject* from the file.
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
virtual const char * GetName() const
Returns name of object.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The most important graphics class in the ROOT system.
virtual void SetBorderSize(Int_t bordersize=4)
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
UInt_t GetListOfTitles(TDirectory *rfdir, TList &titles)
void Initialize(Bool_t useTMVAStyle=kTRUE)
TKey * NextKey(TIter &keyIter, TString className)
TFile * OpenFile(const TString &fin)
void imgconv(TCanvas *c, const TString &fname)
void likelihoodrefs(TString dataset, TDirectory *lhdir)