savePrediction_simple.C
Go to the documentation of this file.
1 #ifdef __CINT__
3  std::cout << "Sorry, you must run in compiled mode" << std::endl;
4 }
5 #else
6 
7 #include "../WorkshopIncludes.h"
8 
10 {
11  std::cout << "Drawing plots..." << std::endl;
12 
13  // Production Concats
14  std::string directoryD = "/pnfs/nova/persistent/production/concat/R16-03-03-prod2reco.d/";
15  std::string directoryF = "/pnfs/nova/persistent/production/concat/R16-03-03-prod2reco.f/";
16  // Data
17  std::string nd_data = directoryD+"prod_decaf_R16-03-03-prod2reco.d_nd_numi_fhc_full_numu_contain_v1_goodruns_prod2-snapshot.root";
18 
19  // Baseline MC
20  // Only one of the files. In true life, use all MC!
21  std::string nd_nonswap_few = directoryD+"prod_decaf_R16-03-03-prod2reco.d_nd_genie_nonswap_genierw_fhc_nova_v08_epoch1-3c_numu_contain_v1_prod2-snapshot/*_1_of_16.root";
22  // Epoch 3b only for FD to run quickly. In practice, use a PredictionCombinePeriods
23  std::string fd_nonswap_3b = directoryF+"/epoch3b/prod_decaf_R16-03-03-prod2reco.f_fd_genie_nonswap_fhc_nova_v08_epoch3b_numu_contain_v1_prod2-snapshot.root";
24  std::string fd_fluxswap_3b = directoryF+"/epoch3b/prod_decaf_R16-03-03-prod2reco.f_fd_genie_fluxswap_fhc_nova_v08_epoch3b_numu_contain_v1_prod2-snapshot.root";
25  std::string fd_tau_3b = directoryF+"/epoch3b/prod_decaf_R16-03-03-prod2reco.f_fd_genie_tau_fhc_nova_v08_epoch3b_numu_contain_v1_prod2-snapshot.root";
26 
28  loaders.SetLoaderPath( nd_data, caf::kNEARDET, Loaders::kData, ana::kBeam, Loaders::kNonSwap );
29  loaders.SetLoaderPath( nd_nonswap_few, caf::kNEARDET, Loaders::kMC, ana::kBeam, Loaders::kNonSwap );
30  loaders.SetLoaderPath( fd_nonswap_3b, caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kNonSwap );
31  loaders.SetLoaderPath( fd_fluxswap_3b, caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kFluxSwap);
33 
35 
36  osc::OscCalculatorPMNSOpt calc;
37  ana::ResetOscCalcToDefault(&calc); // This seeds to default (in particular max-mixing)
38 
39  calc.SetTh23(TMath::ASin(sqrt(0.403))); // Second analysis best fit
40  calc.SetDmsq32(2.67e-3); // Same
41 
42  TFile* f = new TFile("../Predictions/Prediction_epoch3b_simple_kCCE.root","RECREATE");
43 
44  HistAxis axis( ";Reconstructed neutrino energy (GeV);Events / (0.25 GeV)", kNumuEnergyBinning, kCCE );
45 
46  PredictionNoExtrap* prediction = new PredictionNoExtrap(loaders, axis, kNumuFD, kNoShift, kTuftsWeightCC);
47 
48  // GO!
49  loaders.Go();
50 
51  prediction->SaveTo(f->mkdir( "pred_3b" ));
52 
53  f->Close();
54 
55  std::cout << "Prediction saved!" << std::endl;
56 
57 } // End of function
58 
59 #endif
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
void ResetOscCalcToDefault(osc::IOscCalcAdjustable *calc)
Reset calculator to default assumptions for all parameters.
Definition: Calcs.cxx:23
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
T sqrt(T number)
Definition: d0nt_math.hpp:156
const Color_t kMC
const Cut kNumuFD
Definition: NumuCuts.h:53
void savePrediction_simple()
osc::OscCalcDumb calc
void Go()
Call Go() on all the loaders.
Definition: Loaders.cxx:162
void SetSpillCut(const SpillCut &cut)
Definition: Loaders.cxx:121
const Binning kNumuEnergyBinning
Definition: Binnings.cxx:13
const Var kCCE
Definition: NumuVars.h:21
virtual void SaveTo(TDirectory *dir, const std::string &name) const override
const SystShifts kNoShift
Definition: SystShifts.cxx:21
OStream cout
Definition: OStream.cxx:6
const Var kTuftsWeightCC
Definition: XsecTunes.h:31
std::vector< Loaders * > loaders
Definition: syst_header.h:386
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
Prediction that just uses FD MC, with no extrapolation.
Float_t e
Definition: plot.C:35
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.
Definition: Loaders.cxx:25
enum BeamMode string