SharedPlotLists.cxx
Go to the documentation of this file.
3 
4 #include "CAFAna/Vars/Vars.h"
5 
7 #include "CAFAna/Vars/BPFVars.h"
12 #include "CAFAna/Vars/TruthVars.h"
14 #include "CAFAna/Vars/XsecTunes.h"
16 
18 
20 
21 // in this we are putting everything that is not specific to any analysis:
22 // slice, vertex, prong
23 
24 namespace ana
25 {
26 
27  void AddHistDefRecoND(std::vector<HistDef>& hd){
28  hd.push_back({"nVtx", {"Number of Vertices", Binning::Simple(4, -0.5, 3.5), kNElastic}});
29  hd.push_back({"VtxX", {"Reconstructed Vertex X [m]", kXYBinsND, kVtxXm}});
30  hd.push_back({"VtxY", {"Reconstructed Vertex Y [m]", kXYBinsND, kVtxYm}});
31  hd.push_back({"VtxZ", {"Reconstructed Vertex Z [m]", kZBinsND, kVtxZm}});
32  hd.push_back({"SlcMinX", {"Slice Min X [m]", kXYBinsND, kSlcMinX}});
33  hd.push_back({"SlcMinY", {"Slice Min Y [m]", kXYBinsND, kSlcMinY}});
34  hd.push_back({"SlcMinZ", {"Slice Min Z [m]", kZBinsND, kSlcMinZ}});
35  hd.push_back({"SlcMaxX", {"Slice Max X [m]", kXYBinsND, kSlcMaxX}});
36  hd.push_back({"SlcMaxY", {"Slice Max Y [m]", kXYBinsND, kSlcMaxY}});
37  hd.push_back({"SlcMaxZ", {"Slice Max Z [m]", kZBinsND, kSlcMaxZ}});
38  }
39 
40  void AddMultiHistDefRecoND(std::vector<MultiHistDef>& hd){
41  hd.push_back({"PngStartX", {"Prong start X [m]", kXYBinsND, kPngStartX}});
42  hd.push_back({"PngStartY", {"Prong start Y [m]", kXYBinsND, kPngStartY}});
43  hd.push_back({"PngStartZ", {"Prong start Z [m]", kZBinsND, kPngStartZ}});
44  }
45 
46  void AddHistDefTruthND(std::vector<HistDef>& hd){
47  hd.push_back({"TrueVtxX", {"True Vertex X [m]", kXYBinsND, kTrueVtxX}});
48  hd.push_back({"TrueVtxY", {"True Vertex Y [m]", kXYBinsND, kTrueVtxY}});
49  hd.push_back({"TrueVtxZ", {"True Vertex Z [m]", kZBinsND, kTrueVtxZ}});
50  }
51 
52  void AddHistDefRecoFD(std::vector<HistDef>& hd){
53  hd.push_back({"nVtx", {"Number of Vertices", Binning::Simple(4, -0.5, 3.5), kNElastic}});
54  hd.push_back({"VtxX", {"Reconstructed Vertex X [m]", kXYBinsFD, kVtxXm}});
55  hd.push_back({"VtxY", {"Reconstructed Vertex Y [m]", kXYBinsFD, kVtxYm}});
56  hd.push_back({"VtxZ", {"Reconstructed Vertex Z [m]", kZBinsFD, kVtxZm}});
57  hd.push_back({"SlcMinX", {"Slice Min X [m]", kXYBinsFD, kSlcMinX}});
58  hd.push_back({"SlcMinY", {"Slice Min Y [m]", kXYBinsFD, kSlcMinY}});
59  hd.push_back({"SlcMinZ", {"Slice Min Z [m]", kZBinsFD, kSlcMinZ}});
60  hd.push_back({"SlcMaxX", {"Slice Max X [m]", kXYBinsFD, kSlcMaxX}});
61  hd.push_back({"SlcMaxY", {"Slice Max Y [m]", kXYBinsFD, kSlcMaxY}});
62  hd.push_back({"SlcMaxZ", {"Slice Max Z [m]", kZBinsFD, kSlcMaxZ}});
63  }
64 
65  void AddMultiHistDefRecoFD(std::vector<MultiHistDef>& hd){
66  hd.push_back({"PngStartX", {"Prong start X [m]", kXYBinsFD, kPngStartX}});
67  hd.push_back({"PngStartY", {"Prong start Y [m]", kXYBinsFD, kPngStartY}});
68  hd.push_back({"PngStartZ", {"Prong start Z [m]", kZBinsFD, kPngStartZ}});
69  }
70 
71  void AddHistDefTruthFD(std::vector<HistDef>& hd){
72  hd.push_back({"TrueVtxX", {"True Vertex X [m]", kXYBinsFD, kTrueVtxX}});
73  hd.push_back({"TrueVtxY", {"True Vertex Y [m]", kXYBinsFD, kTrueVtxY}});
74  hd.push_back({"TrueVtxZ", {"True Vertex Z [m]", kZBinsFD, kTrueVtxZ}});
75  }
76 
77 
78  void AddHistDefSlice(std::vector<HistDef>& hd){
79  hd.push_back({"SliceCalE", {"Slice Cal E [GeV]", Binning::Simple(50, 0, 5), kCaloE}});
80  hd.push_back({"SliceNHits", {"Slice NHits", Binning::Simple(30, 0, 300), kNHit}});
81  hd.push_back({"Eperhit", {"Slice Calorimetric energy / hit (MeV)", Binning::Simple(40, 0, 40), kEPerHit}});
82  hd.push_back({"SliceDuration", {"Slice Duration [ns]", Binning::Simple(25, 0, 250), kSliceDuration}});
83  hd.push_back({"TSD", {"Standard Dev. of Slice Hits [ns]", Binning::Simple(30,0,30),SIMPLEVAR(slc.tsd)}});
84  hd.push_back({"SlcMeanTime", {"Slice Mean Time", Binning::Simple(30, 210, 240), kSlcMeanTime}});
85  hd.push_back({"SlcStartTime", {"Slice Start Time", Binning::Simple(30, 210, 240), kSlcStartTime}});
86  hd.push_back({"SlcEndTime", {"Slice End Time", Binning::Simple(30, 210, 240), kSlcEndTime}});
87  hd.push_back({"NPng3d", {"Number of 3D Prongs", Binning::Simple(8,-0.5,7.5), kNPng3D}});
88  hd.push_back({"NPng2d", {"Number of 2D Prongs", Binning::Simple(15,-0.5,14.5), kNPng2D}});
89  hd.push_back({"NCellsEdge", {"Number of cells from detector edge, slice", Binning::Simple(51,-0.5,50.5), kNcellsFromEdge}});
90  hd.push_back({"LongestProng", {"Longest prong (cm)", Binning::Simple(60, 0, 600), kLongestProng}});
91  hd.push_back({"HitsPerPlane", {"Hits per plane", Binning::Simple(10, 0, 10), kHitsPerPlane}});
92  hd.push_back({"orphcalE", {"Orphaned Cal E", Binning::Simple(20,0,0.2), kOrphCalE}});
93  }
94 
95  void AddHistDefSliceTruth(std::vector<HistDef>& hd){
96  hd.push_back({"TrueE",{"True neutrino energy [GeV]", Binning::Simple(60,0,6), kTrueE}});
97  hd.push_back({"TrueVisEinSlc", {"True visible energy in slice [GeV]", kEnergyBinningZoom, kTrueVisEinSlc}});
98  hd.push_back({"TrueSlcEff", {"Slicer efficiency", Binning::Simple(14, 0.4, 1.1), kTrueSlcEff}});
99  hd.push_back({"TrueSlcPur", {"Slicer purity", Binning::Simple(14, 0.4, 1.1), kTrueSlcPur}});
100  hd.push_back({"TrueNHitsSlc", {"True NHits in Slice", Binning::Simple(30, 0, 300), kTrueNHitsSlc}});
101  hd.push_back({"TrueNHitsTot", {"True NHits Total", Binning::Simple(30, 0, 300), kTrueNHitsTot}});
102  hd.push_back({"TrueMomX", {"True Momentum X", Binning::Simple(40,-1,1), kTrueMomX}}); // needs units
103  hd.push_back({"TrueMomY", {"True Momentum Y", Binning::Simple(80,-3,1), kTrueMomY}}); // needs units
104  hd.push_back({"TrueMomZ", {"True Momentum Z", Binning::Simple(100,0,10), kTrueMomZ}}); // needs units
105  hd.push_back({"TrueIntMode", {"Neutrino interaction mode",Binning::Simple(15,-1.5,13.5), kMode}});
106  hd.push_back({"TrueNNu",{"Number of neutrinos in nu vector",Binning::Simple(2,-0.5,1.5), SIMPLEVAR(mc.nnu)}});
107  hd.push_back({"Trueq2",{"True square of four-momentum transfer",Binning::Simple(20,0,30), kTrueQ2}}); // needs units
108  hd.push_back({"Trueq0",{"True energy transfer",Binning::Simple(20,0,60),kTrueQ0}}); // needs units
109  hd.push_back({"TrueW",{"True W [GeV]", Binning::Simple(60,0,3),kTrueW}});
110  }
111 
112  void AddNTHistDef(std::vector<NuTruthHistDef>& hd){
113  hd.push_back({"TrueE_NT", {"True neutrino energy NT [GeV]", kEnergyBinningZoom, kTrueE_NT}});
114  hd.push_back({"TrueLepE_NT", {"True lepton energy NT [GeV]", kEnergyBinningZoom, kTrueLepE_NT}});
115  hd.push_back({"TrueVisE_NT", {"True visible energy NT [GeV]", kEnergyBinningZoom, kTrueVisE_NT}});
116  hd.push_back({"TrueMomX_NT", {"True Momentum X NT", Binning::Simple(40,-1,1), kTrueMomX_NT}}); // needs units
117  hd.push_back({"TrueMomY_NT", {"True Momentum Y NT", Binning::Simple(80,-3,1), kTrueMomY_NT}}); // needs units
118  hd.push_back({"TrueMomZ_NT", {"True Momentum Z NT", Binning::Simple(100,0,10), kTrueMomZ_NT}}); // needs units
119  hd.push_back({"TrueMode_NT", {"Neutrino interaction mode NT",Binning::Simple(15,-1.5,13.5), kTrueMode_NT}});
120  hd.push_back({"Trueq2_NT", {"True square of four-momentum transfer NT",Binning::Simple(20,0,30), kTrueQ2_NT}});
121  hd.push_back({"Trueq3_NT", {"True magnitude of three-momentum transfer NT",Binning::Simple(20,0,30), kTrueQ3_NT}});
122  hd.push_back({"Trueq0_NT", {"True energy transfer NT",Binning::Simple(20,0,60), kTrueQ0_NT}}); // needs units
123  hd.push_back({"Trueq0q3_NT", {"q0/q3 NT",Binning::Simple(60, -0.1, 1.1), kTrueq0q3_NT}}); // needs units
124  hd.push_back({"TrueW_NT", {"True W NT [GeV]", Binning::Simple(50,0,5), kTrueW_NT}});
125  }
126 
127  void AddNTHistDefND(std::vector<NuTruthHistDef>& hd){
128  hd.push_back({"TrueVtxX_NT", {"True Vertex X [m]", kXYBinsND, kTrueVtxX_NT}});
129  hd.push_back({"TrueVtxY_NT", {"True Vertex Y [m]", kXYBinsND, kTrueVtxY_NT}});
130  hd.push_back({"TrueVtxZ_NT", {"True Vertex Z [m]", kZBinsND, kTrueVtxZ_NT}});
131  }
132 
133  void AddNTHistDefFD(std::vector<NuTruthHistDef>& hd){
134  hd.push_back({"TrueVtxX_NT", {"True Vertex X [m]", kXYBinsFD, kTrueVtxX_NT}});
135  hd.push_back({"TrueVtxY_NT", {"True Vertex Y [m]", kXYBinsFD, kTrueVtxY_NT}});
136  hd.push_back({"TrueVtxZ_NT", {"True Vertex Z [m]", kZBinsFD, kTrueVtxZ_NT}});
137  }
138 
139 
140  void AddHistDefWeights(std::vector<HistDef>& hd){
141  hd.push_back({"PPFXWgt", {"PPFX CV weight", Binning::Simple(40,0,2), kPPFXFluxCVWgt}});
142  hd.push_back({"XSecCVWgt", {"XSec CV weight", Binning::Simple(40,0,2), kXSecCVWgt2020}});
143  }
144 
145  void AddMultiHistDefProng(std::vector<MultiHistDef>& hd){
146  hd.push_back({"PngCalE", {"3D Prong Cal E [GeV]", Binning::Simple(20, 0, 2), kPngCalE}});
147  hd.push_back({"PngWtCalE", {"3D Prong Weighted Cal E [GeV]", Binning::Simple(20, 0, 2), kPngWtCalE}});
148  hd.push_back({"PngNhit", {"3D Prong Nhits", Binning::Simple(20, 0, 200), kPngNhit}});
149  hd.push_back({"PngNhitX", {"3D Prong Nhits, x view", Binning::Simple(20, 0, 200), kPngNhitX}});
150  hd.push_back({"PngNhitY", {"3D Prong Nhits, y view", Binning::Simple(20, 0, 200), kPngNhitY}});
151  hd.push_back({"PngNPlane", {"3D Prong number of planes", Binning::Simple(10, 0, 100), kPngNPlane}});
152  hd.push_back({"PngMaxPlaneCont", {"3D Prong max number of contiguous planes", Binning::Simple(10, 0, 100), kPngMaxPlaneCont}});
153  hd.push_back({"PngMaxPlaneGap", {"3D Prong max number of missing planes", Binning::Simple(21, -0.5, 20.5), kPngMaxPlaneGap}});
154  hd.push_back({"PngLen", {"3D Prong length", Binning::Simple(50, 0, 16), kPngLen}});
155  hd.push_back({"PngDirX", {"3D Prong cos #theta_{X}", Binning::Simple(100, -1, 1), kPngDirX}});
156  hd.push_back({"PngDirY", {"3D Prong cos #theta_{Y}", Binning::Simple(100, -1, 1), kPngDirY}});
157  hd.push_back({"PngDirZ", {"3D Prong cos #theta_{Z}", Binning::Simple(100, -1, 1), kPngDirZ}});
158  hd.push_back({"Png2dCalE", {"2D Prong Cal E [GeV]", Binning::Simple(10, 0, 0.5), kPng2dCalE}});
159  hd.push_back({"Png2dWtCalE", {"2D Prong Weighted Cal E [GeV]", Binning::Simple(10, 0, 0.5), kPng2dWtCalE}});
160  hd.push_back({"Png2dNhit", {"2D Prong Nhits", Binning::Simple(21, -0.5, 20.5), kPng2dNhit}});
161  hd.push_back({"Png2dNhitX", {"2D Prong Nhits, x view", Binning::Simple(21, -0.5, 20.5), kPng2dNhitX}});
162  hd.push_back({"Png2dNhitY", {"2D Prong Nhits, y view", Binning::Simple(21, -0.5, 20.5), kPng2dNhitY}});
163  hd.push_back({"Png2dNPlane", {"2D Prong number of planes", Binning::Simple(51, -0.5, 50), kPng2dNPlane}});
164  hd.push_back({"Png2dMaxPlaneCont", {"2D Prong max number of contiguous planes", Binning::Simple(11, -0.5, 10.5), kPng2dMaxPlaneCont}});
165  hd.push_back({"Png2dMaxPlaneGap", {"2D Prong max number of missing planes", Binning::Simple(11, -0.5, 10.5), kPng2dMaxPlaneGap}});
166  hd.push_back({"Png2dLen", {"2D Prong length", Binning::Simple(50, 0, 16), kPng2dLen}});
167  hd.push_back({"Png2dDirX", {"2D Prong cos #theta_{X}", Binning::Simple(100, -1, 1), kPng2dDirX}});
168  hd.push_back({"Png2dDirY", {"2D Prong cos #theta_{Y}", Binning::Simple(100, -1, 1), kPng2dDirY}});
169  hd.push_back({"Png2dDirZ", {"2D Prong cos #theta_{Z}", Binning::Simple(100, -1, 1), kPng2dDirZ}});
170  }
171 
172  void AddHistDefProngCVN(std::vector<HistDef>& hd){
173  hd.push_back({"protoncvn", {"Primary Prong Proton CVN", Binning::Simple(60,-0.1,1.1), kProtonCVN}});
174  hd.push_back({"othercvn", {"Primary Prong Other CVN", Binning::Simple(60,-0.1,1.1), kOtherCVN}});
175  hd.push_back({"electroncvn", {"Primary Prong Electron CVN", Binning::Simple(60,-0.1,1.1), kElectronCVN}});
176  hd.push_back({"photoncvn", {"Primary Prong Photon CVN", Binning::Simple(60,-0.1,1.1), kPhotonCVN}});
177  hd.push_back({"neutroncvn", {"Primary Prong Neutron CVN", Binning::Simple(60,-0.1,1.1), kNeutronCVN}});
178  hd.push_back({"muoncvn", {"Primary Prong Muon CVN", Binning::Simple(60,-0.1,1.1), kMuonCVN}});
179  hd.push_back({"pizerocvn", {"Primary Prong Pizero CVN", Binning::Simple(60,-0.1,1.1), kPizeroCVN}});
180  }
181 
182 
183  void AddHistDefPIDs(std::vector<HistDef>& hd){
184  // numu
185  hd.push_back({"CVNmLoosePTP", {"CVNm (looseptp)", Binning::Simple(20, 0, 1.1), kCVNm_looseptp}});
186  hd.push_back({"CVNmOldPresel", {"CVNm (oldpresel)", Binning::Simple(20, 0, 1.1), kCVNm_oldpresel}});
187 
188  // nue
189  hd.push_back({"CVNeLoosePTP", {"CVNe (looseptp)", Binning::Simple(20, 0, 1.1), kCVNe_looseptp}});
190  hd.push_back({"CVNeOldPresel", {"CVNe (oldpresel)", Binning::Simple(20, 0, 1.1), kCVNe_oldpresel}});
191 
192  // NC
193 
194  }
195 
196 // ---------------- numu ----------------
197 
198  void AddHistDefNumuND(std::vector<HistDef>& hd){
199  hd.push_back({"KalmanTrkStartX", {"Kalman Track Start X [m]", kXYBinsND, kTrkStartX}});
200  hd.push_back({"KalmanTrkStartY", {"Kalman Track Start Y [m]", kXYBinsND, kTrkStartY}});
201  hd.push_back({"KalmanTrkStartZ", {"Kalman Track Start Z [m]", kZBinsND, kTrkStartZ}});
202  hd.push_back({"KalmanTrkEndX", {"Kalman Track End X [m]", kXYBinsND, kTrkEndX}});
203  hd.push_back({"KalmanTrkEndY", {"Kalman Track End Y [m]", kXYBinsND, kTrkEndY}});
204  hd.push_back({"KalmanTrkEndZ", {"Kalman Track End Z [m]", kZBinsND, kTrkEndZ}});
205  hd.push_back({"BPFBestMuonStartX", {"BPF track start X [m]", kXYBinsND, kBPFBestMuonStartx}});
206  hd.push_back({"BPFBestMuonStartY", {"BPF track start Y [m]", kXYBinsND, kBPFBestMuonStarty}});
207  hd.push_back({"BPFBestMuonStartZ", {"BPF track start Z [m]", kZBinsND, kBPFBestMuonStartz}});
208  hd.push_back({"BPFBestMuonStopX", {"BPF track stop X [m]", kXYBinsND, kBPFBestMuonStopx}});
209  hd.push_back({"BPFBestMuonStopY", {"BPF track stop Y [m]", kXYBinsND, kBPFBestMuonStopy}});
210  hd.push_back({"BPFBestMuonStopZ", {"BPF track stop Z [m]", kZBinsND, kBPFBestMuonStopz}});
211 
212  }
213 
214  void AddHistDefNumuFD(std::vector<HistDef>& hd){
215  hd.push_back({"KalmanTrkStartX", {"Kalman Track Start X [m]", kXYBinsFD, kTrkStartX}});
216  hd.push_back({"KalmanTrkStartY", {"Kalman Track Start Y [m]", kXYBinsFD, kTrkStartY}});
217  hd.push_back({"KalmanTrkStartZ", {"Kalman Track Start Z [m]", kZBinsFD, kTrkStartZ}});
218  hd.push_back({"KalmanTrkEndX", {"Kalman Track End X [m]", kXYBinsFD, kTrkEndX}});
219  hd.push_back({"KalmanTrkEndY", {"Kalman Track End Y [m]", kXYBinsFD, kTrkEndY}});
220  hd.push_back({"KalmanTrkEndZ", {"Kalman Track End Z [m]", kZBinsFD, kTrkEndZ}});
221  hd.push_back({"kBPFBestMuonStartX", {"BPF track start X [m]", kXYBinsFD, kBPFBestMuonStartx}});
222  hd.push_back({"kBPFBestMuonStartY", {"BPF track start Y [m]", kXYBinsFD, kBPFBestMuonStarty}});
223  hd.push_back({"kBPFBestMuonStartZ", {"BPF track start Z [m]", kZBinsFD, kBPFBestMuonStartz}});
224  hd.push_back({"kBPFBestMuonStopX", {"BPF track stop X [m]", kXYBinsFD, kBPFBestMuonStopx}});
225  hd.push_back({"kBPFBestMuonStopY", {"BPF track stop Y [m]", kXYBinsFD, kBPFBestMuonStopy}});
226  hd.push_back({"kBPFBestMuonStopZ", {"BPF track stop Z [m]", kZBinsFD, kBPFBestMuonStopz}});
227  }
228 
229  // ReMId, Kalman, BPF
230  void AddHistDefNumuMuon(std::vector<HistDef>& hd){
231  hd.push_back({"ReMId",{"ReMId", kRemidBinning, kRemID}});
232  hd.push_back({"kNKalman", {"Number of Kalman Tracks in Slice", Binning::Simple(16,-0.5,15.5), kNKalman}});
233  hd.push_back({"scatLL",{"ReMId Input: Scattering Log-likelihood", Binning::Simple(50,-0.5,0.5), kReMIdScatLLH}});
234  hd.push_back({"dedxLL",{"ReMId Input: dE/dx Log-likelihood", Binning::Simple(50,-3,1), kReMIdDEDxLLH}});
235  hd.push_back({"nonHadPlaneFrac",{"ReMId Input: Non-hadronic Plane Fract.", Binning::Simple(60,-0.1,1.1), kReMIdMeasFrac}});
236 
237  hd.push_back({"KalTrkNhits", {"Kalman track NHits", Binning::Simple(25, 0, 250), kTrkNhits}});
238  hd.push_back({"KalDirX", {"Kalman track cos #theta_{X}", Binning::Simple(100, -1, 1), kDirX}});
239  hd.push_back({"KalDirY", {"Kalman track cos #theta_{Y}", Binning::Simple(100, -1, 1), kDirY}});
240  hd.push_back({"KalDirZ", {"Kalman track cos #theta_{Z}", Binning::Simple(50, 0, 1), kDirZ}});
241  hd.push_back({"KalCosNumi", {"Kalman track cos #theta_{NuMI}", Binning::Simple(50, -0.02, 1.02), kCosNumi}});
242  hd.push_back({"KalTrkCalE", {"Kalman Track CalE [GeV]", kEnergyBinningZoom, kTrkCalE}});
243  hd.push_back({"KalTrkCalEPerNHit", {"Average Track Cal. Energy Per Hit [GeV]", Binning::Simple(40, 0, 0.04), kTrkCalEPerNHit}});
244  hd.push_back({"KalTrkNPlaneGap", {"Missing Planes in Tracks", Binning::Simple(31, -0.5, 30.5), kTrkNPlaneGap}});
245  hd.push_back({"KalTrkLength", {"Kalman track length", Binning::Simple(50, 0, 16), kTrkLength}});
246  hd.push_back({"KalTrkNPlaneGapFrac", {"Fraction of Missing Planes in Track", Binning::Simple(60, -0.1, 0.5), kTrkNPlaneGapFrac}});
247  hd.push_back({"KalNhitLength", {"Track nHit/length", Binning::Simple(30, 0, 30), kTrkNhits/kTrkLength}});
248  hd.push_back({"KalNPlaneGapLength", {"Track missing planes/length", Binning::Simple(20, 0, 5), kTrkNPlaneGap/kTrkLength}});
249  hd.push_back({"KalPtP", {"Muon p_{T}/p", Binning::Simple(25,0,1.01), kNumuMuonPtP}});
250 
251  hd.push_back({"BPFBestMuonNhits", {"Nhits in BPF muon track", Binning::Simple(25, 0, 250), kBPFBestMuonNhits}});
252  hd.push_back({"BPFBestMuonDirx", {"BPF track dir X", Binning::Simple(100, -1, 1), kBPFBestMuonDirx}});
253  hd.push_back({"BPFBestMuonDiry", {"BPF track dir Y", Binning::Simple(100, -1, 1), kBPFBestMuonDiry}});
254  hd.push_back({"BPFBestMuonDirz", {"BPF track dir Z", Binning::Simple(50, 0, 1), kBPFBestMuonDirz}});
255  hd.push_back({"BPFBestMuonCalE", {"BPF track cal E", kEnergyBinningZoom, kBPFBestMuonCalE}});
256  hd.push_back({"BPFBestMuonTrkE", {"BPF track reco E", kEnergyBinningZoom, kBPFBestMuonTrkE}});
257  hd.push_back({"BPFBestMuonTrkLen", {"BPF track len", Binning::Simple(50, 0, 16), kBPFBestMuonTrkLen}});
258  hd.push_back({"BPFCalEperhit", {"BPF track calE per hit", Binning::Simple(40, 0, 0.04), kBPFBestMuonCalE/kBPFBestMuonNhits}});
259  hd.push_back({"BPFTrkEperhit", {"BPF track recoE per hit", Binning::Simple(40, 0, 0.04), kBPFBestMuonTrkE/kBPFBestMuonNhits}});
260  hd.push_back({"BPFBestMuonTrkNPlaneGap", {"BPF Missing Planes in Tracks", Binning::Simple(31, -0.5, 30.5), kBPFBestMuonTrkNPlaneGap}});
261  hd.push_back({"BPFBestMuonTrkNPlanes", {"BPF N Planes in Tracks", Binning::Simple(10, 0, 200), kBPFBestMuonTrkNPlanes}});
262  hd.push_back({"BPFTrkNPlaneGapFrac", {"BPF Fraction of Missing Planes in Track", Binning::Simple(60, -0.1, 0.5), kBPFBestMuonTrkNPlaneGap/kBPFBestMuonTrkNPlanes}});
263  hd.push_back({"BPFNhitLength", {"BPF Track nHit/length", Binning::Simple(30, 0, 30), kBPFBestMuonNhits/kBPFBestMuonTrkLen}});
264  hd.push_back({"BPFNPlaneGapLength", {"BPF track missing planes / length", Binning::Simple(10, 0, 0.1), kBPFBestMuonTrkNPlaneGap/kBPFBestMuonTrkLen}});
265 
266  }
267 
268  void AddHistDefNumuRecoE(std::vector<HistDef>& hd){
269  hd.push_back({"CCE", {"Reconstructed Neutrino Energy [GeV]", kNumuCCEOptimisedBinning, kCCE}});
270  hd.push_back({"MuE", {"Reconstructed Muon E [GeV]", kEnergyBinningZoom, kMuE}});
271  hd.push_back({"MuEPerNHit", {"Average Reconstructed Muon Energy Per Hit [GeV]", Binning::Simple(40, 0, 0.04), kMuEPerNHit}});
272  hd.push_back({"HadE",{"Reconstructed Hadronic Energy [GeV]", Binning::Simple(30,0,3), kHadE}});
273  hd.push_back({"HadEFrac", {"Hadronic Energy Fraction", Binning::Simple(25,0,1.01), kHadEFrac}});
274  hd.push_back({"NumuHadTrkE", {"On Track Cal. Hadronic Energy [GeV]", Binning::Simple(10,0,0.5), kNumuHadTrkE}});
275  hd.push_back({"KalTrkOverlapE", {"Had E Overlap on Kalman Track", Binning::Simple(50, 0, 0.5), kKalTrkOverlapE}});
276  hd.push_back({"NumuHadCalE", {"Off Track Cal. Hadronic Energy [GeV]", Binning::Simple(30,0,1.5), kNumuHadCalE}});
277  hd.push_back({"NumuHadVisE", {"Visible Hadronic E [GeV]", Binning::Simple(20,0,2), kNumuHadVisE}});
278  hd.push_back({"HadNHit", {"Number of Hadronic Hits", Binning::Simple(101, -0.5, 100.5), kHadNHit}});
279  hd.push_back({"HadEPerNHit", {"Average Hadronic Energy per Hit", Binning::Simple(40, 0, 0.04), kHadEPerNHit}});
280  hd.push_back({"Eres", {"#nu Eres (R-T)/T", Binning::Simple(44, -1.1, 1.1), kEres}});
281  hd.push_back({"MuEres", {"Muon Eres (R-T)/T", Binning::Simple(44, -1.1, 1.1), kMuEres}});
282  hd.push_back({"HadEres", {"Had Eres (R-T)/T", Binning::Simple(44, -1.1, 1.1), kHadEres}});
283 
284  }
285 
286  void AddHistDefNumuNDDataMC(std::vector<HistDef>& hd){
287  hd.push_back({"CCE", {"Reconstructed Neutrino Energy [GeV]", kNumuCCEOptimisedBinning, kCCE}});
288  hd.push_back({"MuE", {"Reconstructed Muon E [GeV]", Binning::Simple(25,0,5), kMuE}});
289  hd.push_back({"KalTrkCalEPerNHit", {"Average Track Cal. Energy Per Hit [GeV]", Binning::Simple(25, 0.01, 0.03), kTrkCalEPerNHit}});
290  hd.push_back({"MuEPerNHit", {"Average Reconstructed Muon Energy Per Hit [GeV]", Binning::Simple(25, 0.01, 0.03), kMuEPerNHit}});
291  hd.push_back({"KalTrkNhits", {"Kalman track NHits", Binning::Simple(25, 0, 300), kTrkNhits}});
292  hd.push_back({"KalTrkLength", {"Kalman track length", Binning::Simple(25, 0, 16), kTrkLength}});
293  hd.push_back({"KalCosNumi", {"Kalman track cos #theta_{NuMI}", Binning::Simple(25, 0, 1.01), kCosNumi}});
294  hd.push_back({"KalPtP", {"Muon p_{T}/p", Binning::Simple(25,0,1.01), kNumuMuonPtP}});
295  hd.push_back({"KalPt", {"Muon p_{T}", Binning::Simple(25,0,1.01), kNumuMuonPt}});
296  hd.push_back({"HadE",{"Reconstructed Hadronic Energy [GeV]", Binning::Simple(25,0,3), kHadE}});
297  hd.push_back({"HadEFrac", {"Hadronic Energy Fraction", Binning::Simple(25,0,1.01), kHadEFrac}});
298  hd.push_back({"HadEPerNHit", {"Average Hadronic Energy per Hit", Binning::Simple(25, 0, 0.04), kHadEPerNHit}});
299  hd.push_back({"SliceNHits", {"Slice NHits", Binning::Simple(25, 0, 300), kNHit}});
300  hd.push_back({"CVNmLoosePTP", {"CVNm (looseptp)", Binning::Simple(25, 0, 1.01), kCVNm_looseptp}});
301  hd.push_back({"ReMId",{"ReMId", kRemidBinning, kRemID}});
302  hd.push_back({"scatLL",{"ReMId Input: Scattering Log-likelihood", Binning::Simple(25,-0.25,0.25), kReMIdScatLLH}});
303  hd.push_back({"dedxLL",{"ReMId Input: dE/dx Log-likelihood", Binning::Simple(25,-0.5,0.5), kReMIdDEDxLLH}});
304  hd.push_back({"nonHadPlaneFrac",{"ReMId Input: Non-hadronic Plane Fract.", kRemidBinning, kReMIdMeasFrac}});
305  }
306 
307 // ---------------- nue ----------------
308 
309  void AddHistDefNueND(std::vector<HistDef>& hd){
310  hd.push_back({"shw_startx", {"Shower X Start (cm)", Binning::Simple(50, -200, +200), kShwStartX}});
311  hd.push_back({"shw_starty", {"Shower Y Start (cm)", Binning::Simple(50, -200, +200), kShwStartY}});
312  hd.push_back({"shw_startz", {"Shower Z Start (cm)", Binning::Simple(60, 0, +1300), kShwStartZ}});
313  hd.push_back({"shw_stopx", {"Shower X Stop (cm)", Binning::Simple(50, -200, +200), kShwStopX}});
314  hd.push_back({"shw_stopy", {"Shower Y Stop (cm)", Binning::Simple(50, -200, +200), kShwStopY}});
315  hd.push_back({"shw_stopz", {"Shower Z Stop (cm)", Binning::Simple(70, 0, +1400), kShwStopZ}});
316 
317  }
318 
319  void AddHistDefNueFD(std::vector<HistDef>& hd){
320  hd.push_back({"shw_startx", {"Shower X Start (cm)", Binning::Simple(50, -800, +800), kShwStartX}});
321  hd.push_back({"shw_starty", {"Shower Y Start (cm)", Binning::Simple(50, -800, +800), kShwStartY}});
322  hd.push_back({"shw_startz", {"Shower Z Start (cm)", Binning::Simple(60, 0, +6000), kShwStartZ}});
323  hd.push_back({"shw_stopx", {"Shower X Stop (cm)", Binning::Simple(50, -800, +800), kShwStopX}});
324  hd.push_back({"shw_stopy", {"Shower Y Stop (cm)", Binning::Simple(50, -800, +800), kShwStopY}});
325  hd.push_back({"shw_stopz", {"Shower Z Stop (cm)", Binning::Simple(70, 0, +6000), kShwStopZ}});
326 
327  }
328 
329  void AddHistDefNueShower(std::vector<HistDef>& hd){
330  hd.push_back({"shw_nshw", {"Number of showers", Binning::Simple(10, 0, 10), kNShwLID}});
331  hd.push_back({"shw_nhit", {"Number of hits in primary shower", Binning::Simple(50, 0, 300), kShwNHit}});
332  hd.push_back({"shw_width", {"Width of primary shower (cm)", Binning::Simple(20, 0, 20), kShwWidth}});
333  hd.push_back({"shw_gap", {"Primary shower gap to vertex (cm)", Binning::Simple(25, 0, 200), kShwGap}});
334  hd.push_back({"shw_efrac", {"Fraction of slice energy in shower", Binning::Simple(52, -.02, 1.02), kShwEFrac}});
335  hd.push_back({"had_e", {"(Slice - Primary Shower) calorimetric energy (GeV)", Binning::Simple(30, 0, 3), kHadCalE}});
336  hd.push_back({"had_e_cvn", {"Total CalE of hadronic showers (GeV)", Binning::Simple(30, 0, 3), kCVNhadE}});
337  hd.push_back({"shw_e_cvn", {"Total CalE of EM showers (GeV)", Binning::Simple(50, 0, 5), kCVNemE}});
338  hd.push_back({"shw_e", {"Primary shower calorimetric energy (GeV)", Binning::Simple(50, 0, 5), kShwCalE}});
339  hd.push_back({"shw_len", {"Length of primary shower (cm)", Binning::Simple(55, 0, 550), kShwLen}});
340  hd.push_back({"inelast", {"Fraction of slice energy outside shower", Binning::Simple(30, -0.2, 1.), kInelasticity}});
341  hd.push_back({"shw_Ptp", {"p_{T}/p", Binning::Simple(50, 0., 1.), kPtP}});
342  }
343 
344  void AddHistDefNueLID(std::vector<HistDef>& hd){
345  hd.push_back({"lid_mulll", {"#mu LLL", Binning::Simple(50, -1.2, 3), kMuLLL}});
346  hd.push_back({"lid_elll", {"e LLL", Binning::Simple(50, -1.2, 3), kELLL}});
347  hd.push_back({"lid_emulll", {"e/#mu LLL", Binning::Simple(50, -1.2, 3), kEMuLLL}});
348  hd.push_back({"lid_eglll", {"e/#gamma LLL", Binning::Simple(50, -1.2, 1.2), kEGLLL}});
349  hd.push_back({"lid_eplll", {"e/p LLL", Binning::Simple(50, -1.2, 1.2), kEPLLL}});
350  hd.push_back({"lid_enlll", {"e/n LLL", Binning::Simple(50, -1.2, 1.2), kENLLL}});
351  hd.push_back({"lid_epilll", {"e/#pi LLL", Binning::Simple(50, -1.2, 1.2), kEPiLLL}});
352  hd.push_back({"lid_epi0lll", {"e/#pi^{0} LLL", Binning::Simple(50, -1.2, 1.2), kEPi0LLL}});
353  hd.push_back({"lid_mullt", {"#mu LLT", Binning::Simple(80, 0, 8), kMuLLT}});
354  hd.push_back({"lid_ellt", {"e LLT", Binning::Simple(80, 0, 8), kELLT}});
355  hd.push_back({"lid_emullt", {"e/#mu LLT", Binning::Simple(30, -1, +2), kEMuLLT}});
356  hd.push_back({"lid_egllt", {"e/#gamma LLT", Binning::Simple(30, -1, +2), kEGLLT}});
357  hd.push_back({"lid_epllt", {"e/p LLT", Binning::Simple(30, -1, +2), kEPLLT}});
358  hd.push_back({"lid_enllt", {"e/n LLT", Binning::Simple(30, -1, +2), kENLLT}});
359  hd.push_back({"lid_epillt", {"e/#pi LLT", Binning::Simple(30, -1, +2), kEPiLLT}});
360  hd.push_back({"lid_epi0llt", {"e/#pi^{0} LLT", Binning::Simple(30, -1, +2), kEPi0LLT}});
361  hd.push_back({"lid_pi0mass", {"#pi^{0} mass (GeV)", Binning::Simple(50, 0, .5), kPi0Mass}});
362  hd.push_back({"lid_costheta", {"cos#theta", Binning::Simple(25, 0, +1), kCosTheta}});
363  }
364 
365  void AddHistDefNuePID(std::vector<HistDef>& hd){
366  hd.push_back({"id_lid", {"LID", Binning::Simple(120, -0.1, 1.1), kLID}});
367  hd.push_back({"id_lid_zoom", {"LID", Binning::Simple(40, 0.63, 1.05), kLID}});
368  hd.push_back({"id_cvne", {"CVNe", Binning::Simple(100, 0, 1), kCVNe_looseptp}});
369  hd.push_back({"id_cvne_zoom", {"CVNe", Binning::Simple(40, 0.75, 1), kCVNe_looseptp}});
370 
371 
372  }
373 
374  void AddHistDefNueEnergy(std::vector<HistDef>& hd){
375  hd.push_back({"RecoE_per_hit", {"Reconstructed Energy / hit (MeV)", Binning::Simple(40, 0, 40), kRecoEPerHit}});
376  hd.push_back({"EM_per_hit", {"EM-Prong CalE / EM hit (MeV)" , Binning::Simple(40, 0, 40), kEMEPerHit}});
377  hd.push_back({"HAD_per_hit", {"Slice - EMProng CalE /slc.nhit - EM hit (MeV)" , Binning::Simple(40, 0, 40), kHADEPerHit}});
378  hd.push_back({"RecoE2020", {"#E_{reco} (GeV) 2020", Binning::Simple(50, 0, 5), kNueEnergy2020}});
379  hd.push_back({"emE2018", {"EM Part in #E_{reco} 2020", Binning::Simple(50, 0, 5), kEME_2020}});
380  hd.push_back({"hadE2018", {"HAD Part in #E_{reco} 2020", Binning::Simple(50, 0, 5), kHADE_2020}});
381  hd.push_back({"emCalE", {"EM-Prong CalE (GeV)", Binning::Simple(50, 0, 5), kemCalE}});
382  hd.push_back({"hadEFrac", {"HADE Frac", Binning::Simple(20, 0, 1), kNueHadEFrac2020}});
383  hd.push_back({"hadCalEFrac", {"HadCalE Frac", Binning::Simple(20,0,1), kNueHadCalEFrac}});
384  hd.push_back({"CVN2d", kNue2020Axis});
385  }
386 
387  void AddHistDefNueSelectionExtras(std::vector<HistDef>& hd){
388  hd.push_back({"xsel_cosdang",{"Cosine of angle between two leading prongs",Binning::Simple(100,-1,1),kCosdang}});
389  hd.push_back({"xsel_cosAngle_showers",{"Cosine of angle between two leading showers",Binning::Simple(100,-1,1),kCosAngleNextShower}});
390  hd.push_back({"xsel_XYhit_asymmetry",{"Asymmetry in number of hits betwen X and Y views",Binning::Simple(100,-1,1),kShwHitXYAsymm}});
391  hd.push_back({"xsel_shwhitFrac",{"Fraction of hits in a shower",Binning::Simple(50,0,1),kShwHitFrac}});
392  hd.push_back({"xsel_nplanestofront",{"Number of planes to the front",Binning::Simple(100,0,100),kNPlanesToFront}});
393  hd.push_back({"xsel_distAllFront",{"Distance of all prongs to the front (cm)",Binning::Simple(100,-100,1700),kDistAllFront}});
394  hd.push_back({"xsel_distAllBack",{"Distance of all prongs to the back (cm)",Binning::Simple(100,-100,1700),kDistAllBack}});
395  hd.push_back({"xsel_distAllTop",{"Distance of all prongs to the top (cm)",Binning::Simple(100,-200,400),kDistAllTop}});
396  hd.push_back({"xsel_distAllBottom",{"Distance of all prongs to the bottom (cm)",Binning::Simple(100,-200,400),kDistAllBottom}});
397  hd.push_back({"xsel_distAllEast",{"Distance of all prongs to the east (cm)",Binning::Simple(100,-200,400),kDistAllEast}});
398  hd.push_back({"xsel_distAllWest",{"Distance of all prongs to the west (cm)",Binning::Simple(100,-200,400),kDistAllWest}});
399  hd.push_back({"xsel_shwMaxY",{"Maximum y of all start and stop points (cm)",Binning::Simple(100,-200,200),kMaxY}});
400  hd.push_back({"xsel_sparsenessAsymm",{"Sparseness asymmetry",Binning::Simple(50,-1,1),kSparsenessAsymm}});
401 
402  }
403 
404 
405  void AddHistDefNueDataMC(std::vector<HistDef>& hd){
406 
407 
408  }
409 
410 // ---------------- nus ----------------
411 
412  void AddHistDefNusND(std::vector<HistDef>& hd){
413 
414  }
415 
416  void AddHistDefNusFD(std::vector<HistDef>& hd){
417 
418  }
419 
420 // ---------------- xsec ----------------
421 
422  void AddHistDefXSecND(std::vector<HistDef>& hd){
423 
424  }
425 
426  void AddHistDefXSecFD(std::vector<HistDef>& hd){
427 
428  }
429 
430 
431 }
const MultiVar kPngCalE([](const caf::SRProxy *sr){std::vector< double > E;if(!sr->vtx.elastic.IsValid) return E;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){E.emplace_back(sr->vtx.elastic.fuzzyk.png[i].calE);}return E;})
Definition: NumuVarsExtra.h:22
const Var kHadE
Definition: NumuVars.h:23
const MultiVar kPngDirY([](const caf::SRProxy *sr){std::vector< double > dir;if(!sr->vtx.elastic.IsValid) return dir;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){dir.emplace_back(sr->vtx.elastic.fuzzyk.png[i].dir.Y());}return dir;})
Definition: NumuVarsExtra.h:32
void AddMultiHistDefRecoFD(std::vector< MultiHistDef > &hd)
const Var kHadNHit([](const caf::SRProxy *sr){unsigned int nought=0;if(sr->trk.kalman.ntracks< 1) return nought;return sr->slc.nhit-sr->trk.kalman.tracks[0].nhit;})
Definition: NumuVars.h:61
void AddHistDefNumuMuon(std::vector< HistDef > &hd)
void AddHistDefNumuNDDataMC(std::vector< HistDef > &hd)
const Var kShwNHit
const Var kMode([](const caf::SRProxy *sr){return(sr->mc.nnu==0)?-1:int(sr->mc.nu[0].mode);})
Neutrino interaction mode.
Definition: Vars.h:99
const Var kBPFBestMuonStopz([](const caf::SRProxy *sr){float stopz=-999.0;if(kBPFValidMuon(sr)==false) return-999.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) stopz=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.stop.z/100.0;return stopz;})
: Reco End Z-position for the best muon track
Definition: BPFVars.h:75
const NuTruthVar kTrueVtxZ_NT([](const caf::SRNeutrinoProxy *nu){return float(nu->vtx.Z()/100.);})
void AddHistDefNueFD(std::vector< HistDef > &hd)
const Var kNKalman
Definition: NumuVars.cxx:540
void AddHistDefTruthFD(std::vector< HistDef > &hd)
const Var kBPFBestMuonTrkNPlaneGap([](const caf::SRProxy *sr){int nplanegap=500;if(kBPFValidMuon(sr)==false) return 500;unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) nplanegap=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.nplanegap;return nplanegap;})
: Number of missing planes for best muon track
Definition: BPFVars.h:141
const Var kCVNemE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;double CVNem_CalE=0;for(const caf::SRFuzzyKProngProxy &png:sr->vtx.elastic.fuzzyk.png){double png_CalE=png.shwlid.calE;double emPID=((double) png.cvnpart.photonid+ (double) png.cvnpart.pizeroid+ (double) png.cvnpart.electronid);double haPID=((double) png.cvnpart.protonid+ (double) png.cvnpart.pionid+ (double) png.cvnpart.neutronid+ (double) png.cvnpart.otherid+ (double) png.cvnpart.muonid);if(emPID<=0) continue;if(emPID >=haPID ) CVNem_CalE+=png_CalE;}return CVNem_CalE *CalibrationBugCorrectionFactor(sr->hdr);})
Definition: NueEnergy2017.h:9
const Var kNcellsFromEdge
Definition: NumuVars.cxx:560
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const MultiVar kPngNhit([](const caf::SRProxy *sr){std::vector< double > nhit;if(!sr->vtx.elastic.IsValid) return nhit;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){nhit.emplace_back(sr->vtx.elastic.fuzzyk.png[i].nhit);}return nhit;})
Definition: NumuVarsExtra.h:24
const NuTruthVar kTrueE_NT([](const caf::SRNeutrinoProxy *sr){return float(sr->E);})
True neutrino energy.
Definition: Vars.h:95
const Var kReMIdScatLLH
Definition: NumuVars.cxx:555
const Var kSlcMeanTime([](const caf::SRProxy *sr){return sr->slc.meantime/1000.;})
Definition: NumuVars.h:83
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
const Var kHADEPerHit([](const caf::SRProxy *sr){if((sr->slc.nhit-kEMNhit(sr))>0) return 1000.0 *(sr->slc.calE *CalibrationBugCorrectionFactor(sr->hdr)-kemCalE(sr))/(sr->slc.nhit-kEMNhit(sr));else return-5.;})
Definition: NueVarsExtra.h:21
const Var kNumuHadTrkE
Definition: NumuVars.cxx:539
const Var kNPng2D([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5;return(int) sr->vtx.elastic.fuzzyk.npng2d;})
Definition: NumuVarsExtra.h:57
const Var kEPi0LLL
const Var kTrueMomY([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return(float) sr->mc.nu[0].p.Y();})
Definition: NumuVarsExtra.h:80
const Var kBPFBestMuonDirx([](const caf::SRProxy *sr){float dirx=-5.0;if(kBPFValidMuon(sr)==false) return-5.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) dirx=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.dir.x;return dirx;})
: Reco Start X-direction for the best muon track
Definition: BPFVars.h:81
const Var kNumuMuonPt([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks > 0 &&sr->trk.kalman.idxremid!=999){double pmu=sqrt(util::sqr(kMuE(sr))-util::sqr(0.1056));double Zbeam=kCosNumi(sr);double pt=pmu *sqrt(1-Zbeam *Zbeam);return(float) pt;}return-5.f;})
Definition: NumuVars.h:47
void AddHistDefNueShower(std::vector< HistDef > &hd)
const Binning kRemidBinning
Binning for plotting remid attractively.
Definition: Binning.cxx:80
const MultiVar kPng2dDirX([](const caf::SRProxy *sr){std::vector< double > dir;if(!sr->vtx.elastic.IsValid) return dir;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){dir.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].dir.X());}return dir;})
Definition: NumuVarsExtra.h:48
const Var kPPFXFluxCVWgt
Definition: PPFXWeights.h:16
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 MultiVar kPng2dCalE([](const caf::SRProxy *sr){std::vector< double > E;if(!sr->vtx.elastic.IsValid) return E;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){E.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].calE);}return E;})
Definition: NumuVarsExtra.h:39
const MultiVar kPngStartX([](const caf::SRProxy *sr){std::vector< double > start;if(!sr->vtx.elastic.IsValid) return start;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){start.emplace_back(sr->vtx.elastic.fuzzyk.png[i].start.X()/100.);}return start;})
Definition: NumuVarsExtra.h:34
const Var kSlcMaxZ([](const caf::SRProxy *sr){return sr->slc.boxmax.Z()/100.;})
Definition: NumuVars.h:93
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
const Var kSlcMaxY([](const caf::SRProxy *sr){return sr->slc.boxmax.Y()/100.;})
Definition: NumuVars.h:92
const Var kemCalE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;double CVNem_CalE=0;for(const caf::SRFuzzyKProngProxy &png:sr->vtx.elastic.fuzzyk.png){double png_CalE=png.calE;double emPID=((double) png.cvnpart.photonid+ (double) png.cvnpart.pizeroid+ (double) png.cvnpart.electronid);double haPID=((double) png.cvnpart.protonid+ (double) png.cvnpart.pionid+ (double) png.cvnpart.neutronid+ (double) png.cvnpart.otherid+ (double) png.cvnpart.muonid);if(emPID<=0) continue;if(emPID >=haPID ) CVNem_CalE+=png_CalE;}return CVNem_CalE *CalibrationBugCorrectionFactor(sr->hdr);})
Definition: NueVarsExtra.h:17
const Var kBPFBestMuonStopx([](const caf::SRProxy *sr){float stopx=-999.0;if(kBPFValidMuon(sr)==false) return-999.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) stopx=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.stop.x/100.0;return stopx;})
: Reco End X-position for the best muon track
Definition: BPFVars.h:63
const MultiVar kPngMaxPlaneCont([](const caf::SRProxy *sr){std::vector< double > maxplane;if(!sr->vtx.elastic.IsValid) return maxplane;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){maxplane.emplace_back(sr->vtx.elastic.fuzzyk.png[i].maxplanecont);}return maxplane;})
Definition: NumuVarsExtra.h:28
void AddHistDefSlice(std::vector< HistDef > &hd)
const NuTruthVar kTrueQ0_NT([](const caf::SRNeutrinoProxy *nu){return nu->y *nu->E;})
True energy transfer (q0 = 0th component of four-momentum transfer)
Definition: TruthVars.h:31
const Var kCosdang
const MultiVar kPng2dNhitY([](const caf::SRProxy *sr){std::vector< double > nhit;if(!sr->vtx.elastic.IsValid) return nhit;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){nhit.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].nhity);}return nhit;})
Definition: NumuVarsExtra.h:43
const Var kShwStopX
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
const Var kShwCalE
const Var kEGLLL
const Var kCVNhadE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;const double calE=sr->slc.calE *CalibrationBugCorrectionFactor(sr->hdr);return std::max(calE-kCVNemE(sr), 0.);})
Definition: NueEnergy2017.h:10
const NuTruthVar kTrueQ3_NT([](const caf::SRNeutrinoProxy *nu){return sqrt(nu->q2+util::sqr(kTrueQ0_NT(nu)));})
True magnitude of three-momentum transfer.
Definition: TruthVars.h:37
const Binning kZBinsND
const Var kEGLLT
const NuTruthVar kTrueMomY_NT([](const caf::SRNeutrinoProxy *nu){return(float) nu->p.Y();})
const NuTruthVar kTrueq0q3_NT([](const caf::SRNeutrinoProxy *nu){return float(kTrueQ0_NT(nu)/kTrueQ3_NT(nu));})
const MultiVar kPngNhitY([](const caf::SRProxy *sr){std::vector< double > nhit;if(!sr->vtx.elastic.IsValid) return nhit;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){nhit.emplace_back(sr->vtx.elastic.fuzzyk.png[i].nhity);}return nhit;})
Definition: NumuVarsExtra.h:26
const Var kTrkStartY([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].start.Y()/100;})
Definition: NumuVars.h:52
const Var kMuEres([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return float((kMuE(sr)-kTrueMuonE(sr))/kTrueMuonE(sr));})
Definition: NumuVarsExtra.h:86
const Var kENLLT
const Var kBPFBestMuonStartx([](const caf::SRProxy *sr){float startx=-999.0;if(kBPFValidMuon(sr)==false) return-999.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) startx=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.start.x/100.0;return startx;})
: Reco Start X-position for the best muon track
Definition: BPFVars.h:45
const Var kShwStartY
const MultiVar kPngDirZ([](const caf::SRProxy *sr){std::vector< double > dir;if(!sr->vtx.elastic.IsValid) return dir;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){dir.emplace_back(sr->vtx.elastic.fuzzyk.png[i].dir.Z());}return dir;})
Definition: NumuVarsExtra.h:33
void AddMultiHistDefProng(std::vector< MultiHistDef > &hd)
const Var kBPFBestMuonStartz([](const caf::SRProxy *sr){float startz=-999.0;if(kBPFValidMuon(sr)==false) return-999.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) startz=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.start.z/100.0;return startz;})
: Reco Start Z-position for the best muon track
Definition: BPFVars.h:57
const Var kBPFBestMuonDirz([](const caf::SRProxy *sr){float dirz=-5.0;if(kBPFValidMuon(sr)==false) return-5.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) dirz=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.dir.z;return dirz;})
: Reco Start Z-direction for the best muon track
Definition: BPFVars.h:99
const MultiVar kPngStartZ([](const caf::SRProxy *sr){std::vector< double > start;if(!sr->vtx.elastic.IsValid) return start;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){start.emplace_back(sr->vtx.elastic.fuzzyk.png[i].start.Z()/100.);}return start;})
Definition: NumuVarsExtra.h:36
const Var kTrueVisEinSlc([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return(float) sr->mc.nu[0].visEinslc;})
Definition: NumuVarsExtra.h:68
const Var kBPFBestMuonCalE([](const caf::SRProxy *sr){float calE=-5.0;if(kBPFValidMuon(sr)==false) return-5.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) calE=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.calE;return calE;})
: Cal energy for the best muon track
Definition: BPFVars.h:123
const Var kNueHadEFrac2020([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;if(kNueEnergy2020(sr) > 0.) return(kRecoHADE(sr)/kNueEnergy2020(sr));else return-5.;})
Definition: NueVarsExtra.h:50
const Var kSliceDuration([](const caf::SRProxy *sr){return(sr->slc.endtime-sr->slc.starttime);})
Definition: NumuVars.h:35
const Var kPizeroCVN
const Var kTrkCalEPerNHit([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return 0.f;return sr->trk.kalman.tracks[0].calE/sr->trk.kalman.tracks[0].nhit;})
Definition: NumuVars.h:68
const Var kTrueQ0
Definition: TruthVars.h:32
const Var kEPerHit([](const caf::SRProxy *sr){if(sr->slc.nhit >0) return 1000.0 *(sr->slc.calE/sr->slc.nhit);else return-5.;})
Definition: NueVarsExtra.h:14
const Var kReMIdMeasFrac
Definition: NumuVars.cxx:557
void AddHistDefRecoFD(std::vector< HistDef > &hd)
void AddHistDefNueSelectionExtras(std::vector< HistDef > &hd)
const Var kDirZ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].dir.Z();})
Definition: NumuVars.h:39
const Var kTrkLength([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].len/100;})
Definition: NumuVars.h:65
const Var kSlcMinX([](const caf::SRProxy *sr){return sr->slc.boxmin.X()/100.;})
Definition: NumuVars.h:87
#define SIMPLEVAR(CAFNAME)
For Vars where literally all you need is a single CAF variable.
Definition: Var.h:88
const Var kHadEPerNHit([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return 0.0f;int nHit=sr->slc.nhit-sr->trk.kalman.tracks[0].nhit;if(nHit<=0) return 0.0f;float hadE=sr->energy.numu.hadcalE;return hadE/nHit;})
Definition: NumuVars.h:63
const Var kNumuHadVisE([](const caf::SRProxy *sr){return kNumuHadCalE(sr)+kNumuHadTrkE(sr);})
Definition: NumuVars.h:124
const Var kSlcMaxX([](const caf::SRProxy *sr){return sr->slc.boxmax.X()/100.;})
Definition: NumuVars.h:91
const MultiVar kPng2dMaxPlaneCont([](const caf::SRProxy *sr){std::vector< double > maxplane;if(!sr->vtx.elastic.IsValid) return maxplane;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){maxplane.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].maxplanecont);}return maxplane;})
Definition: NumuVarsExtra.h:45
const NuTruthVar kTrueMomZ_NT([](const caf::SRNeutrinoProxy *nu){return(float) nu->p.Z();})
void AddHistDefPIDs(std::vector< HistDef > &hd)
const Var kSparsenessAsymm
Definition: NueVars.cxx:92
void AddNTHistDefFD(std::vector< NuTruthHistDef > &hd)
const Var kShwEFrac
const Var kLID
PID
Definition: Vars.cxx:27
const Var kHadCalE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return float(sr->slc.calE);if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return float(sr->slc.calE);return((sr->slc.calE- sr->vtx.elastic.fuzzyk.png[0].shwlid.calE));})
Definition: NueVarsExtra.h:40
const Var kTrueNHitsTot([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return(float) sr->mc.nu[0].nhittot;})
Definition: NumuVarsExtra.h:78
const Var kTrueQ2
Definition: TruthVars.h:27
const Var kDirY([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].dir.Y();})
Definition: NumuVars.h:38
const Var kNumuHadCalE
Definition: NumuVars.cxx:538
const Var kShwWidth
const Var kSlcMinY([](const caf::SRProxy *sr){return sr->slc.boxmin.Y()/100.;})
Definition: NumuVars.h:88
const Var kVtxZm([](const caf::SRProxy *sr){return float(kVtxZ(sr)/100.);})
Definition: NumuVarsExtra.h:62
const Var kNPng3D([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5;return(int) sr->vtx.elastic.fuzzyk.npng;})
Definition: NumuVarsExtra.h:56
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
const Var kOrphCalE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.f;return(float) sr->vtx.elastic.fuzzyk.orphCalE;})
Definition: NumuVarsExtra.h:58
const MultiVar kPngNPlane([](const caf::SRProxy *sr){std::vector< double > nplane;if(!sr->vtx.elastic.IsValid) return nplane;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){nplane.emplace_back(sr->vtx.elastic.fuzzyk.png[i].nplane);}return nplane;})
Definition: NumuVarsExtra.h:27
const MultiVar kPngMaxPlaneGap([](const caf::SRProxy *sr){std::vector< double > maxplane;if(!sr->vtx.elastic.IsValid) return maxplane;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){maxplane.emplace_back(sr->vtx.elastic.fuzzyk.png[i].maxplanegap);}return maxplane;})
Definition: NumuVarsExtra.h:29
const MultiVar kPng2dNhitX([](const caf::SRProxy *sr){std::vector< double > nhit;if(!sr->vtx.elastic.IsValid) return nhit;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){nhit.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].nhitx);}return nhit;})
Definition: NumuVarsExtra.h:42
const Var kENLLL
const Var kBPFBestMuonTrkE([](const caf::SRProxy *sr){float trkE=-5.0;if(kBPFValidMuon(sr)==false) return-5.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) trkE=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.energy;return trkE;})
: Track energy for the best muon track
Definition: BPFVars.h:129
const Var kHitsPerPlane
const MultiVar kPng2dDirY([](const caf::SRProxy *sr){std::vector< double > dir;if(!sr->vtx.elastic.IsValid) return dir;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){dir.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].dir.Y());}return dir;})
Definition: NumuVarsExtra.h:49
const Var kTrkNPlaneGapFrac([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;if(sr->trk.kalman.ntracks > 0 &&sr->trk.kalman.idxremid!=999) return float(float(sr->trk.kalman.tracks[0].nplanegap)/float(sr->trk.kalman.tracks[0].nplane));return-5.f;})
Definition: NumuVarsExtra.h:88
void AddHistDefWeights(std::vector< HistDef > &hd)
const NuTruthVar kTrueW_NT([](const caf::SRNeutrinoProxy *nu){if(std::isnan(1.*nu->W2)) return-5.f;return float(sqrt(nu->W2));})
Definition: TruthVars.h:21
const Var kPtP
Transverse momentum fraction in slice.
Definition: NueVars.cxx:90
const Var kEMuLLT
const Var kTrueE([](const caf::SRProxy *sr){assert(sr->mc.nnu==1);return sr->mc.nu[0].E;})
Definition: Vars.cxx:85
const Var kShwStopY
const Binning kXYBinsFD
const MultiVar kPng2dMaxPlaneGap([](const caf::SRProxy *sr){std::vector< double > maxplane;if(!sr->vtx.elastic.IsValid) return maxplane;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){maxplane.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].maxplanegap);}return maxplane;})
Definition: NumuVarsExtra.h:46
const Var kMuLLT
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
const Var kShwStartX
const Var kLongestProng([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return 0.f;if(sr->vtx.elastic.fuzzyk.npng==0) return 0.f;auto idx=sr->vtx.elastic.fuzzyk.longestidx;return float(sr->vtx.elastic.fuzzyk.png[idx].len);})
Definition: Vars.h:89
const Var kCosAngleNextShower([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.f;if(sr->vtx.elastic.fuzzyk.nshwlid >=2) return(sr->vtx.elastic.fuzzyk.png[0].shwlid.dir).Dot(sr->vtx.elastic.fuzzyk.png[1].shwlid.dir);else return-5.f;})
Definition: NueVarsExtra.h:116
const MultiVar kPngLen([](const caf::SRProxy *sr){std::vector< double > len;if(!sr->vtx.elastic.IsValid) return len;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){len.emplace_back(sr->vtx.elastic.fuzzyk.png[i].len/100.);}return len;})
Definition: NumuVarsExtra.h:30
const Var kRemID
PID
Definition: Vars.cxx:81
const Binning kZBinsFD
const Var kCaloE
Summed calorimetric energy of all hits in slice, uncorrected.
Definition: Vars.cxx:52
const Var kEPiLLL
const Var kHadEFrac
Definition: NumuVars.h:24
const Var kNHit
Definition: Vars.cxx:71
const Var kHadEres([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;float recoE=kHadE(sr);float trueE=kTrueE(sr)-kMuE(sr);return float((recoE-trueE)/trueE);})
Definition: NumuVarsExtra.h:87
const MultiVar kPngNhitX([](const caf::SRProxy *sr){std::vector< double > nhit;if(!sr->vtx.elastic.IsValid) return nhit;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){nhit.emplace_back(sr->vtx.elastic.fuzzyk.png[i].nhitx);}return nhit;})
Definition: NumuVarsExtra.h:25
const Var kTrkStartZ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].start.Z()/100;})
Definition: NumuVars.h:53
const HistAxis kNue2020Axis("NuE Energy / Analysis Bin", kNue2020Binning, kNue2020AnaBin)
Use this Axis for Ana2020, official Axis.
Definition: NueCuts2020.h:195
const Var kCCE
Definition: NumuVars.h:21
const Var kNumuMuonPtP([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks > 0 &&sr->trk.kalman.idxremid!=999){if(sr->hdr.det==1){double Zbeam=sr->trk.kalman.tracks[0].dir.Dot(beamDirND);double ptp=sqrt(1-Zbeam *Zbeam);return(float) ptp;}if(sr->hdr.det==2){double Zbeam=sr->trk.kalman.tracks[0].dir.Dot(beamDirFD);double ptp=sqrt(1-Zbeam *Zbeam);return(float) ptp;}}return-5.f;})
Definition: NumuVars.h:49
const Var kEMuLLL
const Var kBPFBestMuonNhits([](const caf::SRProxy *sr){float Nhits=-5.0;if(kBPFValidMuon(sr)==false) return-999.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) Nhits=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.nhit;return Nhits;})
: Number of hits in the best muon track
Definition: BPFVars.h:39
const Var kEPiLLT
const Var kEPi0LLT
const Var kSlcStartTime([](const caf::SRProxy *sr){return sr->slc.starttime/1000.;})
Definition: NumuVars.h:84
const Var kShwGap
void AddHistDefRecoND(std::vector< HistDef > &hd)
const Var kTrkCalE([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return 0.f;return float(sr->trk.kalman.tracks[0].calE);})
Definition: NumuVars.h:67
const Var kTrueSlcPur([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return(float) sr->mc.nu[0].pur;})
Definition: NumuVarsExtra.h:76
const Var kMuLLL
const Var kShwStopZ
void AddHistDefProngCVN(std::vector< HistDef > &hd)
const Var kELLT
const Var kBPFBestMuonStopy([](const caf::SRProxy *sr){float stopy=-999.0;if(kBPFValidMuon(sr)==false) return-999.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) stopy=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.stop.y/100.0;return stopy;})
: Reco End Y-position for the best muon track
Definition: BPFVars.h:69
const MultiVar kPngWtCalE([](const caf::SRProxy *sr){std::vector< double > E;if(!sr->vtx.elastic.IsValid) return E;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){E.emplace_back(sr->vtx.elastic.fuzzyk.png[i].weightedCalE);}return E;})
Definition: NumuVarsExtra.h:23
const Var kKalTrkOverlapE([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return(float) sr->trk.kalman.tracks[0].overlapE;})
Definition: NumuVarsExtra.h:59
const NuTruthVar kTrueMomX_NT([](const caf::SRNeutrinoProxy *nu){return(float) nu->p.X();})
const MultiVar kPng2dNPlane([](const caf::SRProxy *sr){std::vector< double > nplane;if(!sr->vtx.elastic.IsValid) return nplane;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){nplane.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].nplane);}return nplane;})
Definition: NumuVarsExtra.h:44
const Var kELLL
const MultiVar kPngStartY([](const caf::SRProxy *sr){std::vector< double > start;if(!sr->vtx.elastic.IsValid) return start;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){start.emplace_back(sr->vtx.elastic.fuzzyk.png[i].start.Y()/100.);}return start;})
Definition: NumuVarsExtra.h:35
const Var kTrkStartX([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].start.X()/100;})
Definition: NumuVars.h:51
const Var kCVNm_looseptp
Definition: Vars.cxx:40
const Var kHADE_2020([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;const double CVNha_CalE=sr->slc.calE;return std::max(CVNha_CalE-kEME_2020(sr), 0.);})
Definition: NueEnergy2020.h:15
const Var kRecoEPerHit([](const caf::SRProxy *sr){if(sr->slc.nhit >0) return 1000.0 *(kNueEnergy2018(sr)/sr->slc.nhit);else return-5.;})
Definition: NueVarsExtra.h:15
void AddHistDefNuePID(std::vector< HistDef > &hd)
const Var kBPFBestMuonStarty([](const caf::SRProxy *sr){float starty=-999.0;if(kBPFValidMuon(sr)==false) return-999.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) starty=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.start.y/100.0;return starty;})
: Reco Start Y-position for the best muon track
Definition: BPFVars.h:51
const Var kBPFBestMuonDiry([](const caf::SRProxy *sr){float diry=-5.0;if(kBPFValidMuon(sr)==false) return-5.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) diry=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.dir.y;return diry;})
: Reco Start Y-direction for the best muon track
Definition: BPFVars.h:87
const Var kTrkEndZ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].stop.Z()/100;})
Definition: NumuVars.h:57
const Var kNueHadCalEFrac([](const caf::SRProxy *sr){return kHadCalE(sr)/sr->slc.calE;})
Definition: NueVarsExtra.h:52
const Var kTrueMomX([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return(float) sr->mc.nu[0].p.X();})
Definition: NumuVarsExtra.h:79
const Var kCVNm_oldpresel
Definition: Vars.cxx:41
const Var kMuEPerNHit([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return 0.f;return(float) kMuE(sr)/sr->trk.kalman.tracks[0].nhit;})
Definition: NumuVars.h:69
const Var kInelasticity([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return 1.f;if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return 1.f;return((sr->slc.calE- sr->vtx.elastic.fuzzyk.png[0].shwlid.calE)/(sr->slc.calE));})
Definition: NueVarsExtra.h:38
const Var kTrueVtxZ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return float(sr->mc.nu[0].vtx.Z()/100.);})
Definition: NumuVarsExtra.h:84
void AddHistDefNusND(std::vector< HistDef > &hd)
const Var kNueEnergy2020([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;if(kIsRHC(sr)) return kNueEnergyRHC2020(sr);else return kNueEnergyFHC2020(sr);})
Nue energy with 3d prong info. only (old version of vars)
Definition: NueEnergy2020.h:38
const NuTruthVar kTrueVisE_NT([](const caf::SRNeutrinoProxy *nu){return(float) nu->visE;})
Definition: NumuVarsExtra.h:91
const Var kPhotonCVN
const Binning kXYBinsND
const Var kTrkNPlaneGap([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks > 0 &&sr->trk.kalman.idxremid!=999) return int(sr->trk.kalman.tracks[0].nplanegap);return 500;})
Definition: NumuVars.h:99
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
const Var kMuonCVN
const Var kShwHitFrac([](const caf::SRProxy *sr){if(sr->slc.nhit< 1) return-5.f;if(!sr->vtx.elastic.IsValid) return 0.f;float nhitall=0.0;for(unsigned int j=0;j< sr->vtx.elastic.fuzzyk.nshwlid;j++){nhitall+=sr->vtx.elastic.fuzzyk.png[j].shwlid.nhit;}return(nhitall/sr->slc.nhit);})
Fraction of hits in a 3D shower out of total slice.
Definition: NueVarsExtra.h:125
const NuTruthVar kTrueVtxY_NT([](const caf::SRNeutrinoProxy *nu){return float(nu->vtx.Y()/100.);})
const Var kTrkEndY([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].stop.Y()/100;})
Definition: NumuVars.h:56
void AddHistDefXSecFD(std::vector< HistDef > &hd)
const Var kTrkEndX([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return sr->trk.kalman.tracks[0].stop.X()/100;})
Definition: NumuVars.h:55
const Var kEMEPerHit([](const caf::SRProxy *sr){if(kEMNhit(sr)>0) return 1000.0 *(kemCalE(sr)/kEMNhit(sr));else return-5.;})
Definition: NueVarsExtra.h:20
const Var kBPFBestMuonTrkNPlanes([](const caf::SRProxy *sr){int nplanes=500;if(kBPFValidMuon(sr)==false) return 500;unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) nplanes=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.nplane;return nplanes;})
: Number of planes for best muon track
Definition: BPFVars.h:147
const Var kSlcEndTime([](const caf::SRProxy *sr){return sr->slc.endtime/1000.;})
Definition: NumuVars.h:85
const Var kEres([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return float((kCCE(sr)-kTrueE(sr))/kTrueE(sr));})
Definition: NumuVarsExtra.h:85
const Var kTrueMomZ([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return(float) sr->mc.nu[0].p.Z();})
Definition: NumuVarsExtra.h:81
const Var kDirX([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].dir.X();})
Definition: NumuVars.h:37
const Var kPi0Mass
const Binning kEnergyBinningZoom
void AddHistDefNueND(std::vector< HistDef > &hd)
const MultiVar kPngDirX([](const caf::SRProxy *sr){std::vector< double > dir;if(!sr->vtx.elastic.IsValid) return dir;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;++i){dir.emplace_back(sr->vtx.elastic.fuzzyk.png[i].dir.X());}return dir;})
Definition: NumuVarsExtra.h:31
const Var kNPlanesToFront
const Var kElectronCVN
void AddHistDefNumuND(std::vector< HistDef > &hd)
const Var kShwHitXYAsymm([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.f;if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return-5.f;float xyhitdiff=sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx-sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity;float xyhitsum=(sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx+ sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity);if(xyhitsum >0) return xyhitdiff/xyhitsum;else return-5.f;})
asymmetry between x and y hits of most energetic shower
Definition: NueVarsExtra.h:119
void AddHistDefNueLID(std::vector< HistDef > &hd)
const Binning kNumuCCEOptimisedBinning
Optimised binning for numuCCE from L. Vinton. See docdb 16332. This was close to &#39;custC&#39; in that talk...
Definition: Binnings.cxx:28
const Var kEPLLT
void AddHistDefNumuRecoE(std::vector< HistDef > &hd)
const MultiVar kPng2dLen([](const caf::SRProxy *sr){std::vector< double > len;if(!sr->vtx.elastic.IsValid) return len;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){len.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].len/100.);}return len;})
Definition: NumuVarsExtra.h:47
const NuTruthVar kTrueLepE_NT([](const caf::SRNeutrinoProxy *nu){return float(nu->prim[0].p.E);})
void AddHistDefTruthND(std::vector< HistDef > &hd)
const MultiVar kPng2dDirZ([](const caf::SRProxy *sr){std::vector< double > dir;if(!sr->vtx.elastic.IsValid) return dir;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){dir.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].dir.Z());}return dir;})
Definition: NumuVarsExtra.h:50
const Var kReMIdDEDxLLH
Definition: NumuVars.cxx:556
void AddMultiHistDefRecoND(std::vector< MultiHistDef > &hd)
void AddNTHistDefND(std::vector< NuTruthHistDef > &hd)
const Var kEPLLL
const Var kNShwLID([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return 0u;return(unsigned int) sr->vtx.elastic.fuzzyk.nshwlid;})
Definition: NueVarsExtra.h:108
void AddHistDefXSecND(std::vector< HistDef > &hd)
void AddHistDefNueDataMC(std::vector< HistDef > &hd)
const MultiVar kPng2dNhit([](const caf::SRProxy *sr){std::vector< double > nhit;if(!sr->vtx.elastic.IsValid) return nhit;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){nhit.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].nhit);}return nhit;})
Definition: NumuVarsExtra.h:41
const Var kCVNe_oldpresel
Definition: Vars.cxx:37
const Var kCosTheta
const Var kVtxXm([](const caf::SRProxy *sr){return float(kVtxX(sr)/100.);})
Definition: NumuVarsExtra.h:60
void AddNTHistDef(std::vector< NuTruthHistDef > &hd)
const NuTruthVar kTrueMode_NT([](const caf::SRNeutrinoProxy *nu){return int(nu->mode);})
const Var kNElastic([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid){return 0.;}else{return 1.;}})
Definition: NueVarsExtra.h:106
const Var kShwStartZ
const Var kMuE
Definition: NumuVars.h:22
const Var kOtherCVN
void AddHistDefNueEnergy(std::vector< HistDef > &hd)
const Var kShwLen
TH1F * hd
Definition: Xdiff_gwt.C:57
const Var kNeutronCVN
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
Definition: Binning.cxx:107
const Var kCVNe_looseptp
Definition: Vars.cxx:36
const Var kTrueW
Definition: TruthVars.h:22
const NuTruthVar kTrueVtxX_NT([](const caf::SRNeutrinoProxy *nu){return float(nu->vtx.X()/100.);})
const Var kProtonCVN
void AddHistDefSliceTruth(std::vector< HistDef > &hd)
const Var kTrueVtxX([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5555.f;return float(sr->mc.nu[0].vtx.X()/100.);})
Definition: NumuVarsExtra.h:82
void AddHistDefNusFD(std::vector< HistDef > &hd)
const Var kCosNumi([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks > 0 &&sr->trk.kalman.idxremid!=999){if(sr->hdr.det==1){return sr->trk.kalman.tracks[0].dir.Dot(beamDirND);}if(sr->hdr.det==2){return sr->trk.kalman.tracks[0].dir.Dot(beamDirFD);}}return-5.f;})
Definition: NumuVars.h:43
const Var kEME_2020([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;double CVNem_CalE=0.0;const caf::SRFuzzyKProngProxy &prim_png=sr->vtx.elastic.fuzzyk.png[0];for(const caf::SRFuzzyKProngProxy &png:sr->vtx.elastic.fuzzyk.png){double png_CalE=png.shwlid.calE;double emPID=((double) png.cvnpart.photonid+ (double) png.cvnpart.pizeroid+ (double) png.cvnpart.electronid);double haPID=((double) png.cvnpart.protonid+ (double) png.cvnpart.pionid+ (double) png.cvnpart.neutronid+ (double) png.cvnpart.otherid+ (double) png.cvnpart.muonid);if(emPID< 0) continue;if(emPID >=haPID ) CVNem_CalE+=png_CalE;else continue;}if(kLongestProng(sr) >=500) CVNem_CalE=prim_png.shwlid.calE;return CVNem_CalE;})
Definition: NueEnergy2020.h:14
const NuTruthVar kTrueQ2_NT([](const caf::SRNeutrinoProxy *nu){return nu->q2;})
True square of four-momentum transfer.
Definition: TruthVars.h:26
const Var kVtxYm([](const caf::SRProxy *sr){return float(kVtxY(sr)/100.);})
Definition: NumuVarsExtra.h:61
const MultiVar kPng2dWtCalE([](const caf::SRProxy *sr){std::vector< double > E;if(!sr->vtx.elastic.IsValid) return E;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng2d;++i){E.emplace_back(sr->vtx.elastic.fuzzyk.png2d[i].weightedCalE);}return E;})
Definition: NumuVarsExtra.h:40
const Var kSlcMinZ([](const caf::SRProxy *sr){return sr->slc.boxmin.Z()/100.;})
Definition: NumuVars.h:89
const Var kTrkNhits([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return 65535;return int(sr->trk.kalman.tracks[0].nhit);})
Definition: NumuVars.h:59
void AddHistDefNumuFD(std::vector< HistDef > &hd)
const Var kXSecCVWgt2020
Definition: XsecTunes.h:105
const Var kBPFBestMuonTrkLen([](const caf::SRProxy *sr){float len=-1.0;if(kBPFValidMuon(sr)==false) return-5.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid) len=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.len/100.0;return len;})
: Reco length for the best muon track
Definition: BPFVars.h:135
const Var kTrueVtxY([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5555.f;return float(sr->mc.nu[0].vtx.Y()/100.);})
Definition: NumuVarsExtra.h:83
const Var kTrueSlcEff([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return(float) sr->mc.nu[0].eff;})
Definition: NumuVarsExtra.h:75
const Var kTrueNHitsSlc([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-5.f;return(float) sr->mc.nu[0].nhitslc;})
Definition: NumuVarsExtra.h:77