reduce_nue_2018.C
Go to the documentation of this file.
5 #include "CAFAna/Cuts/Cuts.h"
12 #include "CAFAna/Cuts/NueCutsSecondAna.h"
13 
14 
15 using namespace ana;
16 
18 {
19  FileReducer reduce(fname, outname);
20  reduce.SetMetadata("nova.decaf_skim", "nue2018_numu_contain");
21 
22 
23  const Cut kIsND(
24  [](const caf::SRProxy* sr)
25  {
26  return sr->hdr.det==caf::kNEARDET;
27  });
28 
29  const Cut kIsFD(
30  [](const caf::SRProxy* sr)
31  {
32  return sr->hdr.det==caf::kFARDET;
33  });
34 
35 
36  const Var kCVNSSe([](const caf::SRProxy* sr){return sr->sel.cvnProd3Train.nueid;});
37 
39  kVeto &&
40  kNueDQ2017CVN &&
41  (kCVNSSe > 0.5);
42 
43 
44  const Cut fdCut = kNueFD2018DecafCut && kIsFD;
46 
47  reduce.AddEventCut(fdCut || ndCut);
48 
49  //CHANGED FOR THE PURPOSE OF MAKING FD CONCATS FOR ANA2019.
50  //reduce.AddReductionStep(BENDecomp::ReduceForBEN2017Decaf);
53 
54  reduce.Go();
55 
56 }
57 
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
const Cut kApplySecondAnalysisMask([](const caf::SRProxy *sr){if(sr->hdr.det!=caf::kFARDET) return true; std::bitset< 14 > binary(sr->hdr.dibmask);std::pair< int, int > planesA=calcFirstLastLivePlane(sr->slc.firstplane, binary);std::pair< int, int > planesB=calcFirstLastLivePlane(sr->slc.lastplane, binary);if((planesA.first!=planesB.first)||(planesA.second!=planesB.second)) return false;return((planesA.second-planesA.first+1)/64 >=4);})
Definition: AnalysisMasks.h:18
void ClearSecondaryTrackInfo(caf::StandardRecord *sr)
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
const Cut kNueDQ2017CVN([](const caf::SRProxy *sr){if(sr->sel.nuecosrej.hitsperplane >=8) return false;if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng==0) return false;return true;})
Definition: NueCuts2017.h:28
void SetMetadata(const std::string &key, const std::string &val)
Cause the output file to be systematically shifted.
Definition: FileReducer.h:102
void AddReductionStep(const std::function< ReductionFunc > &f)
Run the specified reduction function over each event.
Definition: FileReducer.h:85
const Cut kNueND2018DecafCut
Definition: NueCuts2018.h:155
void reduce_nue_2018(std::string fname, std::string outname)
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.
const Var kCVNSSe([](const caf::SRProxy *sr){throw std::runtime_error("kCVNSSe is no longer available. Fix your macro so you don't use it.");return-5.;})
2018 nue PID
Definition: Vars.h:52
Create smaller CAFs.
Definition: FileReducer.h:56
const Cut kNumuUncontainNDDecafCut
Definition: BeamNueCuts.h:23
caf::Proxy< caf::SRIDBranch > sel
Definition: SRProxy.h:2141
const Cut kNueFD2018DecafCut
void ClearMultiNuInfo(caf::StandardRecord *sr)
Definition: FileReducer.cxx:25
const Cut kNumuContainNDDecafCut
Definition: BeamNueCuts.h:22
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232
enum BeamMode string