All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
helper_nuesel_icarus.h
Go to the documentation of this file.
1 #pragma once
2 
5 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
6 
7 #include "SBNAna/Vars/Binnings.h"
8 #include "SBNAna/Vars/NueVars.h"
10 #include "SBNAna/Vars/Vars.h"
11 #include "SBNAna/Cuts/Cuts.h"
12 #include "SBNAna/Cuts/NueCuts.h"
13 #include "SBNAna/Cuts/TruthCuts.h"
14 
15 #include "TStyle.h"
16 
17 using namespace ana;
18 
19 Color_t color_eff = kGreen+2;
20 Color_t color_pur = kOrange+2;
21 Color_t color_nue = kBlue-7;
22 Color_t color_numu = kGreen+1;
23 Color_t color_nc = kMagenta;
24 Color_t color_other = kOrange+8;
25 Color_t color_cos = kGray+2;
26 Style_t line_nue = kSolid;
27 Style_t line_numu = kSolid;
28 Style_t line_nc = kDashed;
29 Style_t line_other = kDotted;
30 Style_t line_cos = kSolid;
31 
32 const int limitN1 = 13; // N1 cuts start at 13 position in the sels object
33 
34 // These are examples of useful structs to making a bunch of Spectra
35 // Plot structure
36 struct PlotDef
37 {
38  std::string suffix = "";
39  std::string label = "";
40  Binning bins = Binning::Simple(3,0,3);
41  Var var = kCounting;
42 };
43 
45 {
46  std::string suffix = "";
47  std::string label = "";
48  Binning bins = Binning::Simple(3,0,3);
50 };
51 
53 {
54  std::string suffix = "";
55  std::string label = "";
56  Binning bins = Binning::Simple(3,0,3);
58 };
59 
60 // Selection structure
61 struct SelDef
62 {
63  std::string suffix = "";
64  std::string label = "";
65  Cut cut = kNoCut;
66  int color = kBlack;
67 };
68 
70 {
71  std::string suffix = "";
72  std::string label = "";
74  int color = kBlack;
75 };
76 
77 // Define all the variables and cuts first, including binnings
78 const Binning kEnergyBinning = Binning::Simple(40,0.,3.); // to define
79 const Binning kDedxBinning = Binning::Simple(40,0.,10); // to define
84 const Binning kPEBinning = Binning::Simple(60,0.,600);
85 const Binning kTimeBinning = Binning::Simple(155,-1550.,1550.);
86 const Binning kFlashBinning = Binning::Simple(40,-6.f,34.f);
87 
88 const Cut kNueCC = kIsNue && !kIsNC;
89 const Cut kNumuCC = kIsNumu && !kIsNC;
90 const Cut kNC = kIsNC;
91 const Cut kTotal = kNoCut; // Get the total and substract everything else when plotting
93 
94 // Step by step cuts
98 
99 // N-1 cuts: apply all except one cut
100 // // AllCuts = kContainedFD && kNueFlashScoreFDCut && kNuePandoraScoreFDCut && kRecoShower && kNueNumShowersCut && kShowerdEdxCut && kShowerConvGapCut && kNueTrackLenCut && kShowerDensityCut && kShowerEnergyCut;
112 
118 
119 const SpillCut kContainedSpill([](const caf::SRSpillProxy* sr) {
120 
121  unsigned int counter(0);
122  for (auto const& slc : sr->slc) {
123  if (slc.tmatch.index < 0)
124  continue;
125  if (kContained(&slc))
126  ++counter;
127  }
128 
129  return counter;
130 });
131 
132 const SpillCut kFlashMatchSpillCut([](const caf::SRSpillProxy* sr) {
133 
134  unsigned int counter(0);
135  for (auto const& slc : sr->slc) {
136  if (slc.tmatch.index < 0)
137  continue;
138  if (kSlcFlashMatchCut(&slc))
139  ++counter;
140  }
141 
142  return counter;
143 });
144 
145 const SpillCut kNuScoreSpillCut([](const caf::SRSpillProxy* sr) {
146 
147  unsigned int counter(0);
148  for (auto const& slc : sr->slc) {
149  if (slc.tmatch.index < 0)
150  continue;
151  if (kSlcNuScore(&slc))
152  ++counter;
153  }
154 
155  return counter;
156 });
157 
158 const SpillCut kRecoSpillCut([](const caf::SRSpillProxy* sr) {
159 
160  unsigned int counter(0);
161  for (auto const& slc : sr->slc) {
162  if (slc.tmatch.index < 0)
163  continue;
164  if (kRecoCut(&slc))
165  ++counter;
166  }
167 
168  return counter;
169 });
170 
171 const SpillCut kFullSpillCut([](const caf::SRSpillProxy* sr) {
172 
173  unsigned int counter(0);
174  for (auto const& slc : sr->slc) {
175  if (slc.tmatch.index < 0)
176  continue;
177  if (kFullCut(&slc))
178  ++counter;
179  }
180 
181  return counter;
182 });
183 
184 // ----------------------------------------------------------------------------------------------
185 // Plots
186 std::vector<PlotDef> plots_slice =
187  {{"count", "Number of slices", Binning::Simple(3,0,3), kCounting},
188  {"openangle", "Opening angle", kOpenAngleBinning, kRecoShower_OpenAngle},
189  {"startx", "Shower start position X (cm)", kPositionXFDBinning, kRecoShower_StartX},
190  {"starty", "Shower start position Y (cm)", kPositionYFDBinning, kRecoShower_StartY},
191  {"startz", "Shower start position Z (cm)", kPositionZFDBinning, kRecoShower_StartZ},
192  {"endx", "Shower end position X (cm)", kPositionXFDBinning, kRecoShower_EndX},
193  {"endy", "Shower end position Y (cm)", kPositionYFDBinning, kRecoShower_EndY},
194  {"endz", "Shower end position Z (cm)", kPositionZFDBinning, kRecoShower_EndZ},
195  {"vtxx", "Slice vertex X (cm)", kPositionXFDBinning, kSlcVtxX},
196  {"vtxy", "Slice vertes Y (cm)", kPositionYFDBinning, kSlcVtxY},
197  {"vtxz", "Slice vertex Z (cm)", kPositionZFDBinning, kSlcVtxZ},
198  {"conversion", "Conversion gap (cm)", kGapBinning, kRecoShower_ConversionGap},
199  {"bestdedx", "Best plane dEdx (MeV)", kDedxBinning, kRecoShower_BestdEdx},
200  {"bestenergy", "Best plane energy (MeV)", kEnergyBinning, kRecoShower_BestEnergy},
201  {"density", "Shower density (MeV/cm)", kDensityBinning, kRecoShower_Density},
202  {"energy", "Shower energy (MeV)", kNueEnergyBinning, kRecoShower_Energy},
203  {"lengthshw", "Shower length (cm)", kLengthBinning, kRecoShower_Length},
204  {"lengthtrk", "Track length (cm)", kLengthBinning, kLongestTrackLength},
205  {"nuscore", "Pandora #nu score", kBDTBinning, kSlcNuScore},
206  {"flashscore", "Flash score", kFlashBinning, kSlcFlashScore},
207  {"truthenergy","True #nu energy (GeV)", kLowEnergyGeVBinning, kTruthEnergy},
208  };
209 
210 std::vector<PlotDefSpill> plots_spill =
211  {{"count", "Number of spills", Binning::Simple(3,0,3), kSpillCounting},
212  { "nuenergy", "True Neutrino Energy (GeV)", kLowEnergyGeVBinning, kTruthNuEnergy },
213  { "leptonenergy", "True Lepton Energy (GeV)", kLowEnergyGeVBinning, kTruthLeptonEnergy }
214 };
215 
216 std::vector<PlotDefMultiVar> crtplots_spill =
217  {{"crtx", "CRT Hit Position X (cm)", kCRTXFDBinning, kCRTHitX},
218  {"crty", "CRT Hit Position Y (cm)", kCRTYFDBinning, kCRTHitY},
219  {"crtz", "CRT Hit Position Z (cm)", kCRTZFDBinning, kCRTHitZ},
220  {"crttime", "CRT Hit Time (#mus)", kTimeBinning, kCRTHitTimeFD},
221  {"crtpe", "CRT PE", kPEBinning, kCRTHitPE}
222 };
223 
224 // ----------------------------------------------------------------------------------------------
225 // Interaction types
226 std::vector<SelDef> types_slice =
227 {
228  {"nue", "NuE CC", kSlcIsRecoNu&&kNueCC, color_nue},
229  {"numu", "NuMu CC", kSlcIsRecoNu&&kNumuCC, color_numu},
230  {"nunc", "NC", kSlcIsRecoNu&&kNC, color_nc},
231  {"total", "Total", kSlcIsRecoNu, color_other},
232  {"cosmic", "Cosmic", kSlcIsRecoNu&&kThisCosmic, color_cos}
233 };
234 
235 std::vector<SelDefSpill> types_spill =
236 {
237  {"nue", "NuE CC", kNueCCSpill, color_nue}, // kSlcIsRecoNu is already included in the spill cuts from sels_spill
238  {"numu", "NuMu CC", kNumuCCSpill, color_numu},
239  {"nunc", "NC", kNCSpill, color_nc},
240  {"total", "Total", kTotalSpill, color_other},
241  {"cosmic", "Cosmic", kThisCosmicSpill, color_cos}
242 };
243 
244 // ----------------------------------------------------------------------------------------------
245 // Cuts
246 std::vector<SelDef> sels_slice ={
247  {"nocut", "No cut", kNoCut, kBlack},
248  {"cont", "Containment", kContained, kBlack},
249  {"flash", "Flash score", kSlcFlashMatchCut, kBlack},
250  {"pandnu", "Neutrino score", kSlcNuScoreCut, kBlack},
251  // Subcuts that go into the fd reco cut
252  {"recoshw", "Reconstructed shower", kRecoShower, kBlack},
253  {"nshws", "Number of showers", kNueNumShowersCut, kBlack},
254  {"dedx", "Shower dE/dx", kShowerdEdxCut, kBlack},
255  {"convgap", "Conversion gap", kShowerConvGapCut, kBlack},
256  {"trklen", "Track lenght", kNueTrackLenCut, kBlack},
257  {"density", "Shower density", kShowerDensityCut, kBlack},
258  {"energy", "Shower energy", kShowerEnergyCut, kBlack},
259  {"recocut", "Reconstruction (all)", kRecoCut, kBlack},
260  {"everything", "Full selection", kFullCut, kBlack},
261  // N-1 cuts
262  {"N1cont", "N1 Containment", kN1Contained, kBlack},
263  {"N1flash", "N1 Flash score", kN1Flash, kBlack},
264  {"N1pandnu", "N1 Neutrino score", kN1Pandora, kBlack},
265  {"N1recoshw", "N1 Reconstructed shower", kN1RecoShower, kBlack},
266  {"N1nshws", "N1 Number of showers", kN1NumShowers, kBlack},
267  {"N1dedx", "N1 Shower dE/dx", kN1Dedx, kBlack},
268  {"N1convgap", "N1 Conversion gap", kN1ConvGap, kBlack},
269  {"N1trklen", "N1 Track length", kN1TrkLen, kBlack},
270  {"N1density", "N1 Shower density", kN1Density, kBlack},
271  {"N1energy", "N1 Shower energy", kN1Energy, kBlack},
272  {"N1recocut", "N1 Reconstruction (all)", kN1Reco, kBlack}
273  };
274 
275 std::vector<SelDefSpill> sels_spill ={
276  {"nospillcut", "No spill cut", kNoSpillCut, kBlack},
277  {"contspill", "Containment spill", kContainedSpill, kBlack},
278  {"flashspill", "Flash score spill", kFlashMatchSpillCut, kBlack},
279  {"pandnuspill", "Neutrino score spill", kNuScoreSpillCut, kBlack},
280  {"recocutspill", "Reconstruction (all) spill", kRecoSpillCut, kBlack},
281  {"everythingspill", "Full selection spill", kFullSpillCut, kBlack}
282  };
283 
284 std::vector<SelDefSpill> crtsels_spill =
285  {{"nocut_spill", "All Slices", kNoSpillCut, kBlack},
286  {"crtveto_spill", "CRTVeto", kCRTHitVetoFD, kBlue}
287  };
Style_t line_nue
const Binning kLengthBinning
const SpillCut kIsCosmicSpill([](const caf::SRSpillProxy *sr){return(sr->mc.nnu==0);})
const Cut kShowerConvGapCut([](const caf::SRSliceProxy *slc){const int largestShwIdx(kLargestRecoShowerIdx(slc));return false;return(slc->reco.shw[largestShwIdx].conversion_gap< 3.25f);})
Definition: NueCuts.h:22
const Cut kNoCut([](const caf::SRSliceProxy *){return true;})
The simplest possible cut: pass everything, used as a default.
Color_t color_cos
std::vector< PlotDef > plots_slice
const Cut kN1Reco
std::vector< SelDef > types_slice
const Binning kCRTXFDBinning
Definition: Binnings.cxx:36
Color_t color_nc
std::vector< SelDefSpill > types_spill
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 SpillCut kNueCCSpill
const Cut kShowerDensityCut([](const caf::SRSliceProxy *slc){const int largestShwIdx(kLargestRecoShowerIdx(slc));return false;return(slc->reco.shw[largestShwIdx].density > 4.5);})
Definition: NueCuts.h:23
const Cut kIsNC([](const caf::SRSliceProxy *slc){return kHasMatchedNu(slc)&&slc->truth.isnc;})
Is this a Neutral Current event?
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:18
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
Color_t color_pur
const Binning kTimeBinning
std::vector< SelDefSpill > sels_spill
const Binning kDensityBinning
const Binning kCRTYFDBinning
Definition: Binnings.cxx:37
const SpillMultiVar kCRTHitTimeFD([](const caf::SRSpillProxy *sr){std::vector< double > times;for(const auto &hit:sr->crt_hits){auto thistime=hit.time-1600.;times.push_back(thistime);}return times;})
Definition: Vars.h:20
Style_t line_cos
const SpillCut kNCSpill
const Binning kEnergyBinning
const Binning kBDTBinning
Definition: Binnings.cxx:40
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 kSlcFlashScore([](const caf::SRSliceProxy *slc) -> double{return((bool) kSlcHasFlash(slc)?(float) slc->fmatch.score:-5.f);})
Definition: Vars.h:35
const int limitN1
const Cut kSlcFlashMatchCut([](const caf::SRSliceProxy *slc){return(kSlcHasFlashMatch(slc)&&slc->fmatch.score >0 &&slc->fmatch.score< 6);})
const Var kTruthEnergy([](const caf::SRSliceProxy *slc) -> double{return(kHasTruthMatch(slc)?(float) slc->truth.E:-5.f);})
Definition: TruthVars.h:10
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
process_name opflashCryoW ana
const Cut kShowerEnergyCut([](const caf::SRSliceProxy *slc){const int largestShwIdx(kLargestRecoShowerIdx(slc));return false;return(slc->reco.shw[largestShwIdx].bestplane_energy > 0.2f);})
Definition: NueCuts.h:20
const Binning kLowEnergyGeVBinning
Definition: Binnings.cxx:26
Color_t color_eff
const SpillCut kThisCosmicSpill
const Cut kIsNue([](const caf::SRSliceProxy *slc){return slc->truth.index >=0 &&abs(slc->truth.pdg)==12;})
const SpillCut kNuScoreSpillCut([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return counter;})
const Cut kContainedFD
const Var kSlcVtxX([](const caf::SRSliceProxy *slc) -> double{return slc->vertex.x;})
Definition: Vars.h:30
const Cut kN1ConvGap
const SpillVar kTruthNuEnergy([](const caf::SRSpillProxy *sr) -> double{return(sr->mc.nnu!=1?-5.f:(float) sr->mc.nu[0].E);})
Definition: TruthVars.h:22
const SpillCut kRecoSpillCut([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return counter;})
const Var kSlcVtxY([](const caf::SRSliceProxy *slc) -> double{return slc->vertex.y;})
Definition: Vars.h:31
std::vector< SelDefSpill > crtsels_spill
Definition: demo.h:63
const SpillCut kContainedSpill([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return counter;})
const Cut kTotal
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 Cut kN1Flash
const Cut kHasNu([](const caf::SRSliceProxy *slc){return slc->truth.index >=0;})
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 Cut kFullCut
const SpillCut kIsNueSpill([](const caf::SRSpillProxy *sr){if(kIsCosmicSpill(sr)||!kIsSingleNuSpill(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==12);})
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
Definition: counter.h:285
const SpillCut kTotalSpill
const Binning kPositionXFDBinning
Definition: Binnings.cxx:32
const Cut kNueFlashScoreFDCut
Definition: NueCuts.h:42
const Var kSlcVtxZ([](const caf::SRSliceProxy *slc) -> double{return slc->vertex.z;})
Definition: Vars.h:32
const Cut kSlcIsRecoNu([](const caf::SRSliceProxy *slc){return!slc->is_clear_cosmic;})
Style_t line_numu
const Cut kN1RecoShower
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 Cut kIsNumu([](const caf::SRSliceProxy *slc){return slc->truth.index >=0 &&abs(slc->truth.pdg)==14;})
caf::Proxy< caf::StandardRecord > SRSpillProxy
Definition: EpilogFwd.h:3
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 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 Cut kN1Pandora
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
Color_t color_numu
const Cut kSlcNuScoreCut([](const caf::SRSliceProxy *slc){return(kSlcIsRecoNu(slc)&&slc->nu_score >0.4);})
const SpillCut kNoSpillCut([](const caf::SRSpillProxy *){return true;})
The simplest possible cut: pass everything, used as a default.
const SpillCut kNumuCCSpill
const Cut kNueTrackLenCut([](const caf::SRSliceProxy *slc){return kLongestTrackLength(slc)< 110.f;})
Definition: NueCuts.h:13
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
Style_t line_nc
const Binning kPositionYFDBinning
Definition: Binnings.cxx:33
const Binning kNueEnergyBinning
Definition: Binnings.cxx:22
const Cut kN1TrkLen
const Cut kN1Energy
const Binning kDedxBinning
const SpillCut kIsNCSpill([](const caf::SRSpillProxy *sr){if(kIsCosmicSpill(sr)||!kIsSingleNuSpill(sr)) return false;return((bool) sr->mc.nu[0].isnc);})
const Cut kContained
const Cut kNuePandoraScoreFDCut
Definition: NueCuts.h:43
const Binning kPositionZFDBinning
Definition: Binnings.cxx:34
std::vector< PlotDefSpill > plots_spill
const Cut kShowerdEdxCut([](const caf::SRSliceProxy *slc){const int largestShwIdx(kLargestRecoShowerIdx(slc));return false;return(slc->reco.shw[largestShwIdx].bestplane_dEdx< 3.625f);})
Definition: NueCuts.h:21
const Cut kNumuCC
Definition: demo.h:45
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 SpillCut kIsNumuSpill([](const caf::SRSpillProxy *sr){if(kIsCosmicSpill(sr)||!kIsSingleNuSpill(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==14);})
const Binning kGapBinning
const Var kCounting
Definition: Vars.cxx:19
const Cut kRecoShower([](const caf::SRSliceProxy *slc){const int largestShwIdx(kLargestRecoShowerIdx(slc));return false;return(slc->reco.shw[largestShwIdx].bestplane_energy > 0.f &&slc->reco.shw[largestShwIdx].bestplane_dEdx > 0.f &&slc->reco.shw[largestShwIdx].conversion_gap > 0.f);})
Definition: NueCuts.h:8
const Binning kFlashBinning
Neutral-current interactions.
Definition: IPrediction.h:39
const SpillVar kSpillCounting
Definition: Vars.cxx:20
const Cut kRecoShowerFD
Definition: NueCuts.h:44
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 Cut kNueCC
const Binning kCRTZFDBinning
Definition: Binnings.cxx:38
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 Cut kN1Contained
const Cut kN1NumShowers
std::vector< SelDef > sels_slice
std::vector< PlotDefMultiVar > crtplots_spill
const Cut kRecoCut
const Cut kNueFD
Definition: NueCuts.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 kSlcNuScore([](const caf::SRSliceProxy *slc) -> double{return slc->nu_score;})
Definition: Vars.h:33
const Cut kN1Density
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
Definition: Binning.cxx:38
const SpillCut kCRTHitVetoFD([](const caf::SRSpillProxy *sr){for(auto const &crtHit:sr->crt_hits){auto thistime=crtHit.time-1600.;return false;}return true;})
const SpillVar kTruthLeptonEnergy([](const caf::SRSpillProxy *sr) -> double{if(sr->mc.nnu!=1) 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 prim.startE;}return-5.f;})
Definition: TruthVars.h:23
const Cut kThisCosmic
const SpillCut kFullSpillCut([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return counter;})
const SpillCut kFlashMatchSpillCut([](const caf::SRSpillProxy *sr){unsigned int counter(0);for(auto const &slc:sr->slc){continue;++counter;}return counter;})
Style_t line_other
const Cut kNueNumShowersCut([](const caf::SRSliceProxy *slc){return((unsigned int) kRecoShowers_EnergyCut(slc)==1);})
Definition: NueCuts.h:18
Color_t color_other
Color_t color_nue
const Cut kN1Dedx
const Var kLongestTrackLength([](const caf::SRSliceProxy *slc) -> double{const caf::SRTrackProxy *trk=LongestRecoTrack(slc);return trk?double(trk->len):-5.;})
Definition: NueVars.h:34