All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Functions | Variables
NueVars.cxx File Reference
#include "sbnana/SBNAna/Vars/NueVars.h"
#include "sbnana/CAFAna/Core/Utilities.h"
#include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
#include <cassert>

Go to the source code of this file.

Namespaces

 ana
 Oscillation analysis framework, runs over CAF files outside of ART.
 

Functions

const caf::SRShowerProxy * ana::LargestRecoShower (const caf::SRSliceProxy *slc)
 Pointer to largest reconstructed shower, or null pointer if none exists. More...
 
const caf::SRTrackProxy * ana::LongestRecoTrack (const caf::SRSliceProxy *slc)
 Pointer to longest reconstructed shower, or null pointer if none exists. More...
 
const caf::SRTrkChi2PIDProxy * ana::BestPlaneChi2PID (const caf::SRTrackProxy *trk)
 
const caf::SRTrkChi2PIDProxy * ana::LongestTrackBestPlaneChi2PID (const caf::SRSliceProxy *slc)
 

Variables

const Var ana::kLargestRecoShowerIdx ([](const caf::SRSliceProxy *slc) -> int{int bestIdx(-1);double maxEnergy(-1);for(unsigned int i=0;i< slc->reco.nshw;i++){auto const &shw=slc->reco.shw[i];continue;if(shw.bestplane_energy > maxEnergy){bestIdx=i;maxEnergy=shw.bestplane_energy;}}return bestIdx;})
 
const Var ana::kRecoShower_BestEnergy ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->bestplane_energy):-5;})
 
const Var ana::kRecoShower_TruePdg ([](const caf::SRSliceProxy *slc) -> int{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?int(shw->truth.p.pdg):-5;})
 
const Var ana::kRecoShower_BestdEdx ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);if(!shw||shw->bestplane_dEdx< 0) return-5.;return shw->bestplane_dEdx;})
 
const Var ana::kRecoShower_ConversionGap ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->conversion_gap):-5.;})
 
const Var ana::kRecoShower_Density ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->density):-5.;})
 
const Var ana::kRecoShower_Energy ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->plane[1].energy):-5.;})
 
const Var ana::kRecoShower_Length ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->len):-5.;})
 
const Var ana::kRecoShower_OpenAngle ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?180.*shw->open_angle/M_PI:-5.;})
 
const Var ana::kRecoShower_StartX ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.x):-9999.;})
 
const Var ana::kRecoShower_StartY ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.y):-9999.;})
 
const Var ana::kRecoShower_StartZ ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->start.z):-9999.;})
 
const Var ana::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.;})
 
const Var ana::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.;})
 
const Var ana::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.;})
 
const Var ana::kRecoShower_densityGradient ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->selVars.densityGradient):-5.;})
 
const Var ana::kRecoShower_densityGradientPower ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->selVars.densityGradientPower):-5.;})
 
const Var ana::kRecoShower_trackLength ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->selVars.trackLength):-5.;})
 
const Var ana::kRecoShower_trackWidth ([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->selVars.trackWidth):-5.;})
 
const Var ana::kRecoShowers_EnergyCut ([](const caf::SRSliceProxy *slc) -> unsigned{unsigned int counter(0);for(auto const &shw:slc->reco.shw){++counter;}return counter;})
 
const Var ana::kLongestTrackIdx ([](const caf::SRSliceProxy *slc) -> int{int bestIdx(-1);double maxLength(-1);for(unsigned int i=0;i< slc->reco.ntrk;i++){auto const &trk=slc->reco.trk[i];continue;if(trk.len > maxLength){bestIdx=i;maxLength=trk.len;}}return bestIdx;})
 
const Var ana::kLongestTrackTruePdg ([](const caf::SRSliceProxy *slc) -> int{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);return trk?int(trk->truth.p.pdg):-5;})
 
const Var ana::kLongestTrackLength ([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);return trk?double(trk->len):-5.;})
 
const Var ana::kLongestTrackChi2Muon ([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrkChi2PIDProxy *chi2=LongestTrackBestPlaneChi2PID(slc);return chi2?double(chi2->chi2_muon):-5.;})
 
const Var ana::kLongestTrackChi2Pion ([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrkChi2PIDProxy *chi2=LongestTrackBestPlaneChi2PID(slc);return chi2?double(chi2->chi2_pion):-5.;})
 
const Var ana::kLongestTrackChi2Kaon ([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrkChi2PIDProxy *chi2=LongestTrackBestPlaneChi2PID(slc);return chi2?double(chi2->chi2_kaon):-5.;})
 
const Var ana::kLongestTrackChi2Proton ([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrkChi2PIDProxy *chi2=LongestTrackBestPlaneChi2PID(slc);return chi2?double(chi2->chi2_proton):-5.;})
 
const Var ana::kMuonTrackLength ([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);if(!trk) return-5;if(trk &&(kLongestTrackChi2Muon(slc)< 30.f &&kLongestTrackChi2Proton(slc) > 60.f)){return trk->len;}return-5;})
 
const Var ana::kLongestTrackDazzlePID ([](const caf::SRSliceProxy *slc) -> int{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);return trk?(int) trk->dazzle.pdg:-5;})
 
const Var ana::kLongestTrackDazzleMuonScore ([](const caf::SRSliceProxy *slc) -> float{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);return trk?(float) trk->dazzle.muonScore:-5.f;})
 
const Var ana::kRecoShowerRazzlePID ([](const caf::SRSliceProxy *slc) -> int{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?(int) shw->razzle.pdg:-5;})
 
const Var ana::kRecoShowerRazzleElectronScore ([](const caf::SRSliceProxy *slc) -> float{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?(float) shw->razzle.electronScore:-5.f;})