FCSurface.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/FC/FCBin.h"
5 
6 #include <vector>
7 
8 class TH2;
9 class TH2F;
10 
11 namespace ana
12 {
13  /// Pseudo-experiments, binned to match a log-likelihood surface
14  class FCSurface
15  {
16  public:
17  FCSurface(int nbinsx, double xmin, double xmax,
18  int nbinsy, double ymin, double ymax);
19  ~FCSurface();
20 
21  void Add(const FCPoint& pt, std::string plot);
22  void Add(const FCCollection& coln, std::string plot="delta");
23 
24  TH2* SurfaceForSignificance(double sig);
25 
26  void DrawBins();
27 
28  const FCBin* GetBin(int x, int y) const;
29 
30  const TH2F* Binning() const {return fBinning;}
31 
32  void SaveToFile(const std::string& fname) const;
33  static std::unique_ptr<FCSurface> LoadFromFile(const std::string& fname);
34  protected:
35  FCSurface(){ fPrintedWarning = false; }
36 
37  TH2F* fBinning;
38  std::vector<FCBin> fBins;
39  mutable bool fPrintedWarning;
40  };
41 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
std::map< std::string, double > xmax
std::vector< FCBin > fBins
Definition: FCSurface.h:38
const FCBin * GetBin(int x, int y) const
Definition: FCSurface.cxx:152
static std::unique_ptr< FCSurface > LoadFromFile(const std::string &fname)
Definition: FCSurface.cxx:170
Represents the results of a single Feldman-Cousins pseudo-experiment.
Definition: FCPoint.h:8
Double_t ymax
Definition: plot.C:25
bool fPrintedWarning
Definition: FCSurface.h:39
A collection of Feldman-Cousins experiments at the same oscillation parameters.
Definition: FCBin.h:13
TH2F * fBinning
Definition: FCSurface.h:37
void SaveToFile(const std::string &fname) const
Definition: FCSurface.cxx:158
void Add(const FCPoint &pt, std::string plot)
Definition: FCSurface.cxx:39
Int_t nbinsx
Definition: plot.C:23
const TH2F * Binning() const
Definition: FCSurface.h:30
Double_t ymin
Definition: plot.C:24
TH2 * SurfaceForSignificance(double sig)
Definition: FCSurface.cxx:103
Pseudo-experiments, binned to match a log-likelihood surface.
Definition: FCSurface.h:14
void plot(std::string label, std::map< std::string, std::map< std::string, Spectrum * >> &plots, bool log)
Collection of FCPoint. Serializable to/from a file.
Definition: FCCollection.h:12
enum BeamMode string