All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Cuts.cxx
Go to the documentation of this file.
4 
5 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
6 
7 #include <map>
8 #include <string>
9 
10 
11 namespace ana{
12 
13  // Dummy cut example for testing
14  const SpillCut kFirstEvents = kEvt < 10;
15 
16  const SpillCut kFlashTrigger(
17  [](const caf::SRSpillProxy* sr){
18  return ( sr->pass_flashtrig );
19  }
20  );
21 
22  const SpillCut kCRTHitVetoND(
23  [](const caf::SRSpillProxy* sr){
24  for (auto const& crtHit: sr->crt_hits){
25  if (crtHit.time > -0.1 && crtHit.time < 1.8 && crtHit.position.y>-350 && crtHit.pe>100)
26  return false;
27  }
28  return true;
29  }
30  );
31 
32  const SpillCut kCRTHitVetoFD(
33  [](const caf::SRSpillProxy* sr){
34  for (auto const& crtHit: sr->crt_hits){
35  auto thistime = crtHit.time - 1600.; // manually shift to bring beam spill start to zero
36  if (thistime > -0.1 && thistime < 1.8 && crtHit.pe > 100)
37  return false;
38  }
39  return true;
40  }
41  );
42 
43  const Cut kFiducialVolumeND(
44  [](const caf::SRSliceProxy* slc){
45  return PtInVolAbsX(slc->vertex, fvndAbs);
46  }
47  );
48 
49  const Cut kActiveVolumeND(
50  [](const caf::SRSliceProxy* slc){
51  return PtInVolAbsX(slc->vertex, avnd);
52  }
53  );
54 
56  [](const caf::SRSliceProxy* slc){
57  return PtInVol(slc->vertex, fvfd_cryo1);
58  }
59  );
60 
62  [](const caf::SRSliceProxy* slc){
63  return PtInVol(slc->vertex, fvfd_cryo2);
64  }
65  );
66 
68  [](const caf::SRSliceProxy* slc){
69  return PtInVol(slc->vertex, avfd_cryo1);
70  }
71  );
72 
74  [](const caf::SRSliceProxy* slc){
75  return PtInVol(slc->vertex, avfd_cryo2);
76  }
77  );
78 
79  const Cut kSlcIsRecoNu([](const caf::SRSliceProxy *slc)
80  {
81  return !slc->is_clear_cosmic;
82  });
83 
84  const Cut kSlcNuScoreCut([](const caf::SRSliceProxy *slc)
85  {
86  return (kSlcIsRecoNu(slc) && slc->nu_score>0.4);
87  });
88 
89  const Cut kSlcHasFlashMatch([](const caf::SRSliceProxy *slc)
90  {
91  return slc->fmatch.present;
92  });
93 
94  const Cut kSlcFlashMatchCut([](const caf::SRSliceProxy *slc)
95  {
96  return (kSlcHasFlashMatch(slc) && slc->fmatch.score>0 && slc->fmatch.score<6);
97  });
98 
99 } // namespace
const Cut kFiducialVolumeFDCryo2([](const caf::SRSliceProxy *slc){return PtInVol(slc->vertex, fvfd_cryo2);})
then if[["$THISISATEST"==1]]
Definition: neoSmazza.sh:95
const SpillCut kFirstEvents
Definition: Cuts.cxx:14
const FidVol avfd_cryo1
bool PtInVolAbsX(const caf::SRVector3DProxy &pt, const FidVol &vol)
const Cut kSlcFlashMatchCut([](const caf::SRSliceProxy *slc){return(kSlcHasFlashMatch(slc)&&slc->fmatch.score >0 &&slc->fmatch.score< 6);})
const Cut kFiducialVolumeFDCryo1([](const caf::SRSliceProxy *slc){return PtInVol(slc->vertex, fvfd_cryo1);})
process_name opflashCryoW ana
caf::Proxy< caf::SRSlice > SRSliceProxy
Definition: EpilogFwd.h:2
const SpillCut kCRTHitVetoND([](const caf::SRSpillProxy *sr){for(auto const &crtHit:sr->crt_hits){return false;}return true;})
const FidVol fvfd_cryo1
const Cut kFiducialVolumeND([](const caf::SRSliceProxy *slc){return PtInVolAbsX(slc->vertex, fvndAbs);})
const Cut kActiveVolumeFDCryo2([](const caf::SRSliceProxy *slc){return PtInVol(slc->vertex, avfd_cryo2);})
const FidVol avnd
const Cut kSlcIsRecoNu([](const caf::SRSliceProxy *slc){return!slc->is_clear_cosmic;})
const FidVol fvfd_cryo2
_Cut< caf::SRSliceProxy > Cut
Definition: Cut.h:95
caf::Proxy< caf::StandardRecord > SRSpillProxy
Definition: EpilogFwd.h:3
const Cut kSlcNuScoreCut([](const caf::SRSliceProxy *slc){return(kSlcIsRecoNu(slc)&&slc->nu_score >0.4);})
const SpillCut kFlashTrigger([](const caf::SRSpillProxy *sr){return(sr->pass_flashtrig);})
_Cut< caf::SRSpillProxy > SpillCut
Equivalent of Cut acting on caf::SRSpill. For use in spill-by-spill data quality cuts.
Definition: Cut.h:99
const Cut kActiveVolumeND([](const caf::SRSliceProxy *slc){return PtInVolAbsX(slc->vertex, avnd);})
const FidVol avfd_cryo2
const Cut kActiveVolumeFDCryo1([](const caf::SRSliceProxy *slc){return PtInVol(slc->vertex, avfd_cryo1);})
const FidVol fvndAbs
const SpillCut kCRTHitVetoFD([](const caf::SRSpillProxy *sr){for(auto const &crtHit:sr->crt_hits){auto thistime=crtHit.time-1600.;return false;}return true;})
bool PtInVol(const caf::SRVector3DProxy &pt, const FidVol &vol)
const SpillVar kEvt
Definition: Vars.cxx:16
const Cut kSlcHasFlashMatch([](const caf::SRSliceProxy *slc){return slc->fmatch.present;})