#include "TFile.h"
#include "TH1F.h"
#include "TTreeReader.h"
#include "TTreeReaderValue.h"
Go to the source code of this file.
Definition at line 6 of file SBNOsc/macro/example_macro.cc.
8 TFile f(
"/sbnd/data/users/gputnam/NuMu/outputs/sbnd_passthru_v1/SBND_numu_all.root");
11 TH1F *hist =
new TH1F(
"",
"", 50, 0, 5);
18 TTreeReader myReader(
"sbnana", &f);
25 TTreeReaderArray<double> neutrino_energies(myReader,
"truth.neutrino.energy");
29 while (myReader.Next()) {
31 if (max_event >= 0 && event_ind == max_event)
break;
34 for (
double e: neutrino_energies) {