NumuCuts.cxx
Go to the documentation of this file.
1 #include <iostream>
2 
4 
6 
7 #include <cassert>
8 
9 namespace ana{
10 
11  double ZFrontPosition(int diblock)
12  {
13  if (diblock == 1){return 0.4;}
14  else if (diblock == 2){return 426.2;}
15  else if (diblock == 3){return 852.0;}
16  else if (diblock == 4){return 1277.8;}
17  else if (diblock == 5){return 1703.6;}
18  else if (diblock == 6){return 2129.4;}
19  else if (diblock == 7){return 2555.2;}
20  else if (diblock == 8){return 2981.0;}
21  else if (diblock == 9){return 3406.8;}
22  else if (diblock == 10){return 3832.6;}
23  else if (diblock == 11){return 4258.4;}
24  else if (diblock == 12){return 4684.2;}
25  else if (diblock == 13){return 5110.0;}
26  else if (diblock == 14){return 5535.8;}
27  else{
28  std::cout<<"WHAT ARE YOU DOING? DIBLOCK IS CRAZY!"<<std::endl;
29  assert(0);
30  }
31  }
32 
33  double ZEndPosition(int diblock)
34  {
35  int diblockStart = diblock+1;
36  if (diblockStart == 15){return 5961.6;}
37  else if ((diblockStart >= 1)&&(diblockStart < 15)){return ZFrontPosition(diblockStart);}
38  else{
39  std::cout<<"WHAT ARE YOU DOING? DIBLOCK IS CRAZY!"<<std::endl;
40  assert(0);
41  }
42  }
43 
44 
45  const Cut kNumuBasicQuality(
46  [](const caf::SRProxy* sr)
47  {
48  return (sr->energy.numu.trkccE > 0 && // nothing is terribly wrong
49  sr->sel.remid.pid > 0 && // ensures at least 1 3D Kalman track with a remid value
50  sr->slc.nhit > 20 && // low hits stuff is junk
51  sr->slc.ncontplanes > 4 && // remove really vertical stuff
52  sr->trk.cosmic.ntracks > 0 ); // need a cosmic track
53  }
54  );
55 
56 
57  const Cut kNumuContainFD(
58  [](const caf::SRProxy* sr)
59  {
60  ///Note calculate planes to front and back by hand since
61  //incorrect RH diblock masks make the variable unreliable for FD
62  std::pair<int, int> planes = calcFirstLastLivePlane(sr->slc.firstplane,
63  std::bitset<14>(sr->hdr.dibmask));
64  int planestofront = sr->slc.firstplane - planes.first;
65  int planestoback = planes.second - sr->slc.lastplane;
66  return ( sr->slc.ncellsfromedge > 1
67  && planestofront > 1
68  && planestoback > 1
69  && sr->sel.contain.kalfwdcell > 10
70  && sr->sel.contain.kalbakcell > 10
71  && sr->sel.contain.cosfwdcell > 0
72  && sr->sel.contain.cosbakcell > 0 );
73  }
74  );
75 
76 
77  const Cut kNumuContainND(
78  [](const caf::SRProxy* sr)
79  { return ( sr->trk.kalman.ntracks > sr->trk.kalman.idxremid
80  && sr->slc.ncellsfromedge > 1
81  && sr->slc.firstplane > 1 // skip 0 and 1
82  && sr->slc.lastplane < 212 // skip 212 and 213
83  && sr->trk.kalman.tracks[0].start.Z() < 1150
84  // vertex in mC
85  && ( sr->trk.kalman.tracks[0].stop.Z() < 1275
86  || sr->sel.contain.kalyposattrans < 55 ) // air gap
87  && ( sr->energy.numu.ndhadcalcatE
88  + sr->energy.numu.ndhadcaltranE ) < 0.03
89  // too much E in mC for E estimation
90  && sr->sel.contain.kalfwdcellnd > 4
91  && sr->sel.contain.kalbakcellnd > 8 );
92  }
93  );
94 
95  const Cut kNumuNCRej(
96  [](const caf::SRProxy* sr)
97  { return (sr->sel.remid.pid>0.75);
98  }
99  );
100 
101  const Cut kCVNmSel(
102  [](const caf::SRProxy* sr)
103  { return (sr->sel.cvn.numuid>0.5);
104  }
105  );
106 
107  const Cut kNumuHybridNCRej(
108  [](const caf::SRProxy* sr)
109  {
110  return (sr->sel.remid.pid > 0.5
111  && sr->sel.cvn.numuid > 0.5);
112  }
113  );
114  const Cut kKirkSATuneFD(
115  [](const caf::SRProxy* sr)
116  { return (sr->sel.remid.pid > 0.5
117  && sr->sel.cvn.numuid > 0.5
118  && sr->sel.cosrej.anglekal > 0.4
119  && sr->slc.nhit < 400
120  && sr->sel.nuecosrej.pngptp < 0.9
121  && sr->sel.cosrej.numucontpid2019 > 0.51);
122  }
123  );
124 
125  const Cut kNumuCosmicRej(
126  [](const caf::SRProxy* sr)
127  { return ( sr->sel.cosrej.anglekal > 0.5 &&
128  //sr->sel.cosrej.numuSAcontpid > 0.535 &&
129  sr->sel.cosrej.numucontpid2019 > 0.535 &&
130  sr->slc.nhit < 400);
131  }
132  );
133 
134  const Cut kNumuCosmicRejLoose(
135  [](const caf::SRProxy* sr)
136  { return ( sr->sel.cosrej.numucontpid2020 > 0.48 );
137  }
138  );
139 
141  [](const caf::SRProxy* sr)
142  { return ( //sr->sel.cosrej.numuSAcontpid > 0.5 );
143  sr->sel.cosrej.numucontpid2019 > 0.5 );
144  }
145  );
146 
147  const Cut kNumuQESel(
148  [](const caf::SRProxy* sr)
149  {
150  std::cout << "WARNING! Attempting to access kNumuQESel which relies on qepid (which no longer exists.) Aborting..."
151  << std::endl;
152  abort();
153  // return ( (sr->sel.qepid.ntrk == 1 && sr->sel.qepid.pid > 0.45) ||
154  // (sr->sel.qepid.ntrk == 2 && sr->sel.qepid.pid > 0.4 ) );
155  return false;
156  }
157  );
158 
159 const Cut kNewTune([](const caf::SRProxy* sr)
160  { return (sr->sel.cvn.numuid>0.5 &&
161  sr->sel.remid.pid>0.75 &&
162  sr->sel.cosrej.numucontpid2020>0.51 &&
163  sr->sel.cosrej.anglekal>0.4 &&
164  sr->sel.nuecosrej.pngptp<0.9);
165  }
166  );
167 
168 const Cut kCVNmCosSel([](const caf::SRProxy* sr)
169  { return(sr->trk.kalman.tracks[0].start.Y() < 650
170  && sr->sel.cosrej.anglekal > 0.3
171  && sr->trk.cosmic.tracks[0].start.Y() < 600
172  && sr->sel.contain.cosbakdist > 40
173  && sr->sel.nuecosrej.pngptp < 0.8);
174  }
175  );
176 
178  [](const caf::SRProxy* sr)
179  {
180  bool basicsExist = sr->trk.kalman.ntracks > 0 && sr->trk.kalman.idxremid != 999 &&
181  sr->energy.numu.E != -5 && sr->trk.cosmic.ntracks > 0;
182  int best3DRemid = sr->trk.kalman.idxremid;
183  double startX = sr->trk.kalman.tracks[0].start.X();
184  double startY = sr->trk.kalman.tracks[0].start.Y();
185  double startZ = sr->trk.kalman.tracks[0].start.Z();
186  double stopX = sr->trk.kalman.tracks[0].stop.X();
187  double stopY = sr->trk.kalman.tracks[0].stop.Y();
188  double stopZ = sr->trk.kalman.tracks[0].stop.Z();
189  double dirY = sr->trk.kalman.tracks[0].dir.Y();
190  bool negDirY = (dirY<0);
191  int startDetectorDiblock = sr->hdr.dibfirst;
192  int stopDetectorDiblock = sr->hdr.diblast;
193  double startDetectorZ = ZFrontPosition(startDetectorDiblock);
194  double stopDetectorZ = ZEndPosition(stopDetectorDiblock);
195 
196  // track start containment
197  bool kVertBasic = (fabs(startX) < 740 && startY > -750 );
198  bool kVertDirContain;
199  if(negDirY){ kVertDirContain = (startY < 650 && startZ > (startDetectorZ + 40)); }
200  else{ kVertDirContain = (startY < 725 && startZ > (startDetectorZ + 20)); }
201  bool kContainedVert = kVertBasic && kVertDirContain;
202 
203  // track end containment
204  bool kEndBasic = (fabs(stopX) < 740 && stopY > -750 );
205  bool kEndDirContain;
206 
207  if(negDirY){ kEndDirContain = (stopY < 725 && stopZ < (stopDetectorZ - 20.0)); }
208  else{ kEndDirContain = (stopY < 650 && stopZ < (stopDetectorZ - 40.0)); }
209 
210  bool kContainedEnd = kEndBasic && kEndDirContain;
211 
212  int trkHit = sr->trk.kalman.tracks[0].nhit;
213 
214  int trackNPlanes = sr->trk.kalman.tracks[0].nplane;
215  int sliceNHit = sr->slc.nhit;
216 
217  double ratioFlasher = sliceNHit/double(trackNPlanes);
218  bool kNotFlasher = ratioFlasher < 3.0;
219 
220  // check basic cuts first
221  if(basicsExist && kContainedVert && kContainedEnd && trkHit > 5 && kNotFlasher){
222 
223  double cosBakDist = sr->sel.contain.cosbakdist;
224  double cosBeamDir = sr->sel.cosrej.anglecos;
225 
226  bool kCosProjDist = (cosBakDist > 50.0);
227 
228  bool kNegDirBeamProjDistInBox = ((cosBeamDir > 0.20) && (cosBeamDir < 0.65) &&
229  (cosBakDist < 725));
230  bool kPosDirBeamProjDistInBox = ((cosBeamDir > -0.85) && (cosBeamDir < -0.2) &&
231  (cosBakDist < 725));
232 
233  bool kNegDirBeamProjDistInTriangle = false;
234  bool kPosDirBeamProjDistInTriangle = false;
235 
236  if(kNegDirBeamProjDistInBox){
237  double y = 0.65 - (9.0/14500.0)*cosBakDist;
238  if(y > cosBeamDir){ kNegDirBeamProjDistInTriangle = true; }
239  }
240 
241  if(kPosDirBeamProjDistInBox){
242  double y = -0.85 + (13.0/14500.0)*cosBakDist;
243  if(y < cosBeamDir){ kPosDirBeamProjDistInTriangle = true; }
244  }
245 
246  bool kNegDirBeamProjDistInRectangle = ((cosBeamDir > -0.3) &&
247  (cosBeamDir < 0.2) && (cosBakDist < 1500));
248  bool kPosDirBeamProjDistInRectangle = ((cosBeamDir > -0.2) &&
249  (cosBeamDir < 0.2) && (cosBakDist < 1500));
250 
251  bool kDirBeamProjDist = false;
252  if(negDirY){
253  kDirBeamProjDist = !kNegDirBeamProjDistInTriangle && !kNegDirBeamProjDistInRectangle;
254  }
255  else{
256  kDirBeamProjDist = !kPosDirBeamProjDistInTriangle && !kPosDirBeamProjDistInRectangle;
257  }
258 
259  TVector3 vert = sr->trk.kalman.tracks[0].start;
260  TVector3 meanpos = TVector3(sr->slc.meanpos.X(),sr->slc.meanpos.Y(),
261  sr->slc.meanpos.Z());
262  TVector3 evtdir = (meanpos-vert).Unit();
263  TVector3 beamdir = TVector3(0,sin(0.05256),cos(0.05256));
264  beamdir.Unit();
265  double evtcosNumi = evtdir.Dot(beamdir);
266  double pt_frac_evt = sqrt(1-evtcosNumi*evtcosNumi);
267 
268  bool kPt = pt_frac_evt < 0.65;
269 
270  if(kCosProjDist && kDirBeamProjDist && kPt){
271  int nKal = sr->trk.kalman.ntracks;
272  int nKal2D = sr->trk.kalman.ntracks2d;
273 
274  bool passesAllContainment = true;
275  for (int s=0; s<nKal; ++s){
276  if(s == best3DRemid){ continue; }
277 
278  double startOtherX = sr->trk.kalman.tracks[s].start.X();
279  double startOtherY = sr->trk.kalman.tracks[s].start.Y();
280  double startOtherZ = sr->trk.kalman.tracks[s].start.Z();
281 
282  double stopOtherX = sr->trk.kalman.tracks[s].stop.X();
283  double stopOtherY = sr->trk.kalman.tracks[s].stop.Y();
284  double stopOtherZ = sr->trk.kalman.tracks[s].stop.Z();
285 
286  bool kContainOtherVert = ((fabs(startOtherX) < 740) &&
287  (startOtherY < 725) && (startOtherY > -750) &&
288  (startOtherZ > (startDetectorZ + 20.0)));
289 
290  bool kContainOtherEnd = ((fabs(stopOtherX) < 740) &&
291  (stopOtherY < 725) && (stopOtherY > -750) &&
292  (stopOtherZ < (stopDetectorZ - 20.0)));
293 
294  if (!kContainOtherVert){passesAllContainment = false;}
295  if (!kContainOtherEnd){passesAllContainment = false;}
296 
297  }//end of loop over other 3D tracks
298 
299  for (int s=0; s<nKal2D; ++s){
300 
301  double startOtherX = sr->trk.kalman.tracks2d[s].start.X();
302  double startOtherY = sr->trk.kalman.tracks2d[s].start.Y();
303  double startOtherZ = sr->trk.kalman.tracks2d[s].start.Z();
304 
305  double stopOtherX = sr->trk.kalman.tracks2d[s].stop.X();
306  double stopOtherY = sr->trk.kalman.tracks2d[s].stop.Y();
307  double stopOtherZ = sr->trk.kalman.tracks2d[s].stop.Z();
308 
309  bool kContainOtherVert = ((fabs(startOtherX) < 740) &&
310  (startOtherY < 725) && (startOtherY > -750) &&
311  (startOtherZ > (startDetectorZ + 20.0)));
312 
313  bool kContainOtherEnd = ((fabs(stopOtherX) < 740) &&
314  (stopOtherY < 725) && (stopOtherY > -750) &&
315  (stopOtherZ < (stopDetectorZ - 20.0)));
316 
317  if (!kContainOtherVert){passesAllContainment = false;}
318  if (!kContainOtherEnd){passesAllContainment = false;}
319 
320  }//End of loop over 2D tracks
321 
322  return passesAllContainment;
323 
324  }
325  else{ return false; }
326 
327  }//end of basics cuts
328  else{ return false; }
329  });
330 
331  const Cut kNumuDecafPresel(
332  [](const caf::SRProxy* sr)
333  {
334  return (sr->slc.nhit > 20 && sr->sel.remid.pid > 0);
335  });
336 }
const Cut kKirkSATuneFD([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.5 &&sr->sel.cvn.numuid > 0.5 &&sr->sel.cosrej.anglekal > 0.4 &&sr->slc.nhit< 400 &&sr->sel.nuecosrej.pngptp< 0.9 &&sr->sel.cosrej.numucontpid2019 > 0.51);})
Definition: NumuCuts.h:30
caf::Proxy< float > trkccE
Definition: SRProxy.h:195
diblock
print "ROW IS " print row
Definition: geo2elec.py:31
caf::Proxy< float > cosbakdist
Definition: SRProxy.h:807
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
caf::Proxy< std::vector< caf::SRTrack > > tracks
Definition: SRProxy.h:1731
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
caf::Proxy< int > kalfwdcellnd
Definition: SRProxy.h:823
caf::Proxy< float > ndhadcaltranE
Definition: SRProxy.h:179
caf::Proxy< float > E
Definition: SRProxy.h:164
caf::Proxy< unsigned int > idxremid
Definition: SRProxy.h:1777
caf::Proxy< size_t > ntracks
Definition: SRProxy.h:1778
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
double ZEndPosition(int diblock)
Definition: NumuCuts.cxx:33
caf::Proxy< caf::SRContain > contain
Definition: SRProxy.h:1251
caf::Proxy< caf::SRNumuEnergy > numu
Definition: SRProxy.h:214
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
T sqrt(T number)
Definition: d0nt_math.hpp:156
const Cut kCVNmSel([](const caf::SRProxy *sr){return(sr->sel.cvn.numuid >0.5);})
Definition: NumuCuts.h:26
caf::Proxy< float > pid
Definition: SRProxy.h:1136
caf::Proxy< short unsigned int > diblast
Definition: SRProxy.h:234
caf::Proxy< unsigned int > ncontplanes
Definition: SRProxy.h:1314
const Cut kNumuSACosmicRejLoose([](const caf::SRProxy *sr){return( sr->sel.cosrej.numucontpid2019 > 0.5);})
Definition: NumuCuts.h:36
caf::Proxy< size_t > ntracks2d
Definition: SRProxy.h:1779
const Cut kNumuCosmicRej([](const caf::SRProxy *sr){return(sr->sel.cosrej.anglekal > 0.5 && sr->sel.cosrej.numucontpid2019 > 0.535 && sr->slc.nhit< 400);})
Definition: NumuCuts.h:32
double ZFrontPosition(int diblock)
Definition: NumuCuts.cxx:11
const Cut kCosmicRejStraightCuts([](const caf::SRProxy *sr){bool basicsExist=sr->trk.kalman.ntracks > 0 &&sr->trk.kalman.idxremid!=999 &&sr->energy.numu.E!=-5 &&sr->trk.cosmic.ntracks > 0;int best3DRemid=sr->trk.kalman.idxremid;double startX=sr->trk.kalman.tracks[0].start.X();double startY=sr->trk.kalman.tracks[0].start.Y();double startZ=sr->trk.kalman.tracks[0].start.Z();double stopX=sr->trk.kalman.tracks[0].stop.X();double stopY=sr->trk.kalman.tracks[0].stop.Y();double stopZ=sr->trk.kalman.tracks[0].stop.Z();double dirY=sr->trk.kalman.tracks[0].dir.Y();bool negDirY=(dirY< 0);int startDetectorDiblock=sr->hdr.dibfirst;int stopDetectorDiblock=sr->hdr.diblast;double startDetectorZ=ZFrontPosition(startDetectorDiblock);double stopDetectorZ=ZEndPosition(stopDetectorDiblock);bool kVertBasic=(fabs(startX)< 740 &&startY >-750);bool kVertDirContain;if(negDirY){kVertDirContain=(startY< 650 &&startZ >(startDetectorZ+40));}else{kVertDirContain=(startY< 725 &&startZ >(startDetectorZ+20));}bool kContainedVert=kVertBasic &&kVertDirContain;bool kEndBasic=(fabs(stopX)< 740 &&stopY >-750);bool kEndDirContain;if(negDirY){kEndDirContain=(stopY< 725 &&stopZ< (stopDetectorZ-20.0));}else{kEndDirContain=(stopY< 650 &&stopZ< (stopDetectorZ-40.0));}bool kContainedEnd=kEndBasic &&kEndDirContain;int trkHit=sr->trk.kalman.tracks[0].nhit;int trackNPlanes=sr->trk.kalman.tracks[0].nplane;int sliceNHit=sr->slc.nhit;double ratioFlasher=sliceNHit/double(trackNPlanes);bool kNotFlasher=ratioFlasher< 3.0;if(basicsExist &&kContainedVert &&kContainedEnd &&trkHit > 5 &&kNotFlasher){double cosBakDist=sr->sel.contain.cosbakdist;double cosBeamDir=sr->sel.cosrej.anglecos;bool kCosProjDist=(cosBakDist > 50.0);bool kNegDirBeamProjDistInBox=((cosBeamDir > 0.20)&&(cosBeamDir< 0.65)&&(cosBakDist< 725));bool kPosDirBeamProjDistInBox=((cosBeamDir >-0.85)&&(cosBeamDir< -0.2)&&(cosBakDist< 725));bool kNegDirBeamProjDistInTriangle=false;bool kPosDirBeamProjDistInTriangle=false;if(kNegDirBeamProjDistInBox){double y=0.65-(9.0/14500.0)*cosBakDist;if(y > cosBeamDir){kNegDirBeamProjDistInTriangle=true;}}if(kPosDirBeamProjDistInBox){double y=-0.85+(13.0/14500.0)*cosBakDist;if(y< cosBeamDir){kPosDirBeamProjDistInTriangle=true;}}bool kNegDirBeamProjDistInRectangle=((cosBeamDir >-0.3)&&(cosBeamDir< 0.2)&&(cosBakDist< 1500));bool kPosDirBeamProjDistInRectangle=((cosBeamDir >-0.2)&&(cosBeamDir< 0.2)&&(cosBakDist< 1500));bool kDirBeamProjDist=false;if(negDirY){kDirBeamProjDist=!kNegDirBeamProjDistInTriangle &&!kNegDirBeamProjDistInRectangle;}else{kDirBeamProjDist=!kPosDirBeamProjDistInTriangle &&!kPosDirBeamProjDistInRectangle;}TVector3 vert=sr->trk.kalman.tracks[0].start;TVector3 meanpos=TVector3(sr->slc.meanpos.X(), sr->slc.meanpos.Y(), sr->slc.meanpos.Z());TVector3 evtdir=(meanpos-vert).Unit();TVector3 beamdir=TVector3(0, sin(0.05256), cos(0.05256));beamdir.Unit();double evtcosNumi=evtdir.Dot(beamdir);double pt_frac_evt=sqrt(1-evtcosNumi *evtcosNumi);bool kPt=pt_frac_evt< 0.65;if(kCosProjDist &&kDirBeamProjDist &&kPt){int nKal=sr->trk.kalman.ntracks;int nKal2D=sr->trk.kalman.ntracks2d;bool passesAllContainment=true;for(int s=0;s< nKal;++s){if(s==best3DRemid){continue;}double startOtherX=sr->trk.kalman.tracks[s].start.X();double startOtherY=sr->trk.kalman.tracks[s].start.Y();double startOtherZ=sr->trk.kalman.tracks[s].start.Z();double stopOtherX=sr->trk.kalman.tracks[s].stop.X();double stopOtherY=sr->trk.kalman.tracks[s].stop.Y();double stopOtherZ=sr->trk.kalman.tracks[s].stop.Z();bool kContainOtherVert=((fabs(startOtherX)< 740)&&(startOtherY< 725)&&(startOtherY >-750)&&(startOtherZ >(startDetectorZ+20.0)));bool kContainOtherEnd=((fabs(stopOtherX)< 740)&&(stopOtherY< 725)&&(stopOtherY >-750)&&(stopOtherZ< (stopDetectorZ-20.0)));if(!kContainOtherVert){passesAllContainment=false;}if(!kContainOtherEnd){passesAllContainment=false;}}for(int s=0;s< nKal2D;++s){double startOtherX=sr->trk.kalman.tracks2d[s].start.X();double startOtherY=sr->trk.kalman.tracks2d[s].start.Y();double startOtherZ=sr->trk.kalman.tracks2d[s].start.Z();double stopOtherX=sr->trk.kalman.tracks2d[s].stop.X();double stopOtherY=sr->trk.kalman.tracks2d[s].stop.Y();double stopOtherZ=sr->trk.kalman.tracks2d[s].stop.Z();bool kContainOtherVert=((fabs(startOtherX)< 740)&&(startOtherY< 725)&&(startOtherY >-750)&&(startOtherZ >(startDetectorZ+20.0)));bool kContainOtherEnd=((fabs(stopOtherX)< 740)&& (stopOtherY< 725)&&(stopOtherY >-750)&& (stopOtherZ< (stopDetectorZ-20.0)));if(!kContainOtherVert){passesAllContainment=false;}if(!kContainOtherEnd){passesAllContainment=false;}}return passesAllContainment;}else{return false;}}else{return false;}})
Definition: NumuCuts.h:44
caf::Proxy< float > anglecos
Definition: SRProxy.h:858
const Cut kNumuContainFD([](const caf::SRProxy *sr){ std::pair< int, int > planes=calcFirstLastLivePlane(sr->slc.firstplane, std::bitset< 14 >(sr->hdr.dibmask));int planestofront=sr->slc.firstplane-planes.first;int planestoback=planes.second-sr->slc.lastplane;return( sr->slc.ncellsfromedge > 1 &&planestofront > 1 &&planestoback > 1 &&sr->sel.contain.kalfwdcell > 10 &&sr->sel.contain.kalbakcell > 10 &&sr->sel.contain.cosfwdcell > 0 &&sr->sel.contain.cosbakcell > 0);})
Definition: NumuCuts.h:20
caf::Proxy< int > cosfwdcell
Definition: SRProxy.h:810
caf::Proxy< int > cosbakcell
Definition: SRProxy.h:805
caf::Proxy< caf::SREnergyBranch > energy
Definition: SRProxy.h:2136
const Cut kNumuContainND([](const caf::SRProxy *sr){return( sr->trk.kalman.ntracks > sr->trk.kalman.idxremid &&sr->slc.ncellsfromedge > 1 &&sr->slc.firstplane > 1 &&sr->slc.lastplane< 212 &&sr->trk.kalman.tracks[0].start.Z()< 1150 &&( sr->trk.kalman.tracks[0].stop.Z()< 1275 ||sr->sel.contain.kalyposattrans< 55) &&( sr->energy.numu.ndhadcalcatE +sr->energy.numu.ndhadcaltranE)< 0.03 &&sr->sel.contain.kalfwdcellnd > 4 &&sr->sel.contain.kalbakcellnd > 8);})
Definition: NumuCuts.h:22
caf::Proxy< caf::SRCosRej > cosrej
Definition: SRProxy.h:1252
const Cut kNumuHybridNCRej([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.5 &&sr->sel.cvn.numuid > 0.5);})
Definition: NumuCuts.h:28
caf::Proxy< caf::SRNueCosRej > nuecosrej
Definition: SRProxy.h:1265
caf::Proxy< int > kalbakcellnd
Definition: SRProxy.h:818
const XML_Char * s
Definition: expat.h:262
caf::Proxy< unsigned int > nhit
Definition: SRProxy.h:1315
caf::Proxy< caf::SRTrackBranch > trk
Definition: SRProxy.h:2145
const Cut kCVNmCosSel([](const caf::SRProxy *sr){return(sr->trk.kalman.tracks[0].start.Y()< 650 &&sr->sel.cosrej.anglekal > 0.3 &&sr->trk.cosmic.tracks[0].start.Y()< 600 &&sr->sel.contain.cosbakdist > 40 &&sr->sel.nuecosrej.pngptp< 0.8);})
Definition: NumuCuts.h:42
const Cut kNumuQESel([](const caf::SRProxy *sr){std::cout<< "WARNING! Attempting to access kNumuQESel which relies on qepid (which no longer exists.) Aborting..."<< std::endl;abort(); return false;})
Definition: NumuCuts.h:38
caf::Proxy< caf::SRCVNResult > cvn
Definition: SRProxy.h:1253
caf::Proxy< unsigned int > ncellsfromedge
Definition: SRProxy.h:1313
caf::StandardRecord * sr
caf::Proxy< unsigned int > lastplane
Definition: SRProxy.h:1309
caf::Proxy< caf::SRRemid > remid
Definition: SRProxy.h:1269
const Cut kNumuNCRej([](const caf::SRProxy *sr){return(sr->sel.remid.pid >0.75);})
Definition: NumuCuts.h:24
TVector3 Unit() const
caf::Proxy< float > numucontpid2020
Definition: SRProxy.h:884
const Cut kNumuDecafPresel([](const caf::SRProxy *sr){return(sr->slc.nhit > 20 &&sr->sel.remid.pid > 0);})
Definition: NumuCuts.h:46
OStream cout
Definition: OStream.cxx:6
caf::Proxy< int > kalbakcell
Definition: SRProxy.h:817
caf::Proxy< int > kalfwdcell
Definition: SRProxy.h:822
caf::Proxy< float > ndhadcalcatE
Definition: SRProxy.h:178
caf::Proxy< caf::SRKalman > kalman
Definition: SRProxy.h:1797
caf::Proxy< std::vector< caf::SRTrack > > tracks2d
Definition: SRProxy.h:1781
T sin(T number)
Definition: d0nt_math.hpp:132
const Cut kNumuBasicQuality([](const caf::SRProxy *sr){return(sr->energy.numu.trkccE > 0 && sr->sel.remid.pid > 0 && sr->slc.nhit > 20 && sr->slc.ncontplanes > 4 && sr->trk.cosmic.ntracks > 0);})
Definition: NumuCuts.h:14
caf::Proxy< caf::SRSlice > slc
Definition: SRProxy.h:2142
const Cut kNewTune([](const caf::SRProxy *sr){return(sr->sel.cvn.numuid >0.5 && sr->sel.remid.pid >0.75 && sr->sel.cosrej.numucontpid2020 >0.51 && sr->sel.cosrej.anglekal >0.4 && sr->sel.nuecosrej.pngptp< 0.9);})
Definition: NumuCuts.h:40
caf::Proxy< caf::SRVector3D > meanpos
Definition: SRProxy.h:1310
caf::Proxy< caf::SRTrackBase > cosmic
Definition: SRProxy.h:1795
caf::Proxy< float > anglekal
Definition: SRProxy.h:859
std::pair< int, int > calcFirstLastLivePlane(int plane, std::bitset< 14 > binary, caf::Det_t det)
caf::Proxy< float > pngptp
Definition: SRProxy.h:1061
T cos(T number)
Definition: d0nt_math.hpp:78
assert(nhit_max >=nhit_nbins)
caf::Proxy< unsigned int > firstplane
Definition: SRProxy.h:1305
caf::Proxy< float > kalyposattrans
Definition: SRProxy.h:826
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
caf::Proxy< short unsigned int > dibfirst
Definition: SRProxy.h:233
caf::Proxy< float > numucontpid2019
Definition: SRProxy.h:883
caf::Proxy< float > numuid
Definition: SRProxy.h:907
caf::Proxy< size_t > ntracks
Definition: SRProxy.h:1730
const Cut kNumuCosmicRejLoose([](const caf::SRProxy *sr){return(sr->sel.cosrej.numucontpid2020 > 0.48);})
Definition: NumuCuts.h:34