Cuts.cxx
Go to the documentation of this file.
1 #include "CAFAna/Cuts/Cuts.h"
2 
4 
5 #include <bitset>
6 #include <iostream>
7 
8 namespace ana
9 {
10  //----------------------------------------------------------------------
11  /// Helper for \ref kPassesPresel
12  inline bool PassesPreselFunc(const caf::SRProxy* sr)
13  {
14  // TODO HACK this should be cutting those out anyway
15  if(sr->sel.lem.pid < -4) return false;
16  return (sr->slc.nhit >= 43 && sr->slc.nhit <= 120 &&
17  (sr->trk.discrete.ntracks == 0 || sr->trk.discrete.tracks[0].len < 267) &&
18  2*sr->slc.calE > 1 && 2*sr->slc.calE < 3);
19  }
20 
22 
23  //----------------------------------------------------------------------
24  const Cut kCrudeCCSel([](const caf::SRProxy* sr)
25  {
26  if(sr->trk.kalman.ntracks == 0) return false;
27  return sr->trk.kalman.tracks[0].len > 200;
28  });
29 
30  //----------------------------------------------------------------------
31  const Cut kUCCosmicRej([](const caf::SRProxy* sr)
32  {
33  return (sr->sel.cosrej.anglekal > 0.5 &&
34  sr->sel.cosrej.numuunconttunedpid > 0.55);
35  });
36 
37  //----------------------------------------------------------------------
38  const Cut kNDContainNue(
39  [](const caf::SRProxy* sr)
40  {
41  if( sr->vtx.elastic.fuzzyk.nshwlid <=0 )
42  return false;
43 
44  const caf::SRShowerLIDProxy& shwlid = sr->vtx.elastic.fuzzyk.png[0].shwlid;
45  const caf::SRVector3DProxy& start = shwlid.start;
46  const caf::SRVector3DProxy& stop = shwlid.stop;
47 
48  return (std::min(start.X(), stop.X()) > -150 &&
49  std::max(start.X(), stop.X()) < +150 &&
50  std::min(start.Y(), stop.Y()) > -150 &&
51  std::max(start.Y(), stop.Y()) < +150 &&
52  std::min(start.Z(), stop.Z()) > 50 &&
53  std::max(start.Z(), stop.Z()) < 1230);
54  });
55 
56  //----------------------------------------------------------------------
57  const Cut kFDContainNue(
58  [](const caf::SRProxy* sr)
59  {
60  if( sr->vtx.elastic.fuzzyk.nshwlid <=0 )
61  return false;
62 
63  const caf::SRShowerLIDProxy& shwlid = sr->vtx.elastic.fuzzyk.png[0].shwlid;
64  const caf::SRVector3DProxy& start = shwlid.start;
65  const caf::SRVector3DProxy& stop = shwlid.stop;
66 
67  return (std::min(start.X(), stop.X()) > -725 &&
68  std::max(start.X(), stop.X()) < +725 &&
69  std::min(start.Y(), stop.Y()) > -725 &&
70  std::max(start.Y(), stop.Y()) < +725 &&
71  std::min(start.Z(), stop.Z()) > 50 &&
72  std::max(start.Z(), stop.Z()) < 5910);
73  });
74 
75  //----------------------------------------------------------------------
76  const Cut kInTime([](const caf::SRProxy* sr)
77  {
78  return (sr->slc.meantime >= 208000 &&
79  sr->slc.meantime <= 236000);
80  });
81 
82  //----------------------------------------------------------------------
83  const Cut kAngVar([](const caf::SRProxy* sr)
84  {
85  std::cout << "\n\n\n"
86  << "WARNING: This cut used sandbox variables which no longer exist. Aborting."
87  << std::endl;
88  abort();
89  /*
90  if(((sr->trk.cosmic.tracks[0].nhit*1.0)/(1.0*sr->slc.nhit))>0.88){
91  if(sr->slc.nhit>50 && sr->slc.nhit<=135 &&
92  (((sr->sand.nue.anglecosmic*sr->sand.nue.anglecosmic)
93  - (sr->trk.cosmic.tracks[0].dir.Y()*sr->trk.cosmic.tracks[0].dir.Y()))
94  <((1.1/85)*sr->slc.nhit-1.65)))
95  return false;
96 
97  if(sr->slc.nhit>135 && sr->slc.nhit<=250 &&
98  (((sr->sand.nue.anglecosmic*sr->sand.nue.anglecosmic)
99  - (sr->trk.cosmic.tracks[0].dir.Y()*sr->trk.cosmic.tracks[0].dir.Y()))
100  <((.6/115)*sr->slc.nhit-0.6)))
101  return false;
102 
103  if(sr->slc.nhit>250 && sr->slc.nhit<=500 &&
104  (((sr->sand.nue.anglecosmic*sr->sand.nue.anglecosmic)
105  - (sr->trk.cosmic.tracks[0].dir.Y()*sr->trk.cosmic.tracks[0].dir.Y()))
106  < ((0.1/250)*sr->slc.nhit+0.6)))
107  return false;
108 
109  if(sr->slc.nhit>500 &&
110  (((sr->sand.nue.anglecosmic*sr->sand.nue.anglecosmic)
111  - (sr->trk.cosmic.tracks[0].dir.Y()*sr->trk.cosmic.tracks[0].dir.Y())) > 0.8))
112  return false;
113  }
114  */
115  return false;
116  });
117 
118  //----------------------------------------------------------------------
119  const Cut kXYContainment([](const caf::SRProxy* sr)
120  {
121  return (sr->slc.boxmin.X() > -700 &&
122  sr->slc.boxmin.Y() > -700 &&
123  sr->slc.boxmax.X() < 700 &&
124  sr->slc.boxmax.Y() < 660);
125  });
126 
127  //----------------------------------------------------------------------
128  const Cut kContained([](const caf::SRProxy* sr)
129  {
130  return (sr->slc.boxmin.Z() > 100 &&
131  sr->slc.boxmax.Z() < 800 );
132  });
133 
134  //----------------------------------------------------------------------
135  const Cut kThroughGoing([](const caf::SRProxy* sr)
136  {
137  return (sr->slc.boxmin.Z() < 100 &&
138  sr->slc.boxmax.Z() > 800 );
139  });
140 
141  //----------------------------------------------------------------------
142  const Cut kEnter([](const caf::SRProxy* sr)
143  {
144  return (sr->slc.boxmin.Z() < 100 &&
145  sr->slc.boxmax.Z() < 800 );
146  });
147 
148  //----------------------------------------------------------------------
149  const Cut kExit([](const caf::SRProxy* sr)
150  {
151  return (sr->slc.boxmin.Z() > 100 &&
152  sr->slc.boxmax.Z() > 800 );
153  });
154 
155  //----------------------------------------------------------------------
156  const Cut kCleanup([](const caf::SRProxy* sr)
157  {
158  return (sr->slc.nhit > 20 &&
159  sr->trk.cosmic.tracks[0].view == 2);
160  });
161 
162  //----------------------------------------------------------------------
163  bool ContainFxn::operator()(const caf::SRProxy* sr) const
164  {
165  return (sr->slc.boxmin.X() > -745 &&
166  sr->slc.boxmin.Y() > -745 &&
167  sr->slc.boxmax.X() < 745 &&
168  sr->slc.boxmax.Y() < 720 &&
169  sr->slc.boxmin.Z() > zmax+12 &&
170  sr->slc.boxmax.Z() < 5950 &&
171  sr->sel.contain.kalfwdcell > 10 &&
172  sr->sel.contain.kalbakcell > 10 &&
173  sr->sel.contain.cosfwdcell > 10 &&
174  sr->sel.contain.cosbakcell > 10);
175  }
176 
177  //----------------------------------------------------------------------
179  {
180  return ((sr->slc.boxmin.X() < -745 ||
181  sr->slc.boxmin.Y() < -745 ||
182  sr->slc.boxmax.X() > 745 ||
183  sr->slc.boxmax.Y() > 720 ||
184  sr->slc.boxmin.Z() > 5950 ||
185  sr->slc.boxmin.Z() < zmax+12 ||
186  sr->sel.contain.kalfwdcell < 11 ||
187  sr->sel.contain.kalbakcell < 11 ||
188  sr->sel.contain.cosfwdcell < 11 ||
189  sr->sel.contain.cosbakcell < 11) && sr->mc.nu[0].vtx.Z() > zmax);
190  }
191 
192  //----------------------------------------------------------------------
193  const Cut kNueNDCont([](const caf::SRProxy* sr)
194  {
195  bool cut = false;
196 
197  //must have a vertex and nonzero numbers of 3d prongs and showers
198  if (!sr->vtx.elastic.IsValid) return cut;
199  if (sr->vtx.elastic.fuzzyk.npng == 0) return cut;
200  if (sr->vtx.elastic.fuzzyk.nshwlid ==0) return cut;
201 
202  //minimum hit requirement
203  if (sr->slc.nhit < 20) return cut;
204 
205  //longest shower containment cut
206  if (std::min(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.X(),sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.X()) < -180.0) return cut;
207  if (std::max(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.X(),sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.X()) > 180.0) return cut;
208  if (std::min(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Y(),sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Y()) < -180.0) return cut;
209  if (std::max(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Y(),sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Y()) > 180.0) return cut;
210  if (std::min(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Z(),sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z()) < 25.0) return cut;
211  if (std::max(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Z(),sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z()) > 1225.0) return cut;
212 
213  //vertex containment
214  if (sr->vtx.elastic.vtx.X() < -140.0) return cut;
215  if (sr->vtx.elastic.vtx.X() > 140.0) return cut;
216  if (sr->vtx.elastic.vtx.Y() < -140.0) return cut;
217  if (sr->vtx.elastic.vtx.Y() > 140.0) return cut;
218  if (sr->vtx.elastic.vtx.Z() < 100.0) return cut;
219  if (sr->vtx.elastic.vtx.Z() > 550.0) return cut;
220 
221  //cut on longest fuzzyk 3d track length - do we really mean longest here or do we want highest E?
222  if (sr->vtx.elastic.fuzzyk.png[sr->vtx.elastic.fuzzyk.longestidx].len > 600.0) return cut;
223 
224  //cut on maximum slice energy, remove high energy tail
225  if (sr->slc.calE > 5.0) return cut;
226 
227  //cut on gap between longest shower and vertex, remove a class of reco failure
228  if (sr->vtx.elastic.fuzzyk.png[sr->vtx.elastic.fuzzyk.longestidx].shwlid.gap > 150.0) return cut;
229 
230  cut = true;
231  return cut;
232  });
233 
234  //----------------------------------------------------------------------
235  const Cut kNueIsMuon([](const caf::SRProxy* sr)
236  {
237  if (sr->vtx.elastic.fuzzyk.nshwlid > 0){
238  for (unsigned int i=0; i<sr->vtx.elastic.fuzzyk.nshwlid; ++i){
239  if (sr->vtx.elastic.fuzzyk.png[i].shwlid.lid.ismuon == 1){
240  return false;
241  }
242  }
243  return true;
244  }
245  return false;
246  });
247 
248  //----------------------------------------------------------------------
249  const Cut kTruthContainedND(
250  [](const caf::SRProxy* sr){
251  if (sr->mc.nnu == 0)
252  return false;
253  if (fabs(sr->mc.nu[0].vtx.X()) > 200 ||
254  fabs(sr->mc.nu[0].vtx.Y()) > 200 ||
255  sr->mc.nu[0].vtx.Z() < 0 ||
256  sr->mc.nu[0].vtx.Z() > 1650)
257  return false;
258  return true;
259  });
260 
261  //----------------------------------------------------------------------
262  const Cut kIsSingleGap([](const caf::SRProxy* sr){
263  // Modeled after kRemoveSmallMasks
264  // Selects out only spills that have an upstream diblock that is masked
265  // off and have all the active diblocks contiguous
266  if (sr->hdr.det != caf::kFARDET) return false;
267  std::bitset<14> binary(sr->hdr.dibmask);
268  // don't look at configs whose first db is active
269  if (binary[0] == 1) return false;
270  bool gap = false;
271  for (int i=0; i<13; ++i){
272  // Is this diblock masked, but the next isn't?
273  if (binary[i] == 0 && binary[i+1] == 1){
274  if (gap) return false;
275  gap = true;
276  }
277  }
278  return gap;
279  });
280 
281  //----------------------------------------------------------------------
283  // Check that we have a neutrino
284  if (sr->mc.nnu == 0) return false;
285 
286  // To find the upstream start, we need to where the first active db is
287  if (sr->hdr.det != caf::kFARDET) return false;
288  std::bitset<14> binary(sr->hdr.dibmask);
289  // don't look at configs whose first db is active
290  if (binary[0] == 1) return false;
291  int FirstActiveDB = 0;
292  for (int i=0; i<14; ++i){
293  if (binary[i] == 0 && binary[i+1] == 1){
294  FirstActiveDB = i+1;
295  }
296  }
297 
298  // Calculate the upstream edge of the first active db
299  // Got numbers from gdml, checked 14 db's gives you right det length
300  int nspace = 1 + 2*FirstActiveDB;
301  double start = nspace*0.45 + 32*(6.61+0.0379)*2*FirstActiveDB; // in cm
302 
303  bool isUpStreamOfStart = sr->mc.nu[0].vtx.z < start;
304  return isUpStreamOfStart;
305  });
306 
307  //----------------------------------------------------------------------
308  const Cut kIsFarDet ([](const caf::SRProxy* sr)
309  {
310  return sr->hdr.det==caf::kFARDET;
311  });
312 }
caf::Proxy< size_t > npng
Definition: SRProxy.h:2038
caf::Proxy< unsigned int > nshwlid
Definition: SRProxy.h:2040
T max(const caf::Proxy< T > &a, T b)
caf::Proxy< float > pid
Definition: SRProxy.h:949
const Cut kTruthContainedND([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(fabs(sr->mc.nu[0].vtx.X()) > 200|| fabs(sr->mc.nu[0].vtx.Y()) > 200|| sr->mc.nu[0].vtx.Z()< 0|| sr->mc.nu[0].vtx.Z() > 1650) return false;return true;})
Definition: Cuts.h:88
const Cut kAngVar([](const caf::SRProxy *sr){std::cout<< "\n\n\n"<< "WARNING: This cut used sandbox variables which no longer exist. Aborting."<< std::endl;abort();return false;})
Definition: Cuts.h:36
bool operator()(const caf::SRProxy *sr) const
Definition: Cuts.cxx:178
caf::Proxy< caf::SRFuzzyK > fuzzyk
Definition: SRProxy.h:2059
Far Detector at Ash River.
Definition: SREnums.h:11
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
bool operator()(const caf::SRProxy *sr) const
Definition: Cuts.cxx:163
caf::Proxy< std::vector< caf::SRTrack > > tracks
Definition: SRProxy.h:1731
const Cut kCrudeCCSel([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks==0) return false;return sr->trk.kalman.tracks[0].len > 200;})
Extremely crude CC selection, only for use in some old demos.
Definition: Cuts.h:17
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
caf::Proxy< size_t > ntracks
Definition: SRProxy.h:1778
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
const Cut kEnter([](const caf::SRProxy *sr){return(sr->slc.boxmin.Z()< 100 && sr->slc.boxmax.Z()< 800);})
2 di-block era Entering-type event selector
Definition: Cuts.h:48
caf::Proxy< caf::SRContain > contain
Definition: SRProxy.h:1251
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
const Cut kNueIsMuon([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.nshwlid > 0){for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;++i){if(sr->vtx.elastic.fuzzyk.png[i].shwlid.lid.ismuon==1){return false;}}return true;}return false;})
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:618
const Cut kXYContainment([](const caf::SRProxy *sr){return(sr->slc.boxmin.X() >-700 && sr->slc.boxmin.Y() >-700 && sr->slc.boxmax.X()< 700 && sr->slc.boxmax.Y()< 660);})
XY containment in 2 di-block era based on slice box coordinates.
Definition: Cuts.h:39
caf::Proxy< short int > nnu
Definition: SRProxy.h:617
caf::Proxy< int > cosfwdcell
Definition: SRProxy.h:810
caf::Proxy< int > cosbakcell
Definition: SRProxy.h:805
const Cut kIsFarDet([](const caf::SRProxy *sr){return sr->hdr.det==caf::kFARDET;})
Definition: Cuts.h:94
caf::Proxy< caf::SRCosRej > cosrej
Definition: SRProxy.h:1252
caf::Proxy< caf::SRVector3D > boxmin
Definition: SRProxy.h:1291
caf::Proxy< caf::SRElastic > elastic
Definition: SRProxy.h:2118
const Cut kExit([](const caf::SRProxy *sr){return(sr->slc.boxmin.Z() > 100 && sr->slc.boxmax.Z() > 800);})
2 di-block era Exiting-type event selector
Definition: Cuts.h:51
caf::Proxy< std::vector< caf::SRFuzzyKProng > > png
Definition: SRProxy.h:2043
Proxy for caf::SRShowerLID.
Definition: SRProxy.h:1606
caf::Proxy< unsigned int > nhit
Definition: SRProxy.h:1315
const Cut kInTime([](const caf::SRProxy *sr){return(sr->slc.meantime >=208000 && sr->slc.meantime<=236000);})
Cut events that are not in time 208us - 236us.
Definition: Cuts.h:32
if(dump)
Proxy for caf::SRVector3D.
Definition: SRProxy.h:78
const Cut kContained([](const caf::SRProxy *sr){return(sr->slc.boxmin.Z() > 100 && sr->slc.boxmax.Z()< 800);})
2 di-block era contained-type event selector
Definition: Cuts.h:42
caf::Proxy< caf::SRTrackBranch > trk
Definition: SRProxy.h:2145
const Cut kNueNDCont([](const caf::SRProxy *sr){bool cut=false;if(!sr->vtx.elastic.IsValid) return cut;if(sr->vtx.elastic.fuzzyk.npng==0) return cut;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return cut;if(sr->slc.nhit< 20) return cut;if(std::min(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.X(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.X())< -180.0) return cut;if(std::max(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.X(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.X()) > 180.0) return cut;if(std::min(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Y(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Y())< -180.0) return cut;if(std::max(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Y(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Y()) > 180.0) return cut;if(std::min(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Z(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z())< 25.0) return cut;if(std::max(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Z(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z()) > 1225.0) return cut;if(sr->vtx.elastic.vtx.X()< -140.0) return cut;if(sr->vtx.elastic.vtx.X() > 140.0) return cut;if(sr->vtx.elastic.vtx.Y()< -140.0) return cut;if(sr->vtx.elastic.vtx.Y() > 140.0) return cut;if(sr->vtx.elastic.vtx.Z()< 100.0) return cut;if(sr->vtx.elastic.vtx.Z() > 550.0) return cut;if(sr->vtx.elastic.fuzzyk.png[sr->vtx.elastic.fuzzyk.longestidx].len > 600.0) return cut;if(sr->slc.calE > 5.0) return cut;if(sr->vtx.elastic.fuzzyk.png[sr->vtx.elastic.fuzzyk.longestidx].shwlid.gap > 150.0) return cut;cut=true;return cut;})
Definition: Cuts.h:84
const Cut kFDContainNue([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.nshwlid<=0) return false;const caf::SRShowerLIDProxy &shwlid=sr->vtx.elastic.fuzzyk.png[0].shwlid;const caf::SRVector3DProxy &start=shwlid.start;const caf::SRVector3DProxy &stop=shwlid.stop;return(std::min(start.X(), stop.X()) >-725 && std::max(start.X(), stop.X())< +725 && std::min(start.Y(), stop.Y()) >-725 && std::max(start.Y(), stop.Y())< +725 && std::min(start.Z(), stop.Z()) > 50 && std::max(start.Z(), stop.Z())< 5910);})
Definition: Cuts.h:25
const Cut kUCCosmicRej([](const caf::SRProxy *sr){return(sr->sel.cosrej.anglekal > 0.5 && sr->sel.cosrej.numuunconttunedpid > 0.55);})
numu group selection: see NumuCuts.h
Definition: Cuts.h:20
const Cut kPassesPresel(PassesPreselFunc)
Does this event pass the nue preselection?
Definition: Cuts.h:14
caf::StandardRecord * sr
caf::Proxy< caf::SRTrackBase > discrete
Definition: SRProxy.h:1796
caf::Proxy< caf::SRLem > lem
Definition: SRProxy.h:1260
OStream cout
Definition: OStream.cxx:6
caf::Proxy< unsigned int > longestidx
Definition: SRProxy.h:2037
caf::Proxy< int > kalbakcell
Definition: SRProxy.h:817
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2138
caf::Proxy< int > kalfwdcell
Definition: SRProxy.h:822
const Cut kCleanup([](const caf::SRProxy *sr){return(sr->slc.nhit > 20 && sr->trk.cosmic.tracks[0].view==2);})
2 di-block era cleanup before applying other cuts
Definition: Cuts.h:54
caf::Proxy< float > numuunconttunedpid
Definition: SRProxy.h:885
const Cut kNDContainNue([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.nshwlid<=0) return false;const caf::SRShowerLIDProxy &shwlid=sr->vtx.elastic.fuzzyk.png[0].shwlid;const caf::SRVector3DProxy &start=shwlid.start;const caf::SRVector3DProxy &stop=shwlid.stop;return(std::min(start.X(), stop.X()) >-150 && std::max(start.X(), stop.X())< +150 && std::min(start.Y(), stop.Y()) >-150 && std::max(start.Y(), stop.Y())< +150 && std::min(start.Z(), stop.Z()) > 50 && std::max(start.Z(), stop.Z())< 1230);})
Definition: Cuts.h:22
caf::Proxy< caf::SRKalman > kalman
Definition: SRProxy.h:1797
const Cut cut
Definition: exporter_fd.C:30
caf::Proxy< bool > IsValid
Definition: SRProxy.h:2058
caf::Proxy< caf::SRSlice > slc
Definition: SRProxy.h:2142
caf::Proxy< float > calE
Definition: SRProxy.h:1292
const Cut kIsSingleGap([](const caf::SRProxy *sr){ if(sr->hdr.det!=caf::kFARDET) return false;std::bitset< 14 > binary(sr->hdr.dibmask);if(binary[0]==1) return false;bool gap=false;for(int i=0;i< 13;++i){if(binary[i]==0 &&binary[i+1]==1){if(gap) return false;gap=true;}}return gap;})
Definition: Cuts.h:90
caf::Proxy< float > meantime
Definition: SRProxy.h:1311
caf::Proxy< caf::SRTrackBase > cosmic
Definition: SRProxy.h:1795
caf::Proxy< float > anglekal
Definition: SRProxy.h:859
caf::Proxy< caf::SRVector3D > vtx
Definition: SRProxy.h:2073
const Cut kIsNeutrinoInUpstreamDeadDBSingleGap([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->hdr.det!=caf::kFARDET) return false;std::bitset< 14 > binary(sr->hdr.dibmask);if(binary[0]==1) return false;int FirstActiveDB=0;for(int i=0;i< 14;++i){if(binary[i]==0 &&binary[i+1]==1){FirstActiveDB=i+1;}} int nspace=1+2 *FirstActiveDB;double start=nspace *0.45+32 *(6.61+0.0379)*2 *FirstActiveDB;bool isUpStreamOfStart=sr->mc.nu[0].vtx.z< start;return isUpStreamOfStart;})
Definition: Cuts.h:92
const Cut kThroughGoing([](const caf::SRProxy *sr){return(sr->slc.boxmin.Z()< 100 && sr->slc.boxmax.Z() > 800);})
2 di-block era through-going-type event selector
Definition: Cuts.h:45
caf::Proxy< short unsigned int > dibmask
Definition: SRProxy.h:235
caf::Proxy< std::vector< caf::SRKalmanTrack > > tracks
Definition: SRProxy.h:1780
caf::Proxy< caf::SRIDBranch > sel
Definition: SRProxy.h:2141
double zmax
Definition: Cuts.h:67
T min(const caf::Proxy< T > &a, T b)
Template for Cut and SpillCut.
Definition: Cut.h:15
caf::Proxy< caf::SRVertexBranch > vtx
Definition: SRProxy.h:2146
bool PassesPreselFunc(const caf::SRProxy *sr)
Helper for kPassesPresel.
Definition: Cuts.cxx:12
caf::Proxy< size_t > ntracks
Definition: SRProxy.h:1730
caf::Proxy< caf::SRVector3D > boxmax
Definition: SRProxy.h:1290
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232