get_eventslist.C
Go to the documentation of this file.
1 #pragma once
2 
7 
8 using namespace ana;
9 
10 
11 void get_eventslist(std::string polarity = "fhc",
12  std::string period = "full")
13 {
14 
15 
16  const Var kNumuCVN2018 = SIMPLEVAR(sel.cvnProd3Train.numuid);
17  const Var kNumuCVN2017 = SIMPLEVAR(sel.cvn2017.numuid);
18  const Var kNumuCosRej2018 = SIMPLEVAR(sel.cosrej.numucontpid);
19  const Var kNumuCosRej2017 = SIMPLEVAR(sel.cosrej.numucontpidoldcvn);
20 
21  const Var kRunNumber = SIMPLEVAR(hdr.run);
22  const Var kRun = SIMPLEVAR(hdr.run);
23  const Var kSubRun = SIMPLEVAR(hdr.subrun);
24  const Var kEvt = SIMPLEVAR(hdr.evt);
25  const Var kSlice = SIMPLEVAR(hdr.subevt);
26  const Var kSliceTime = SIMPLEVAR(hdr.unixtime);
27  const Var kSliceMeanTime = SIMPLEVAR(hdr.subevtmeantime);
28  const Var kSliceTsd = SIMPLEVAR(slc.tsd);
29  const Var kSliceDeltaT([](const caf::SRProxy *sr) {
30  return (sr->slc.endtime - sr->slc.starttime);
31  });
32 
33 
34  std::vector<const Var*> vars = {&kRun, &kSubRun, &kEvt, &kSlice, &kSliceTime, &kSliceMeanTime, &kSliceTsd, &kSliceDeltaT,
35  &kRemID, &kNumuCosRej2018, &kNumuCosRej2017, &kNumuCVN2018, &kNumuCVN2017,
37 
38  std::string fFiles = "prod4_sumrestricteddecaf_fd_numi_" + polarity + "_" + period + "_goodruns_numu2018";
39  MakeTextListFile(fFiles, {kNumuCutFD2018 && kInBeamSpill},{"events_" + polarity + "_" + period + "__numu2018_vars.txt"}, vars , &kStandardSpillCuts);
40 
41 }
42 
const Var kHadE
Definition: NumuVars.h:23
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
caf::Proxy< float > starttime
Definition: SRProxy.h:1319
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
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
const Var kSliceTime([](const caf::SRProxy *sr){return sr->slc.meantime/1000;})
Definition: NumuVars.h:34
void MakeTextListFile(const std::string &wildcard, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< const Var * > &floatVars, const std::vector< const Var * > &intVars, const SpillCut *spillCut)
Make a file listing all the events passing the specified cut.
Definition: EventList.cxx:193
void get_eventslist(std::string polarity="fhc", std::string period="full")
caf::Proxy< float > endtime
Definition: SRProxy.h:1303
const Var kEvt
Definition: Vars.cxx:23
const Var kRemID
PID
Definition: Vars.cxx:81
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
const Var kCCE
Definition: NumuVars.h:21
caf::StandardRecord * sr
const std::map< std::pair< std::string, std::string >, Variable > vars
const Var kSubRun
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
caf::Proxy< caf::SRSlice > slc
Definition: SRProxy.h:2142
#define SIMPLEVAR(CAFNAME)
For Vars where literally all you need is a single CAF variable.
Definition: Var.h:88
const Cut kInBeamSpill([](const caf::SRProxy *sr){if(sr->spill.run > util::kLastBadTimingRun) return kInBeamSpill_main(sr);else return kInBeamSpill_main(sr)||kInBeamSpill_shifted(sr);}, [](const caf::SRSpillProxy *spill){if(spill->run > util::kLastBadTimingRun) return kInBeamSpill_main.Livetime(spill);else return kInBeamSpill_main.Livetime(spill)+kInBeamSpill_shifted.Livetime(spill);}, [](const caf::SRSpillProxy *spill) -> double{return spill->spillpot;})
Does the event fall inside the window we call the beam spill?
Definition: TimingCuts.h:8
const Var kSlice
const Cut kNumuCutFD2018
Definition: NumuCuts2018.h:39
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
const Var kRun
Definition: Vars.cxx:20
const Var kMuE
Definition: NumuVars.h:22
enum BeamMode string