dataprocess_numuccinc.C
Go to the documentation of this file.
1 
2 #include "CAFAna/Vars/Vars.h"
3 #include "CAFAna/Core/Binning.h"
4 #include "CAFAna/Cuts/Cuts.h"
6 #include "CAFAna/Core/Spectrum.h"
10 
16 
17 #include "TFile.h"
18 
19 #include <iostream>
20 #include <string>
21 
22 #include "Utilities/func/MathUtil.h"
23 
24 using namespace ana;
25 
26 void dataprocess_numuccinc(const char* fOutname){
27 
28  //This script generates a data spectrum with the variables and binning of the NuMu CC Inclusive analysis.
29  std::cout<<"=> dataprocess_numucc_inc_xs() start "<<std::endl;
30 
31  //test run: cafe --numuccinc -s 100000 dataprocess_numuccinc.C test.root
32 
33  // FHC CAF prod4 ND respin
34  const std::string dataset = "defname: prod_caf_R17-11-14-prod4reco.remid-hotfix.b_nd_numi_fhc_full_v1_addShortSimpleCVN_goodruns";
35  const std::string dataset_name = "Data";
36 
37  SpectrumLoader loader(dataset);
39 
41  loader.Go();
42 
43  //The structure of the file is Data/data to be compatible with the MC systematic ones.
44  TFile fOut(fOutname, "RECREATE");
45  fOut.cd();
46  TDirectory* dir = fOut.mkdir(Form("%s",dataset_name.c_str()));
47  dir->cd();
48  sDt.SaveTo(dir->mkdir("data"));
49 
50  std::cout<<"=> dataprocess_numucc_inc_xs() end "<<std::endl;
51 
52 }
53 
54 
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
void SetSpillCut(const SpillCut &cut)
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
virtual void Go() override
Load all the registered spectra.
void SaveTo(TDirectory *dir, const std::string &name) const
Definition: Spectrum.cxx:506
loader
Definition: demo0.py:10
void dataprocess_numuccinc(const char *fOutname)
OStream cout
Definition: OStream.cxx:6
const HistAxis kRecoMuKEVsCosVsEnuStandardAxis("Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)", angvsmukevsebins, kRecoMuKEVsCosVsEnu)
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
TDirectory * dir
Definition: macro.C:5
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
const Cut kAllNumuCCCuts
enum BeamMode string