Prod4ProngCVNScores.h
Go to the documentation of this file.
1 
2 namespace ana {
3  const ana::Cut kNDRockFilter([](const caf::SRProxy * sr)
4  {
5  if(sr->vtx.nelastic == 0) return false;
6  return
7  sr->vtx.elastic[0].vtx.x > -180 &&
8  sr->vtx.elastic[0].vtx.x < 180 &&
9  sr->vtx.elastic[0].vtx.y > -180 &&
10  sr->vtx.elastic[0].vtx.y < 180 &&
11  sr->vtx.elastic[0].vtx.z > 20;
12  });
13 
14 
15  bool IsGoodProng(unsigned int prong_idx, const caf::SRProxy * sr) {
16  if(sr->vtx.elastic[0].fuzzyk.png[prong_idx].len >= 500) return false;
17  if(sr->vtx.elastic[0].fuzzyk.png[prong_idx].cvnpart.muonid <= 0) return false;
18  return true;
19  }
20 
21  bool IsPionPng(unsigned int prong_idx, const caf::SRProxy * sr) {
22  if(sr->vtx.nelastic == 0) return false;
23  if(sr->vtx.elastic[0].fuzzyk.npng == 0) return false;
24  if(IsGoodProng(prong_idx, sr))
25  return abs(sr->vtx.elastic[0].fuzzyk.png[prong_idx].truth.pdg) == 211;
26  return false;
27  }
28 
29  bool IsPhotonPng(unsigned int prong_idx, const caf::SRProxy * sr) {
30  if(sr->vtx.nelastic == 0) return false;
31  if(sr->vtx.elastic[0].fuzzyk.npng == 0) return false;
32  if(IsGoodProng(prong_idx, sr))
33  return sr->vtx.elastic[0].fuzzyk.png[prong_idx].truth.pdg == 22;
34  //return abs(sr->vtx.elastic[0].fuzzyk.png[prong_idx].truth.pdg) == 22;
35  return false;
36  }
37 
38  bool IsProtonPng(unsigned int prong_idx, const caf::SRProxy * sr) {
39  if(sr->vtx.nelastic == 0) return false;
40  if(sr->vtx.elastic[0].fuzzyk.npng == 0) return false;
41  if(IsGoodProng(prong_idx, sr))
42  return abs(sr->vtx.elastic[0].fuzzyk.png[prong_idx].truth.pdg) == 2212;
43  return false;
44  }
45 
46  bool IsElectronPng(unsigned int prong_idx, const caf::SRProxy * sr) {
47  if(sr->vtx.nelastic == 0) return false;
48  if(sr->vtx.elastic[0].fuzzyk.npng == 0) return false;
49  if(IsGoodProng(prong_idx, sr))
50  return abs(sr->vtx.elastic[0].fuzzyk.png[prong_idx].truth.pdg) == 11;
51  return false;
52  }
53 
54  bool IsMuonPng(unsigned int prong_idx, const caf::SRProxy * sr) {
55  if(sr->vtx.nelastic == 0) return false;
56  if(sr->vtx.elastic[0].fuzzyk.npng == 0) return false;
57  if(IsGoodProng(prong_idx, sr))
58  return abs(sr->vtx.elastic[0].fuzzyk.png[prong_idx].truth.pdg) == 13;
59  return false;
60  }
61 
62  double emid(int vtx_idx, int png_idx,const caf::SRProxy * sr) {
63  return sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid +
64  sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid;
65  }
66  ///////////////////////////////////////////////////////////////////////////
67  // EMID
68  ///////////////////////////////////////////////////////////////////////////
69  const ana::MultiVar kEMPIDTruePion([](const caf::SRProxy * sr)
70  {
71  std::vector<double> emid_scores;
72  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
73  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
74  if(IsPionPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));
75  }
76  }
77  return emid_scores;
78  });
79  const ana::MultiVar kEMPIDTrueElectron([](const caf::SRProxy * sr)
80  {
81  std::vector<double> emid_scores;
82  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
83  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
84  if(IsElectronPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));
85  }
86  }
87  return emid_scores;
88  });
89  const ana::MultiVar kEMPIDTrueMuon([](const caf::SRProxy * sr)
90  {
91  std::vector<double> emid_scores;
92  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
93  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
94  if(IsMuonPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));
95  }
96  }
97  return emid_scores;
98  });
99  const ana::MultiVar kEMPIDTrueProton([](const caf::SRProxy * sr)
100  {
101  std::vector<double> emid_scores;
102  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
103  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
104  if(IsProtonPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));
105  }
106  }
107  return emid_scores;
108  });
109  const ana::MultiVar kEMPIDTruePhoton([](const caf::SRProxy * sr)
110  {
111  std::vector<double> emid_scores;
112  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
113  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
114  if(IsPhotonPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));
115  }
116  }
117  return emid_scores;
118  });
119 
120 
121  ///////////////////////////////////////////////////////////////////////////
122  // PIONID
123  ///////////////////////////////////////////////////////////////////////////
124  const ana::MultiVar kPionPIDTruePion([](const caf::SRProxy * sr)
125  {
126  std::vector<double> pionid;
127  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
128  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
129  if(IsPionPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);
130  }
131  }
132  return pionid;
133  });
134  const ana::MultiVar kPionPIDTrueElectron([](const caf::SRProxy * sr)
135  {
136  std::vector<double> pionid;
137  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
138  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
139  if(IsElectronPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);
140  }
141  }
142  return pionid;
143  });
144  const ana::MultiVar kPionPIDTrueMuon([](const caf::SRProxy * sr)
145  {
146  std::vector<double> pionid;
147  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
148  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
149  if(IsMuonPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);
150  }
151  }
152  return pionid;
153  });
154  const ana::MultiVar kPionPIDTruePhoton([](const caf::SRProxy * sr)
155  {
156  std::vector<double> pionid;
157  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
158  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
159  if(IsPhotonPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);
160  }
161  }
162  return pionid;
163  });
164  const ana::MultiVar kPionPIDTrueProton([](const caf::SRProxy * sr)
165  {
166  std::vector<double> pionid;
167  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
168  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
169  if(IsProtonPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);
170  }
171  }
172  return pionid;
173  });
174 
175  ///////////////////////////////////////////////////////////////////////////
176  // ELECTRONID
177  ///////////////////////////////////////////////////////////////////////////
178  const ana::MultiVar kElectronPIDTruePion([](const caf::SRProxy * sr)
179  {
180  std::vector<double> electronid;
181  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
182  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
183  if(IsPionPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);
184  }
185  }
186  return electronid;
187  });
189  {
190  std::vector<double> electronid;
191  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
192  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
193  if(IsElectronPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);
194  }
195  }
196  return electronid;
197  });
198  const ana::MultiVar kElectronPIDTrueMuon([](const caf::SRProxy * sr)
199  {
200  std::vector<double> electronid;
201  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
202  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
203  if(IsMuonPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);
204  }
205  }
206  return electronid;
207  });
209  {
210  std::vector<double> electronid;
211  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
212  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
213  if(IsPhotonPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);
214  }
215  }
216  return electronid;
217  });
219  {
220  std::vector<double> electronid;
221  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
222  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
223  if(IsProtonPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);
224  }
225  }
226  return electronid;
227  });
228 
229  ///////////////////////////////////////////////////////////////////////////
230  // MUONID
231  ///////////////////////////////////////////////////////////////////////////
232  const ana::MultiVar kMuonPIDTruePion([](const caf::SRProxy * sr)
233  {
234  std::vector<double> muonid;
235  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
236  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
237  if(IsPionPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);
238  }
239  }
240  return muonid;
241  });
242  const ana::MultiVar kMuonPIDTrueElectron([](const caf::SRProxy * sr)
243  {
244  std::vector<double> muonid;
245  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
246  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
247  if(IsElectronPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);
248  }
249  }
250  return muonid;
251  });
252  const ana::MultiVar kMuonPIDTrueMuon([](const caf::SRProxy * sr)
253  {
254  std::vector<double> muonid;
255  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
256  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
257  if(IsMuonPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);
258  }
259  }
260  return muonid;
261  });
262  const ana::MultiVar kMuonPIDTruePhoton([](const caf::SRProxy * sr)
263  {
264  std::vector<double> muonid;
265  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
266  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
267  if(IsPhotonPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);
268  }
269  }
270  return muonid;
271  });
272  const ana::MultiVar kMuonPIDTrueProton([](const caf::SRProxy * sr)
273  {
274  std::vector<double> muonid;
275  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
276  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
277  if(IsProtonPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);
278  }
279  }
280  return muonid;
281  });
282 
283  ///////////////////////////////////////////////////////////////////////////
284  // PROTONID
285  ///////////////////////////////////////////////////////////////////////////
286  const ana::MultiVar kProtonPIDTruePion([](const caf::SRProxy * sr)
287  {
288  std::vector<double> protonid;
289  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
290  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
291  if(IsPionPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);
292  }
293  }
294  return protonid;
295  });
297  {
298  std::vector<double> protonid;
299  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
300  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
301  if(IsElectronPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);
302  }
303  }
304  return protonid;
305  });
306  const ana::MultiVar kProtonPIDTrueMuon([](const caf::SRProxy * sr)
307  {
308  std::vector<double> protonid;
309  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
310  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
311  if(IsMuonPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);
312  }
313  }
314  return protonid;
315  });
316  const ana::MultiVar kProtonPIDTruePhoton([](const caf::SRProxy * sr)
317  {
318  std::vector<double> protonid;
319  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
320  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
321  if(IsPhotonPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);
322  }
323  }
324  return protonid;
325  });
326  const ana::MultiVar kProtonPIDTrueProton([](const caf::SRProxy * sr)
327  {
328  std::vector<double> protonid;
329  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
330  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
331  if(IsProtonPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);
332  }
333  }
334  return protonid;
335  });
336 
337  ///////////////////////////////////////////////////////////////////////////
338  // PHOTONID
339  ///////////////////////////////////////////////////////////////////////////
340  const ana::MultiVar kPhotonPIDTruePion([](const caf::SRProxy * sr)
341  {
342  std::vector<double> photonid;
343  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
344  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
345  if(IsPionPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);
346  }
347  }
348  return photonid;
349  });
351  {
352  std::vector<double> photonid;
353  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
354  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
355  if(IsElectronPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);
356  }
357  }
358  return photonid;
359  });
360  const ana::MultiVar kPhotonPIDTrueMuon([](const caf::SRProxy * sr)
361  {
362  std::vector<double> photonid;
363  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
364  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
365  if(IsMuonPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);
366  }
367  }
368  return photonid;
369  });
370  const ana::MultiVar kPhotonPIDTruePhoton([](const caf::SRProxy * sr)
371  {
372  std::vector<double> photonid;
373  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
374  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
375  if(IsPhotonPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);
376  }
377  }
378  return photonid;
379  });
380  const ana::MultiVar kPhotonPIDTrueProton([](const caf::SRProxy * sr)
381  {
382  std::vector<double> photonid;
383  for(unsigned int vtx_idx = 0; vtx_idx < sr->vtx.elastic.size(); vtx_idx++) {
384  for(unsigned int png_idx = 0; png_idx < sr->vtx.elastic[vtx_idx].fuzzyk.png.size(); png_idx++) {
385  if(IsProtonPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);
386  }
387  }
388  return photonid;
389  });
390 
391 }
caf::Proxy< size_t > npng
Definition: SRProxy.h:2038
const ana::Cut kNDRockFilter([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return false;return sr->vtx.elastic[0].vtx.x >-180 &&sr->vtx.elastic[0].vtx.x< 180 &&sr->vtx.elastic[0].vtx.y >-180 &&sr->vtx.elastic[0].vtx.y< 180 &&sr->vtx.elastic[0].vtx.z > 20;})
bool IsGoodProng(unsigned int prong_idx, const caf::SRProxy *sr)
const ana::MultiVar kMuonPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
caf::Proxy< caf::SRFuzzyK > fuzzyk
Definition: SRProxy.h:2059
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
const ana::MultiVar kMuonPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
const ana::MultiVar kElectronPIDTruePion([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})
const ana::MultiVar kEMPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
const ana::MultiVar kPhotonPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
const ana::MultiVar kProtonPIDTruePion([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
const ana::MultiVar kPionPIDTruePion([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
void abs(TH1 *hist)
const ana::MultiVar kProtonPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
const ana::MultiVar kMuonPIDTruePion([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
A PID for muons.
Definition: FillPIDs.h:11
const ana::MultiVar kMuonPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
caf::Proxy< caf::SRElastic > elastic
Definition: SRProxy.h:2118
const ana::MultiVar kPhotonPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
caf::Proxy< std::vector< caf::SRFuzzyKProng > > png
Definition: SRProxy.h:2043
const ana::MultiVar kPionPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
bool IsPionPng(unsigned int prong_idx, const caf::SRProxy *sr)
caf::Proxy< float > z
Definition: SRProxy.h:108
const ana::MultiVar kPhotonPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
caf::Proxy< float > x
Definition: SRProxy.h:106
const ana::MultiVar kElectronPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})
const ana::MultiVar kEMPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
const ana::MultiVar kEMPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
bool IsProtonPng(unsigned int prong_idx, const caf::SRProxy *sr)
const ana::MultiVar kProtonPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
caf::StandardRecord * sr
bool IsPhotonPng(unsigned int prong_idx, const caf::SRProxy *sr)
const ana::MultiVar kProtonPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
const ana::MultiVar kProtonPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > protonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) protonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.protonid);}}return protonid;})
const ana::MultiVar kEMPIDTruePion([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
const ana::MultiVar kPionPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
caf::Proxy< float > y
Definition: SRProxy.h:107
const ana::MultiVar kEMPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > emid_scores;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) emid_scores.push_back(emid(vtx_idx, png_idx, sr));}}return emid_scores;})
caf::Proxy< caf::SRVector3D > vtx
Definition: SRProxy.h:2073
const ana::MultiVar kPionPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
const ana::MultiVar kElectronPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})
caf::Proxy< caf::SRVertexBranch > vtx
Definition: SRProxy.h:2146
const ana::MultiVar kPhotonPIDTrueElectron([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsElectronPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
const ana::MultiVar kPhotonPIDTruePion([](const caf::SRProxy *sr){std::vector< double > photonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPionPng(png_idx, sr)) photonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.photonid);}}return photonid;})
bool IsElectronPng(unsigned int prong_idx, const caf::SRProxy *sr)
const ana::MultiVar kPionPIDTruePhoton([](const caf::SRProxy *sr){std::vector< double > pionid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsPhotonPng(png_idx, sr)) pionid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.pionid);}}return pionid;})
double emid(int vtx_idx, int png_idx, const caf::SRProxy *sr)
bool IsMuonPng(unsigned int prong_idx, const caf::SRProxy *sr)
const ana::MultiVar kElectronPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})
const ana::MultiVar kMuonPIDTrueMuon([](const caf::SRProxy *sr){std::vector< double > muonid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsMuonPng(png_idx, sr)) muonid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.muonid);}}return muonid;})
const ana::MultiVar kElectronPIDTrueProton([](const caf::SRProxy *sr){std::vector< double > electronid;for(unsigned int vtx_idx=0;vtx_idx< sr->vtx.elastic.size();vtx_idx++){for(unsigned int png_idx=0;png_idx< sr->vtx.elastic[vtx_idx].fuzzyk.png.size();png_idx++){if(IsProtonPng(png_idx, sr)) electronid.push_back(sr->vtx.elastic[vtx_idx].fuzzyk.png[png_idx].cvnpart.electronid);}}return electronid;})