5 #include "TDirectory.h"
8 #include "TObjString.h"
18 assert(!
throws.
empty());
21 assert(
s.fHist->GetNbinsX() ==
throws[0].fHist->GetNbinsX());
22 assert(
s.fHist->GetNbinsY() ==
throws[0].fHist->GetNbinsY());
26 fLogX =
throws[0].fLogX;
27 fLogY =
throws[0].fLogY;
42 for(
int ix = 0; ix < fHist->GetNbinsX()+2; ++ix){
43 for(
int iy = 0; iy < fHist->GetNbinsY()+2; ++iy){
44 std::vector<float> chis;
45 chis.reserve(
throws.
size());
47 chis.push_back(
s.fHist->GetBinContent(ix, iy));
49 std::sort(chis.begin(), chis.end());
53 fHist->SetBinContent(ix, iy, chis[
throws.
size()/2]);
55 const double tail1 = (1-0.6827)/2;
56 fHistUp1->SetBinContent(ix, iy, chis[
throws.
size()*tail1]);
57 fHistDn1->SetBinContent(ix, iy, chis[
throws.
size()*(1-tail1)]);
60 const double tail2 = (1-0.9545)/2;
61 fHistUp2->SetBinContent(ix, iy, chis[
throws.
size()*tail2]);
62 fHistDn2->SetBinContent(ix, iy, chis[(
throws.
size()-1)*(1-tail2)]);
73 std::vector<TGraph*> gs =
s.GetGraphs(fc, -1);
77 g->SetLineColor(color);
93 for(
int ix = 0; ix <
fHist->GetNbinsX()+2; ++ix){
94 for(
int iy = 0; iy <
fHist->GetNbinsY()+2; ++iy){
95 const double c = fc->GetBinContent(ix, iy);
97 const double u1 =
fHistUp1->GetBinContent(ix, iy);
98 const double d1 =
fHistDn1->GetBinContent(ix, iy);
99 surf1.SetBinContent(ix, iy, std::max(u1-c, c-d1));
101 const double u2 =
fHistUp2->GetBinContent(ix, iy);
102 const double d2 =
fHistDn2->GetBinContent(ix, iy);
103 surf2.SetBinContent(ix, iy, std::max(u2-c, c-d2));
107 const double level = 0;
110 surf2.SetContour(1, &level);
111 surf2.SetLineColor(kYellow);
112 surf2.DrawCopy(
"cont3 same");
114 surf1.SetContour(1, &level);
115 surf1.SetLineColor(kGreen);
116 surf1.SetFillColor(kGreen+2);
117 surf1.DrawCopy(
"cont3 same");
125 TDirectory* tmp = gDirectory;
127 TObjString(
"MedianSurface").Write(
"type");
129 for(
unsigned int i = 0; i <
fThrows.size(); ++i){
130 fThrows[i].SaveTo(dir->mkdir(TString::Format(
"surf%d", i)));
141 TObjString* tag = (TObjString*)dir->Get(
"type");
143 assert(tag->GetString() ==
"MedianSurface");
145 std::vector<Surface> surfs;
146 for(
unsigned int i = 0; ; ++i){
147 TDirectory* surfdir = dir->GetDirectory(TString::Format(
"surf%d", i));
149 surfs.push_back(*ana::LoadFrom<Surface>(surfdir));
152 return std::make_unique<MedianSurface>(surfs);
Log-likelihood scan across two parameters.
std::size_t size(FixedBins< T, C > const &) noexcept
process_name opflashCryoW ana
then echo File list $list not found else cat $list while read file do echo $file sed s
Prevent histograms being added to the current directory.
bool empty(FixedBins< T, C > const &) noexcept