BPFVars.h
Go to the documentation of this file.
1 #pragma once
2 
3 // Definitions for specific BPF variables.
4 
5 #include "CAFAna/Core/Cut.h"
6 #include "CAFAna/Core/Var.h"
7 #include "CAFAna/Core/MultiVar.h"
8 
10 
11 namespace ana
12 {
13  const Cut kBPFValidMuon = (kCVNMuonIdx >= 0);
14 
15  //=============================//
16  // BPF single-variables:
17  //=============================//
18 
19  /// \brief: Best muon PID for the slice
20  ///
21  /// Event-level muon PID from the highest scoring BPF muon track, using CVN-prong as a PID.
22  ///
23  /// Suggested range: complete coverage from 0 -> 1
24  ///
25  // const Var kBPFBestMuonPID - Depreciated Var, please use kCVNBestMuonScore in CVNProngVars.h
26 
27 
28 
29  /// \brief: Number of 3D Prongs
30  ///
31  /// Reconstructed number of hits (under the muon assumption) for the
32  /// BPF track with the highest CVN-prong muon PID.
33  extern const Var kBPFBestMuonNpng;
34 
35  /// \brief: Number of hits in the best muon track
36  ///
37  /// Reconstructed number of hits (under the muon assumption) for the
38  /// BPF track with the highest CVN-prong muon PID.
39  extern const Var kBPFBestMuonNhits;
40 
41  /// \brief: Reco Start X-position for the best muon track
42  ///
43  /// Reconstructed Start X-position (under the muon assumption) for the
44  /// BPF track with the highest CVN-prong muon PID.
45  extern const Var kBPFBestMuonStartx;
46 
47  /// \brief: Reco Start Y-position for the best muon track
48  ///
49  /// Reconstructed Start Y-position (under the muon assumption) for the
50  /// BPF track with the highest CVN-prong muon PID.
51  extern const Var kBPFBestMuonStarty;
52 
53  /// \brief: Reco Start Z-position for the best muon track
54  ///
55  /// Reconstructed Start Z-position (under the muon assumption) for the
56  /// BPF track with the highest CVN-prong muon PID.
57  extern const Var kBPFBestMuonStartz;
58 
59  /// \brief: Reco End X-position for the best muon track
60  ///
61  /// Reconstructed End X-position (under the muon assumption) for the
62  /// BPF track with the highest CVN-prong muon PID.
63  extern const Var kBPFBestMuonStopx;
64 
65  /// \brief: Reco End Y-position for the best muon track
66  ///
67  /// Reconstructed End Y-position (under the muon assumption) for the
68  /// BPF track with the highest CVN-prong muon PID.
69  extern const Var kBPFBestMuonStopy;
70 
71  /// \brief: Reco End Z-position for the best muon track
72  ///
73  /// Reconstructed End Z-position (under the muon assumption) for the
74  /// BPF track with the highest CVN-prong muon PID.
75  extern const Var kBPFBestMuonStopz;
76 
77  /// \brief: Reco Start X-direction for the best muon track
78  ///
79  /// Reconstructed Start X-direction (under the muon assumption) for the
80  /// BPF track with the highest CVN-prong muon PID.
81  extern const Var kBPFBestMuonDirx;
82 
83  /// \brief: Reco Start Y-direction for the best muon track
84  ///
85  /// Reconstructed Start Y-direction (under the muon assumption) for the
86  /// BPF track with the highest CVN-prong muon PID.
87  extern const Var kBPFBestMuonDiry;
88 
89  /// \brief: Cosine of Reco Start Y-direction for the best muon track
90  ///
91  /// Cosine of the reconstructed Start Y-direction (under the muon assumption)
92  /// for the BPF track with the highest CVN-prong muon PID.
93  extern const Var kBPFBestMuonCosDirY;
94 
95  /// \brief: Reco Start Z-direction for the best muon track
96  ///
97  /// Reconstructed Start Z-direction (under the muon assumption) for the
98  /// BPF track with the highest CVN-prong muon PID.
99  extern const Var kBPFBestMuonDirz;
100 
101  /// \brief: Reco X-momentum for the best muon track
102  ///
103  /// Reconstructed X-momentum (under the muon assumption) for the
104  /// BPF track with the highest CVN-prong muon PID.
105  extern const Var kBPFBestMuonPx;
106 
107  /// \brief: Reco Y-momentum for the best muon track
108  ///
109  /// Reconstructed Y-momentum (under the muon assumption) for the
110  /// BPF track with the highest CVN-prong muon PID.
111  extern const Var kBPFBestMuonPy;
112 
113  /// \brief: Reco Z-momentum for the best muon track
114  ///
115  /// Reconstructed Z-momentum (under the muon assumption) for the
116  /// BPF track with the highest CVN-prong muon PID.
117  extern const Var kBPFBestMuonPz;
118 
119  /// \brief: Cal energy for the best muon track
120  ///
121  /// Calorimetric energy (under the muon assumption) for the
122  /// BPF track with the highest muon PID.
123  extern const Var kBPFBestMuonCalE;
124 
125  /// \brief: Track energy for the best muon track
126  ///
127  /// BPF track energy (under the muon assumption) for the
128  /// BPF track with the highest muon PID
129  extern const Var kBPFBestMuonTrkE;
130 
131  /// \brief: Reco length for the best muon track
132  ///
133  /// Reconstructed track length (under the muon assumption) for the
134  /// BPF track with the highest muon PID.
135  extern const Var kBPFBestMuonTrkLen;
136 
137  /// \brief: Number of missing planes for best muon track
138  ///
139  /// Number of missing planes (under the muon assumption) for the
140  /// BPF track with the highest muon PID
142 
143  /// \brief: Number of planes for best muon track
144  ///
145  /// Number of planes (under the muon assumption) for the
146  /// BPF track with the highest muon PID
148 
149 
150  /// \brief: Pt/P for Best Muon track
151  ///
152  extern const Var kBPFBestMuonPtP;
153 
154  /// \brief: Cos(NuMI beam dir) w.r.t. Best BPF Muon track
155  ///
156  extern const Var kBPFBestMuonCosNumi;
157 
158  /// \brief: EXAMPLE VAR: longest track length under the muon assumption
159  ///
160  /// Reconstructed track length (under the muon assumption) for the
161  /// longest BPF track in the slice. This varibale is provided
162  /// partially as an example of how to loop over all prongs & tracks.
164 
165  /// \brief: chi2T for the best muon track
166  ///
167  /// Input variable "chi2T" (total track fit chi^2) to the muon PID from the best muon track.
168  ///
169  /// Suggested range: 0 -> 20 (although values can occur outside of this range)
170  extern const Var kBPFBestMuonChi2T;
171 
172  /// \brief: dEdXLL for the best muon track
173  ///
174  /// Input variable "dEdXLL" (dE/dx log-likelihood) to the muon PID from the best muon track.
175  ///
176  /// Suggested range: -10 -> 0 (although values can occur outside of this range)
177  extern const Var kBPFBestMuondEdXLL;
178 
179  /// \brief: hitRatio for the best muon track
180  ///
181  /// Input variable "hitRatio" to the muon PID from the best muon track.
182  ///
183  /// Suggested range: complete coverage from 0 -> 1
184  extern const Var kBPFBestMuonHitRatio;
185 
186 
187 
188  /// \brief: Position at the MuCat transition for the best muon track
189  ///
190  /// Interpolated position at the MuCat transition (under the muon assumption) for the
191  /// BPF track with the highest CVN-prong muon PID.
193 
194  /// \brief: Projected number of cells from endpoint forward to detector edge in ND for the best muon track
195  ///
197 
198  /// \brief: Projected number of cells from endpoint forward to detector edge for the best muon track
199  ///
200  extern const Var kBPFBestMuonFwdCell;
201 
202  /// \brief: Projected number of cells from endpoint backward to detector edge in ND for the best muon track
203  ///
205 
206  /// \brief: Projected number of cells from endpoint backward to detector edge for the best muon track
207  ///
208  extern const Var kBPFBestMuonBakCell;
209 
210 
211  //=============================//
212  // BPF multi-variables:
213  //=============================//
214 
215 
216 
217  /// \brief: EXAMPLE MULTIVAR: reco E for all "pion-like" tracks
218  ///
219  /// This multivar is provided as an example of how to plot a value for a
220  /// set of tracks that match user defined criteria. The example is to plot
221  /// the BPF reconstructed energy under the pion assumption for all "pion-like"
222  /// tracks. "pion-like" is definied simply as all tracks < 2 m long and NOT
223  /// identified as the muon by the BPF muon PID.
224  extern const MultiVar kBPFPionRecoE;
225 
226  /// \brief: track length for all BPF tracks under the muon assumption
227  ///
228  /// The length of every track in the slice made using the muon assumption.
230 
231  /// \brief: track length for all BPF tracks under the pion assumption
232  ///
233  /// The length of every track in the slice made using the pion assumption.
235 
236  /// \brief: track length for all BPF tracks under the proton assumption
237  ///
238  /// The length of every track in the slice made using the proton assumption.
240 
241 } // namespace
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 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
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
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 kBPFBestMuonHitRatio([](const caf::SRProxy *sr){float hitRatio=-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) hitRatio=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.hitRatio;return hitRatio;})
: hitRatio for the best muon track
Definition: BPFVars.h:184
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 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 MultiVar kBPFAllTrkLenProton(BPFAllTrkLenHelper(2212))
: track length for all BPF tracks under the proton assumption
Definition: BPFVars.h:239
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 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 kCVNMuonIdx([](const caf::SRProxy *sr){float longest_idx=-5.0;float longest_len=-5.0;if(sr->vtx.elastic.IsValid){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic.fuzzyk.png.size();png_idx++){auto &png=sr->vtx.elastic.fuzzyk.png[png_idx];if(png.len > longest_len){longest_len=png.len;longest_idx=png_idx;}}} if(longest_len > 500.0) return longest_idx;float best_idx=-5.0;float best_score=-5.0;if(sr->vtx.elastic.IsValid){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic.fuzzyk.png.size();png_idx++){auto &png=sr->vtx.elastic.fuzzyk.png[png_idx];if(png.cvnpart.muonid > best_score){best_score=png.cvnpart.muonid;best_idx=png_idx;}}}return best_idx;})
: Prong index of best muon prong by CVN score & length
Definition: CVNProngVars.h:19
const MultiVar kBPFAllTrkLenPion(BPFAllTrkLenHelper(211))
: track length for all BPF tracks under the pion assumption
Definition: BPFVars.h:234
const Var kBPFBestMuonPx([](const caf::SRProxy *sr){float px=-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) px=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.momentum.x;return px;})
: Reco X-momentum for the best muon track
Definition: BPFVars.h:105
const Var kBPFBestMuondEdXLL([](const caf::SRProxy *sr){float dEdXLL=-999.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) dEdXLL=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.dEdXLL;return dEdXLL;})
: dEdXLL for the best muon track
Definition: BPFVars.h:177
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 kBPFBestMuonPz([](const caf::SRProxy *sr){float pz=-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) pz=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.momentum.z;return pz;})
: Reco Z-momentum for the best muon track
Definition: BPFVars.h:117
const Var kBPFBestMuonBakCell([](const caf::SRProxy *sr){float trkbakcell=-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) trkbakcell=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.trkbakcell;return trkbakcell;})
: Projected number of cells from endpoint backward to detector edge for the best muon track ...
Definition: BPFVars.h:208
const Var kBPFBestMuonCosNumi([](const caf::SRProxy *sr){float cosnumi=-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){if(sr->hdr.det==caf::kNEARDET) cosnumi=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.dir.Dot(beamDirND);if(sr->hdr.det==caf::kFARDET) cosnumi=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.dir.Dot(beamDirFD);}return cosnumi;})
: Cos(NuMI beam dir) w.r.t. Best BPF Muon track
Definition: BPFVars.h:156
_Cut< caf::SRProxy > Cut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
Definition: Cut.h:96
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 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 Var kBPFBestMuonPosAtTrans([](const caf::SRProxy *sr){float trkyposattrans=-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) trkyposattrans=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.trkyposattrans;return trkyposattrans;})
: Position at the MuCat transition for the best muon track
Definition: BPFVars.h:192
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 MultiVar kBPFPionRecoE([](const caf::SRProxy *sr){unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);std::vector< double > recoE;if(sr->vtx.elastic.IsValid){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic.fuzzyk.png.size();png_idx++){if((unsigned int) png_idx==muIdx) continue;auto &png=sr->vtx.elastic.fuzzyk.png[png_idx];if(!png.bpf.pion.IsValid) continue;recoE.push_back(png.bpf.pion.energy);}}return recoE;})
: EXAMPLE MULTIVAR: reco E for all "pion-like" tracks
Definition: BPFVars.h:224
const Var kBPFBestMuonFwdCell([](const caf::SRProxy *sr){float trkfwdcell=-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) trkfwdcell=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.trkfwdcell;return trkfwdcell;})
: Projected number of cells from endpoint forward to detector edge for the best muon track ...
Definition: BPFVars.h:200
const MultiVar kBPFAllTrkLenMuon(BPFAllTrkLenHelper(13))
: track length for all BPF tracks under the muon assumption
Definition: BPFVars.h:229
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 kBPFBestMuonCosDirY([](const caf::SRProxy *sr){float diry=kBPFBestMuonDiry(sr);if(diry==-5) return diry;else return(float) cos(diry);})
: Cosine of Reco Start Y-direction for the best muon track
Definition: BPFVars.h:93
const Cut kBPFValidMuon
: Make sure CVN-prong returns a valid muon score.
Definition: BPFCuts.cxx:16
const Var kBPFBestMuonFwdCellND([](const caf::SRProxy *sr){float trkfwdcellnd=-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) trkfwdcellnd=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.trkfwdcellnd;return trkfwdcellnd;})
: Projected number of cells from endpoint forward to detector edge in ND for the best muon track ...
Definition: BPFVars.h:196
const Var kBPFBestMuonChi2T([](const caf::SRProxy *sr){float chi2T=-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) chi2T=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.chi2T;return chi2T;})
: chi2T for the best muon track
Definition: BPFVars.h:170
const Var kBPFBestMuonPy([](const caf::SRProxy *sr){float py=-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) py=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.momentum.y;return py;})
: Reco Y-momentum for the best muon track
Definition: BPFVars.h:111
const Var kBPFBestMuonNpng([](const caf::SRProxy *sr){float npng=-5.0;if(kBPFValidMuon(sr)==false) return-999.f;npng=sr->vtx.elastic.fuzzyk.npng;return npng;})
: Best muon PID for the slice
Definition: BPFVars.h:33
const Var kBPFBestMuonPtP([](const caf::SRProxy *sr){float ptp=-5.0;if(kBPFValidMuon(sr)==false) return-5.f; unsigned int muIdx=(unsigned int) kCVNMuonIdx(sr);double Zbeam=-5.0;if(sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.IsValid){if(sr->hdr.det==caf::kNEARDET) Zbeam=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.dir.Dot(beamDirND);if(sr->hdr.det==caf::kFARDET) Zbeam=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.dir.Dot(beamDirFD);}if(Zbeam==-5.0) ptp=-5.0;else ptp=sqrt(1-Zbeam *Zbeam);return ptp;})
: Pt/P for Best Muon track
Definition: BPFVars.h:152
const Var kBPFLongestMuonTrkLen([](const caf::SRProxy *sr){float length=-1.0;if(kBPFValidMuon(sr)==false) return-5.f;if(sr->vtx.elastic.IsValid){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic.fuzzyk.png.size();png_idx++){auto &png=sr->vtx.elastic.fuzzyk.png[png_idx]; if(png.bpf.muon.len > length &&png.bpf.muon.IsValid){length=png.bpf.muon.len;}}}return length;})
: EXAMPLE VAR: longest track length under the muon assumption
Definition: BPFVars.h:163
const Var kBPFBestMuonBakCellND([](const caf::SRProxy *sr){float trkbakcellnd=-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) trkbakcellnd=sr->vtx.elastic.fuzzyk.png[muIdx].bpf.muon.trkbakcellnd;return trkbakcellnd;})
: Projected number of cells from endpoint backward to detector edge in ND for the best muon track ...
Definition: BPFVars.h:204
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