Functions
joint_fit_2020_datarelease_tools.h File Reference
#include "TFile.h"
#include "TString.h"
#include "TH2F.h"
#include "TMarker.h"
#include "TGraph.h"
#include <vector>
#include <string>
#include <iostream>

Go to the source code of this file.

Functions

TFile * MakeDataReleaseFileContour (TString preffix, bool dmsqSurf)
 
TFile * MakeDataReleaseFileSlice (TString preffix, bool th23Slice, bool dmsqSlice)
 
void GraphsToDataRelease (TFile *file, std::vector< TGraph * > graphs, TString label, TString hiestr)
 
void GraphsToDataRelease (TFile *file, std::vector< std::pair< TGraph *, TString > > graphs)
 
void BestFitToDataRelease (TFile *file, TMarker &bf, TString label, TString hiestr)
 

Function Documentation

void BestFitToDataRelease ( TFile *  file,
TMarker &  bf,
TString  label,
TString  hiestr 
)

Definition at line 111 of file joint_fit_2020_datarelease_tools.h.

References om::cout, and label.

Referenced by plot_joint_fit_2020_contours().

115 {
116  auto tempdir = gDirectory;
117  file->cd();
118  bf.SetMarkerStyle(kFullCircle);
119  bf.SetMarkerSize(1);
120  TString name = hiestr + "_" + label;
121  bf.Write(name);
122  std::cout << "Official: Added marker " << name << "\n";
123  tempdir->cd();
124 }
const XML_Char * name
Definition: expat.h:151
const char * label
OStream cout
Definition: OStream.cxx:6
TFile * file
Definition: cellShifts.C:17
void GraphsToDataRelease ( TFile *  file,
std::vector< TGraph * >  graphs,
TString  label,
TString  hiestr 
)

Definition at line 82 of file joint_fit_2020_datarelease_tools.h.

References om::cout, MECModelEnuComparisons::i, label, and art::to_string().

Referenced by plot_joint_fit_2020_contours(), and plot_joint_fit_2020_slices().

86 {
87  auto tempdir = gDirectory;
88  file->cd();
89  int ngraphs = graphs.size();
90  for(int i = 0; i < ngraphs; ++i){
91  TString name = hiestr + "_" + label;
92  if(ngraphs>1) name += ("_" + std::to_string(i));
93  graphs[i]->Write(name);
94  std::cout << "Official: Added graph " << name << "\n";
95  }
96  tempdir->cd();
97 }
const XML_Char * name
Definition: expat.h:151
const char * label
OStream cout
Definition: OStream.cxx:6
TFile * file
Definition: cellShifts.C:17
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
void GraphsToDataRelease ( TFile *  file,
std::vector< std::pair< TGraph *, TString > >  graphs 
)

Definition at line 99 of file joint_fit_2020_datarelease_tools.h.

References om::cout, and MECModelEnuComparisons::graphs.

101 {
102  auto tempdir = gDirectory;
103  file->cd();
104  for (auto const & gr:graphs) {
105  gr.first->ResetAttLine();
106  gr.first->Write(gr.second);
107  std::cout << "Official: Added graph " << gr.second << "\n";
108  }
109 }
OStream cout
Definition: OStream.cxx:6
TFile * file
Definition: cellShifts.C:17
TFile* MakeDataReleaseFileContour ( TString  preffix,
bool  dmsqSurf 
)

Definition at line 17 of file joint_fit_2020_datarelease_tools.h.

References file_size_ana::axes, om::cout, allTimeWatchdog::endl, shutoffs::filename, and runNovaSAM::ret.

Referenced by plot_joint_fit_2020_contours().

18 {
19  TString filename = (preffix +
20  "NOvA_2020_official_contour_" +
21  (dmsqSurf? "ssth23dmsq32":"deltassth23" ) +
22  ".root");
23  std::cout << "\nCreating official release file "
24  << filename << std::endl << std::endl;
25 
26  auto ret = new TFile(filename, "recreate");
27 
28  if(dmsqSurf) {
29  auto axes_NH =
30  new TH2F("NH_axes",
31  ";sin^{2}#theta_{23};#Deltam^{2}_{32} (10^{-3}eV^{2}/c^{4})",
32  100,0.3,0.7,100,2.05,2.85);
33  auto axes_IH =
34  new TH2F("IH_axes",
35  ";sin^{2}#theta_{23};#Deltam^{2}_{32} (10^{-3}eV^{2}/c^{4})",
36  100,0.3,0.7,100,-2.95,-2.15);
37  axes_NH->Write();
38  axes_IH->Write();
39  }
40  else{
41  TH2* axes = new TH2F("axes",
42  ";#delta_{CP}/#pi;sin^{2}#theta_{23}",
43  100,0,2,100,0.275,0.725);
44  axes->Write();
45  }
46  return ret;
47 }
string filename
Definition: shutoffs.py:106
OStream cout
Definition: OStream.cxx:6
TFile* MakeDataReleaseFileSlice ( TString  preffix,
bool  th23Slice,
bool  dmsqSlice 
)

Definition at line 49 of file joint_fit_2020_datarelease_tools.h.

References file_size_ana::axes, om::cout, allTimeWatchdog::endl, shutoffs::filename, and runNovaSAM::ret.

Referenced by plot_joint_fit_2020_slices().

50 {
51  TString filename = (preffix +
52  "NOvA_2020_official_slice_" +
53  (th23Slice ? "ssth23" :
54  (dmsqSlice? "dmsq32":"delta" )) +
55  ".root");
56  std::cout << "\nCreating official release file "
57  << filename << std::endl << std::endl;
58 
59  auto ret = new TFile(filename, "recreate");
60  TH2F* axes;
61 
62  if(th23Slice) {
63  axes = new TH2F("axes",";sin^{2}#theta_{23};Significance (#sigma)",
64  100,0.32,0.72,100,0,3);
65  }
66  else if (dmsqSlice) {
67  axes = new TH2F("axes",
68  ";|#Deltam^{2}_{32}| (10^{-3} eV^{2}/c^{4});Significance (#sigma)",
69  100,2.15,2.75,100,0,3);
70  }
71  else {
72  axes = new TH2F("axes",";#delta_{CP}/#pi;Significance (#sigma)",
73  100,0,2,100,0,5);
74 
75  }
76 
77  axes->Write();
78 
79  return ret;
80 }
string filename
Definition: shutoffs.py:106
OStream cout
Definition: OStream.cxx:6