All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions | Variables
AnaBasics/eventsel.h File Reference
#include "sbnana/CAFAna/Core/Binning.h"
#include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
#include "SBNAna/Vars/Vars.h"
#include "SBNAna/Vars/NumuVars.h"
#include "SBNAna/Cuts/NumuCuts.h"
#include "SBNAna/Cuts/TruthCuts.h"

Go to the source code of this file.

Classes

struct  PlotDef
 
struct  SelDef
 

Functions

const Var kCounting ([](const caf::SRSliceProxy *slc){return 1;})
 
const Var kPrimTrkCosth ([](const caf::SRSliceProxy *slc){int muIdx=kPrimMuonIdx(slc);if(muIdx< 0) return-5.;return(double) slc->reco.trk[muIdx].costh;})
 
const Var kPrimTrkCRTdist ([](const caf::SRSliceProxy *slc){int muIdx=kPrimMuonIdx(slc);if(muIdx< 0) return-5.;return(double) slc->reco.trk[muIdx].crthit.distance;})
 

Variables

std::vector< PlotDefplots
 
const Cut kSig = kIsNumu && !kIsNC
 
std::vector< SelDefsels
 

Function Documentation

const Var kCounting ( [] (const caf::SRSliceProxy *slc){return 1;}  )
const Var kPrimTrkCosth ( [] (const caf::SRSliceProxy *slc){int muIdx=kPrimMuonIdx(slc);if(muIdx< 0) return-5.;return(double) slc->reco.trk[muIdx].costh;}  )
const Var kPrimTrkCRTdist ( [] (const caf::SRSliceProxy *slc){int muIdx=kPrimMuonIdx(slc);if(muIdx< 0) return-5.;return(double) slc->reco.trk[muIdx].crthit.distance;}  )

Variable Documentation

const Cut kSig = kIsNumu && !kIsNC

Definition at line 69 of file AnaBasics/eventsel.h.

std::vector<PlotDef> plots
Initial value:
=
{{"count", "", Binning::Simple(3,0,3), kCounting},
{"mucosth", "cos#theta", Binning::Simple(50,-1,1), kPrimTrkCosth},
{"vtxx", "X (cm)", Binning::Simple(50,-200,200), kSlcVtxX},
{"vtxy", "Y (cm)", Binning::Simple(50,-200,200), kSlcVtxY},
{"vtxz", "Z (cm)", Binning::Simple(50,0,500), kSlcVtxZ},
{"mulen", "Primary Track Length", Binning::Simple(50,0,200), kPrimTrkLen},
{"mucrtdist", "Primary Track Distance to CRT hit", Binning::Simple(50,0,100), kPrimTrkCRTdist},
}
const Var kPrimTrkCRTdist([](const caf::SRSliceProxy *slc){int muIdx=kPrimMuonIdx(slc);if(muIdx< 0) return-5.;return(double) slc->reco.trk[muIdx].crthit.distance;})
const Var kPrimTrkCosth([](const caf::SRSliceProxy *slc) -> double{int muIdx=kPrimMuonIdx(slc);if(muIdx< 0) return-5.;return(double) slc->reco.trk[muIdx].costh;})
const Var kSlcVtxX([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.x;})
const Var kPrimTrkLen([](const caf::SRSliceProxy *slc) -> double{double len=-5.0;if(slc->reco.ntrk > 0){int muIdx=(int) kPrimMuonIdx(slc);if(muIdx >=0){len=slc->reco.trk[muIdx].len;}}return len;})
Definition: NumuVars.h:9
const Var kCounting
Definition: Vars.cxx:19
const Var kSlcVtxZ([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.z;})
const Var kSlcVtxY([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.y;})

Definition at line 48 of file AnaBasics/eventsel.h.

std::vector<SelDef> sels
Initial value:
=
{{"nocut", "All Slices", kNoCut, kBlack},
{"sig", "True NumuCC", kSig, kRed+1},
{"bkg", "Not NumuCC", !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

Definition at line 73 of file AnaBasics/eventsel.h.