Functions
AnalyzeSysts.C File Reference
#include "TFile.h"
#include "CAFAna/Core/LoadFromFile.h"
#include "CAFAna/Analysis/Exposures.h"
#include "NuXAna/Analysis/SystMaker.h"

Go to the source code of this file.

Functions

void AnalyzeSysts (std::string ndFile="/nova/data/users/jhewes15/nus20/systmakers/systsmaker_nus_fhc_neardet.root", std::string fdFile="/nova/data/users/jhewes15/nus20/systmakers/systsmaker_nus_fhc_fardet.root")
 

Function Documentation

void AnalyzeSysts ( std::string  ndFile = "/nova/data/users/jhewes15/nus20/systmakers/systsmaker_nus_fhc_neardet.root",
std::string  fdFile = "/nova/data/users/jhewes15/nus20/systmakers/systsmaker_nus_fhc_fardet.root" 
)

Definition at line 17 of file AnalyzeSysts.C.

References om::cout, allTimeWatchdog::endl, inFile, ana::kAna2018FHCPOT, ana::kAna2018SensitivityFHCNDPOT, outFile, runNovaSAM::release, and string.

18  {
19 
20  DontAddDirectory guard;
21 
22  std::string ofName = "syst_ana.root";
23 
24  TFile* inFile = TFile::Open(ndFile.c_str(), "read");
25  TFile* outFile = TFile::Open(ofName.c_str(), "recreate");
26 
27  // Get the syst maker from the file
28  SystematicsMaker* systsMaker = LoadFromFile<SystematicsMaker>(inFile, "nus_fhc_neardet").release();
29 
30  for (auto systMaker : systsMaker->GetSystMakers()) {
31  std::cout << "Name is " << systMaker.second->GetName() << std::endl;
32  }
33 
34  // Run the syst makers
35  systsMaker->Go(kAna2018SensitivityFHCNDPOT);
36 
37  // Draw plots
38  systsMaker->PrintSysts();
39  systsMaker->DrawSysts(outFile->mkdir("nus_fhc_neardet"));
40 
41  delete systsMaker;
42  delete inFile;
43 
44  // Repeat for far detector
45  inFile = TFile::Open(fdFile.c_str(), "read");
46  systsMaker = LoadFromFile<SystematicsMaker>(inFile, "nus_fhc_fardet").release();
47  systsMaker->Go(kAna2018FHCPOT);
48  systsMaker->PrintSysts();
49  systsMaker->DrawSysts(outFile->mkdir("nus_fhc_fardet"));
50 
51  delete systsMaker;
52  delete inFile;
53  delete outFile;
54 
55 }
const double kAna2018SensitivityFHCNDPOT
Definition: Exposures.h:210
ifstream inFile
Definition: AnaPlotMaker.h:34
TFile * outFile
Definition: PlotXSec.C:135
OStream cout
Definition: OStream.cxx:6
const double kAna2018FHCPOT
Definition: Exposures.h:207
Prevent histograms being added to the current directory.
Definition: UtilsExt.h:46
enum BeamMode string