DataMCLoad.C
Go to the documentation of this file.
1 // A macro for ND data/MC comparisons
2 // Aaron Markowitz
3 
4 #include "CAFAna/Core/HistAxis.h"
5 #include "CAFAna/Core/Loaders.h"
7 #include "CAFAna/Core/Spectrum.h"
8 #include "NuXAna/Cuts/NusCuts.h"
12 #include "CAFAna/Vars/HistAxes.h"
13 #include "CAFAna/Vars/Vars.h"
15 #include "NuXAna/Vars/HistAxes.h"
16 
17 using namespace ana;
18 
19 std::pair<Spectrum*, CheatDecomp*> make_pair(
20  SpectrumLoaderBase& loader_data,
21  SpectrumLoaderBase& loader_mc,
22  HistAxis* axis,
23  Cut* cut,
24  const SystShifts& shift,
25  const Var& wei
26 );
27 
28 std::map<std::string, std::pair<Spectrum*, CheatDecomp*> > MakeMap(
29  SpectrumLoaderBase& loader_data,
30  SpectrumLoaderBase& loader_mc,
31  std::map<std::string, HistAxis* > axes,
32  std::map<std::string, Cut* > cuts,
33  const SystShifts& shift,
34  const Var& wei
35 );
36 
37 std::map<std::string, std::pair<Spectrum*, CheatDecomp*> > MakeMap(
38  Loaders& loader,
39  std::map<std::string, HistAxis*> axes,
40  std::map<std::string, Cut*> cuts,
41  const SystShifts& shift,
42  const Var& wei
43 );
44 
45 void DataMCLoad()
46 {
47  TH1::AddDirectory(0);
48 
49  // Strings to file paths
50  //const std::string fneardata = "defname: prod_caf_R16-03-03-prod2reco.d_nd_numi_fhc_full_v1_goodruns with limit 10";
51  //const std::string fneardatafull = "prod_caf_R16-03-03-prod2reco.d_nd_numi_fhc_full_v1_goodruns";
52  const std::string fneardatafull = "defname: prod_caf_R16-11-12-feature_caf_size.a_nd_numi_fhc_full_v1_goodruns with limit 1";
53  //const std::string fnamenearcaftest = "defname: prod_caf_R16-03-03-prod2reco.a_nd_genie_nonswap_genierw_fhc_nova_v08_full_v1 with limit 10";
54  //const std::string fnearcaffull = "prod_caf_R16-03-03-prod2reco.a_nd_genie_nonswap_genierw_fhc_nova_v08_full_v1";
55  const std::string fnearcaffull = "defname: prod_caf_R16-11-12-feature_caf_size.a_nd_genie_nonswap_genierw_fhc_nova_v08_full_v1 with limit 1";
56 
57  // Set up a Loaders object
58  // For full SA data and MC filesets, use 'fneardatafull' and 'fnamenearcaf' respectively
62 
63  // Axis definitions
64  std::string labelHpP = "Hits per Plane";
65  std::string labelGap = "Primary Shower Gap to Vertex (cm)";
66  std::string labelVtxX = "X Vertex Position (cm)";
67  std::string labelVtxY = "Y Vertex Position (cm)";
68  std::string labelVtxZ = "Z Vertex Position (cm)";
69  std::string labelCont = "Minimum Distance to Any Detector Face (cm)";
70  std::string labelHits = "Number of Hits";
71  std::string labelCVN = "CVN NC Classifier";
72  std::string labelLID = "LID";
73  std::string labelRemID = "RemID";
74  std::string labelNCP = "NumucontPID";
75  std::string labelPTP = "p_{T}/p";
76  std::string labelIsMuon = "Is Muon";
77  std::string labelEPerHit = "Average E/Hit (GeV)";
78  std::string labelTop = "Distance to Top of Detector (cm)";
79 
80  Binning kNCAllEBins = Binning::Simple(24, 0, 6);
81  Binning kGapBins = Binning::Simple(25, 0., 200.);
82  Binning kXYBinsND = Binning::Simple(100, -250., 250.);
83  Binning kZBinsND = Binning::Simple(410, -50., 2000.);
84  Binning kNearEdgeBins = Binning::Simple(160, 0., 800.);
85  Binning kFinePIDBins = Binning::Simple(100, 0., 1.);
86  Binning kHitBins = Binning::Simple(800, 0., 800.);
87  Binning kEDepBins = Binning::Simple(200, 0., 0.2);
88  Binning kHpPBins = Binning::Simple(10, 0., 10.);
89 
90  const Var kGap(
91  [](const caf::SRProxy* sr){
92  if(sr->vtx.elastic.fuzzyk.nshwlid > 0) {
93  return sr->vtx.elastic.fuzzyk.gap;
94  }
95  float output = 999.;
96  return output;
97  });
98  const Var kHpP = SIMPLEVAR(sel.nuecosrej.hitsperplane);
99 
100  const Var kRecoVtxX(
101  [](const caf::SRProxy* sr)
102  {
103  if(!sr->vtx.elastic.IsValid) { return 9000.f; }
104  return sr->vtx.elastic.vtx.X();
105  });
106  const Var kRecoVtxY(
107  [](const caf::SRProxy* sr)
108  {
109  if(!sr->vtx.elastic.IsValid) { return 9000.f; }
110  return sr->vtx.elastic.vtx.Y();
111  });
112  const Var kRecoVtxZ(
113  [](const caf::SRProxy* sr)
114  {
115  if(!sr->vtx.elastic.IsValid) { return 9000.f; }
116  return sr->vtx.elastic.vtx.Z();
117  });
118 
119  const Var kMinDistP(
120  [](const caf::SRProxy* sr)
121  {
122  const caf::SRNueCosRej& cr = sr->sel.nuecosrej;
123  float mindist = 10000.;
124  mindist = std::min(mindist, std::min(cr.starteast, cr.stopeast));
125  mindist = std::min(mindist, std::min(cr.startwest, cr.stopwest));
126  mindist = std::min(mindist, std::min(cr.starttop, cr.stoptop));
127  mindist = std::min(mindist, std::min(cr.startbottom, cr.stopbottom));
128  mindist = std::min(mindist, std::min(cr.startfront, cr.stopfront));
129  mindist = std::min(mindist, std::min(cr.startback, cr.stopback));
130  return (mindist > 9999. ? (float)-1. : mindist);
131  });
132 
133  const Var kNCP = SIMPLEVAR(sel.cosrej.numucontpid);
134  const Var kPartPTP(
135  [](const caf::SRProxy* sr)
136  {
137  if(std::isnan(sr->sel.nuecosrej.partptp)) { return -5.f; }
138  return sr->sel.nuecosrej.partptp;
139  });
140  const Var kIsMuon([](const caf::SRProxy* sr)
141  {
142  if(sr->vtx.elastic.fuzzyk.nshwlid < 1) { return -1; }
143  return sr->vtx.elastic.fuzzyk.png[0].shwlid.lid.ismuon;
144  });
145  const Var kEPerHit(
146  [](const caf::SRProxy* sr)
147  {
148  double nhit = (double)sr->slc.nhit;
149  if(nhit <= 0.) { return 0.; }
150  return sr->slc.calE/nhit;
151  });
152  const Var kDistTop(
153  [](const caf::SRProxy* sr)
154  {
156  });
157 
158  const HistAxis kNCAllEAxis("Calorimetric Energy (GeV)", kNCAllEBins, kCaloE);
159  const HistAxis kAxisHpP( labelHpP, kHpPBins, kHpP);
160  const HistAxis kAxisGap( labelGap, kGapBins, kGap);
161  const HistAxis kAxisVtxX(labelVtxX, kXYBinsND, kRecoVtxX);
162  const HistAxis kAxisVtxY(labelVtxY, kXYBinsND, kRecoVtxY);
163  const HistAxis kAxisVtxZ(labelVtxZ, kZBinsND, kRecoVtxZ);
164  const HistAxis kAxisCont(labelCont, kNearEdgeBins, kMinDistP);
165  const HistAxis kAxisCVN( labelCVN, kFinePIDBins, kCVNnc);
166  const HistAxis kAxisLID( labelLID, kFinePIDBins, kElecID);
167  const HistAxis kAxisRem( labelRemID, kRemidBinning, kRemID);
168  const HistAxis kAxisNHit(labelHits, kHitBins, kNHit);
169  const HistAxis kAxisNCP( labelNCP, kFinePIDBins, kNCP);
170  const HistAxis kAxisPTP( labelPTP, kFinePIDBins, kPartPTP);
171  const HistAxis kAxisIsMu(labelIsMuon, kBooleanBins, kIsMuon);
172  const HistAxis kAxisEpH( labelEPerHit, kEDepBins, kEPerHit);
173  const HistAxis kAxisTop( labelTop, kNearEdgeBins, kDistTop);
174 
175  // Two intermediate cuts, created from cuts in NusCuts.h
176  const Cut kEQFid = kNusEventQuality && kNusNDFiducial;
177  const Cut kPreselNCSel = kNusNDPresel && kNusNCSel;
178 
179  const Cut kNM1Fid = kNusEventQuality && kNusNDContain && kNusCosRejMod && kNusNCSel;
180  const Cut kNM1Cont = kNusEventQuality && kNusNDFiducial && kNusCosRejMod && kNusNCSel;
181  const Cut kNM1NCSel = kNusNDPresel && kNusCosRejMod;
182  const Cut kNM1CosRej = kNusNDPresel && kNusNCSel;
183 
184  const Cut kFidMinusX(
185  [](const caf::SRProxy* sr)
186  {
187  if(!sr->vtx.elastic.IsValid) return false;
188 
189  const TVector3 vtx = sr->vtx.elastic.vtx;
190  if(vtx.Y() < -100.0) return false;
191  if(vtx.Y() > 100.0) return false;
192  if(vtx.Z() < 200.0) return false;
193  if(vtx.Z() > 1000.0) return false;
194  return true;
195  });
196  const Cut kFidMinusY(
197  [](const caf::SRProxy* sr)
198  {
199  if(!sr->vtx.elastic.IsValid) return false;
200 
201  const TVector3 vtx = sr->vtx.elastic.vtx;
202  if(vtx.X() < -100.0) return false;
203  if(vtx.X() > 100.0) return false;
204  if(vtx.Z() < 200.0) return false;
205  if(vtx.Z() > 1000.0) return false;
206  return true;
207  });
208  const Cut kFidMinusZ(
209  [](const caf::SRProxy* sr)
210  {
211  if(!sr->vtx.elastic.IsValid ) return false;
212 
213  const TVector3 vtx = sr->vtx.elastic.vtx;
214  if(vtx.X() < -100.0) return false;
215  if(vtx.X() > 100.0) return false;
216  if(vtx.Y() < -100.0) return false;
217  if(vtx.Y() > 100.0) return false;
218  return true;
219  });
220 
221  const Cut kNCSelMinusHit(
222  [](const caf::SRProxy* sr)
223  {
224  if(sr->sel.cvn.ncid < 0.2) return false;
225  return true;
226  });
227  const Cut kNCSelMinusCVN(
228  [](const caf::SRProxy* sr)
229  {
230  if(sr->slc.nhit >= 200) return false;
231  if(sr->slc.nhit < 20) return false;
232  return true;
233  });
234 
235  const Cut kCosRejMinusPTP(
236  [](const caf::SRProxy* sr)
237  {
238  if(sr->vtx.elastic.fuzzyk.nshwlid == 0) return false;
239  if(sr->vtx.elastic.fuzzyk.png[0].shwlid.lid.ismuon == 1) return false;
240  double nhit = (double)sr->slc.nhit;
241  if(nhit <= 0.) return false;
242  if(sr->slc.calE/nhit <= 0.009) return false;
243  return true;
244  });
245  const Cut kCosRejMinusIsM(
246  [](const caf::SRProxy* sr)
247  {
248  double partptp = sr->sel.nuecosrej.partptp;
249  if(partptp >= 0.8) return false;
250  double nhit = (double)sr->slc.nhit;
251  if(nhit <= 0.) return false;
252  if(sr->slc.calE/nhit <= 0.009) return false;
253  return true;
254  });
255  const Cut kCosRejMinusEpH(
256  [](const caf::SRProxy* sr)
257  {
258  double partptp = sr->sel.nuecosrej.partptp;
259  if(sr->vtx.elastic.fuzzyk.nshwlid == 0) return false;
260  if(partptp >= 0.8) return false;
261  if(sr->vtx.elastic.fuzzyk.png[0].shwlid.lid.ismuon == 1) return false;
262  return true;
263  });
264 
265  // set up the axes map
266  std::map<std::string, HistAxis*> axes;
267  axes["ECal"] = new HistAxis(kNCAxis);
268  axes["ECalLong"] = new HistAxis(kNCAllEAxis);
269  axes["HitpPlane"] = new HistAxis(kAxisHpP);
270  axes["Gap"] = new HistAxis(kAxisGap);
271  axes["VtxX"] = new HistAxis(kAxisVtxX);
272  axes["VtxY"] = new HistAxis(kAxisVtxY);
273  axes["VtxZ"] = new HistAxis(kAxisVtxZ);
274  axes["Cont"] = new HistAxis(kAxisCont);
275  axes["CVN"] = new HistAxis(kAxisCVN);
276  axes["RemID"] = new HistAxis(kAxisRem);
277  axes["LID"] = new HistAxis(kAxisLID);
278  axes["NHit"] = new HistAxis(kAxisNHit);
279  axes["EpH"] = new HistAxis(kAxisEpH);
280  axes["PTP"] = new HistAxis(kAxisPTP);
281  axes["IsMu"] = new HistAxis(kAxisIsMu);
282  axes["DistTop"] = new HistAxis(kAxisTop);
283 
284  // set up the cuts map
285  std::map<std::string, Cut*> cuts;
286  cuts["DQ"] = new Cut(kNoCut);
287  cuts["EQ"] = new Cut(kNusEventQuality);
288  cuts["EQFid"] = new Cut(kEQFid);
289  cuts["Presel"] = new Cut(kNusNDPresel);
290  cuts["PreselNCSel"] = new Cut(kPreselNCSel);
291  cuts["NusND"] = new Cut(kNusND);
292  cuts["AllE"] = new Cut(kNusNDAllE);
293 
294  // make a map containing data spectra and MC cheat decomps for each axis/cut pair
295  std::map<std::string, std::pair<ana::Spectrum*, ana::CheatDecomp*>> loaded_specs = MakeMap(
296  loaders, axes, cuts, kNoShift, kTuftsWeightCC
297  );
298 
299  std::map<std::string, Cut*> nm1s;
300  nm1s["VtxX"] = new Cut(kNM1Fid && kFidMinusX);
301  nm1s["VtxY"] = new Cut(kNM1Fid && kFidMinusY);
302  nm1s["VtxZ"] = new Cut(kNM1Fid && kFidMinusZ);
303  nm1s["Cont"] = new Cut(kNM1Cont);
304  nm1s["CVN"] = new Cut(kNM1NCSel && kNCSelMinusCVN);
305  nm1s["NHit"] = new Cut(kNM1NCSel && kNCSelMinusHit);
306  nm1s["PTP"] = new Cut(kNM1CosRej && kCosRejMinusPTP);
307  nm1s["EpH"] = new Cut(kNM1CosRej && kCosRejMinusEpH);
308  nm1s["IsMu"] = new Cut(kNM1CosRej && kCosRejMinusIsM);
309  for(const auto& nm1 : nm1s) {
310  std::string strcut = nm1.first;
311  std::string strNM1 = "NM1";
312 
313  loaded_specs[strcut + strNM1] = make_pair(
316  axes[strcut], nm1.second, kNoShift, kTuftsWeightCC
317  );
318  }
319 
320  // Go loaders
322  loaders.Go();
323 
324  // Open output file
325  TFile* rootOut = new TFile("/nova/ana/steriles/Ana01/DataMC.root", "RECREATE");
326 
327  for(const auto& loaded_spec : loaded_specs) {
328  loaded_spec.second.first->SaveTo(rootOut, (loaded_spec.first + "Data").c_str());
329  loaded_spec.second.second->SaveTo(rootOut, (loaded_spec.first + "MC").c_str());
330  }
331 
332  rootOut->Close();
333 }
334 
335 //..............................................................................
336 std::pair<Spectrum*, CheatDecomp*> make_pair(SpectrumLoaderBase& loader_data,
337  SpectrumLoaderBase& loader_mc,
338  HistAxis* axis,
339  Cut* cut,
340  const SystShifts& shift,
341  const Var& wei)
342 {
343  std::pair<Spectrum*, CheatDecomp*> output;
344  output.first = new Spectrum(
345  loader_data,
346  *axis, *cut,
347  shift, wei
348  );
349  output.second = new CheatDecomp(
350  loader_mc,
351  *axis, *cut,
352  shift, wei
353  );
354 
355  return output;
356 }
357 
358 //..............................................................................
359 std::map<std::string, std::pair<Spectrum*, CheatDecomp*> > MakeMap(
360  SpectrumLoaderBase& loader_data,
361  SpectrumLoaderBase& loader_mc,
362  std::map<std::string, HistAxis* > axes,
363  std::map<std::string, Cut* > cuts,
364  const SystShifts& shift,
365  const Var& wei
366 )
367 {
368  std::map<std::string, std::pair<Spectrum*, CheatDecomp*> > output;
369  for(const auto& cut : cuts) {
370  for(const auto& axis : axes) {
371  output[axis.first + cut.first] = make_pair(
372  loader_data, loader_mc,
373  axis.second, cut.second, shift, wei
374  );
375  }
376  }
377 
378  return output;
379 };
380 
381 //..............................................................................
382 std::map<std::string, std::pair<Spectrum*, CheatDecomp*> > MakeMap(
383  Loaders& loader,
384  std::map<std::string, HistAxis*> axes,
385  std::map<std::string, Cut*> cuts,
386  const SystShifts& shift,
387  const Var& wei
388 )
389 {
390  return MakeMap(
393  axes, cuts, shift, wei
394  );
395 };
caf::Proxy< unsigned int > nshwlid
Definition: SRProxy.h:2022
Near Detector underground.
Definition: SREnums.h:10
ofstream output
caf::Proxy< caf::SRFuzzyK > fuzzyk
Definition: SRProxy.h:2041
_HistAxis< Var > HistAxis
Definition: HistAxis.h:103
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:16
float partptp
Definition: NusVarsTemp.cxx:50
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
caf::Proxy< float > stoptop
Definition: SRProxy.h:1059
std::map< std::string, std::pair< Spectrum *, CheatDecomp * > > MakeMap(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, std::map< std::string, HistAxis * > axes, std::map< std::string, Cut * > cuts, const SystShifts &shift, const Var &wei)
Definition: DataMCLoad.C:359
const Var kCVNnc
PID
Definition: Vars.cxx:44
const Binning kRemidBinning
Binning for plotting remid attractively.
Definition: Binning.cxx:80
const Cut kNusEventQuality([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->sel.nuecosrej.hitsperplane >=8) return false;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.gap >=100.) return false;if(sr->slc.ncontplanes<=2) return false;return true;})
Data Quality cuts from docdb 14241.
Definition: NusCuts.h:14
const Var kDistTop([](const caf::SRProxy *sr){return std::min(sr->sel.nuecosrej.starttop, sr->sel.nuecosrej.stoptop);})
Definition: NusVars.h:76
caf::Proxy< float > ncid
Definition: SRProxy.h:883
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2108
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
const Binning kZBinsND
const Cut kNusNDFiducial([](const caf::SRProxy *sr){assert(sr->vtx.elastic.IsValid &&"Must apply DQ cuts");if(sr->vtx.elastic.vtx.X()< -100.0) return false;if(sr->vtx.elastic.vtx.X() > 100.0) return false;if(sr->vtx.elastic.vtx.Y()< -100.0) return false;if(sr->vtx.elastic.vtx.Y() > 100.0) return false;if(sr->vtx.elastic.vtx.Z()< 200.0) return false;if(sr->vtx.elastic.vtx.Z() > 1000.0) return false;return true;})
ND Fiducial volume from docdb 15242.
Definition: NusCuts.h:51
const Cut kNusNDPresel
Definition: NusCuts.h:69
nhit
Definition: demo1.py:25
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
Definition: DataMCLoad.C:336
const Var kEPerHit([](const caf::SRProxy *sr){if(sr->slc.nhit >0) return 1000.0 *(sr->slc.calE/sr->slc.nhit);else return-5.;})
Definition: NueVarsExtra.h:14
const Cut kNusNCSel([](const caf::SRProxy *sr){if(sr->slc.nhit >=200) return false;if(sr->slc.nhit< 20) return false;if(sr->sel.cvn.ncid< 0.2) return false;return true;})
Cut that is more CC rejection than NC selection from docdb 15285.
Definition: NusCuts.h:27
caf::Proxy< float > starttop
Definition: SRProxy.h:1053
int isnan(const stan::math::var &a)
Definition: std_isnan.hpp:18
void Go()
Call Go() on all the loaders.
Definition: Loaders.cxx:162
caf::Proxy< caf::SRElastic > elastic
Definition: SRProxy.h:2100
caf::Proxy< caf::SRNueCosRej > nuecosrej
Definition: SRProxy.h:1244
caf::Proxy< std::vector< caf::SRFuzzyKProng > > png
Definition: SRProxy.h:2025
void SetSpillCut(const SpillCut &cut)
Definition: Loaders.cxx:121
const Cut kNusNDAllE
Definition: NusCuts.h:70
const Var kNCP
caf::Proxy< unsigned int > nhit
Definition: SRProxy.h:1294
#define SIMPLEVAR(CAFNAME)
For Vars where literally all you need is a single CAF variable.
Definition: Var.h:88
const Var kRemID
PID
Definition: Vars.cxx:81
const Var kCaloE
Summed calorimetric energy of all hits in slice, uncorrected.
Definition: Vars.cxx:52
caf::Proxy< caf::SRCVNResult > cvn
Definition: SRProxy.h:1232
SpectrumLoaderBase & GetLoader(caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Retrieve a specific loader.
Definition: Loaders.cxx:129
const Var kNHit
Definition: Vars.cxx:71
const Cut kIsMuon([](const caf::SRProxy *sr){return(abs(sr->mc.nu[0].beam.ptype)==13);})
Definition: TruthCuts.h:84
_Cut< caf::SRProxy > Cut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
Definition: Cut.h:96
const Binning kBooleanBins
Definition: NusLoadProd3.h:98
caf::StandardRecord * sr
caf::Proxy< float > partptp
Definition: SRProxy.h:1036
const HistAxis kNCAxis("Calorimetric Energy (GeV)", kNCDisappearanceEnergyBinning, kCaloE)
Axes used in Ana01 analysis by nus group.
Definition: HistAxes.h:8
void DataMCLoad()
Definition: DataMCLoad.C:45
loader
Definition: demo0.py:10
std::vector< float > Spectrum
Definition: Constants.h:570
Output from Cosmic Rejection (Nuecosrej) module.
Definition: SRNueCosRej.h:10
const SystShifts kNoShift
Definition: SystShifts.cxx:21
Base class for the various types of spectrum loader.
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
const Cut cut
Definition: exporter_fd.C:30
const Binning kXYBinsND
caf::Proxy< bool > IsValid
Definition: SRProxy.h:2040
caf::Proxy< caf::SRSlice > slc
Definition: SRProxy.h:2124
const Cut kNusNDContain([](const caf::SRProxy *sr){const caf::SRNueCosRejProxy &cr=sr->sel.nuecosrej;if(std::min(cr.starteast, cr.stopeast)< 25) return false;if(std::min(cr.startwest, cr.stopwest)< 25) return false;if(std::min(cr.starttop, cr.stoptop) < 25) return false;if(std::min(cr.startbottom, cr.stopbottom)< 25) return false;if(std::min(cr.startfront, cr.stopfront)< 25) return false;if(std::min(cr.startback, cr.stopback)< 25) return false;return true;})
Containment variable for NC events from docdb 15242.
Definition: NusCuts.h:58
const Var kTuftsWeightCC
Definition: XsecTunes.h:31
caf::Proxy< float > calE
Definition: SRProxy.h:1271
std::vector< Loaders * > loaders
Definition: syst_header.h:386
caf::Proxy< caf::SRVector3D > vtx
Definition: SRProxy.h:2055
const Binning kFinePIDBins
Definition: NusLoadProd3.h:102
const Cut kNusCosRejMod([](const caf::SRProxy *sr){double partptp=sr->sel.nuecosrej.partptp;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return false;if(partptp >=0.8) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.lid.ismuon==1) return false;double nhit=(double) sr->slc.nhit;if(nhit<=0.) return false;if(sr->slc.calE/nhit<=0.009) return false;return true;})
Definition: NusCuts.h:66
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
caf::Proxy< caf::SRIDBranch > sel
Definition: SRProxy.h:2123
T min(const caf::Proxy< T > &a, T b)
caf::Proxy< caf::SRVertexBranch > vtx
Definition: SRProxy.h:2128
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.
Definition: Loaders.cxx:25
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
Definition: Binning.cxx:114
Just return the ND truth spectra as the decomposition.
Definition: CheatDecomp.h:10
const Cut kNusND
Definition: NusCuts.h:71
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.
Definition: Cut.h:109