9 using std::ostringstream;
22 string opt =
"numusel_ncsel_fhc_neardet_fardet";
24 TFile* plotFile = TFile::Open((
"plots/covmx/plots_"+opt+
".root").c_str(),
"recreate");
25 TDirectory* systDir = plotFile->mkdir(
"systs");
33 for (
size_t i = 0;
i < samples.size(); ++
i) {
34 if (
i > 0) tag <<
"_";
35 tag << samples[
i].GetID();
37 TCanvas
c(
"c",
"c", 1600, 900);
38 TFile*
inFile = TFile::Open((
InputPath()+
"/covmx/mx.root").c_str(),
"read");
39 CovarianceMatrix* mx = LoadFrom<CovarianceMatrix>(
inFile, tag.str()+
"/allsysts").
release();
40 TH2* hMx = mx->GetCovMxRelativeTH2(samples,
calc);
41 plotFile->WriteTObject(hMx,
"MxScaled");
43 c.SaveAs(
"plots/covmx/MxScaled.png");
45 hMx = mx->GetFullCovMxTH2();
46 plotFile->WriteTObject(hMx,
"MxFull");
48 c.SaveAs(
"plots/covmx/MxFull.png");
50 hMx = mx->GetFullCorrMxTH2();
51 plotFile->WriteTObject(hMx,
"MxCorrFull");
53 c.SaveAs(
"plots/covmx/MxFullCorr.png");
57 cout <<
endl <<
"Exception occurred! " << e.what() <<
endl;
Cuts and Vars for the 2020 FD DiF Study.
void SetNus20Params(osc::OscCalcSterile *calc, std::string type="3flav")
void SetEverything(covmx::Sample &sample, bool systs=false, double res=0)
vector< const ISyst * > getNusAna2020AllSysts(covmx::Sample &s)
void DrawCovMx(bool rhc=false)
::xsd::cxx::tree::exception< char > exception
osc::OscCalcSterile * DefaultSterileCalc(int nflavors)
Create a sterile calculator with default assumptions for all parameters.
std::vector< covmx::Sample > GetSamplesFromOptString(TString optString)
Function to take an option TString and return a vector of associated covmx::Samples.
Prevent histograms being added to the current directory.
A class for generating a covariance matrices as a function of oscillation parameters and systematics ...