All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions | Variables
helper.h File Reference
#include "sbnana/CAFAna/Core/Binning.h"
#include "sbnana/CAFAna/Core/Cut.h"
#include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
#include "SBNAna/Vars/Binnings.h"
#include "SBNAna/Vars/NueVars.h"
#include "SBNAna/Vars/Vars.h"
#include "SBNAna/Cuts/Cuts.h"
#include "SBNAna/Cuts/NueCuts.h"
#include "SBNAna/Cuts/TruthCuts.h"

Go to the source code of this file.

Classes

struct  PlotDef
 
struct  PlotDefSpill
 
struct  SelDef
 
struct  SelDefSpill
 

Functions

const Cut kShortShower ([](const caf::SRSliceProxy *slc){if(slc->reco.nshw >0){return(slc->reco.shw[0].len< 30.);}return false;})
 

Variables

const Binning kGapBinning = Binning::Simple(22,-1,10)
 
const Binning kDensityBinning = Binning::Simple(20,0.,10)
 
const Binning kOpenAngleBinning = Binning::Simple(20,0.,2)
 
const Binning kLengthBinning = Binning::Simple(40,0.,200)
 
const Binning kPEBinning = Binning::Simple(70,0.,1400)
 
const Binning kTimeBinning = Binning::Simple(70,0.,3500)
 
std::vector< PlotDefplots
 
std::vector< PlotDefSpillplots_spill
 
const Cut kSig = kIsNue && !kIsNC
 
const Cut kContained = kNueContainedFD
 
std::vector< SelDefsels
 
std::vector< SelDefSpillsels_spill
 

Function Documentation

const Cut kShortShower ( [] (const caf::SRSliceProxy *slc){if(slc->reco.nshw >0){return(slc->reco.shw[0].len< 30.);}return false;}  )

Variable Documentation

const Cut kContained = kNueContainedFD

Definition at line 89 of file helper.h.

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

Definition at line 35 of file helper.h.

const Binning kGapBinning = Binning::Simple(22,-1,10)

Definition at line 34 of file helper.h.

const Binning kLengthBinning = Binning::Simple(40,0.,200)

Definition at line 37 of file helper.h.

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

Definition at line 36 of file helper.h.

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

Definition at line 38 of file helper.h.

const Cut kSig = kIsNue && !kIsNC

Definition at line 88 of file helper.h.

const Binning kTimeBinning = Binning::Simple(70,0.,3500)

Definition at line 39 of file helper.h.

std::vector<PlotDef> plots
Initial value:
=
{{"count", "", Binning::Simple(3,0,3), kCounting},
{"bestenergy", "Best plane energy (GeV)", kLowEnergyBinningGeV, kRecoShower_BestEnergy},
{"conversion", "Conversion gap (cm)", kGapBinning, kRecoShower_ConversionGap},
{"density", "Shower density (MeV/cm)", kDensityBinning, kRecoShower_Density},
{"energy", "Energy (MeV)", kNueEnergyBinning, kRecoShower_Energy},
{"length", "Length (cm)", kLengthBinning, kRecoShower_Length},
{"openangle", "Opening angle", kOpenAngleBinning, kRecoShower_OpenAngle},
{"startx", "Shower start position X (cm)", kPositionXFDBinning, kRecoShower_StartX},
{"starty", "Shower start position Y (cm)", kPositionYFDBinning, kRecoShower_StartY},
{"startz", "Shower start position Z (cm)", kPositionZFDBinning, kRecoShower_StartZ},
{"endx", "Shower end position X (cm)", kPositionXFDBinning, kRecoShower_EndX},
{"endy", "Shower end position Y (cm)", kPositionYFDBinning, kRecoShower_EndY},
{"endz", "Shower end position Z (cm)", kPositionZFDBinning, kRecoShower_EndZ},
{"vtxx", "Slice vertex X (cm)", kPositionXFDBinning, kSlcVtxX},
{"vtxy", "Slice vertes Y (cm)", kPositionYFDBinning, kSlcVtxY},
{"vtxz", "Slice vertex Z (cm)", kPositionZFDBinning, kSlcVtxZ}
}
const Binning kLengthBinning
const Var kRecoShower_EndX([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.x+shw->dir.x *shw->len):-9999.;})
Definition: NueVars.h:20
const Var kRecoShower_OpenAngle([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?180.*shw->open_angle/M_PI:-5.;})
Definition: NueVars.h:16
const Binning kDensityBinning
const Var kRecoShower_StartX([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.x):-9999.;})
Definition: NueVars.h:17
const Var kRecoShower_StartY([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.y):-9999.;})
Definition: NueVars.h:18
const Binning kOpenAngleBinning
const Var kRecoShower_BestEnergy([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->bestplane_energy):-5;})
Definition: NueVars.h:10
const Binning kPositionXFDBinning
Definition: Binnings.cxx:32
const Var kRecoShower_EndY([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.y+shw->dir.y *shw->len):-9999.;})
Definition: NueVars.h:21
const Var kRecoShower_Length([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->len):-5.;})
Definition: NueVars.h:15
const Var kRecoShower_Energy([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->plane[1].energy):-5.;})
Definition: NueVars.h:14
const Var kRecoShower_StartZ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.z):-9999.;})
Definition: NueVars.h:19
const Binning kPositionYFDBinning
Definition: Binnings.cxx:33
const Binning kNueEnergyBinning
Definition: Binnings.cxx:22
const Var kSlcVtxX([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.x;})
const Binning kPositionZFDBinning
Definition: Binnings.cxx:34
const Var kRecoShower_Density([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->density):-5.;})
Definition: NueVars.h:13
const Binning kGapBinning
const Var kCounting
Definition: Vars.cxx:19
const Var kRecoShower_EndZ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.z+shw->dir.z *shw->len):-9999.;})
Definition: NueVars.h:22
const Var kSlcVtxZ([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.z;})
const Var kRecoShower_ConversionGap([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->conversion_gap):-5.;})
Definition: NueVars.h:12
const Var kSlcVtxY([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.y;})

Definition at line 43 of file helper.h.

std::vector<PlotDefSpill> plots_spill
Initial value:
=
{{"crtx", "CRT Hit Position X (cm)", kPositionXFDBinning, kCRTHitX},
{"crty", "CRT Hit Position Y (cm)", kPositionYFDBinning, kCRTHitY},
{"crtz", "CRT Hit Position Z (cm)", kPositionZFDBinning, kCRTHitZ},
{"crttime", "CRT Hit Time (xs)", kTimeBinning, kCRTHitTime},
{"crtpe", "CRT PE", kPEBinning, kCRTHitPE}
}
const SpillMultiVar kCRTHitTime([](const caf::SRSpillProxy *sr){std::vector< double > times;for(const auto &hit:sr->crt_hits){times.push_back(hit.time);}return times;})
Definition: Vars.h:19
const SpillMultiVar kCRTHitX([](const caf::SRSpillProxy *sr){std::vector< double > positions;for(const auto &hit:sr->crt_hits){positions.push_back(hit.position.x);}return positions;})
Definition: Vars.h:15
const Binning kTimeBinning
const SpillMultiVar kCRTHitPE([](const caf::SRSpillProxy *sr){std::vector< double > pes;for(const auto &hit:sr->crt_hits){pes.push_back(hit.pe);}return pes;})
Definition: Vars.h:18
const Binning kPositionXFDBinning
Definition: Binnings.cxx:32
const SpillMultiVar kCRTHitY([](const caf::SRSpillProxy *sr){std::vector< double > positions;for(const auto &hit:sr->crt_hits){positions.push_back(hit.position.y);}return positions;})
Definition: Vars.h:16
const Binning kPEBinning
const SpillMultiVar kCRTHitZ([](const caf::SRSpillProxy *sr){std::vector< double > positions;for(const auto &hit:sr->crt_hits){positions.push_back(hit.position.z);}return positions;})
Definition: Vars.h:17
const Binning kPositionYFDBinning
Definition: Binnings.cxx:33
const Binning kPositionZFDBinning
Definition: Binnings.cxx:34

Definition at line 62 of file helper.h.

std::vector<SelDef> sels
Initial value:
=
{{"nocut", "All Slices", kNoCut, kBlack},
{"sig", "True NumuCC", kSig, kRed+1},
{"bkg", "Not NumuCC", !kSig, kAzure+2},
{"cont", "Contained", kContained, kBlack},
{"sig_cont", "Contained Signal", kContained && kSig, kRed+1},
{"bkg_cont", "Contained Bkg", kContained && !kSig, kAzure+2},
{"uncont", "Uncontained", !kContained, kBlack},
{"sig_uncont", "Uncontained Signal", !kContained && kSig, kRed+1},
{"bkg_uncont", "Uncontained Bkg", !kContained && !kSig, kAzure+2}
}
const Cut kNoCut([](const caf::SRSliceProxy *){return true;})
The simplest possible cut: pass everything, used as a default.
const Cut kSig
Definition: demo.h:73
const Cut kContained

Definition at line 102 of file helper.h.

std::vector<SelDefSpill> sels_spill
Initial value:
=
{{"nocut_spill", "All Slices", kNoSpillCut, kBlack},
{"event_spill", "First Events", kFirstEvents, kRed+1},
{"flash_spill", "Pass flash Trigger", kFlashTrigger, kAzure+2}
}
const SpillCut kFirstEvents
Definition: Cuts.cxx:14
const SpillCut kNoSpillCut([](const caf::SRSpillProxy *){return true;})
The simplest possible cut: pass everything, used as a default.
const SpillCut kFlashTrigger([](const caf::SRSpillProxy *sr){return(sr->pass_flashtrig);})

Definition at line 114 of file helper.h.