NueVars.cxx
Go to the documentation of this file.
2 
4 
5 namespace ana
6 {
7  const Var kRawE = SIMPLEVAR(energy.nue.rawgevslice);
8  const Var kRawEshw = SIMPLEVAR(energy.nue.rawgevshw);
9  const Var kRawEhad = SIMPLEVAR(energy.nue.rawgevhad);
10 
11  const Var kDistAllTop (
12  [](const caf::SRProxy* sr)
13  {
15  return -1000.0f;
16  return float(sr->sel.nuecosrej.distallpngtop);
17  });
18 
19 
20  const Var kDistAllBottom (
21  [](const caf::SRProxy* sr)
22  {
24  return -1000.0f;
25  return float(sr->sel.nuecosrej.distallpngbottom);
26  });
27 
28 
29  const Var kDistAllWest (
30  [](const caf::SRProxy* sr)
31  {
33  return -1000.0f;
34  return float(sr->sel.nuecosrej.distallpngwest);
35  });
36 
37 
38  const Var kDistAllEast (
39  [](const caf::SRProxy* sr)
40  {
42  return -1000.0f;
43  return float(sr->sel.nuecosrej.distallpngeast);
44  });
45 
46 
47  const Var kDistAllBack (
48  [](const caf::SRProxy* sr)
49  {
51  return -1000.0f;
52  return float(sr->sel.nuecosrej.distallpngback);
53  });
54 
55 
56  const Var kDistAllFront (
57  [](const caf::SRProxy* sr)
58  {
60  return -1000.0f;
61  return float(sr->sel.nuecosrej.distallpngfront);
62  });
63 
64 
65  const Var kDistNotTop (
66  [](const caf::SRProxy* sr)
67  {
68  float distnottop = std::min(kDistAllBottom(sr),kDistAllFront(sr));
69  distnottop = std::min(float(kDistAllBack(sr)),distnottop);
70  distnottop = std::min(float(kDistAllEast(sr)),distnottop);
71  distnottop = std::min(float(kDistAllWest(sr)),distnottop);
72 
73  return distnottop;
74  });
75 
76 
77  const Var kMaxY(
78  [](const caf::SRProxy* sr)
79  {
80  if(!sr->vtx.elastic.IsValid) return -1000.0f;
81  if(sr->vtx.elastic.fuzzyk.nshwlid == 0) return -1000.0f;
82  float maxyall = -999.0;
83  for(unsigned int i=0;i<sr->vtx.elastic.fuzzyk.nshwlid;i++){
84  maxyall = std::max(std::max(sr->vtx.elastic.fuzzyk.png[i].shwlid.start.Y(),
85  sr->vtx.elastic.fuzzyk.png[i].shwlid.stop.Y()),maxyall);
86  }
87  return maxyall;
88  });
89 
90  const Var kPtP = SIMPLEVAR(sel.nuecosrej.partptp);
91 
92  const Var kSparsenessAsymm = SIMPLEVAR(sel.nuecosrej.sparsenessasymm);
93 
94 
95  const Var kMaxZ(
96  [](const caf::SRProxy* sr)
97  {
98  if(!sr->vtx.elastic.IsValid) return -1000.0f;
99  if(sr->vtx.elastic.fuzzyk.nshwlid == 0) return -1000.0f;
100  float maxzall = -999.0;
101  for(unsigned int i=0;i<sr->vtx.elastic.fuzzyk.nshwlid;i++){
102  maxzall = std::max(std::max(sr->vtx.elastic.fuzzyk.png[i].shwlid.start.Z(),
103  sr->vtx.elastic.fuzzyk.png[i].shwlid.stop.Z()),maxzall);
104  }
105  return maxzall;
106  });
107 
108 
109  const Var kCosPID = SIMPLEVAR(sel.nuecosrej.cospidlight);
110  const Var kCosPIDContain = SIMPLEVAR(sel.nuecosrej.cospidcontain);
111 
112  const Var kCosPIDCoreBDT = SIMPLEVAR(sel.nuecosrej.cospidcorebdt);
113  const Var kCosPIDPeriBDT = SIMPLEVAR(sel.nuecosrej.cospidperibdt);
114 }
caf::Proxy< unsigned int > nshwlid
Definition: SRProxy.h:2040
caf::Proxy< caf::SRFuzzyK > fuzzyk
Definition: SRProxy.h:2059
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kDistAllBottom([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngbottom)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngbottom);})
Distance of all showers in slice from the bottom edge of detector.
Definition: NueVars.h:33
caf::Proxy< float > distallpngtop
Definition: SRProxy.h:1044
const Var kDistAllWest([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngwest)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngwest);})
Distance of all showers in slice from the west edge of detector.
Definition: NueVars.h:36
const Var kDistAllTop([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngtop)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngtop);})
Distance of all showers in slice from the top edge of detector.
Definition: NueVars.h:30
caf::Proxy< float > distallpngeast
Definition: SRProxy.h:1042
const Var kDistAllBack([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngback)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngback);})
Distance of all showers in slice from the back edge of detector.
Definition: NueVars.h:42
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
const Var kCosPIDContain
Definition: NueVars.cxx:110
const Var kRawE
Raw energy (without calE correction) for the slice,.
Definition: NueVars.cxx:7
#define SIMPLEVAR(CAFNAME)
For Vars where literally all you need is a single CAF variable.
Definition: Var.h:88
const Var kMaxZ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1000.0f;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return-1000.0f;float maxzall=-999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;i++){maxzall=std::max(std::max(sr->vtx.elastic.fuzzyk.png[i].shwlid.start.Z(), sr->vtx.elastic.fuzzyk.png[i].shwlid.stop.Z()), maxzall);}return maxzall;})
Definition: NueVars.h:76
const Var kSparsenessAsymm
Definition: NueVars.cxx:92
_Var< caf::SRProxy > Var
Representation of a variable to be retrieved from a caf::StandardRecord object.
Definition: Var.h:74
int isnan(const stan::math::var &a)
Definition: std_isnan.hpp:18
const Var kDistAllEast([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngeast)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngeast);})
Distance of all showers in slice from the east edge of detector.
Definition: NueVars.h:39
caf::Proxy< caf::SRElastic > elastic
Definition: SRProxy.h:2118
caf::Proxy< caf::SRNueCosRej > nuecosrej
Definition: SRProxy.h:1265
const Var kRawEshw
Raw energy (without calE correction) for the leading shower,.
Definition: NueVars.cxx:8
const Var kPtP
Transverse momentum fraction in slice.
Definition: NueVars.cxx:90
const Var kMaxY([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1000.0f;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return-1000.0f;float maxyall=-999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;i++){maxyall=std::max(std::max(sr->vtx.elastic.fuzzyk.png[i].shwlid.start.Y(), sr->vtx.elastic.fuzzyk.png[i].shwlid.stop.Y()), maxyall);}return maxyall;})
Definition: NueVars.h:60
double energy
Definition: plottest35.C:25
caf::StandardRecord * sr
const Var kCosPID
Definition: NueVars.cxx:109
caf::Proxy< float > distallpngwest
Definition: SRProxy.h:1045
caf::Proxy< float > distallpngback
Definition: SRProxy.h:1040
const Var kDistAllFront([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngfront)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngfront);})
Distance of all showers in slice from the front edge of detector.
Definition: NueVars.h:45
caf::Proxy< bool > IsValid
Definition: SRProxy.h:2058
caf::Proxy< float > distallpngbottom
Definition: SRProxy.h:1041
const Var kDistNotTop([](const caf::SRProxy *sr){float distnottop=std::min(kDistAllBottom(sr), kDistAllFront(sr));distnottop=std::min(float(kDistAllBack(sr)), distnottop);distnottop=std::min(float(kDistAllEast(sr)), distnottop);distnottop=std::min(float(kDistAllWest(sr)), distnottop);return distnottop;})
Distance of all showers in slice from the edge that is not the top.
Definition: NueVars.h:52
const Var kRawEhad
Raw energy (without calE correction) for the slice - leading shower,.
Definition: NueVars.cxx:9
caf::Proxy< caf::SRIDBranch > sel
Definition: SRProxy.h:2141
T min(const caf::Proxy< T > &a, T b)
caf::Proxy< caf::SRVertexBranch > vtx
Definition: SRProxy.h:2146
const Var kCosPIDCoreBDT
2020 nue cosmic rejection BDT variable - core
Definition: NueVars.cxx:112
const Var kCosPIDPeriBDT
2020 nue cosmic rejection BDT variable - peripheral
Definition: NueVars.cxx:113
caf::Proxy< float > distallpngfront
Definition: SRProxy.h:1043