Functions | Variables
exporter_nd.C File Reference
#include <string>
#include <iostream>
#include "CAFAna/numu/SplineEE/exporters/var_defs.h"
#include "CAFAna/Analysis/CSVMaker.h"
#include "3FlavorAna/Cuts/NumuCuts2018.h"
#include "CAFAna/Cuts/TruthCuts.h"
#include "CAFAna/Cuts/SpillCuts.h"
#include "CAFAna/Vars/GenieWeights.h"
#include "CAFAna/Vars/PPFXWeights.h"
#include "CAFAna/Vars/XsecTunes.h"

Go to the source code of this file.

Functions

void exporter_nd ()
 

Variables

const std::string data
 
const std::string output = "data_nd_p3.csv"
 
const Cut cut
 
const Var weight = kPPFXFluxCVWgt * kXSecCVWgt2018
 

Function Documentation

void exporter_nd ( )

Definition at line 36 of file exporter_nd.C.

References ana::CSVMaker::addVar(), ana::CSVMaker::addVars(), ana::CSVMaker::Go(), ana::kStandardSpillCuts, generic.controllers.MakeCanvases::maker, output, ana::CSVMaker::setCut(), ana::SpectrumLoaderBase::SetSpillCut(), VARS_BASE(), VARS_ND(), and VARS_TRUTH().

37 {
39 
40  maker.setCut(cut);
41  maker.SetSpillCut(kStandardSpillCuts);
42 
43  maker.addVars(VARS_TRUTH);
44  maker.addVars(VARS_BASE);
45  maker.addVars(VARS_ND);
46 
47  maker.addVar("weight", weight);
48 
49  maker.Go();
50 }
const Var weight
Definition: exporter_nd.C:33
const std::vector< std::pair< std::string, Var > > VARS_ND({{"trkcalactE", SIMPLEVAR(energy.numu.ndtrkcalactE)},{"trkcalcatE", SIMPLEVAR(energy.numu.ndtrkcalcatE)},{"trkcaltranE", SIMPLEVAR(energy.numu.ndtrkcaltranE)},{"trklenact", SIMPLEVAR(energy.numu.ndtrklenact)},{"trklencat", SIMPLEVAR(energy.numu.ndtrklencat)},{"hadVisE", kNumuHadVisE},})
const XML_Char const XML_Char * data
Definition: expat.h:268
const std::string output
Definition: exporter_nd.C:28
const Cut cut
Definition: exporter_nd.C:30
const std::vector< std::pair< std::string, Var > > VARS_BASE({{"baseMuE", kMuE},{"baseHadE", kHadE},{"baseNuMuE", kCCE},})
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
const std::vector< std::pair< std::string, Var > > VARS_TRUTH({{"trueE", kTrueE},{"trueMuE", kTrueMuonE},})

Variable Documentation

const Cut cut
Initial value:
= kIsNumuCC && (kTrueE < 5) && (
)
const Cut kNumuContainND2017([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;++i){TVector3 start=sr->vtx.elastic.fuzzyk.png[i].shwlid.start;TVector3 stop=sr->vtx.elastic.fuzzyk.png[i].shwlid.stop;if(std::min(start.X(), stop.X())< -180.0) return false;if(std::max(start.X(), stop.X()) > 180.0) return false;if(std::min(start.Y(), stop.Y())< -180.0) return false;if(std::max(start.Y(), stop.Y()) > 180.0) return false;if(std::min(start.Z(), stop.Z())< 20.0) return false;if(std::max(start.Z(), stop.Z()) > 1525.0) return false;}if(sr->trk.kalman.ntracks< 1) return false;for(unsigned int i=0;i< sr->trk.kalman.ntracks;++i){if(i==sr->trk.kalman.idxremid) continue;else if(sr->trk.kalman.tracks[i].start.Z() > 1275||sr->trk.kalman.tracks[i].stop.Z() > 1275) return false;}return(sr->trk.kalman.ntracks > sr->trk.kalman.idxremid &&sr->slc.firstplane > 1 &&sr->slc.lastplane< 212 &&sr->trk.kalman.tracks[0].start.Z()< 1100 &&(sr->trk.kalman.tracks[0].stop.Z()< 1275 ||sr->sel.contain.kalyposattrans< 55) &&sr->sel.contain.kalfwdcellnd > 5 &&sr->sel.contain.kalbakcellnd > 10);})
Definition: NumuCuts2017.h:11
const Var kTrueE([](const caf::SRProxy *sr){return(sr->mc.nnu==0)?0.:float(sr->mc.nu[0].E);})
Definition: Vars.cxx:85
const Cut kNumuBasicQuality([](const caf::SRProxy *sr){return(sr->energy.numu.trkccE > 0 && sr->sel.remid.pid > 0 && sr->slc.nhit > 20 && sr->slc.ncontplanes > 4 && sr->trk.cosmic.ntracks > 0);})
Definition: NumuCuts.h:14
const Cut kNumuPID2018([](const caf::SRProxy *sr){std::cout<< "ERROR::kNumuPID2018, cutting on both cvnProd3Train and cvn2017."<< " Neither branch exists anymore. Returning False."<< std::endl;abort();return false;})
Definition: NumuCuts2018.h:22

Definition at line 30 of file exporter_nd.C.

const std::string data
Initial value:
=
"dataset_def_name_newest_snapshot "
"prod_caf_R17-11-14-prod4reco.d_nd_genie_nonswap_fhc_nova_v08_period3_v1"

Definition at line 24 of file exporter_nd.C.

const std::string output = "data_nd_p3.csv"

Definition at line 28 of file exporter_nd.C.

Referenced by exporter_nd().

const Var weight = kPPFXFluxCVWgt * kXSecCVWgt2018

Definition at line 33 of file exporter_nd.C.