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