exporter_nd.C
Go to the documentation of this file.
1 #ifdef __CINT__
2 void exporter_nd()
3 {
4  std::cout << "Sorry, you must run in compiled mode" << std::endl;
5 }
6 #else
7 
8 #include <string>
9 #include <iostream>
10 
11 #include "CAFAna/numu/SplineEE/exporters/var_defs.h"
13 
15 #include "CAFAna/Cuts/TruthCuts.h"
16 #include "CAFAna/Cuts/SpillCuts.h"
17 
20 #include "CAFAna/Vars/XsecTunes.h"
21 
22 using namespace ana;
23 
25  "dataset_def_name_newest_snapshot "
26  "prod_caf_R17-11-14-prod4reco.d_nd_genie_nonswap_fhc_nova_v08_period3_v1";
27 
28 const std::string output = "data_nd_p3.csv";
29 
30 const Cut cut = kIsNumuCC && (kTrueE < 5) && (
32 );
34 
35 
37 {
39 
40  maker.setCut(cut);
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 }
51 
52 #endif
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
void setCut(const Cut &cut)
Definition: CSVMaker.cxx:132
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kPPFXFluxCVWgt
Definition: PPFXWeights.h:16
const Var weight
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
void SetSpillCut(const SpillCut &cut)
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 Var kTrueE([](const caf::SRProxy *sr){assert(sr->mc.nnu==1);return sr->mc.nu[0].E;})
Definition: Vars.cxx:85
const std::string output
Definition: exporter_nd.C:28
OStream cout
Definition: OStream.cxx:6
const Cut cut
Definition: exporter_nd.C:30
void addVar(const std::string &name, const Var &var)
Definition: CSVMaker.cxx:110
const std::vector< std::pair< std::string, Var > > VARS_BASE({{"baseMuE", kMuE},{"baseHadE", kHadE},{"baseNuMuE", kCCE},})
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
const Var kXSecCVWgt2018
Definition: XsecTunes.h:48
void exporter_nd()
Definition: exporter_nd.C:36
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
void Go() override
Load all the registered spectra.
Definition: CSVMaker.cxx:150
void addVars(const std::vector< NamedVar > &vars)
Definition: CSVMaker.cxx:120
const std::vector< std::pair< std::string, Var > > VARS_TRUTH({{"trueE", kTrueE},{"trueMuE", kTrueMuonE},})
enum BeamMode string