All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NueVars.h
Go to the documentation of this file.
1 #pragma once
2 // Specific variables for the Nue event selection.
3 
5 
6 namespace ana
7 {
8  // Reconstructed variables
9  extern const Var kLargestRecoShowerIdx;
11  extern const Var kRecoShower_BestdEdx;
13  extern const Var kRecoShower_Density;
14  extern const Var kRecoShower_Energy;
15  extern const Var kRecoShower_Length;
16  extern const Var kRecoShower_OpenAngle;
17  extern const Var kRecoShower_StartX;
18  extern const Var kRecoShower_StartY;
19  extern const Var kRecoShower_StartZ;
20  extern const Var kRecoShower_EndX;
21  extern const Var kRecoShower_EndY;
22  extern const Var kRecoShower_EndZ;
23 
28 
29  extern const Var kRecoShower_TruePdg;
30  extern const Var kLongestTrackTruePdg;
32 
33  extern const Var kLongestTrackIdx;
34  extern const Var kLongestTrackLength;
35  extern const Var kLongestTrackChi2Muon;
36  extern const Var kLongestTrackChi2Pion;
37  extern const Var kLongestTrackChi2Kaon;
39 
40  extern const Var kMuonTrackLength;
41 
44  extern const Var kRecoShowerRazzlePID;
46 } // namespace
47 
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 Var kRecoShower_trackLength([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->selVars.trackLength):-5.;})
Definition: NueVars.h:26
const Var kLongestTrackChi2Proton([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrkChi2PIDProxy *chi2=LongestTrackBestPlaneChi2PID(slc);return chi2?double(chi2->chi2_proton):-5.;})
Definition: NueVars.h:38
const Var kRecoShower_trackWidth([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->selVars.trackWidth):-5.;})
Definition: NueVars.h:27
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
process_name opflashCryoW ana
const Var kRecoShowers_EnergyCut([](const caf::SRSliceProxy *slc) -> unsigned{unsigned int counter(0);for(auto const &shw:slc->reco.shw){++counter;}return counter;})
Definition: NueVars.h:31
const Var kLongestTrackDazzleMuonScore([](const caf::SRSliceProxy *slc) -> float{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);return trk?(float) trk->dazzle.muonScore:-5.f;})
Definition: NueVars.h:43
const Var 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;})
Definition: NueVars.h:40
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 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 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;})
Definition: NueVars.h:9
const Var kLongestTrackChi2Pion([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrkChi2PIDProxy *chi2=LongestTrackBestPlaneChi2PID(slc);return chi2?double(chi2->chi2_pion):-5.;})
Definition: NueVars.h:36
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 Var kRecoShowerRazzlePID([](const caf::SRSliceProxy *slc) -> int{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?(int) shw->razzle.pdg:-5;})
Definition: NueVars.h:44
const Var kLongestTrackChi2Muon([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrkChi2PIDProxy *chi2=LongestTrackBestPlaneChi2PID(slc);return chi2?double(chi2->chi2_muon):-5.;})
Definition: NueVars.h:35
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 Var kLongestTrackTruePdg([](const caf::SRSliceProxy *slc) -> int{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);return trk?int(trk->truth.p.pdg):-5;})
Definition: NueVars.h:30
const Var 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;})
Definition: NueVars.h:33
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 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 kRecoShower_densityGradientPower([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->selVars.densityGradientPower):-5.;})
Definition: NueVars.h:25
const Var kRecoShowerRazzleElectronScore([](const caf::SRSliceProxy *slc) -> float{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?(float) shw->razzle.electronScore:-5.f;})
Definition: NueVars.h:45
const Var 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;})
Definition: NueVars.h:11
const Var kLongestTrackDazzlePID([](const caf::SRSliceProxy *slc) -> int{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);return trk?(int) trk->dazzle.pdg:-5;})
Definition: NueVars.h:42
const Var kLongestTrackChi2Kaon([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrkChi2PIDProxy *chi2=LongestTrackBestPlaneChi2PID(slc);return chi2?double(chi2->chi2_kaon):-5.;})
Definition: NueVars.h:37
const Var kRecoShower_TruePdg([](const caf::SRSliceProxy *slc) -> int{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?int(shw->truth.p.pdg):-5;})
Definition: NueVars.h:29
const Var kRecoShower_densityGradient([](const caf::SRSliceProxy *slc) -> double{const caf::SRShowerProxy *shw=LargestRecoShower(slc);return shw?double(shw->selVars.densityGradient):-5.;})
Definition: NueVars.h:24
const Var kLongestTrackLength([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);return trk?double(trk->len):-5.;})
Definition: NueVars.h:34