Functions
dataprocess_numuccinc.C File Reference
#include "CAFAna/Vars/Vars.h"
#include "CAFAna/Core/Binning.h"
#include "CAFAna/Cuts/Cuts.h"
#include "CAFAna/Cuts/SpillCuts.h"
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Core/SpectrumLoaderBase.h"
#include "3FlavorAna/Vars/NumuVars.h"
#include "NDAna/numucc_inc/NumuCCIncAnalysis.h"
#include "NDAna/numucc_inc/NumuCCIncBins.h"
#include "NDAna/numucc_inc/NumuCCIncVars.h"
#include "NDAna/numucc_inc/NumuCCIncCuts.h"
#include "NDAna/numucc_inc/NDXSecMuonPID.h"
#include "TFile.h"
#include <iostream>
#include <string>
#include "Utilities/func/MathUtil.h"

Go to the source code of this file.

Functions

void dataprocess_numuccinc (const char *fOutname)
 

Function Documentation

void dataprocess_numuccinc ( const char *  fOutname)

Definition at line 26 of file dataprocess_numuccinc.C.

References om::cout, make_training::dataset, cache_state::dataset_name, dir, allTimeWatchdog::endl, makeBrightnessMap::fOut, ana::SpectrumLoader::Go(), ana::kAllNumuCCCuts, ana::kRecoMuKEVsCosVsEnuStandardAxis(), ana::kStandardSpillCuts, demo0::loader, ana::Spectrum::SaveTo(), ana::SpectrumLoaderBase::SetSpillCut(), and string.

26  {
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);
38  loader.SetSpillCut(kStandardSpillCuts);
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 }
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
loader
Definition: demo0.py:10
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
enum BeamMode string