make_files_for_decomp_plots.C
Go to the documentation of this file.
2 
12 
13 #include "TString.h"
14 #include "TFile.h"
15 
16 #include <iostream>
17 #include <cmath>
18 
19 using namespace ana;
20 
22  // Point to the nominal PredictionExtrap for the core sample
23  std::string source = "/nova/ana/nu_e_ana/Ana2017/Predictions/provisional/pred_nom.root";
24  std::string name = "pred_nom2017/predFid/predCore";
25  PredictionExtrap* p = LoadFromFile<PredictionExtrap>(source,name).release();
26 
27  // Grap the Decomp from a ModularExtrapComponent
28  ModularExtrap* extrap = (ModularExtrap*) p->GetExtrap();
29  std::vector < ModularExtrapComponent* > comp = extrap->GetModExtrapComponents();
30  const MichelDecomp* decomp = (MichelDecomp*)comp[0]->GetDecomp();
31 
32  // Save the MichelDecomp and its plots
33  std::string output = "mdcmp_hists.root";
34  TFile* outfile = new TFile (output.c_str(),"RECREATE");
35  decomp->SaveTo(outfile, "decomp");
36  decomp->SavePlots(outfile->mkdir("MichelDecomp_Plots"));
37  outfile->Close();
38 }
39 
const XML_Char * name
Definition: expat.h:151
ofstream output
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const IDecomp * GetDecomp(IPrediction *prediction, EModExtrapComps modExtrapComp)
const char * p
Definition: xmltok.h:285
void SavePlots(TDirectory *dir) const
void make_files_for_decomp_plots()
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
std::vector< ModularExtrapComponent * > GetModExtrapComponents() const
Definition: ModularExtrap.h:60
const char * source
Definition: lz4.h:436
const IExtrap * GetExtrap() const
Take the output of an extrapolation and oscillate it as required.
Extrapolate each component using a separate ModularExtrapComponent.
Definition: ModularExtrap.h:23
FILE * outfile
Definition: dump_event.C:13
enum BeamMode string