Functions | Variables
make_training_sample.C File Reference
#include "CAFAna/Core/EventList.h"
#include "CAFAna/Core/MultiVar.h"
#include "CAFAna/Cuts/SpillCuts.h"
#include "CAFAna/Vars/Vars.h"
#include "NDAna/ncpi0_semi_inc_png_cvn/ncpi0Bins.h"
#include "NDAna/ncpi0_semi_inc_png_cvn/ncpi0Cuts.h"
#include "NDAna/ncpi0_semi_inc_png_cvn/ncpi0Vars.h"

Go to the source code of this file.

Functions

void make_training_sample (int stride=5000, int offset=0)
 

Variables

const Var kRun = SIMPLEVAR(hdr.run)
 
const Var kSubRun = SIMPLEVAR(hdr.subrun)
 
const Var kCycle = SIMPLEVAR(hdr.cycle)
 
const Var kEvt = SIMPLEVAR(hdr.evt)
 
const Var kSlice = SIMPLEVAR(hdr.subevt)
 

Function Documentation

void make_training_sample ( int  stride = 5000,
int  offset = 0 
)

Definition at line 63 of file make_training_sample.C.

References make_training::dataset, ana::k2FlatFluxCVN1gamma(), ana::k2FlatFluxCVN2gamma(), ana::k2GenieLikeCVN1gamma(), ana::k2GenieLikeCVN2gamma(), ana::k2ViewCVN1gamma(), ana::k2ViewCVN2gamma(), ana::kCycle, ana::kEvt, ana::kIsPreSel, ana::kNCCurrent(), ana::kNCGapPng1(), ana::kNCGapPng2(), ana::kNpCVN1gamma(), ana::kNpCVN2gamma(), ana::kPdgPi0(), ana::kRun, kSlice, kSubRun, ana::MakeTextListFile(), PandAna.reco_validation.add_data::offset, update_sam_good_runs_metadata::stride, and art::to_string().

66 {
67 
68  //string dataset = "defname: prod_caf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_v1 with stride "+to_string(stride)+" offset "+to_string(offset);
69  string dataset = "defname: CVN_Prong_Prod4_ND_NuMI_MC_2view_Genielike_FlatFlux_CAFs with stride "+to_string(stride)+" offset "+to_string(offset);
70 
71 
72  MakeTextListFile(dataset, {kIsPreSel}, {"nd_fhc_nc_selection_stride_nominaldataset"+to_string(stride)+"_offset"+to_string(offset)+".txt"},{&kRun, &kSubRun, &kCycle, &kEvt, &kSlice, &kNpCVN1gamma, &kNpCVN2gamma, &kNCGapPng1, &kNCGapPng2, &kNCCurrent, &kPdgPi0},0);
73 
74  MakeTextListFile(dataset, {kIsPreSel}, {"nd_fhc_nc_selection_stride_2viewdataset"+to_string(stride)+"_offset"+to_string(offset)+".txt"},{&kRun, &kSubRun, &kCycle, &kEvt, &kSlice, &k2ViewCVN1gamma, &k2ViewCVN2gamma, &kNCGapPng1, &kNCGapPng2, &kNCCurrent, &kPdgPi0},0);
75 
76  MakeTextListFile(dataset, {kIsPreSel}, {"nd_fhc_nc_selection_stride_FlatFluxdataset"+to_string(stride)+"_offset"+to_string(offset)+".txt"},{&kRun, &kSubRun, &kCycle, &kEvt, &kSlice, &k2FlatFluxCVN1gamma, &k2FlatFluxCVN2gamma, &kNCGapPng1, &kNCGapPng2, &kNCCurrent, &kPdgPi0},0);
77 
78  MakeTextListFile(dataset, {kIsPreSel}, {"nd_fhc_nc_selection_stride_GenieLikedataset"+to_string(stride)+"_offset"+to_string(offset)+".txt"},{&kRun, &kSubRun, &kCycle, &kEvt, &kSlice, &k2GenieLikeCVN1gamma, &k2GenieLikeCVN2gamma, &kNCGapPng1, &kNCGapPng2, &kNCCurrent, &kPdgPi0},0);
79 
80 
81 }
const Var kNCGapPng2([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 2) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[1].shwlid.gap);})
const Var kNCGapPng1([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 1) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[0].shwlid.gap);})
const Var kNCCurrent([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0;if(sr->mc.nnu==0) return 0;assert(sr->mc.nnu==1);if(sr->vtx.elastic[0].fuzzyk.nshwlid==0) return 0;if(sr->vtx.elastic[0].fuzzyk.npng==0) return 0;if(sr->mc.nu[0].iscc==0) return 1;return 0;})
const Var kNpCVN1gamma([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 1) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[0].cvnpart.photonid);})
const Var k2GenieLikeCVN1gamma([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 1) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[0].cvnpart2GenieLike.photonid);})
const Var k2FlatFluxCVN1gamma([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 1) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[0].cvnpart2FlatFlux.photonid);})
void MakeTextListFile(const std::string &wildcard, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< const Var * > &floatVars, const std::vector< const Var * > &intVars, const SpillCut *spillCut)
Make a file listing all the events passing the specified cut.
Definition: EventList.cxx:193
const Var kCycle
const Var kEvt
const Var kNpCVN2gamma([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 2) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[1].cvnpart.photonid);})
const int kPdgPi0
Definition: PDGCodes.h:137
const Var kSubRun
const Cut kIsPreSel
Definition: ncpi0Cuts.h:1099
const Var k2ViewCVN2gamma([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 2) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[1].cvnpart2View.photonid);})
const Var k2ViewCVN1gamma([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 1) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[0].cvnpart2View.photonid);})
const Var kSlice
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
const Var k2GenieLikeCVN2gamma([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 2) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[1].cvnpart2GenieLike.photonid);})
const Var kRun
const Var k2FlatFluxCVN2gamma([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return 0.f;if(sr->vtx.elastic[0].fuzzyk.npng< 2) return float(-1);return float(sr->vtx.elastic[0].fuzzyk.png[1].cvnpart2FlatFlux.photonid);})

Variable Documentation

const Var kCycle = SIMPLEVAR(hdr.cycle)

Definition at line 55 of file make_training_sample.C.

const Var kEvt = SIMPLEVAR(hdr.evt)

Definition at line 57 of file make_training_sample.C.

const Var kRun = SIMPLEVAR(hdr.run)

Definition at line 51 of file make_training_sample.C.

const Var kSlice = SIMPLEVAR(hdr.subevt)
const Var kSubRun = SIMPLEVAR(hdr.subrun)