validation_numu_nd.C
Go to the documentation of this file.
1 // Fills spectra for systematic error band
2 
3 #include "CAFAna/Cuts/Cuts.h"
5 #include "CAFAna/Core/Binning.h"
6 #include "CAFAna/Core/Spectrum.h"
7 #include "CAFAna/Core/Var.h"
9 #include "CAFAna/Systs/Systs.h"
12 #include "CAFAna/Cuts/SpillCuts.h"
13 #include "CAFAna/Analysis/Plots.h"
14 #include "CAFAna/Analysis/Style.h"
15 #include "CAFAna/Vars/HistAxes.h"
16 //#include "Utilities/rootlogon.C"
17 
18 #include "TCanvas.h"
19 #include "TFile.h"
20 #include "TGraph.h"
21 #include "TH1.h"
22 #include "TH2.h"
23 #include "TMath.h"
24 #include "TGaxis.h"
25 #include "TMultiGraph.h"
26 #include "TLegend.h"
27 #include "TLatex.h"
28 #include "TStyle.h"
29 #include "THStack.h"
30 #include "TPaveText.h"
31 #include "TList.h"
32 #include "TGaxis.h"
33 #include "TAttLine.h"
34 #include "TAttMarker.h"
36 
37 #include <cmath>
38 #include <iostream>
39 #include <vector>
40 #include <list>
41 #include <sstream>
42 #include <string>
43 #include <sstream>
44 #include <fstream>
45 #include <iomanip>
46 
47 
48 using namespace ana;
49 
50 // Put a "NOvA Preliminary" tag in the corner
51 void Preliminary(){
52  TLatex* prelim = new TLatex(.9, .95, "NO#nuA Preliminary");
53  prelim->SetTextColor(kBlue);
54  prelim->SetNDC();
55  prelim->SetTextSize(2/30.);
56  prelim->SetTextAlign(32);
57  prelim->Draw();
58 }
59 
60 
62  int pos = 0;
63  for (size_t i=0; i<name.size(); i++){
64  if(name[i] == '/') pos = i;
65  }
66  std::string tmp = name.substr(pos+1, name.size());
67  return tmp.substr(0, tmp.size()-5) + "_web.root";
68 
69 }
70 
71 template<class T> class Tangible{
72 
73 public:
74  Tangible(const T& obj, const std::string& shortName,
75  const std::string& blurb ):
76  fObj(obj),
77  fShortName(shortName),
78  fBlurb(blurb)
79  {};
80 
81  T fObj;
84 
85 };
86 
87 
90 
91 
92 class UsefulHist{
93 
94 public:
95 
96  UsefulHist(Selection sel, TangibleAxis tanAxis, SpectrumLoader& loaderMC, const Cut& bkg=kNoCut):
97  fSel(sel),
98  fAxis(tanAxis),
99  fHist(loaderMC, fAxis.fObj, fSel.fObj),
100  fName(tanAxis.fShortName + "_" + sel.fShortName){};
101 
102  Selection fSel;
106 
107 };
108 
109 
111 {
112 
113 
114  std::cout << "\n\n\n"
115  << "This script appears to be quite old. I've hacked some stuff to remove qepid, but I doubt it will run out of the box."
116  << "\n\n"
117  << "If you choose to run it, best of luck to you..."
118  << "\n\n\n";
119 
120 
121  gStyle->SetMarkerStyle(kFullCircle);
122  TGaxis::SetMaxDigits(3);
123  //std::string fnameMC ("/nova/ana/users/tamsett/data/sam_definitions/hadd_rocco_decaf_S15-05-22_nd_genie_fhc_nonswap_genierw_numu_contain.root");
124  std::string fnameMC ("/nova/ana/nu_e_ana/concat/prod_decaf_S15-05-22a_fd_genie_fhc_fluxswap_fdfluxv08_numu_contain.root");
125  std::string path = "numu/Validation/";
126  std::string fnameOutput = path + GetOutputFileName(fnameMC);
127 
128  SpectrumLoader loaderMC(fnameMC);
129 
130  TH1D* spillHist = new TH1D("spills", ";Detector;Spills", 3, 0, 3);
131  SpillVar spillRun([](const caf::SRSpill* spill) {return spill->det;});
132 
134  loaderMC.AddSpillHistogram(spillHist, spillRun, kStandardSpillCuts);
135 
136  const Binning kXYBins = Binning::Simple(55,-2.20,2.20);
137  const Binning kZBins = Binning::Simple(32, 0,16.00);
138  const Binning kEnergyBinning = Binning::Simple(50,0,5);
140 
141  std::vector<Selection> selections;
142 
143  selections.emplace_back(kNumuContainND && kNumuQuality, "NumuContainND",
144  "Selected events pass numu containment and slice quality cuts. ");
145  selections.emplace_back(kNumuContainND && kNumuQuality && kNumuNCRej, "NumuND",
146  "Selected events pass numu containment, slice quality, and ReMId cuts. ");
147 
148  std::vector<TangibleAxis> variables;
149 
150  variables.emplace_back(
151  HistAxis("Reconstructed Neutrino Energy [GeV]", kEnergyBinning, kCCE),
152  "numuE", "CC energy estimator. ");
153 
154  variables.emplace_back(
155  HistAxis("Slice N_{Hit}", Binning::Simple(50, 0, 500), kNHit),
156  "slcNHit", "Number of hits in slice. " );
157 
158  variables.emplace_back(
159  HistAxis("Slice Calorimetric Energy [GeV]", kEnergyBinning, kCaloE),
160  "calE", "Calorimetric energy of slice. " );
161 
162  variables.emplace_back(
163  HistAxis("Reconstructed Hadronic Energy [GeV]", kHadronicEnergyBinning, kHadE),
164  "hadE", "Hadronic enery, i.e. numu energy estimate minus muon track energy. " );
165 
166  variables.emplace_back(
167  HistAxis("Muon Track Energy [GeV]", Binning::Simple(50, 0, 5), kMuE),
168  "numuTrackE", "Muon track Energy. " );
169 
170  variables.emplace_back(
171  HistAxis("Average Hadronic Energy Per Hit [GeV]", Binning::Simple(40, 0, 0.04), kHadEPerNHit),
172  "hadEPerNHit", "Average energy per hit in hadronic cluster, i.e. had_E/had_n_hit. " );
173 
174  variables.emplace_back(
175  HistAxis("Average Track Energy Per Hit [GeV]", Binning::Simple(40, 0, 0.04), kTrkEPerNHit),
176  "trkEPerNHit", "Average energy per hit on primary track, i.e. trk_E/trk_n_hit. " );
177 
178  variables.emplace_back(
179  HistAxis("Hadronic N_{Hit}", Binning::Simple(50, 0, 100), kHadNHit),
180  "hadNHit", "Number of hits in hadronic cluster. ");
181 
182  variables.emplace_back(
183  HistAxis("Off-track Calorimetric Hadronic Energy [GeV]", kHadronicEnergyBinning, kNumuHadCalE),
184  "hadcalE", "Sum of calibrated energy deposits in hadronic cluster. " );
185 
186  variables.emplace_back(
187  HistAxis("On-track Hadronic Energy [GeV]", Binning::Simple(50, 0, 0.5), kNumuHadTrkE),
188  "hadTrkE", "Hadronic Energy in active region, on the track. " );
189 
190  variables.emplace_back(
191  HistAxis("Visible On-track Hadronic Energy [GeV]", kHadronicEnergyBinning, kNumuHadVisE),
192  "hadVisE", "Hadronic Energy in active region, on the track. " );
193 
194  variables.emplace_back(
195  HistAxis("Slice Maximum Y [m]", kXYBins, kSlcMaxY),
196  "maxy", "Maximum Y position of slice. " );
197 
198  variables.emplace_back(
199  HistAxis("Number of Tracks in Slice", Binning::Simple(14, 1, 15), kNKalman),
200  "nkal", "Number of tracks in slice. " );
201 
202  variables.emplace_back(
203  HistAxis("Number of Hits in Slice", Binning::Simple(50, 0, 500), kNHit),
204  "nhit", "Number of hits in slice. " );
205 
206  variables.emplace_back(
207  HistAxis("Track Start X Position [m]", kXYBins, kTrkStartX),
208  "trkStartX", "Track start x position. " );
209 
210  variables.emplace_back(
211  HistAxis("Track Start Y Position [m]", kXYBins, kTrkStartY),
212  "trkStartY", "Track start y position. " );
213 
214  variables.emplace_back(
215  HistAxis("Track Start Z Position [m]", kZBins, kTrkStartZ),
216  "trkStartZ", "Track start z position. " );
217 
218  variables.emplace_back(
219  HistAxis("Track End X Position [m]", kXYBins, kTrkEndX),
220  "trkEndX", "Track stop x position. " );
221 
222  variables.emplace_back(
223  HistAxis("Track End Y Position [m]", kXYBins, kTrkEndY),
224  "trkEndY", "Track stop y position. " );
225 
226  variables.emplace_back(
227  HistAxis("Track End Z Position [m]", kZBins, kTrkEndZ),
228  "trkEndZ", "Track stop z position. " );
229 
230  variables.emplace_back(
231  HistAxis("Slice Duration [ns]", Binning::Simple(50,0,500), kSliceDuration),
232  "sliceDuration", "Slice duration. " );
233 
234  variables.emplace_back(
235  HistAxis("Number of Hits in Primary Track", Binning::Simple(50,0,500), kTrkNhits),
236  "trkNhits", "Number of hits on primary track. ");
237 
238  variables.emplace_back(
239  HistAxis("Muon Track Length [m]", Binning::Simple(50,0,16), kTrkLength),
240  "trkLength", "Primary track length. " );
241 
242  variables.emplace_back(
243  HistAxis("ReMId Input: Scattering Log-likelihood", Binning::Simple(50,-0.5,0.5), kReMIdScatLLH),
244  "scatLL", "ReMId scattering log log-likelihood for primary track. " );
245 
246  variables.emplace_back(
247  HistAxis("ReMId Input: dE/dx Log-likelihood", Binning::Simple(50,-3,1), kReMIdDEDxLLH),
248  "dedxLL", "ReMId dE/dx log log-likelihood for primary track. " );
249 
250  variables.emplace_back(
251  HistAxis("ReMId Input: Non-hadronic Plane Fraction", Binning::Simple(50,0,1), kReMIdMeasFrac),
252  "nonHadPlaneFrac", "ReMId Non-hadronic plane fraction. " );
253 
254  variables.emplace_back(
255  HistAxis("ReMId", kRemidBinning, kRemID),
256  "remid", "ReMId kNN score. " );
257 
258  variables.emplace_back(
259  HistAxis("Number of Uncalibrated Hits in Slice", Binning::Simple(50, 0, 50), kSlcUnCalibNHit),
260  "slcUnCalibNHit", "Uncalibrated slice nhit. " );
261 
262  variables.emplace_back(
263  HistAxis("Slice Mean Time [#mus]", Binning::Simple(60, -50, 550), kSlcMeanTime),
264  "slcMeanTime", "Slice mean time TNS in microseconds. " );
265 
266  variables.emplace_back(
267  HistAxis("Slice Start Time [#mus]", Binning::Simple(60, -50, 550), kSlcStartTime),
268  "slcStartTime", "Slice start time TNS in microseconds. " );
269 
270  variables.emplace_back(
271  HistAxis("Slice End Time [#mus]", Binning::Simple(60, -50, 550), kSlcEndTime),
272  "slcEndTime", "Slice end time TNS in microseconds. " );
273 
274  variables.emplace_back(
275  HistAxis("Slice Minimum X [m]", kXYBins, kSlcMinX),
276  "slcMinX", "Slice Min X [m]. " );
277 
278  variables.emplace_back(
279  HistAxis("Slice Minimum Y [m]", kXYBins, kSlcMinY),
280  "slcMinY", "Slice Min Y [m]. " );
281 
282  variables.emplace_back(
283  HistAxis("Slice Minimum Z [m]", kZBins, kSlcMinZ),
284  "slcMinZ", "Slice Min Z [m]. " );
285 
286  variables.emplace_back(
287  HistAxis("Slice Maximum X [m]", kXYBins, kSlcMaxX),
288  "slcMaxX", "Slice Max X [m]. " );
289 
290  variables.emplace_back(
291  HistAxis("Slice Maximum Y [m]", kXYBins, kSlcMaxY),
292  "slcMaxY", "Slice Max Y [m]. " );
293 
294  variables.emplace_back(
295  HistAxis("Slice Maximum Z [m]", kZBins, kSlcMaxZ),
296  "slcMaxZ", "Slice Max Z [m]. " );
297 
298  variables.emplace_back(
299  HistAxis("Slice Extent X [m]", Binning::Simple(55, 0, 4.4), kSlcExtentX),
300  "slcExtentX", "Slice Extent X [m]. " );
301 
302  variables.emplace_back(
303  HistAxis("Slice Extent Y [m]", Binning::Simple(55, 0, 4.4), kSlcExtentY),
304  "slcExtentY", "Slice Extent Y [m]. " );
305 
306  variables.emplace_back(
307  HistAxis("Slice Extent Z [m]", Binning::Simple(18, 0, 16), kSlcExtentZ),
308  "slcExtentZ", "Slice Extent Z [m]. " );
309 
310  variables.emplace_back(
311  HistAxis("Kalman Track Cos #theta_{X}", Binning::Simple(100, -1, 1), kDirX),
312  "dirX", "X-direction of muon track. " );
313 
314  variables.emplace_back(
315  HistAxis("Kalman Track Cos #theta_{Y}", Binning::Simple(100, -1, 1), kDirY),
316  "dirY", "Y-direction of muon track. " );
317 
318  variables.emplace_back(
319  HistAxis("Kalman Track Cos #theta_{Z}", Binning::Simple(50, 0, 1), kDirZ),
320  "dirZ", "Z-direction of muon track. " );
321 
322  variables.emplace_back(
323  HistAxis("Kalman Track Cos #theta_{NuMI}", Binning::Simple(50, 0, 1), kCosNumi),
324  "cosNumi", "Beam direction of muon track. " );
325 
326  variables.emplace_back(
327  HistAxis("Number of Missing Planes in Kalman Track", Binning::Simple(50, 0, 50),
328  kTrkNPlaneGap),
329  "trkNPlaneGap", "Track N Plane Gap. " );
330 
331  variables.emplace_back(
332  HistAxis("Visible Slice Energy Per Hit [GeV]", Binning::Simple(40, 0, 0.04),
334  "slcCalEPerNHit", "Slice Energy Per Slice NHit. " );
335 
336 
337 
338  std::vector<UsefulHist> hists;
339  hists.reserve(selections.size() * variables.size());
340 
341  for(const auto& sel:selections){
342  for(const auto& variable:variables){
343  hists.emplace_back(sel, variable, loaderMC);
344  }
345  }
346 
347  loaderMC.Go();
348  double pot = hists[0].fHist.POT();
349 
350  TFile inputfile(fnameMC.c_str(), "READ");
351  TFile outputfile(fnameOutput.c_str(), "RECREATE");
352 
353  for(const auto& hist:hists){
354  TH1 *temp = hist.fHist.ToTH1(pot);
355  std::string tempName = hist.fName;
356  temp->Write(tempName.c_str());
357  }
358 
359  TH1F *pothist = new TH1F("TotalPOT", "TotalPOT", 1, 0, 1);
360  TH1F *evthist = new TH1F("TotalEvents", "TotalEvents", 1, 0, 1);
361  pothist->SetBinContent(1, pot);
362  evthist->SetBinContent(1, spillHist->GetEntries());
363  pothist->Write("TotalPOT");
364  evthist->Write("TotalEvents");
365 
366  inputfile.Close();
367  outputfile.Close();
368 
369 }
const Var kHadE
Definition: NumuVars.h:23
const Var kHadNHit([](const caf::SRProxy *sr){unsigned int nought=0;if(sr->trk.kalman.ntracks< 1) return nought;return sr->slc.nhit-sr->trk.kalman.tracks[0].nhit;})
Definition: NumuVars.h:61
const XML_Char * name
Definition: expat.h:151
const Var kNKalman
Definition: NumuVars.cxx:540
_HistAxis< Var > HistAxis
Definition: HistAxis.h:103
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:16
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kReMIdScatLLH
Definition: NumuVars.cxx:555
const Var kSlcMeanTime([](const caf::SRProxy *sr){return sr->slc.meantime/1000.;})
Definition: NumuVars.h:83
const Var kNumuHadTrkE
Definition: NumuVars.cxx:539
const Binning kRemidBinning
Binning for plotting remid attractively.
Definition: Binning.cxx:80
const Var kSlcMaxZ([](const caf::SRProxy *sr){return sr->slc.boxmax.Z()/100.;})
Definition: NumuVars.h:93
const Var kSlcCalEPerNHit([](const caf::SRProxy *sr){if(sr->slc.nhit > 0) return sr->slc.calE/(1.78 *sr->slc.nhit);return-5.;})
Definition: NumuVars.h:101
const Var kSlcMaxY([](const caf::SRProxy *sr){return sr->slc.boxmax.Y()/100.;})
Definition: NumuVars.h:92
const Var kTrkStartY([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].start.Y()/100;})
Definition: NumuVars.h:52
std::string fShortName
Definition: DataMCPair.h:47
Tangible< Cut > Selection
Definition: DataMCPair.h:52
void Preliminary()
const Var kSliceDuration([](const caf::SRProxy *sr){return(sr->slc.endtime-sr->slc.starttime);})
Definition: NumuVars.h:35
const Var kSlcExtentY([](const caf::SRProxy *sr){return(sr->slc.boxmax.Y()-sr->slc.boxmin.Y())/100.;})
Definition: NumuVars.h:96
Float_t tmp
Definition: plot.C:36
void SetSpillCut(const SpillCut &cut)
const Var kTrkEPerNHit([](const caf::SRProxy *sr){return(sr->trk.kalman.tracks[0].calE/sr->trk.kalman.tracks[0].nhit);})
TString hists[nhists]
Definition: bdt_com.C:3
Det_t det
Detector, ND = 1, FD = 2, NDOS = 3.
Definition: SRSpill.h:29
const Var kReMIdMeasFrac
Definition: NumuVars.cxx:557
const Var kDirZ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].dir.Z();})
Definition: NumuVars.h:39
const Var kTrkLength([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].len/100;})
Definition: NumuVars.h:65
const Var kSlcMinX([](const caf::SRProxy *sr){return sr->slc.boxmin.X()/100.;})
Definition: NumuVars.h:87
const Var kHadEPerNHit([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return 0.0f;int nHit=sr->slc.nhit-sr->trk.kalman.tracks[0].nhit;if(nHit<=0) return 0.0f;float hadE=sr->energy.numu.hadcalE;return hadE/nHit;})
Definition: NumuVars.h:63
const Var kNumuHadVisE([](const caf::SRProxy *sr){return kNumuHadCalE(sr)+kNumuHadTrkE(sr);})
Definition: NumuVars.h:124
const Var kSlcMaxX([](const caf::SRProxy *sr){return sr->slc.boxmax.X()/100.;})
Definition: NumuVars.h:91
const Cut kNumuContainND([](const caf::SRProxy *sr){return( sr->trk.kalman.ntracks > sr->trk.kalman.idxremid &&sr->slc.ncellsfromedge > 1 &&sr->slc.firstplane > 1 &&sr->slc.lastplane< 212 &&sr->trk.kalman.tracks[0].start.Z()< 1150 &&( sr->trk.kalman.tracks[0].stop.Z()< 1275 ||sr->sel.contain.kalyposattrans< 55) &&( sr->energy.numu.ndhadcalcatE +sr->energy.numu.ndhadcaltranE)< 0.03 &&sr->sel.contain.kalfwdcellnd > 4 &&sr->sel.contain.kalbakcellnd > 8);})
Definition: NumuCuts.h:22
const Var kDirY([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].dir.Y();})
Definition: NumuVars.h:38
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
const Var kNumuHadCalE
Definition: NumuVars.cxx:538
TangibleAxis fAxis
const Var kSlcMinY([](const caf::SRProxy *sr){return sr->slc.boxmin.Y()/100.;})
Definition: NumuVars.h:88
std::string GetOutputFileName(std::string &name)
const Var kRemID
PID
Definition: Vars.cxx:81
virtual void AddSpillHistogram(TH1 *h, const SpillVar &var, const SpillCut &cut, const SpillVar &wei=kSpillUnweighted)
Uses include counting the total POT or spills in a run.
const Var kCaloE
Summed calorimetric energy of all hits in slice, uncorrected.
Definition: Vars.cxx:52
Tangible(const T &obj, const std::string &shortName, const std::string &blurb)
const Binning kHadronicEnergyBinning
const Var kNHit
Definition: Vars.cxx:71
const Var kTrkStartZ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].start.Z()/100;})
Definition: NumuVars.h:53
Tangible< HistAxis > TangibleAxis
Definition: DataMCPair.h:53
const Var kCCE
Definition: NumuVars.h:21
const Binning kEnergyBinning
#define pot
UsefulHist(Selection sel, TangibleAxis tanAxis, SpectrumLoader &loaderMC, const Cut &bkg=kNoCut)
const Var kSlcStartTime([](const caf::SRProxy *sr){return sr->slc.starttime/1000.;})
Definition: NumuVars.h:84
const Binning kXYBins
Definition: VarsAndCuts.h:95
virtual void Go() override
Load all the registered spectra.
const Cut kNumuNCRej([](const caf::SRProxy *sr){return(sr->sel.remid.pid >0.75);})
Definition: NumuCuts.h:24
void validation_numu_nd()
TLatex * prelim
Definition: Xsec_final.C:133
const Var kTrkStartX([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].start.X()/100;})
Definition: NumuVars.h:51
const Var kTrkEndZ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].stop.Z()/100;})
Definition: NumuVars.h:57
OStream cout
Definition: OStream.cxx:6
std::string fBlurb
Definition: DataMCPair.h:46
const std::string path
Definition: plot_BEN.C:43
std::string fName
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
const Var kTrkNPlaneGap([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks > 0 &&sr->trk.kalman.idxremid!=999) return int(sr->trk.kalman.tracks[0].nplanegap);return 500;})
Definition: NumuVars.h:99
const Var kTrkEndY([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].stop.Y()/100;})
Definition: NumuVars.h:56
const Var kTrkEndX([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].stop.X()/100;})
Definition: NumuVars.h:55
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
const Var kSlcEndTime([](const caf::SRProxy *sr){return sr->slc.endtime/1000.;})
Definition: NumuVars.h:85
const Var kDirX([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].dir.X();})
Definition: NumuVars.h:37
string shortName
THUMBNAIL BLOCK: We need to make a thumbnail for each.
const Var kReMIdDEDxLLH
Definition: NumuVars.cxx:556
string tempName
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
double T
Definition: Xdiff_gwt.C:5
const Var kSlcExtentX([](const caf::SRProxy *sr){return(sr->slc.boxmax.X()-sr->slc.boxmin.X())/100.;})
Definition: NumuVars.h:95
const Cut kNumuQuality
Definition: NumuCuts.h:18
Template for Var and SpillVar.
const Var kMuE
Definition: NumuVars.h:22
const Var kSlcExtentZ([](const caf::SRProxy *sr){return(sr->slc.boxmax.Z()-sr->slc.boxmin.Z())/100.;})
Definition: NumuVars.h:97
const Binning kZBins
Definition: VarsAndCuts.h:96
const Var kSlcUnCalibNHit([](const caf::SRProxy *sr){return sr->slc.nhit-sr->slc.ncalhit;})
Definition: NumuVars.h:81
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
Definition: Binning.cxx:114
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.
Definition: Cut.h:109
const Var kCosNumi([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks > 0 &&sr->trk.kalman.idxremid!=999){if(sr->hdr.det==1){return sr->trk.kalman.tracks[0].dir.Dot(beamDirND);}if(sr->hdr.det==2){return sr->trk.kalman.tracks[0].dir.Dot(beamDirFD);}}return-5.f;})
Definition: NumuVars.h:43
const Var kSlcMinZ([](const caf::SRProxy *sr){return sr->slc.boxmin.Z()/100.;})
Definition: NumuVars.h:89
const Var kTrkNhits([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return 65535;return int(sr->trk.kalman.tracks[0].nhit);})
Definition: NumuVars.h:59