reduce_numu_ana2018_cosmics.C
Go to the documentation of this file.
1 #include "CAFAna/Cuts/Cuts.h"
5 #include "CAFAna/Vars/Vars.h"
6 
9 using namespace ana;
10 
11 void Clear2DRecoInfo(caf::StandardRecord* sr) // the stuff we never use
12 {
13  sr->trk.kalman.tracks2d.clear();
14  sr->trk.kalman.ntracks2d = 0;
15  for(caf::SRElastic& elastic: sr->vtx.elastic){
16  elastic.fuzzyk.png2d.clear();
17  elastic.fuzzyk.npng2d = 0;
18  }
19  sr->sel.cvnProd3Train.output.clear();
20 }
21 
23 {
24  FileReducer reduce(fname, outname);
25 
26  reduce.SetMetadata("nova.decaf_skim","numu_loose_contain");
27 
28  const Cut kIsND([](const caf::SRProxy* sr)
29  {
30  return sr->hdr.det==caf::kNEARDET;
31  });
32 
33  const Cut kIsFD([](const caf::SRProxy* sr)
34  {
35  return sr->hdr.det==caf::kFARDET;
36  });
37 
38  const Cut kNumuDecafCut = (kIsND && kNumuDecafCutND2018) || (kIsFD && kCosmicDecafCut2019);
39 
40  reduce.AddEventCut(kNumuDecafCut);
41 
42  // reduce.AddReductionStep(ClearWindowTrackInfo);
43  // reduce.AddReductionStep(ClearDiscreteTrackInfo);
44  // reduce.AddReductionStep(Clear2DRecoInfo);
45 
46  reduce.Go();
47 }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
std::vector< SRProng > png2d
Vector of 2D prong objects.
Definition: SRFuzzyK.h:20
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
void SetMetadata(const std::string &key, const std::string &val)
Cause the output file to be systematically shifted.
Definition: FileReducer.h:102
size_t ntracks2d
Definition: SRKalman.h:24
void reduce_numu_ana2018_cosmics(std::string fname, std::string outname)
void Clear2DRecoInfo(caf::StandardRecord *sr)
SRKalman kalman
Tracks produced by KalmanTrack.
Definition: SRTrackBranch.h:24
const Cut kNumuDecafCutND2018
Definition: NumuCuts2018.h:35
const Cut kCosmicDecafCut2019
Definition: NumuCuts2018.h:28
void AddEventCut(const Cut &cut)
Only copy records to the output file if they pass this cut.
caf::StandardRecord * sr
virtual void Go() override
Load all the registered spectra.
Create smaller CAFs.
Definition: FileReducer.h:56
size_t npng2d
Definition: SRFuzzyK.h:27
The StandardRecord is the primary top-level object in the Common Analysis File trees.
SRIDBranch sel
Selector (PID) branch.
SRElastic elastic
Single vertex found by Elastic Arms.
std::vector< SRTrack > tracks2d
2D Tracks produced by KalmanTrack
Definition: SRKalman.h:19
SRFuzzyK fuzzyk
Primary 3D prong object.
Definition: SRElastic.h:44
SRTrackBranch trk
Track branch: nhit, len, etc.
A potential interaction point from the ElasticArms algorithm.
Definition: SRElastic.h:19
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232
SRVertexBranch vtx
Vertex branch: location, time, etc.
enum BeamMode string