Public Member Functions | List of all members
recovalid::CAFCutter Class Reference

Helper class for Reco Validation modules. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-21/RecoValidation/CAFCutter.h"

Public Member Functions

 CAFCutter ()
 
 ~CAFCutter ()
 
bool passCuts (int cut, const caf::StandardRecord *sr)
 

Detailed Description

Helper class for Reco Validation modules.

Definition at line 58 of file CAFCutter.h.

Constructor & Destructor Documentation

recovalid::CAFCutter::CAFCutter ( )

Definition at line 29 of file CAFCutter.cxx.

30  { }
recovalid::CAFCutter::~CAFCutter ( )

Definition at line 33 of file CAFCutter.cxx.

34  { }

Member Function Documentation

bool recovalid::CAFCutter::passCuts ( int  cut,
const caf::StandardRecord sr 
)

Definition at line 37 of file CAFCutter.cxx.

References ana::kApplySecondAnalysisMask, recovalid::kFDcvnPresel, recovalid::kFDnueCut1, recovalid::kFDnueCut2, recovalid::kFDnueCut3, recovalid::kFDnumuCut1, recovalid::kFDnumuCut2, recovalid::kFDnumuCut3, recovalid::kFDnusCut1, recovalid::kFDnusCut2, recovalid::kFDnusCut3, ana::kHasNeutrino, recovalid::kNDcvnPresel, recovalid::kNDnueCut1, recovalid::kNDnueCut2, recovalid::kNDnueCut3, recovalid::kNDnumuCut1, recovalid::kNDnumuCut2, recovalid::kNDnumuCut3, recovalid::kNDnusCut1, recovalid::kNDnusCut2, recovalid::kNDnusCut3, ana::kNue2017BasicPart(), ana::kNue2017CorePresel, ana::kNue2017FD, ana::kNue2017NDCVNSsb, ana::kNue2017NDPresel, ana::kNue2017Presel, ana::kNueDQ2017CVN, ana::kNumuContainFD2017, ana::kNumuContainND2017, ana::kNumuCosmicRej2017, ana::kNumuDecafPresel2017, ana::kNumuPID2017, ana::kNumuQuality, ana::kNus17EventQuality, ana::kNus17FDAlt, ana::kNus17FDContain, ana::kNus17FDPresel, ana::kNus17ND, ana::kNus17NDContain, ana::kNus17NDPresel, ana::kNus17Veto, recovalid::kTruth, and sr.

Referenced by trk::KalmanTrackAna::analyze(), cvn::CVNEventDump::analyze(), hough::HoughValidate::analyze(), cvn::CVNCosmicEventDump::analyze(), earms::ElasticArmsValidate::analyze(), bpfit::BreakPointAna::analyze(), cvn::CVNEventProngDump::analyze(), slicer::SlicerAna::analyze(), and fuzz::FuzzyKValidate::analyze().

37  {
38  static caf::SRProxy srProxy(0, 0, "", 0, 0);
39  srProxy = *sr;
40 
41  bool pass = false;
42 
43 
44 
45  // Truth cut:
46  if(cut == kTruth) {
47  pass = ana::kHasNeutrino(&srProxy);
48  }
49 
50 
51 
52  // CVN preselection cuts:
53  if(cut == kNDcvnPresel) {
54  pass = (ana::kNueDQ2017CVN(&srProxy) && ana::kNue2017Presel(&srProxy)) ||
55  (ana::kNumuDecafPresel2017(&srProxy) && ana::kNumuContainND2017(&srProxy)) ||
56  (ana::kNus17EventQuality(&srProxy) && ana::kNus17NDContain(&srProxy));
57 
58  }
59  if(cut == kFDcvnPresel) {
60  pass = (ana::kNueDQ2017CVN(&srProxy) && ana::kNue2017Presel(&srProxy)) ||
61  (ana::kNumuDecafPresel2017(&srProxy) && ana::kNumuContainFD2017(&srProxy)) ||
62  (ana::kNus17EventQuality(&srProxy) && ana::kNus17FDContain(&srProxy));
63 
64  }
65 
66 
67 
68  // Numu cuts:
69  if(cut == kNDnumuCut1) {
70  pass = ana::kNumuQuality(&srProxy);
71  }
72  if(cut == kNDnumuCut2) {
73  pass = ana::kNumuQuality(&srProxy) && ana::kNumuContainND2017(&srProxy);
74  }
75  if(cut == kNDnumuCut3) {
76  pass = ana::kNumuQuality(&srProxy) && ana::kNumuContainND2017(&srProxy) && ana::kNumuPID2017(&srProxy);
77  }
78 
79  if(cut == kFDnumuCut1) {
80  pass = ana::kNumuQuality(&srProxy);
81  }
82  if(cut == kFDnumuCut2) {
83  pass = ana::kNumuQuality(&srProxy) && ana::kNumuContainFD2017(&srProxy);
84  }
85  if(cut == kFDnumuCut3) {
86  pass = ana::kNumuQuality(&srProxy) && ana::kNumuContainFD2017(&srProxy) && ana::kNumuPID2017(&srProxy) && ana::kNumuCosmicRej2017(&srProxy);
87  }
88 
89 
90 
91  // Nue cuts:
92  if(cut == kNDnueCut1) {
93  pass = ana::kNueDQ2017CVN(&srProxy);
94  }
95  if(cut == kNDnueCut2) {
96  pass = ana::kNue2017NDPresel(&srProxy);
97  }
98  if(cut == kNDnueCut3) {
99  pass = ana::kNue2017NDCVNSsb(&srProxy);
100  }
101 
102  if(cut == kFDnueCut1) {
103  pass = ana::kNue2017BasicPart(&srProxy);
104  }
105  if(cut == kFDnueCut2) {
106  pass = ana::kNue2017CorePresel(&srProxy);
107  }
108  if(cut == kFDnueCut3) {
109  pass = ana::kNue2017FD(&srProxy);
110  }
111 
112 
113 
114  // Nus cuts:
115  if(cut == kNDnusCut1) {
116  pass = ana::kNus17EventQuality(&srProxy) && ana::kApplySecondAnalysisMask(&srProxy) && ana::kNus17Veto(&srProxy);
117  }
118  if(cut == kNDnusCut2) {
119  pass = ana::kNus17EventQuality(&srProxy) && ana::kApplySecondAnalysisMask(&srProxy) && ana::kNus17Veto(&srProxy) && ana::kNus17NDPresel(&srProxy);
120  }
121  if(cut == kNDnusCut3) {
122  pass = ana::kNus17ND(&srProxy);
123  }
124 
125  if(cut == kFDnusCut1) {
126  pass = ana::kNus17EventQuality(&srProxy) && ana::kApplySecondAnalysisMask(&srProxy) && ana::kNus17Veto(&srProxy);
127  }
128  if(cut == kFDnusCut2) {
129  pass = ana::kNus17EventQuality(&srProxy) && ana::kApplySecondAnalysisMask(&srProxy) && ana::kNus17Veto(&srProxy) && ana::kNus17FDPresel(&srProxy);
130  }
131  if(cut == kFDnusCut3) {
132  pass = ana::kNus17FDAlt(&srProxy);
133  }
134 
135  return pass;
136 
137  }
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
const Cut kNumuContainND2017([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;++i){TVector3 start=sr->vtx.elastic.fuzzyk.png[i].shwlid.start;TVector3 stop=sr->vtx.elastic.fuzzyk.png[i].shwlid.stop;if(std::min(start.X(), stop.X())< -180.0) return false;if(std::max(start.X(), stop.X()) > 180.0) return false;if(std::min(start.Y(), stop.Y())< -180.0) return false;if(std::max(start.Y(), stop.Y()) > 180.0) return false;if(std::min(start.Z(), stop.Z())< 20.0) return false;if(std::max(start.Z(), stop.Z()) > 1525.0) return false;}if(sr->trk.kalman.ntracks< 1) return false;for(unsigned int i=0;i< sr->trk.kalman.ntracks;++i){if(i==sr->trk.kalman.idxremid) continue;else if(sr->trk.kalman.tracks[i].start.Z() > 1275||sr->trk.kalman.tracks[i].stop.Z() > 1275) return false;}return(sr->trk.kalman.ntracks > sr->trk.kalman.idxremid &&sr->slc.firstplane > 1 &&sr->slc.lastplane< 212 &&sr->trk.kalman.tracks[0].start.Z()< 1100 &&(sr->trk.kalman.tracks[0].stop.Z()< 1275 ||sr->sel.contain.kalyposattrans< 55) &&sr->sel.contain.kalfwdcellnd > 5 &&sr->sel.contain.kalbakcellnd > 10);})
Definition: NumuCuts2017.h:11
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
const Cut kNue2017BasicPart(kNue2017BasicPartFunc)
const Cut kNue2017Presel
Definition: NueCuts2017.h:54
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
const Cut kNue2017NDCVNSsb
Definition: NueCuts2017.h:302
const Cut kNue2017FD
Full FD nue selection for 2017 analysis.
Definition: NueCuts2017.h:130
const Cut kNus17FDContain
FD Containment, nue-inspired, from docdb 21113.
Definition: NusCuts17.h:28
const Cut kNus17NDPresel
Definition: NusCuts17.h:114
const Cut kNumuContainFD2017
Definition: NumuCuts2017.h:21
const Cut kNus17ND
Full Nus17 ND analysis selection.
Definition: NusCuts17.h:120
caf::StandardRecord * sr
const Cut kNumuDecafPresel2017([](const caf::SRProxy *sr){return(sr->slc.nhit > 20 &&sr->sel.remid.pid > 0 &&sr->sel.cvn.numuid > 0);})
Definition: NumuCuts2017.h:13
const Cut kNumuPID2017([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.5 &&sr->sel.cvn.numuid > 0.5);})
Definition: NumuCuts2017.h:27
const Cut kNumuCosmicRej2017([](const caf::SRProxy *sr){return(sr->sel.cosrej.anglekal > 0.5 && sr->sel.cosrej.numucontpid2020 > 0.5 && sr->slc.nhit< 400);})
Definition: NumuCuts2017.h:24
const Cut kNus17NDContain
Definition: NusCuts17.h:105
const Cut kHasNeutrino([](const caf::SRProxy *sr){return(sr->mc.nnu!=0);})
Check if MC slice has neutrino information (useful for in-and-out tests)
Definition: TruthCuts.h:61
const Cut kNue2017NDPresel
Definition: NueCuts2017.h:285
const Cut cut
Definition: exporter_fd.C:30
const Cut kNus17Veto([](const caf::SRProxy *sr){return sr->sel.veto.keep;})
Definition: NusCuts17.h:25
const Cut kNus17FDAlt
Definition: NusCuts17.h:92
const Cut kNue2017CorePresel
Full preselection for 2017 "core" sample with Cut-based CosRej.
Definition: NueCuts2017.h:105
const Cut kNumuQuality
Definition: NumuCuts.h:18
const Cut kNus17FDPresel
The Nus17 preselection cuts for the Far Detector from docdb 21113.
Definition: NusCuts17.h:38
const Cut kNus17EventQuality([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->sel.nuecosrej.hitsperplane >=8) return false;if(sr->vtx.elastic.fuzzyk.npng==0) return false;if(sr->slc.ncontplanes<=2) return false;return true;})
Data Quality cuts from docdb 21113.
Definition: NusCuts17.h:21

The documentation for this class was generated from the following files: