EnergyCont_help.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/Var.h"
4 #include "CAFAna/Vars/Vars.h"
7 
8 namespace ana {
9 
10  static const float MassNeut = 0.939565;
11  static const float MassProt = 0.938272;
12 
13  static const bool DEBUGGING = false;
14 
15  // --- Return the true energy or true uncontained energy of the primaries, summed by particle type.
16  double CalcPrimE( const caf::SRProxy* sr, int WhPDG, bool GetUncontE) {
17  // --- Define my variable to return.
18  double MyEnergy = 0.;
19  // --- Loop through all primary particles.
20  for (unsigned int PrimL=0; PrimL < sr->mc.nu[0].prim.size(); ++PrimL) {
21  // --- Continue if not the particle type we want.
22  if ( abs(sr->mc.nu[0].prim[PrimL].pdg) != WhPDG ) continue;
23  // --- Do I want to get the primary energy, or the uncontained energy?
24  if (GetUncontE) {
25  // --- Check that uncontained energy is set.
26  if (sr->mc.nu[0].prim[PrimL].totEscE>0.0) MyEnergy += sr->mc.nu[0].prim[PrimL].totEscE;
27  } else {
28  // --- Check that true energy is set.
29  if(sr->mc.nu[0].prim[PrimL].p.E<0.0) continue;
30  // --- Grab kinetic energy for neutrons and protons, and total energy for all other particle types.
31  double E = 0.;
32  if (sr->mc.nu[0].prim[PrimL].pdg == 2112) {
33  E = sr->mc.nu[0].prim[PrimL].p.E - MassNeut;
34  } else if (sr->mc.nu[0].prim[PrimL].pdg == 2212) {
35  E = sr->mc.nu[0].prim[PrimL].p.E - MassProt;
36  } else if (abs(sr->mc.nu[0].prim[PrimL].pdg) == 211) {
37  E = sr->mc.nu[0].prim[PrimL].p.E;
38  } else if (sr->mc.nu[0].prim[PrimL].pdg == 111) {
39  E = sr->mc.nu[0].prim[PrimL].p.E;
40  } else if (abs(sr->mc.nu[0].prim[PrimL].pdg) == 13) {
41  E = sr->mc.nu[0].prim[PrimL].p.E;
42  } else if (sr->mc.nu[0].prim[PrimL].pdg == 22 ) {
43  E = sr->mc.nu[0].prim[PrimL].p.E;
44  } else if (abs(sr->mc.nu[0].prim[PrimL].pdg) == 321) {
45  E = sr->mc.nu[0].prim[PrimL].p.E;
46  } else if (abs(sr->mc.nu[0].prim[PrimL].pdg) == 11) {
47  E = sr->mc.nu[0].prim[PrimL].p.E;
48  }
49  // --- Sum energy for the particle type
50  MyEnergy += E;
51  }
52  } // Loop through prim particles.
53  if (DEBUGGING) std::cout << "\tThe total " << (GetUncontE==true?"uncontained":"kinetic") << " energy from " << WhPDG << " was " << MyEnergy << std::endl;
54  // --- Return the value we have just worked out.
55  return MyEnergy;
56  }
57 
58  // ----- Neutrino energy
59  const Var kNeutrinoEn([](const caf::SRProxy *sr) {
60  float ThisEn = 0.;
61  ThisEn = sr->mc.nu[0].E;
62  return ThisEn;
63  });
64 
65  // ---- Find out the total uncontained energy
66  const Var kTotUncontEn([](const caf::SRProxy *sr) {
67  float TotEn = 0.0;
68  for (unsigned int PrimL=0; PrimL < sr->mc.nu[0].prim.size(); ++PrimL) {
69  TotEn += sr->mc.nu[0].prim[PrimL].totEscE;
70  }
71  // --- want to know the total uncontained energy and run / subrun / slice / event number
72  // so we can go look at the events in these "bumps" in the evd
73  std::cout << "Energy " << TotEn << " Run " << sr->hdr.run << ", SubRun " << sr->hdr.subrun << ", Cycle " << sr->hdr.cycle << ", Batch " << sr->hdr.batch << ", Event " << sr->hdr.evt << ", Slice " << sr->hdr.subevt << std::endl;
74  // --- Now return our final value...
75  return TotEn;
76  });
77 
78  // ----- Muon energy
79  // Total primary energy
80  const Var kMuonEn([](const caf::SRProxy* sr) {
81  float ThisEn = 0.;
82  ThisEn = CalcPrimE( sr, 13, false );
83  return ThisEn;
84  });
85  // Uncontained energy
86  const Var kUncontMuonEn([](const caf::SRProxy* sr) {
87  float ThisEn = 0.;
88  ThisEn = CalcPrimE( sr, 13, true );
89  return ThisEn;
90  });
91 
92  // ----- Neutron energy
93  // Total primary energy
94  const Var kNeutronEn([](const caf::SRProxy* sr) {
95  float ThisEn = 0.;
96  ThisEn = CalcPrimE( sr, 2112, false );
97  return ThisEn;
98  });
99  // Uncontained energy
100  const Var kUncontNeutronEn([](const caf::SRProxy* sr) {
101  float ThisEn = 0.;
102  ThisEn = CalcPrimE( sr, 2112, true );
103  return ThisEn;
104  });
105 
106  // ----- Proton energy
107  // Total primary energy
108  const Var kProtonEn([](const caf::SRProxy* sr) {
109  float ThisEn = 0.;
110  ThisEn = CalcPrimE( sr, 2212, false );
111  return ThisEn;
112  });
113  // Uncontained energy
114  const Var kUncontProtonEn([](const caf::SRProxy* sr) {
115  float ThisEn = 0.;
116  ThisEn = CalcPrimE( sr, 2212, true );
117  return ThisEn;
118  });
119 
120 
121  // ----- Pion energy
122  // Total primary energy
123  const Var kPionEn([](const caf::SRProxy* sr) {
124  float ThisEn = 0.;
125  ThisEn = CalcPrimE( sr, 211, false );
126  return ThisEn;
127  });
128  // Uncontained energy
129  const Var kUncontPionEn([](const caf::SRProxy* sr) {
130  float ThisEn = 0.;
131  ThisEn = CalcPrimE( sr, 211, true );
132  return ThisEn;
133  });
134 
135  // ----- Pi0 energy
136  // Total primary energy
137  const Var kPi0En([](const caf::SRProxy* sr) {
138  float ThisEn = 0.;
139  ThisEn = CalcPrimE( sr, 111, false );
140  return ThisEn;
141  });
142  // Uncontained energy
143  const Var kUncontPi0En([](const caf::SRProxy* sr) {
144  float ThisEn = 0.;
145  ThisEn = CalcPrimE( sr, 111, true );
146  return ThisEn;
147  });
148 
149  // ----- Photon energy
150  // Total primary energy
151  const Var kPhotonEn([](const caf::SRProxy* sr) {
152  float ThisEn = 0.;
153  ThisEn = CalcPrimE( sr, 22, false );
154  return ThisEn;
155  });
156  // Uncontained energy
157  const Var kUncontPhotonEn([](const caf::SRProxy* sr) {
158  float ThisEn = 0.;
159  ThisEn = CalcPrimE( sr, 22, true );
160  return ThisEn;
161  });
162 
163  // ----- Kaon energy
164  // Total primary energy
165  const Var kKaonEn([](const caf::SRProxy* sr) {
166  float ThisEn = 0.;
167  ThisEn = CalcPrimE( sr, 321, false );
168  return ThisEn;
169  });
170  // Uncontained energy
171  const Var kUncontKaonEn([](const caf::SRProxy* sr) {
172  float ThisEn = 0.;
173  ThisEn = CalcPrimE( sr, 321, true );
174  return ThisEn;
175  });
176 
177  // ----- Electron energy
178  // Total primary energy
179  const Var kElectronEn([](const caf::SRProxy* sr) {
180  float ThisEn = 0.;
181  ThisEn = CalcPrimE( sr, 11, false );
182  return ThisEn;
183  });
184  // Uncontained energy
185  const Var kUncontElectronEn([](const caf::SRProxy* sr) {
186  float ThisEn = 0.;
187  ThisEn = CalcPrimE( sr, 11, true );
188  return ThisEn;
189  });
190 
191 
192 // ------------------------------------------------------------
193 // A few extra Vars that make use of the previous ones...
194 
195  // nu E - energy from each selected particle type
196  const Var kNuMinusAll([](const caf::SRProxy* sr) {
197  return kNeutrinoEn(sr) - kMuonEn(sr) - kNeutronEn(sr) - kProtonEn(sr) - kPionEn(sr) - kPi0En(sr) - kPhotonEn(sr) - kKaonEn(sr) - kElectronEn(sr);
198  });
199 
200  // total uncontained E - uncontianed E from each selected particle type
201  const Var kUncontMiscEn([](const caf::SRProxy* sr) {
203  });
204 
205 
206 
207 
208 
209 // ------------------------------------------------------------
210 
211 
212  // ----- Energy fraction
213  // calculate particle type E / true nu E
214  // or
215  // uncontained E per particle type / total uncontained E
216  // or
217  // uncontained E per particle type / true nu E
218  double CalcFracE( const caf::SRProxy* sr, int WhPDG, bool GetUncontE, bool UncontOverTotal=false) {
219  // calculate the total energy of the particle type
220  double E = CalcPrimE(sr, WhPDG, GetUncontE);
221  // is it uncontained?
222  if(GetUncontE) {
223  // uncont. E / true nu E
224  if(UncontOverTotal){
225  if(sr->mc.nu[0].E<=0.0) return -5.0; // avoid nan
226  else return (E/sr->mc.nu[0].E);
227  }
228  // uncont. E / total uncont. E
229  else{
230  if(kTotUncontEn(sr)<=0.0) return -5.0; // avoid nan
231  else return (E/kTotUncontEn(sr));
232  }
233  }
234 
235  // particle type E / true nu E
236  else {
237  if(sr->mc.nu[0].E<=0.0) return -5.0; // avoid nan
238  else return (E/sr->mc.nu[0].E);
239  }
240  }
241 
242  // total uncont. E / true nu E
243  const Var kTotUncontEnFrac([](const caf::SRProxy* sr) {
244  if(sr->mc.nu[0].E<=0.0) return -5.0;
245  else return (kTotUncontEn(sr)/sr->mc.nu[0].E);
246  });
247 
248  // ----- Muon
249  // energy fraction
250  const Var kMuonEnFrac([](const caf::SRProxy* sr) {
251  return CalcFracE(sr, 13, false);
252  });
253  // uncont./tot. uncont.
254  const Var kUncontMuonEnFrac([](const caf::SRProxy* sr) {
255  return CalcFracE(sr, 13, true);
256  });
257  // uncont./true nu E
258  const Var kUncontMuonEnFracTot([](const caf::SRProxy* sr) {
259  return CalcFracE(sr, 13, true, true);
260  });
261 
262  // ----- Neutron
263  // energy fraction
264  const Var kNeutronEnFrac([](const caf::SRProxy* sr) {
265  return CalcFracE(sr, 2112, false);
266  });
267  // uncont./tot. uncont.
268  const Var kUncontNeutronEnFrac([](const caf::SRProxy* sr) {
269  return CalcFracE(sr, 2112, true);
270  });
271  // uncont./true nu E
272  const Var kUncontNeutronEnFracTot([](const caf::SRProxy* sr) {
273  return CalcFracE(sr, 2112, true, true);
274  });
275 
276  // ----- Proton
277  // energy fraction
278  const Var kProtonEnFrac([](const caf::SRProxy* sr) {
279  return CalcFracE(sr, 2212, false);
280  });
281  // uncont./tot. uncont.
282  const Var kUncontProtonEnFrac([](const caf::SRProxy* sr) {
283  return CalcFracE(sr, 2212, true);
284  });
285  // uncont./true nu E
286  const Var kUncontProtonEnFracTot([](const caf::SRProxy* sr) {
287  return CalcFracE(sr, 2212, true, true);
288  });
289 
290  // ----- Charged Pions
291  // energy fraction
292  const Var kPionEnFrac([](const caf::SRProxy *sr) {
293  return CalcFracE(sr, 211, false);
294  });
295  // uncont./tot. uncont.
296  const Var kUncontPionEnFrac([](const caf::SRProxy *sr) {
297  return CalcFracE(sr, 211, true);
298  });
299  // uncont./true nu E
300  const Var kUncontPionEnFracTot([](const caf::SRProxy *sr) {
301  return CalcFracE(sr, 211, true, true);
302  });
303 
304  // ----- Neutral Pions
305  // energy fraction
306  const Var kPi0EnFrac([](const caf::SRProxy *sr) {
307  return CalcFracE(sr, 111, false);
308  });
309  // uncont./tot. uncont.
310  const Var kUncontPi0EnFrac([](const caf::SRProxy *sr) {
311  return CalcFracE(sr, 111, true);
312  });
313  // uncont./true nu E
314  const Var kUncontPi0EnFracTot([](const caf::SRProxy *sr) {
315  return CalcFracE(sr, 111, true, true);
316  });
317 
318  // ----- Gammas
319  // energy fraction
320  const Var kPhotonEnFrac([](const caf::SRProxy *sr) {
321  return CalcFracE(sr, 22, false);
322  });
323  // uncont./tot. uncont.
324  const Var kUncontPhotonEnFrac([](const caf::SRProxy *sr) {
325  return CalcFracE(sr, 22, true);
326  });
327  // uncont./true nu E
328  const Var kUncontPhotonEnFracTot([](const caf::SRProxy *sr) {
329  return CalcFracE(sr, 22, true, true);
330  });
331 
332  // ----- Kaons
333  // energy fraction
334  const Var kKaonEnFrac([](const caf::SRProxy *sr) {
335  return CalcFracE(sr, 321, false);
336  });
337  // uncont./tot. uncont.
338  const Var kUncontKaonEnFrac([](const caf::SRProxy *sr) {
339  return CalcFracE(sr, 321, true);
340  });
341  // uncont./true nu E
342  const Var kUncontKaonEnFracTot([](const caf::SRProxy *sr) {
343  return CalcFracE(sr, 321, true, true);
344  });
345 
346  // ----- Electrons
347  // energy fraction
348  const Var kElectronEnFrac([](const caf::SRProxy *sr) {
349  return CalcFracE(sr, 11, false);
350  });
351  // uncont./tot. uncont.
352  const Var kUncontElectronEnFrac([](const caf::SRProxy *sr) {
353  return CalcFracE(sr, 11, true);
354  });
355  // uncont./true nu E
356  const Var kUncontElectronEnFracTot([](const caf::SRProxy *sr) {
357  return CalcFracE(sr, 11, true, true);
358  });
359 
360  // ----- Find out the number of neutrons
361  const Var kNNeutrons([](const caf::SRProxy* sr) {
362  float NPar = 0.;
363  // --- Write out some basic event information.
364  if (DEBUGGING) {
365  std::cout << "\nLooking at event " << sr->hdr.evt << ", there are " << sr->mc.nu.size() << ", the 0th neutrino is a " << sr->mc.nu[0].pdg << ", with Energy " << sr->mc.nu[0].E
366  << ". There were a total of " << sr->mc.nu[0].prim.size() << " other primaries associated with that neutrino, " << sr->mc.nu[0].nneutron << " were neutrons."
367  << std::endl;
368  if ( kIsDytmanMEC(sr) ) std::cout << " The neutrino was a MEC" << std::endl;
369  else if ( kIsDIS(sr) ) std::cout << " The neutrino was a DIS" << std::endl;
370  else if ( kIsRes(sr) ) std::cout << " The neutrino was a Resonance" << std::endl;
371  else if ( kIsCoh(sr) ) std::cout << " The neutrino was a Coherent" << std::endl;
372  float TotEn = 0.0;
373  for (unsigned int PrimL=0; PrimL < sr->mc.nu[0].prim.size(); ++PrimL) {
374  std::cout << "\t\tLooking at Prim " << PrimL << " of " << sr->mc.nu[0].prim.size() << ", it was a " << sr->mc.nu[0].prim[PrimL].pdg
375  << ", VisE " << sr->mc.nu[0].prim[PrimL].visE << ", VisEInslc " << sr->mc.nu[0].prim[PrimL].visEinslc << ", E0 " << sr->mc.nu[0].prim[PrimL].p.E
376  << ", enteringE " << sr->mc.nu[0].prim[PrimL].enteringE << ", totEscE " << sr->mc.nu[0].prim[PrimL].totEscE
377  << std::endl;
378  TotEn += sr->mc.nu[0].prim[PrimL].totEscE;
379  }
380  std::cout << "\tThe total uncontained energy was " << TotEn << std::endl;
381  // --- Return the number of neutrons
382  NPar = sr->mc.nu[0].nneutron;
383  }
384  return NPar;
385  });
386 
387  // ----- Find out the number of protons
388  const Var kNProtons([](const caf::SRProxy* sr) {
389  float NPar = 0.;
390  NPar = sr->mc.nu[0].nproton;
391  // --- Return the number of protons
392  return NPar;
393  });
394 
395  // ----- Find out the number of pions
396  const Var kNPions([](const caf::SRProxy* sr) {
397  float NPar = 0.;
398  NPar = sr->mc.nu[0].npiplus + sr->mc.nu[0].npiminus;
399  // --- Return the number of pions
400  return NPar;
401  });
402 
403  // ----- Find out the number of pi0s
404  const Var kNPi0s([](const caf::SRProxy* sr) {
405  float NPar = 0.;
406  NPar = sr->mc.nu[0].npizero;
407  // --- Return the number of pi0s
408  return NPar;
409  });
410 
411 } // namespace
const Var kProtonEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 2212, false);})
const Var kPi0EnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 111, false);})
double CalcPrimE(const caf::SRProxy *sr, int WhPDG, bool GetUncontE)
const Var kTotUncontEn([](const caf::SRProxy *sr){float TotEn=0.0;for(unsigned int PrimL=0;PrimL< sr->mc.nu[0].prim.size();++PrimL){TotEn+=sr->mc.nu[0].prim[PrimL].totEscE;} std::cout<< "Energy "<< TotEn<< " Run "<< sr->hdr.run<< ", SubRun "<< sr->hdr.subrun<< ", Cycle "<< sr->hdr.cycle<< ", Batch "<< sr->hdr.batch<< ", Event "<< sr->hdr.evt<< ", Slice "<< sr->hdr.subevt<< std::endl;return TotEn;})
const Var kElectronEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 11, false);return ThisEn;})
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kUncontPi0EnFracTot([](const caf::SRProxy *sr){return CalcFracE(sr, 111, true, true);})
caf::Proxy< unsigned int > subrun
Definition: SRProxy.h:253
const Var kTotUncontEnFrac([](const caf::SRProxy *sr){if(sr->mc.nu[0].E<=0.0) return-5.0;else return(kTotUncontEn(sr)/sr->mc.nu[0].E);})
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2136
const Var kUncontMiscEn([](const caf::SRProxy *sr){return kTotUncontEn(sr)-kUncontMuonEn(sr)-kUncontNeutronEn(sr)-kUncontProtonEn(sr)-kUncontPionEn(sr)-kUncontPi0En(sr)-kUncontPhotonEn(sr)-kUncontKaonEn(sr)-kUncontElectronEn(sr);})
const Var kElectronEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 11, false);})
const Cut kIsRes
Definition: TruthCuts.cxx:111
double CalcFracE(const caf::SRProxy *sr, int WhPDG, bool GetUncontE, bool UncontOverTotal=false)
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2125
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:617
const Var kUncontPhotonEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 22, true);return ThisEn;})
const Var kUncontPionEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 211, true);})
const Var kUncontKaonEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 321, true);})
void abs(TH1 *hist)
const Cut kIsDIS
Definition: TruthCuts.cxx:118
const Var kUncontProtonEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 2212, true);})
const Var kUncontElectronEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 11, true);return ThisEn;})
const Var kKaonEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 321, false);return ThisEn;})
const Var kKaonEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 321, false);})
caf::Proxy< unsigned int > run
Definition: SRProxy.h:247
const Var kUncontNeutronEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 2112, true);})
const Var kUncontProtonEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 2212, true);return ThisEn;})
const Var kNPions
const Cut kIsDytmanMEC
Definition: TruthCuts.cxx:187
const Var kUncontNeutronEnFracTot([](const caf::SRProxy *sr){return CalcFracE(sr, 2112, true, true);})
const Var kNPi0s([](const caf::SRProxy *sr){float NPar=0.;NPar=sr->mc.nu[0].npizero;return NPar;})
const Var kUncontProtonEnFracTot([](const caf::SRProxy *sr){return CalcFracE(sr, 2212, true, true);})
caf::Proxy< short unsigned int > subevt
Definition: SRProxy.h:249
Float_t E
Definition: plot.C:20
const Var kUncontMuonEnFracTot([](const caf::SRProxy *sr){return CalcFracE(sr, 13, true, true);})
const Var kUncontMuonEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 13, true);return ThisEn;})
caf::StandardRecord * sr
static const float MassProt
caf::Proxy< int > cycle
Definition: SRProxy.h:229
const Var kUncontElectronEnFracTot([](const caf::SRProxy *sr){return CalcFracE(sr, 11, true, true);})
const Var kNNeutrons([](const caf::SRProxy *sr){float NPar=0.;if(DEBUGGING){std::cout<< "\nLooking at event "<< sr->hdr.evt<< ", there are "<< sr->mc.nu.size()<< ", the 0th neutrino is a "<< sr->mc.nu[0].pdg<< ", with Energy "<< sr->mc.nu[0].E<< ". There were a total of "<< sr->mc.nu[0].prim.size()<< " other primaries associated with that neutrino, "<< sr->mc.nu[0].nneutron<< " were neutrons."<< std::endl;if(kIsDytmanMEC(sr)) std::cout<< " The neutrino was a MEC"<< std::endl;else if(kIsDIS(sr)) std::cout<< " The neutrino was a DIS"<< std::endl;else if(kIsRes(sr)) std::cout<< " The neutrino was a Resonance"<< std::endl;else if(kIsCoh(sr)) std::cout<< " The neutrino was a Coherent"<< std::endl;float TotEn=0.0;for(unsigned int PrimL=0;PrimL< sr->mc.nu[0].prim.size();++PrimL){std::cout<< "\t\tLooking at Prim "<< PrimL<< " of "<< sr->mc.nu[0].prim.size()<< ", it was a "<< sr->mc.nu[0].prim[PrimL].pdg<< ", VisE "<< sr->mc.nu[0].prim[PrimL].visE<< ", VisEInslc "<< sr->mc.nu[0].prim[PrimL].visEinslc<< ", E0 "<< sr->mc.nu[0].prim[PrimL].p.E<< ", enteringE "<< sr->mc.nu[0].prim[PrimL].enteringE<< ", totEscE "<< sr->mc.nu[0].prim[PrimL].totEscE<< std::endl;TotEn+=sr->mc.nu[0].prim[PrimL].totEscE;}std::cout<< "\tThe total uncontained energy was "<< TotEn<< std::endl;NPar=sr->mc.nu[0].nneutron;}return NPar;})
const Var kUncontPionEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 211, true);return ThisEn;})
const Var kMuonEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 13, false);})
const Var kPionEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 211, false);return ThisEn;})
const Var kPi0En([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 111, false);return ThisEn;})
caf::Proxy< unsigned int > evt
Definition: SRProxy.h:236
OStream cout
Definition: OStream.cxx:6
const Var kUncontPi0En([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 111, true);return ThisEn;})
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2137
const Var kUncontNeutronEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 2112, true);return ThisEn;})
caf::Proxy< int > batch
Definition: SRProxy.h:227
const Var kPhotonEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 22, false);return ThisEn;})
const Var kMuonEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 13, false);return ThisEn;})
const Var kUncontElectronEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 11, true);})
const Var kNProtons
const Var kNeutronEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 2112, false);return ThisEn;})
const Var kProtonEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 2212, false);return ThisEn;})
const Var kNuMinusAll([](const caf::SRProxy *sr){return kNeutrinoEn(sr)-kMuonEn(sr)-kNeutronEn(sr)-kProtonEn(sr)-kPionEn(sr)-kPi0En(sr)-kPhotonEn(sr)-kKaonEn(sr)-kElectronEn(sr);})
const Var kUncontMuonEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 13, true);})
static const float MassNeut
const Var kUncontKaonEnFracTot([](const caf::SRProxy *sr){return CalcFracE(sr, 321, true, true);})
const Var kUncontPi0EnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 111, true);})
const Var kNeutrinoEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=sr->mc.nu[0].E;return ThisEn;})
const Var kPionEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 211, false);})
static const bool DEBUGGING
const Var kNeutronEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 2112, false);})
const Var kUncontKaonEn([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 321, true);return ThisEn;})
const Var kUncontPhotonEnFracTot([](const caf::SRProxy *sr){return CalcFracE(sr, 22, true, true);})
const Var kUncontPionEnFracTot([](const caf::SRProxy *sr){return CalcFracE(sr, 211, true, true);})
const Cut kIsCoh
Definition: TruthCuts.cxx:133
const Var kUncontPhotonEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 22, true);})
const Var kPhotonEnFrac([](const caf::SRProxy *sr){return CalcFracE(sr, 22, false);})