11 #include "TVirtualPad.h" 21 int nbinsy,
double ymin,
double ymax)
26 nbinsx, xmin, xmax, nbinsy, ymin, ymax);
28 fBins.resize((nbinsx+2)*(nbinsy+2));
47 else if(plot ==
"ssth23")
49 else if(plot ==
"th13")
51 else if(plot ==
"dmsq")
53 else if(plot ==
"deltassth23")
55 else if(plot ==
"ssth23dmsq32") {
58 else if(plot ==
"deltath13")
60 else if(plot ==
"mass")
70 if(plot ==
"deltassth23"){
73 double binWidth =
fBinning->GetXaxis()->GetBinWidth(1);
77 fBins[mergeBin].Add(pt);
82 fBins[mergeBin].Add(pt);
93 const unsigned int N = coln.
NPoints();
95 for(
unsigned int n = 0;
n < N; ++
n){
111 for(
int x = 1;
x < hRet->GetNbinsX()+1; ++
x){
112 for(
int y = 1;
y < hRet->GetNbinsY()+1; ++
y){
113 const int bin = hRet->GetBin(
x,
y);
114 if(
fBins[bin].Empty()){
115 double crit2D = -2*
log(1-sig);
116 hRet->SetBinContent(bin,crit2D);
121 const double up =
fBins[
bin].UpValueForSignificance(sig);
122 assert(!std::isinf(up) && !std::isnan(up));
123 hRet->SetBinContent(bin, up);
135 TVirtualPad*
c = gPad;
136 if(!c) c =
new TCanvas;
142 for(
int x = 1;
x < X+1; ++
x){
143 for(
int y = 1;
y < Y+1; ++
y){
160 TFile
fout(fname.c_str(),
"RECREATE");
163 TTree
tr(
"fcsurf",
"fcsurf");
179 ret->fBinning = (TH2F*)(fin->Get(
"bins")->Clone());
181 TTree*
tr = (TTree*)fin->Get(
"fcsurf");
186 for(
int i = 0;
i < tr->GetEntries(); ++
i)
Cuts and Vars for the 2020 FD DiF Study.
std::map< std::string, double > xmax
std::vector< FCBin > fBins
std::string pnfs2xrootd(std::string loc, bool unauth)
const FCBin * GetBin(int x, int y) const
unsigned int NPoints() const
static std::unique_ptr< FCSurface > LoadFromFile(const std::string &fname)
Represents the results of a single Feldman-Cousins pseudo-experiment.
A collection of Feldman-Cousins experiments at the same oscillation parameters.
void SaveToFile(const std::string &fname) const
static FCBin FromTree(TTree *tr, int idx)
void Add(const FCPoint &pt, std::string plot)
static void InitFromTree(TTree *tr)
void SetProgress(double frac)
Update the progress fraction between zero and one.
static void InitToTree(TTree *tr)
assert(nhit_max >=nhit_nbins)
A simple ascii-art progress bar.
TH2 * SurfaceForSignificance(double sig)
Prevent histograms being added to the current directory.
void Done()
Call this when action is completed.
std::string UniqueName()
Return a different string each time, for creating histograms.
const FCPoint & Point(int n) const
Pseudo-experiments, binned to match a log-likelihood surface.
Collection of FCPoint. Serializable to/from a file.