Functions | Variables
prod4_pid.C File Reference
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Core/Cut.h"
#include "StandardRecord/Proxy/SRProxy.h"
#include "NuXAna/Cuts/NusCuts.h"
#include "NuXAna/Cuts/NusCuts18.h"
#include "CAFAna/Cuts/NumuCuts.h"
#include "CAFAna/Cuts/NumuCuts2017.h"
#include "CAFAna/Cuts/NueCuts2018.h"
#include "CAFAna/Cuts/Cuts.h"
#include "CAFAna/Cuts/AnalysisMasks.h"
#include "Prod4ProngCVNScores.h"
#include "TFile.h"

Go to the source code of this file.

Functions

void prod4_pid ()
 

Variables

const ana::Cut kHasVtx ([](const caf::SRProxy *sr){return sr->vtx.nelastic > 0;})
 
const ana::Cut kHasPng ([](const caf::SRProxy *sr){return sr->vtx.elastic[0].fuzzyk.npng > 0;})
 
const ana::Cut kSliceQuality ([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kHasVtx(sr)&&kHasPng(sr);else return kHasVtx(sr)&&kHasPng(sr)&&kNDRockFilter(sr);})
 
const ana::Cut kNumuPreselMinusCCE ([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNumuBasicQuality(sr)&&kNumuOptimizedContainFD2017(sr);else return kNumuBasicQuality(sr)&&kNumuContainND2017(sr);})
 
const ana::Cut kNumuContain ([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNumuOptimizedContainFD2017(sr);else return kNumuContainND2017(sr);})
 
const ana::Var kHitsPerPlane ([](const caf::SRProxy *sr){return sr->sel.nuecosrej.hitsperplane;})
 
const ana::Cut kNueDQ = (kHitsPerPlane < 8) && kHasVtx && kHasPng
 
const ana::Cut kNueBasicPart = kIsFarDet && kNueDQ && kVeto && kApplySecondAnalysisMask
 
const ana::Cut kNueContainFD = kNueBasicPart && kNue2017ProngContainment
 
const ana::Cut kNueContain ([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNueContainFD(sr);else return kNue2017NDContain(sr);})
 
const ana::Cut kNuePresel ([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNue2018CorePresel(sr);else return kNue2018NDPresel(sr);})
 
const ana::Cut kNusContain ([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNus18FDContain(sr);else return kNus18NDContain(sr);})
 
const ana::Cut kNusPresel ([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNus18FDPresel(sr);else return kNus18NDPresel(sr);})
 
const ana::Cut kOrContainment = kNumuContain || kNusContain || kNueContain
 
const ana::Cut kOrPreselection = kNuePresel || kNumuPreselMinusCCE || kNusPresel
 

Function Documentation

void prod4_pid ( )

pid vars

selection cuts CutVarCache doesn't like this....

loaders

Definition at line 99 of file prod4_pid.C.

References om::cout, update_sam_good_runs_metadata::cuts, allTimeWatchdog::endl, MECModelEnuComparisons::i, makeTrainCVSamples::int, ana::kElectronPIDTrueElectron(), ana::kElectronPIDTrueMuon(), ana::kElectronPIDTruePhoton(), ana::kElectronPIDTruePion(), ana::kElectronPIDTrueProton(), ana::kEMPIDTrueElectron(), ana::kEMPIDTrueMuon(), ana::kEMPIDTruePhoton(), ana::kEMPIDTruePion(), ana::kEMPIDTrueProton(), ana::kMuonPIDTrueElectron(), ana::kMuonPIDTrueMuon(), ana::kMuonPIDTruePhoton(), ana::kMuonPIDTruePion(), ana::kMuonPIDTrueProton(), ana::kPhotonPIDTrueElectron(), ana::kPhotonPIDTrueMuon(), ana::kPhotonPIDTruePhoton(), ana::kPhotonPIDTruePion(), ana::kPhotonPIDTrueProton(), ana::kPionPIDTrueElectron(), ana::kPionPIDTrueMuon(), ana::kPionPIDTruePhoton(), ana::kPionPIDTruePion(), ana::kPionPIDTrueProton(), ana::kProtonPIDTrueElectron(), ana::kProtonPIDTrueMuon(), ana::kProtonPIDTruePhoton(), ana::kProtonPIDTruePion(), ana::kProtonPIDTrueProton(), kSliceQuality, PandAna.cut.analysis_cuts::kVeto, demo0::loader, loaders, output, ana::Binning::Simple(), and PandAna.Demos.tute_pid_validation::var.

100 {
101  std::map<std::string, const MultiVar &> prong_vars;
102  std::map<std::string, const Cut &> selection_cuts;
103  std::map<std::string, SpectrumLoader *> loaders;
104  /// pid vars
105  // muonid
106  prong_vars.insert({"muonid_true_muon", kMuonPIDTrueMuon});
107  prong_vars.insert({"muonid_true_electron", kMuonPIDTrueElectron});
108  prong_vars.insert({"muonid_true_pion", kMuonPIDTruePion});
109  prong_vars.insert({"muonid_true_proton", kMuonPIDTrueProton});
110  prong_vars.insert({"muonid_true_photon", kMuonPIDTruePhoton});
111 
112  // electronid
113  prong_vars.insert({"electronid_true_muon", kElectronPIDTrueMuon});
114  prong_vars.insert({"electronid_true_electron", kElectronPIDTrueElectron});
115  prong_vars.insert({"electronid_true_pion", kElectronPIDTruePion});
116  prong_vars.insert({"electronid_true_proton", kElectronPIDTrueProton});
117  prong_vars.insert({"electronid_true_photon", kElectronPIDTruePhoton});
118 
119  // pionid
120  prong_vars.insert({"pionid_true_muon", kPionPIDTrueMuon});
121  prong_vars.insert({"pionid_true_electron", kPionPIDTrueElectron});
122  prong_vars.insert({"pionid_true_pion", kPionPIDTruePion});
123  prong_vars.insert({"pionid_true_proton", kPionPIDTrueProton});
124  prong_vars.insert({"pionid_true_photon", kPionPIDTruePhoton});
125 
126  // protonid
127  prong_vars.insert({"protonid_true_muon", kProtonPIDTrueMuon});
128  prong_vars.insert({"protonid_true_electron", kProtonPIDTrueElectron});
129  prong_vars.insert({"protonid_true_pion", kProtonPIDTruePion});
130  prong_vars.insert({"protonid_true_proton", kProtonPIDTrueProton});
131  prong_vars.insert({"protonid_true_photon", kProtonPIDTruePhoton});
132 
133  // photonid
134  prong_vars.insert({"photonid_true_muon", kPhotonPIDTrueMuon});
135  prong_vars.insert({"photonid_true_electron", kPhotonPIDTrueElectron});
136  prong_vars.insert({"photonid_true_pion", kPhotonPIDTruePion});
137  prong_vars.insert({"photonid_true_proton", kPhotonPIDTrueProton});
138  prong_vars.insert({"photonid_true_photon", kPhotonPIDTruePhoton});
139 
140  // photonid
141  prong_vars.insert({"emid_true_muon", kEMPIDTrueMuon});
142  prong_vars.insert({"emid_true_electron", kEMPIDTrueElectron});
143  prong_vars.insert({"emid_true_pion", kEMPIDTruePion});
144  prong_vars.insert({"emid_true_proton", kEMPIDTrueProton});
145  prong_vars.insert({"emid_true_photon", kEMPIDTruePhoton});
146 
147  /// selection cuts
148  /// CutVarCache doesn't like this....
149  // selection_cuts.insert({"Veto", Cut(kVeto)});
150  // selection_cuts.insert({"Containment", Cut(kVeto && kOrContainment)});
151  // selection_cuts.insert({"Preselection", Cut(kVeto && kOrContainment && kOrPreselection)});
152  // dont know why this has to be so complicated
153  std::vector<const Cut *> cuts = {new Cut(kVeto),
154  new Cut(kVeto && kOrContainment),
156  std::vector<std::string> cut_labels = {"Veto", "Containment", "Preselection"};
157 
158 
159  /// loaders
160  loaders.insert({"FD_Fluxswap_FHC", new SpectrumLoader("prod_caf_R17-11-14-prod4reco.d_fd_genie_fluxswap_fhc_nova_v08_full_v1")});
161  loaders.insert({"FD_Nonswap_FHC", new SpectrumLoader("prod_caf_R17-11-14-prod4reco.d_fd_genie_nonswap_fhc_nova_v08_full_v1")});
162  // loaders.insert({"ND_Nonswap_RHC", new SpectrumLoader("prod_caf_R17-11-14-prod4reco.CVNprong-respin.a_nd_genie_nonswap_rhc_nova_v08_full_v1")});
163  // loaders.insert({"ND_Nonswap_FHC", new SpectrumLoader("prod_caf_R17-11-14-prod4reco.CVNprong-respin.a_nd_genie_nonswap_fhc_nova_v08_full_v1")});
164  loaders.insert({"ND_Nonswap_RHC", new SpectrumLoader("prod_caf_R17-11-14-prod4reco.neutron-respin.b_nd_genie_nonswap_rhc_nova_v08_full_v1")});
165  loaders.insert({"ND_Nonswap_FHC", new SpectrumLoader("prod_caf_R17-11-14-prod4reco.neutron-respin.b_nd_genie_nonswap_fhc_nova_v08_full_v1")});
166 
167 
168  const Binning pid_bins = Binning::Simple(30, 0, 1);
169 
170  std::cout << "Prong Vars: " << prong_vars.size() << std::endl;
171  std::cout << "Selection Cuts: " << cuts.size() << std::endl;
172  std::cout << "Loaders: " << loaders.size() << std::endl;
173 
174  std::vector<Spectrum*> spectra;
175  int start_cut = 1;
176  int end_cut = 2;
177  for(std::map<std::string, const MultiVar &>::iterator var = prong_vars.begin(); var != prong_vars.end();var++) {
178  for(int icut = 0; icut < (int) cuts.size(); icut++) {
179  //for(int icut = start_cut; icut < end_cut; icut++) {
180  for(std::map<std::string, SpectrumLoader*>::iterator loader = loaders.begin(); loader != loaders.end(); loader++) {
181  spectra.push_back(new Spectrum(cut_labels[icut] + "_" + loader->first + "_" + var->first,
182  pid_bins,
183  *loader->second,
184  var->second,
185  kSliceQuality && *cuts[icut]));
186  }
187  }
188  }
189 
190  for(std::map<std::string, SpectrumLoader*>::iterator loader = loaders.begin(); loader != loaders.end(); loader++) {
191  loader->second->Go();
192  }
193 
194  TFile * output = new TFile("prod4_pid.root", "recreate");
195  for(int i = 0; i < (int) spectra.size(); i++) {
196  spectra[i]->SaveTo(output->mkdir(spectra[i]->GetLabels()[0].c_str()));
197  }
198 
199 }
ofstream output
const ana::MultiVar kMuonPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:16
const ana::Cut kSliceQuality([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kHasVtx(sr)&&kHasPng(sr);else return kHasVtx(sr)&&kHasPng(sr)&&kNDRockFilter(sr);})
const ana::MultiVar kMuonPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
const ana::MultiVar kElectronPIDTruePion([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})
const ana::MultiVar kEMPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
const ana::MultiVar kPhotonPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
const ana::MultiVar kProtonPIDTruePion([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
const ana::MultiVar kPionPIDTruePion([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
const ana::MultiVar kProtonPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
const ana::MultiVar kMuonPIDTruePion([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
const ana::MultiVar kMuonPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
const ana::MultiVar kPhotonPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
void Cut(double x)
Definition: plot_outliers.C:1
const ana::MultiVar kPionPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
const ana::MultiVar kPhotonPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
const ana::MultiVar kElectronPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})
const ana::MultiVar kEMPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
const ana::MultiVar kEMPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
const ana::MultiVar kProtonPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
const ana::Cut kOrContainment
Definition: prod4_pid.C:94
loader
Definition: demo0.py:10
const ana::MultiVar kProtonPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
const ana::MultiVar kProtonPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
std::vector< float > Spectrum
Definition: Constants.h:527
const ana::Cut kOrPreselection
Definition: prod4_pid.C:95
const ana::MultiVar kEMPIDTruePion([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
const ana::MultiVar kPionPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
OStream cout
Definition: OStream.cxx:6
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
std::vector< Loaders * > loaders
Definition: syst_header.h:386
const ana::MultiVar kEMPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
const ana::MultiVar kPionPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
const ana::MultiVar kElectronPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})
const ana::MultiVar kPhotonPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
const ana::MultiVar kPhotonPIDTruePion([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
const ana::MultiVar kPionPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
const ana::MultiVar kElectronPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})
const ana::MultiVar kMuonPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
const ana::MultiVar kElectronPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})

Variable Documentation

const ana::Cut kHasPng([](const caf::SRProxy *sr){return sr->vtx.elastic[0].fuzzyk.npng > 0;})
const ana::Cut kHasVtx([](const caf::SRProxy *sr){return sr->vtx.nelastic > 0;})
const ana::Var kHitsPerPlane([](const caf::SRProxy *sr){return sr->sel.nuecosrej.hitsperplane;})
const ana::Cut kNueBasicPart = kIsFarDet && kNueDQ && kVeto && kApplySecondAnalysisMask
const ana::Cut kNueContain([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNueContainFD(sr);else return kNue2017NDContain(sr);})
const ana::Cut kNueContainFD = kNueBasicPart && kNue2017ProngContainment

Definition at line 61 of file prod4_pid.C.

const ana::Cut kNueDQ = (kHitsPerPlane < 8) && kHasVtx && kHasPng

Definition at line 59 of file prod4_pid.C.

const ana::Cut kNuePresel([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNue2018CorePresel(sr);else return kNue2018NDPresel(sr);})
const ana::Cut kNumuContain([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNumuOptimizedContainFD2017(sr);else return kNumuContainND2017(sr);})
const ana::Cut kNumuPreselMinusCCE([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNumuBasicQuality(sr)&&kNumuOptimizedContainFD2017(sr);else return kNumuBasicQuality(sr)&&kNumuContainND2017(sr);})
const ana::Cut kNusContain([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNus18FDContain(sr);else return kNus18NDContain(sr);})
const ana::Cut kNusPresel([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kNus18FDPresel(sr);else return kNus18NDPresel(sr);})
const ana::Cut kOrContainment = kNumuContain || kNusContain || kNueContain

Definition at line 94 of file prod4_pid.C.

const ana::Cut kOrPreselection = kNuePresel || kNumuPreselMinusCCE || kNusPresel

Definition at line 95 of file prod4_pid.C.

const ana::Cut kSliceQuality([](const caf::SRProxy *sr){if(kIsFarDet(sr)) return kHasVtx(sr)&&kHasPng(sr);else return kHasVtx(sr)&&kHasPng(sr)&&kNDRockFilter(sr);})

Referenced by prod4_pid().