All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions | Variables
helper_eff_spill.h File Reference
#include "helper.h"

Go to the source code of this file.

Classes

struct  PlotDef
 
struct  SelDef
 

Functions

const SpillVar kLeptonEnergy ([](const caf::SRSpillProxy *sr){return-5.f;for(auto const &prim:sr->mc.nu[0].prim){if(std::abs(prim.pdg)!=11 &&std::abs(prim.pdg)!=13) continue;return(float) prim.startE;}return-5.f;})
 
const SpillCut kCosmicSpill ([](const caf::SRSpillProxy *sr){return(sr->mc.nnu==0);})
 
const SpillCut kSpillTrueNuFV ([](const caf::SRSpillProxy *sr){return true;return false;return PtInVolAbsX(sr->mc.nu[0].position, fvndAbs);})
 
const SpillCut kSpillNuEEnergyCut ([](const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!(std::abs(sr->mc.nu[0].pdg)==12 &&sr->mc.nu[0].iscc)) return true;for(auto const &prim:sr->mc.nu[0].prim){continue;return true;}return false;})
 
const SpillCut kNuECCSpill ([](const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!kSpillSingleNu(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==12 &&sr->mc.nu[0].iscc &&PtInVolAbsX(sr->mc.nu[0].position, fvndAbs)&&kSpillNuEEnergyCut(sr));})
 
const SpillCut kNuMuCCSpill ([](const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!kSpillSingleNu(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==14 &&sr->mc.nu[0].iscc &&PtInVolAbsX(sr->mc.nu[0].position, fvndAbs));})
 
const SpillCut kNCSpill ([](const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!kSpillSingleNu(sr)) return false;return((bool) sr->mc.nu[0].isnc &&PtInVolAbsX(sr->mc.nu[0].position, fvndAbs));})
 
const SpillCut kOtherNuSpill ([](const caf::SRSpillProxy *sr){return(kSpillSingleNu(sr)&&!(kCosmicSpill(sr)||kNuECCSpill(sr)||kNuMuCCSpill(sr)||kNCSpill(sr)));})
 
const SpillCut kSpillVtxDistCut ([](const caf::SRSpillProxy *sr){return true;unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return(bool) counter;})
 
const SpillCut kSpillPreSel ([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return counter;})
 
const SpillCut kSpillRecoSel ([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;if(kPreNueSelND(&slc)&&kRecoNueSel(&slc))++counter;}return counter;})
 
const SpillCut kSpillFullSel ([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;if(kPreNueSelND(&slc)&&kRecoNueSel(&slc)&&kFullNueSel(&slc))++counter;}return counter;})
 

Variables

const Binning kBDTBinning = Binning::Simple(40, 0, 1.0)
 
const Binning kEnergyBinningGeV = Binning::Simple(30, 0, 3)
 
const Binning kdEdxBinning = Binning::Simple(40, 0, 10)
 
const Binning kGapBinning = Binning::Simple(20, 0, 10)
 
const Binning kDensityBinning = Binning::Simple(20, 0., 20)
 
const Binning kOpenAngleBinning = Binning::Simple(20, 0., 1)
 
const Binning kLengthBinning = Binning::Simple(42, -5.01, 100)
 
const Binning kPEBinning = Binning::Simple(70, 0., 1400)
 
const Binning kTimeBinning = Binning::Simple(70, -3500, 3500)
 
const Binning kFlashBinning = Binning::Simple(40, -6.f, 34.f)
 
std::vector< PlotDefplots
 
const Cut kSpillPreSelSlc = kSlcIsRecoNu && kPreNueSelND && kVtxDistMagCut && kSlcCompletenessCut
 
std::vector< SelDeftypes
 
const SpillCut kNuESpillTruthCuts = kSpillVtxDistCut && kSpillSingleNu
 
std::vector< SelDefsels
 

Function Documentation

const SpillCut kCosmicSpill ( [] (const caf::SRSpillProxy *sr){return(sr->mc.nnu==0);}  )
const SpillVar kLeptonEnergy ( [] (const caf::SRSpillProxy *sr){return-5.f;for(auto const &prim:sr->mc.nu[0].prim){if(std::abs(prim.pdg)!=11 &&std::abs(prim.pdg)!=13) continue;return(float) prim.startE;}return-5.f;}  )
const SpillCut kNCSpill ( [] (const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!kSpillSingleNu(sr)) return false;return((bool) sr->mc.nu[0].isnc &&PtInVolAbsX(sr->mc.nu[0].position, fvndAbs));}  )
const SpillCut kNuECCSpill ( [] (const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!kSpillSingleNu(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==12 &&sr->mc.nu[0].iscc &&PtInVolAbsX(sr->mc.nu[0].position, fvndAbs)&&kSpillNuEEnergyCut(sr));}  )
const SpillCut kNuMuCCSpill ( [] (const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!kSpillSingleNu(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==14 &&sr->mc.nu[0].iscc &&PtInVolAbsX(sr->mc.nu[0].position, fvndAbs));}  )
const SpillCut kOtherNuSpill ( [] (const caf::SRSpillProxy *sr){return(kSpillSingleNu(sr)&&!(kCosmicSpill(sr)||kNuECCSpill(sr)||kNuMuCCSpill(sr)||kNCSpill(sr)));}  )
const SpillCut kSpillFullSel ( [] (const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;if(kPreNueSelND(&slc)&&kRecoNueSel(&slc)&&kFullNueSel(&slc))++counter;}return counter;}  )
const SpillCut kSpillNuEEnergyCut ( [] (const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!(std::abs(sr->mc.nu[0].pdg)==12 &&sr->mc.nu[0].iscc)) return true;for(auto const &prim:sr->mc.nu[0].prim){continue;return true;}return false;}  )
const SpillCut kSpillPreSel ( [] (const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return counter;}  )
const SpillCut kSpillRecoSel ( [] (const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;if(kPreNueSelND(&slc)&&kRecoNueSel(&slc))++counter;}return counter;}  )
const SpillCut kSpillTrueNuFV ( [] (const caf::SRSpillProxy *sr){return true;return false;return PtInVolAbsX(sr->mc.nu[0].position, fvndAbs);}  )
const SpillCut kSpillVtxDistCut ( [] (const caf::SRSpillProxy *sr){return true;unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return(bool) counter;}  )

Variable Documentation

const Binning kBDTBinning = Binning::Simple(40, 0, 1.0)

Definition at line 79 of file helper_eff_spill.h.

const Binning kdEdxBinning = Binning::Simple(40, 0, 10)

Definition at line 81 of file helper_eff_spill.h.

const Binning kDensityBinning = Binning::Simple(20, 0., 20)

Definition at line 83 of file helper_eff_spill.h.

const Binning kEnergyBinningGeV = Binning::Simple(30, 0, 3)

Definition at line 80 of file helper_eff_spill.h.

const Binning kFlashBinning = Binning::Simple(40, -6.f, 34.f)

Definition at line 88 of file helper_eff_spill.h.

const Binning kGapBinning = Binning::Simple(20, 0, 10)

Definition at line 82 of file helper_eff_spill.h.

const Binning kLengthBinning = Binning::Simple(42, -5.01, 100)

Definition at line 85 of file helper_eff_spill.h.

const SpillCut kNuESpillTruthCuts = kSpillVtxDistCut && kSpillSingleNu

Definition at line 169 of file helper_eff_spill.h.

const Binning kOpenAngleBinning = Binning::Simple(20, 0., 1)

Definition at line 84 of file helper_eff_spill.h.

const Binning kPEBinning = Binning::Simple(70, 0., 1400)

Definition at line 86 of file helper_eff_spill.h.

const Cut kSpillPreSelSlc = kSlcIsRecoNu && kPreNueSelND && kVtxDistMagCut && kSlcCompletenessCut

Definition at line 118 of file helper_eff_spill.h.

const Binning kTimeBinning = Binning::Simple(70, -3500, 3500)

Definition at line 87 of file helper_eff_spill.h.

std::vector<PlotDef> plots
Initial value:
= {
{ "count", "", Binning::Simple(3, 0, 3), kSpillCounting },
{ "nuEnergy", "True Neutrino Energy [GeV]", kEnergyBinningGeV, kNuEnergy },
{ "leptonEnergy", "True Lepton Energy [GeV]", kEnergyBinningGeV, kLeptonEnergy }
}
const SpillVar kLeptonEnergy([](const caf::SRSpillProxy *sr){return-5.f;for(auto const &prim:sr->mc.nu[0].prim){if(std::abs(prim.pdg)!=11 &&std::abs(prim.pdg)!=13) continue;return(float) prim.startE;}return-5.f;})
const Binning kEnergyBinningGeV
const SpillVar kNuEnergy([](const caf::SRSpillProxy *sr){float energy=(sr->mc.nnu!=1?-5.f:(float) sr->mc.nu[0].E);return energy;})
const SpillVar kSpillCounting
Definition: Vars.cxx:20

Definition at line 90 of file helper_eff_spill.h.

std::vector<SelDef> sels
Initial value:
= {
{ "spill_trueshowerenergy", "True Shower Energy", kNuESpillTruthCuts, kBlue },
{ "spill_crtVeto", "CRT Veto", kNuESpillTruthCuts&& kCRTHitVetoND, kBlue },
{ "spill_presel", "Pre Selection", kNuESpillTruthCuts&& kCRTHitVetoND&& kSpillPreSel, kBlue },
{ "spill_recosel", "Reco Selection", kNuESpillTruthCuts&& kCRTHitVetoND&& kSpillRecoSel, kBlue },
{ "spill_fullsel", "Full Selection", kNuESpillTruthCuts&& kCRTHitVetoND&& kSpillFullSel, kBlue },
}
const SpillCut kSpillPreSel([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return counter;})
const SpillCut kCRTHitVetoND([](const caf::SRSpillProxy *sr){for(auto const &crtHit:sr->crt_hits){return false;}return true;})
const SpillCut kNuESpillTruthCuts
const SpillCut kSpillRecoSel([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;if(kPreNueSelND(&slc)&&kRecoNueSel(&slc))++counter;}return counter;})
const SpillCut kSpillFullSel([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;if(kPreNueSelND(&slc)&&kRecoNueSel(&slc)&&kFullNueSel(&slc))++counter;}return counter;})

Definition at line 171 of file helper_eff_spill.h.

std::vector<SelDef> types
Initial value:
= {
{ "nuecc", "NuE CC", kNuECCSpill, kBlue + 1 },
{ "numucc", "NuMu CC", kNuMuCCSpill, kRed + 1 },
{ "nunc", "NC", kNCSpill, kOrange },
{ "othernu", "Other Nu", kOtherNuSpill, kOrange },
}
const SpillCut kNCSpill
const SpillCut kNuMuCCSpill([](const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!kSpillSingleNu(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==14 &&sr->mc.nu[0].iscc &&PtInVolAbsX(sr->mc.nu[0].position, fvndAbs));})
const SpillCut kOtherNuSpill([](const caf::SRSpillProxy *sr){return(kSpillSingleNu(sr)&&!(kCosmicSpill(sr)||kNuECCSpill(sr)||kNuMuCCSpill(sr)||kNCSpill(sr)));})
const SpillCut kNuECCSpill([](const caf::SRSpillProxy *sr){if(kCosmicSpill(sr)||!kSpillSingleNu(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==12 &&sr->mc.nu[0].iscc &&PtInVolAbsX(sr->mc.nu[0].position, fvndAbs)&&kSpillNuEEnergyCut(sr));})

Definition at line 160 of file helper_eff_spill.h.