MakeCosmics.C
Go to the documentation of this file.
1 /// MakeCosmics.C by J. Hewes (jhewes15@fnal.gov)
2 /// Macro to produce FD FHC spectrum for Nus19
3 
4 #include "CAFAna/Core/Spectrum.h"
6 
10 
11 #include "CAFAna/Vars/HistAxes.h"
12 #include "NuXAna/Vars/HistAxes.h"
13 
14 #include "TFile.h"
15 
16 using namespace ana;
17 
18 void MakeCosmics() {
19 
20  SpectrumLoader loader("prod_caf_R17-11-14-prod4reco.b_fd_cosmic_fhcTune_full_v1_goodruns", kCosmic);
22 
23  Spectrum c_spec(loader, kNCFDAxisE, kNus18FD and kInCosmicTimingWindow);
24  loader.Go();
25 
26  TFile* f_out = TFile::Open("nus19_fhc_cosmic.root", "recreate");
27  c_spec.SaveTo(f_out, "nus18_fhc_cosmic");
28  delete f_out;
29 
30 }
31 
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
void SetSpillCut(const SpillCut &cut)
const Cut kNus18FD
Definition: NusCuts18.h:100
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
void MakeCosmics()
Definition: MakeCosmics.C:18
const Cut kInCosmicTimingWindow
Is the event far from the start and ends of the spill ? For FD cosmic selection.
Definition: TimingCuts.cxx:165
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
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
Definition: SpillCuts.h:49