NumuCCIncVars.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Vars/Vars.h"
5 #include "CAFAna/Core/HistAxis.h"
9 
10 #include "Utilities/func/MathUtil.h"
11 
14 
15 #include "TH2.h"
16 #include "TMath.h"
17 #include "TH2.h"
18 #include "TH1.h"
19 #include "TAxis.h"
20 #include "TVector3.h"
21 #include "TParticlePDG.h"
22 #include "TDatabasePDG.h"
23 #include "TLorentzVector.h"
24 
25 namespace ana
26 {
27  //-------------------------------------------------------------------------------------------------
28  // PID related Vars
29 
30  /// Return the muon to non-muon likelihod ration, given
31  /// the dedx and scattering likelihood ratios for the track
32  float MuonLLR(const float dedxll, const float scatll);
33 
34  extern const Var kMostMuonLikeTrackIdx;
35 
36  extern const Var kMuonLLRPID;
37 
38  //----------------------------
39  // Energy Estimation
40  //----------------------------
41 
42  float MuonEActandCat(double trklenactandcat);
43  float MuonEAct(double trklenact);
44  float MuonECat(double trklencat);
45  float VisibleHadE(float vishadE);
46 
47  extern const Var kMuStartX;
48  extern const Var kMuStartY;
49  extern const Var kMuStartZ;
50 
51  extern const Var kMuStopX;
52  extern const Var kMuStopY;
53  extern const Var kMuStopZ;
54 
55  extern const Var kMuonLength;
56 
57  extern const Var kVisHadE;
58 
59  extern const Var kHadEonTrack;
60 
61  extern const Var kAveragededx40;
62 
63 //==============================================================================
64 // Redefine track lengths in active and catcher volumes with the new PID.
65 // Note that at this moment what is called leninact is actually distance from
66 // the start of the track to the transition plane. If the transition plane is
67 // outside of the track, that number is the track length plus the length of the
68 // projection from the last hit along the direction determined by the last two
69 // hits to the transition plane. The lenincat behaves similarly.
70 // In the next production the two variables should be changed to what they are
71 // supposed to mean literally.
72 
73  extern const Var kTrkLenAct;
74 
75  extern const Var kTrkLenCat;
76 
77  const Var kTrkLenActandCat = kTrkLenAct + kTrkLenCat;
78 
79 
80  // Muon Energy for Inclusive numuCC
81  //------------------------------------
82  extern const Var kIncXsecMuonE;
83 
84  // Hadronic Energy for Inclusive numuCC
85  //---------------------------------------
86 
87  extern const Var kIncXsecHadE;
88 
89  // Neutrino Energy for Inclusive numuCC
90  //---------------------------------------
91 
92  const Var kIncXsecNuE = kIncXsecMuonE + kIncXsecHadE;
93 
94  //-------------------------------------------------------------------------------------------------
95  // Standard analysis vars and axes
96 
98 
99  inline double MuonMass()
100  {
101  static TDatabasePDG* pdgdb = TDatabasePDG::Instance();
102  static double mass = pdgdb->GetParticle(13)->Mass();
103  return mass;
104  }
105 
106  const Var kMuonMass([](const caf::SRProxy* sr)
107  {
108  return MuonMass();
109  });
110 
111  const Var kMuonMass2([](const caf::SRProxy* sr)
112  {
113  return util::sqr(MuonMass());
114  });
115 
116  inline double NeutronMass()
117  {
118  static TDatabasePDG* pdgdb = TDatabasePDG::Instance();
119  static double mass = pdgdb->GetParticle(2112)->Mass();
120  return mass;
121  }
122 
123  const Var kNeutronMass([](const caf::SRProxy* sr)
124  {
125  return NeutronMass();
126  });
127 
128  const Var kNeutronMass2([](const caf::SRProxy* sr)
129  {
130  return util::sqr(NeutronMass());
131  });
132 
133  const Var kRecoMuKE = kIncXsecMuonE - kMuonMass;
134 
135  // Reconstructed candidate muon angle wrt beam
136  extern const Var kRecoMuCostheta;
137 
138  // Angle systematics (+/- 0.0025 mrad wrt beam)
139  extern const Var kRecoMuTheta;
140 
141  const Var kThetaSystShift = Constant(0.0025);
142  const Var kRecoMuThetaUp = kRecoMuTheta + kThetaSystShift;
143  const Var kRecoMuThetaDw = kRecoMuTheta - kThetaSystShift;
144 
145  extern const Var kRecoMuCosthetaUp;
146  extern const Var kRecoMuCosthetaDw;
147 
148  extern const NuTruthVar kTrueEST;
149  const Var kTrueNuE = VarFromNuTruthVar(kTrueEST);
150 
151  extern const NuTruthVar kTrueMuEST;
152  const Var kTrueMuE = VarFromNuTruthVar(kTrueMuEST);
153 
154  extern const NuTruthVar kTrueMuKEST;
155  const Var kTrueMuKE = VarFromNuTruthVar(kTrueMuKEST);
156 
157 
158  // True muon cos theta wrt beam direction
159 
161  const Var kTrueMuCostheta = VarFromNuTruthVar(kTrueMuCosthetaST);
162 
163  // True hadronic y
164  extern const NuTruthVar kTrueYST;
165 
166  // True hadronic energy
167  extern const NuTruthVar kTrueHadEST;
168  const Var kTrueHadE = VarFromNuTruthVar(kTrueHadEST);
169 
170  // Reconstructed hadronic energy
172 
174 
175  // Reconstructed available energy (Determined by Travis Olson)
176  extern const Var kRecoEavail;
177 
178 
179  extern const Var kRecoMuKEVsCos;
180 
181  extern const NuTruthVar kTrueMuKEVsCosST;
182  const Var kTrueMuKEVsCos = VarFromNuTruthVar(kTrueMuKEVsCosST);
183 
184 
185  extern const NuTruthVar kTrueMuKEVsCosVsEnuST;
186 
187  extern const Var kRecoMuKEVsCosVsEnu;
188 
190 
191  extern const Var kRecoMuKEVsCosVsEavail;
192 
193 /////////////////////////////////////////
194 /// \brief Systematic Shift Vars and HistAxes
195 /////////////////////////////////////////
196 
197  // Vars related to muon energy scale systematics:
198  extern const Var kIncXsecMuonEUp;
199 
200  extern const Var kIncXsecMuonEDw;
201 
202  // Muon Energy Shift Vars
203  const Var kIncXsecNuEUp = kIncXsecMuonEUp + kIncXsecHadE;
204  const Var kIncXsecNuEDw = kIncXsecMuonEDw + kIncXsecHadE;
205 
208 
209  const Var kRecoMuKEUp = kIncXsecMuonEUp - kMuonMass;
210  const Var kRecoMuKEDw = kIncXsecMuonEDw - kMuonMass;
211 
212  // 3D vars for muon energy shift (Enu as 3rd axis)
213  extern const Var kRecoMuKEVsCosVsEnu_onlyMuKEUp;
214  extern const Var kRecoMuKEVsCosVsEnu_onlyMuKEDw;
215  extern const Var kRecoMuKEVsCosVsEnuUp;
216  extern const Var kRecoMuKEVsCosVsEnuDw;
217 
218  // 3D vars for muon energy shift (Eavail as 3rd axis)
219  extern const Var kRecoMuKEVsCosVsEavailUp;
220  extern const Var kRecoMuKEVsCosVsEavailDw;
221 
222  // 3D vars for muon angle shift (Eavail as 3rd axis)
223  extern const Var kRecoMuKEVsCosVsEavailAngleUp;
224  extern const Var kRecoMuKEVsCosVsEavailAngleDw;
225 
226  // Hist axes for p, costheta and energy
228  "Reconstructed T_{#mu} vs cos #{theta};T_{#mu} [GeV];cos #{theta}",
230  kRecoMuKEVsCos);
232  "True T_{#mu} vs cos #{theta};T_{#mu} [GeV];cos #{theta}",
234  kTrueMuKEVsCosST);
235 
237 
239  "Reconstructed Neutrino Energy (GeV)",
240  enubins,
241  kRecoE);
243  "True Neutrino Energy (GeV)",
244  enubins,
245  kTrueEST);
246 
248 
249 
250  // 3D axis, for 3D efficiency calculation
252  "True T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)",
254  kTrueMuKEVsCosVsEnuST);
255 
257 
258 
260  "True T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)",
262  kTrueMuKEVsCosVsEavailST);
263 
265 
266  // 3D reco axis, for 3D efficiency calculation
268  "Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)",
270  kRecoMuKEVsCosVsEnu);
271 
273  "Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)",
275  kRecoMuKEVsCosVsEavail);
276 
278  "Reco. T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)",
280  kRecoMuKEVsCosVsEnu_onlyMuKEUp);
282  "Reco. T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)",
284  kRecoMuKEVsCosVsEnu_onlyMuKEDw);
286  "Reco. T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)",
288  kRecoMuKEVsCosVsEnuUp);
290  "Reco. T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)",
292  kRecoMuKEVsCosVsEnuDw);
293 
295  "Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)",
297  kRecoMuKEVsCosVsEavailUp);
299  "Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)",
301  kRecoMuKEVsCosVsEavailDw);
302 
303  // Angle systematic HistAxes
305  "Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)",
307  kRecoMuKEVsCosVsEavailAngleUp);
309  "Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)",
311  kRecoMuKEVsCosVsEavailAngleDw);
312 
313  //-------------------------------------------------------------------------------------------------
314 
315 
316  extern const Var kDummy;
317 
318  extern const Var ksigResdown;
319  extern const Var ksigDISup;
320 
321  extern const Var kbkgDISdown;
322 
323  //Number of prongs
324  extern const Var kNProngs;
325  // True Q2
326 
327  extern const Var kQsqr;
328 
329  // True W2
330 
331  extern const Var kWsqr;
332 
333  const Var kW = Sqrt(kWsqr);
334  const Var kQ = Sqrt(kQsqr);
335 
336 
337  extern const Var kweightedten;
338 
339  // Primary muon momentum
340 
341  extern const Var kTrueMuP;
342 
343 
344  // Primary muon transverse momentum wrt beam direction
345 
346  extern const Var kTrueMuPt;
347 
348  // Primary muon momentum along the beam direction
349 
350  extern const Var kTrueMuPz;
351 
352  // Reconstructed muon momentum
353  extern const Var kRecoMuPsqr;
354  extern const Var kRecoMuPsqrUp;
355  extern const Var kRecoMuPsqrDw;
356  const Var kRecoMuP = Sqrt(kRecoMuPsqr);
357  const Var kRecoMuPUp = Sqrt(kRecoMuPsqrUp);
358  const Var kRecoMuPDw = Sqrt(kRecoMuPsqrDw);
359 
360 
361  // Reconstructed muon tranvserse momentum wrt beam direction
362 
363  extern const Var kRecoMuPt;
364 
365  // Reconstructed muon momentum along beam direction
366 
367  extern const Var kRecoMuPz;
368 
369  // Fractional neutrino energy resolution
370  const Var kResE = (kNumuCCXsecNuE - kTrueNuE)/kTrueNuE;
371 
372  // Fractional muon momentum resolution
373  extern const Var kResMuP;
374 
375  // Fractional muon transverse momentum resolution
376  extern const Var kResMuPt;
377 
378  // Fractional resolution of muon momentum along beam direction
379  extern const Var kResMuPz;
380 
381  // Remid
382  extern const Var kRemid;
383 
384  // Remid variables
385  extern const Var kScatLL;
386  extern const Var kDedxLL;
387  extern const Var kMeasfrac;
388 
389  // Length of candidate muon track
390  extern const Var kMuLength;
391 
392  // Energy per length of the candidate muon track
393  extern const Var kEPerLength;
394 
395  // Resolution of candidate muon angle wrt beam
396  extern const Var kResMuCostheta;
397 
398  // True visible energy fraction of the muon
399  extern const Var kTrueEFrac;
400 
401  // 2D var : energy resolution vs true energy
402  extern const Var kResVsTrueE;
403 
404  // 2D var : energy resolution vs reco energy
405  extern const Var kResVsRecoE;
406 
407  // 2D var : muon momentum resolution vs true muon momentum
408  extern const Var kResVsTrueMuP;
409 
410  // 2D var : muon momentum resolution vs reco muon momentum
411  extern const Var kResVsRecoMuP;
412 
413  // 2D var : muon transverse momentum resolution vs true muon transverse momentum
414  extern const Var kResVsTrueMuPt;
415 
416  // 2D var : muon transverse momentum resolution vs reco muon transverse momentum
417  extern const Var kResVsRecoMuPt;
418 
419  // 2D var : muon longitudinal momentum resolution vs true muon longitudinal momentum
420  extern const Var kResVsTrueMuPz;
421 
422  // 2D var : muon longitudinal momentum resolution vs reco muon longitudinal momentum
423  extern const Var kResVsRecoMuPz;
424 
425  extern const Var kResVsTrueCostheta;
426 
427  extern const Var kResVsRecoCostheta;
428 
429  extern const Var kRecoPVsCos;
430 
431  extern const Var kRecoPtVsPz;
432 
433  extern const Var kTruePVsCos;
434 
435  extern const Var kTruePtVsPz;
436 
437  // background weights
438  extern const Var kUncontainedBGWeight;
439 
440  //Reconstructed Muon energy
444 
445  const Var kTwo = Constant(2);
446 
447  const Var kRecoq2 = kTwo * kRecoE *(kRecoMuE- (kRecoMuP *kRecoMuCostheta ))-kMuonMass2;
453  const Var kRecoq = Sqrt(kRecoq2);
454  const Var kRecow = Sqrt(kRecow2);
455 
456 
457  // Var For Energy estimation
458  extern const Var kTrueCatcherE;
459 
460  extern const Var kReMIdTrkLenAct;
461  extern const Var kReMIdTrkLenCat;
462 
463 
466 
467  // Q2 Variables
469  "True Q2 (GeV)",
470  q2bins,
471  kTrueQ2_NT);
472 
474 
476  "Reco Q2 (GeV)",
477  q2bins,
478  kRecoq2);
479 
480  // Systematically shifted 1D axes
482  "Reconstructed Neutrino Energy (GeV)",
483  enubins,
484  kRecoEUp);
485 
486  // Systematically shifted 1D axes
488  "Reconstructed Neutrino Energy (GeV)",
489  enubins,
490  kRecoEDw);
491 
493  "Reco Q2 (GeV)",
494  q2bins,
495  kRecoq2_MuonEUp);
496 
498  "Reco Q2 (GeV)",
499  q2bins,
500  kRecoq2_MuonEDw);
501 
503  "Reco Q2 (GeV)",
504  q2bins,
505  kRecoq2_AngleUp);
506 
508  "Reco Q2 (GeV)",
509  q2bins,
510  kRecoq2_AngleDw);
511 
512 }//end of namespace
const HistAxis kRecoEStandardAxis_MuonEUp("Reconstructed Neutrino Energy (GeV)", enubins, kRecoEUp)
const Var kRecoMuKEVsCosVsEavailUp
const NuTruthHistAxis kTrueMuKEVsCosVsEnuStandardAxisST("True T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)", angvsmukevsebins, kTrueMuKEVsCosVsEnuST)
const Var kRecow2
const Var kRecoq2
const Binning angvsmukevseavailbins
const NuTruthVar kTrueMuEST([](const caf::SRNeutrinoProxy *nu){float MuE=-5.;if(abs(nu->pdg)!=14||!nu->iscc) return MuE;int nprims=nu->prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(nu->prim[iprim].pdg)==13){MuE=nu->prim[iprim].p.T();}}return MuE;})
const HistAxis kTrueEStandardAxis
const Var kRecoMuKEVsCosVsEavail
const Var kTrueMuPt([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return-5.0;if(abs(sr->mc.nu[0].pdg)!=14||!sr->mc.nu[0].iscc) return-5.0;TVector3 beamdir=NuMIBeamDirection(sr->hdr.det);int nprims=sr->mc.nu[0].prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(sr->mc.nu[0].prim[iprim].pdg)==13){TVector3 p=sr->mc.nu[0].prim[iprim].p.Vect();return(p-p.Dot(beamdir)*beamdir).Mag();}}return-5.0;})
const Var kRecoMuPDw
const HistAxis kRecoMuKEVsCosVsEnuStandardAxis_onlyMuKEDw("Reco. T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)", angvsmukevsebins, kRecoMuKEVsCosVsEnu_onlyMuKEDw)
const HistAxis kRecoQ2StandardAxis("Reco Q2 (GeV)", q2bins, kRecoq2)
const NuTruthHistAxis kTrueMuKEVsCosStandardAxisST("True T_{#mu} vs cos #{theta};T_{#mu} [GeV];cos #{theta}", angvsmukebins, kTrueMuKEVsCosST)
const Var kReMIdTrkLenAct([](const caf::SRProxy *sr){return(sr->energy.numu.ndtrklenact/100);})
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kResMuCostheta([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return-5.0;if(abs(sr->mc.nu[0].pdg)!=14|| !sr->mc.nu[0].iscc) return-5.0;int bestidx=sr->trk.kalman.idxremid;int nkals=sr->trk.kalman.ntracks;if(nkals< 1|| nkals< bestidx|| bestidx< 0) return-5.0;double mu=0, muReco=0;TVector3 beamdir=NuMIBeamDirection(sr->hdr.det);int nprims=sr->mc.nu[0].prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(sr->mc.nu[0].prim[iprim].pdg)==13){TVector3 mudir=sr->mc.nu[0].prim[iprim].p.Vect();mu=beamdir.Dot(mudir);mu=beamdir.Dot(sr->mc.nu[0].prim[iprim].p.Vect().Unit());}}if(mu==0) return-5.0;TVector3 dir=sr->trk.kalman.tracks[0].dir;muReco=beamdir.Dot(dir);return(muReco-mu)/mu;})
const Var kDeltatheta
const HistAxis kRecoQ2StandardAxis_MuonEDw("Reco Q2 (GeV)", q2bins, kRecoq2_MuonEDw)
const Var kIncXsecMuonEUp([](const caf::SRProxy *sr){float mue_act_up=1.0079;float mue_cat_up=1.0120;float muonE=0.0;float muonEact=0.0;float muonEcat=0.0;float muonEactandcat=0.0;float trkLenAct=0.f;float trkLenCat=0.f;trkLenAct=kTrkLenAct(sr);trkLenCat=kTrkLenCat(sr);int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat< 0) muonEact=mue_act_up *MuonEAct(trkLenAct);else if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat > 0){muonEcat=MuonECat(trkLenCat);muonEactandcat=MuonEActandCat(trkLenAct);muonE=mue_act_up *muonEactandcat+mue_cat_up *muonEcat;}return muonE+muonEact;})
Systematic Shift Vars and HistAxes.
const NuTruthVar kTrueMuCosthetaST([](const caf::SRNeutrinoProxy *nu){if(abs(nu->pdg)!=14||!nu->iscc) return-5.0;int nprims=nu->prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(nu->prim[iprim].pdg)==13){TVector3 mudir=nu->prim[iprim].p.Vect();TVector3 beamdir=NuMIBeamDirection(caf::kNEARDET);return mudir.Unit().Dot(beamdir.Unit());}}return-5.0;})
const Var kRecoMuKE
const Var kTwo
const Var kRecoE
Definition: NumuCCIncVars.h:97
const Var kTrueMuCostheta
const NuTruthVar kTrueHadEST([](const caf::SRNeutrinoProxy *sr){return float(sr->y *sr->E);})
const Var kRecoq2_AngleDw
const Var ksigDISup([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return 0.;assert(sr->mc.nnu==1);if((sr->mc.nu[0].iscc)&&sr->mc.nu[0].mode==caf::kDIS) return 1.1;else return 1.;})
const Var kQsqr([](const caf::SRProxy *sr){return(sr->mc.nnu==0)?0.:float(sr->mc.nu[0].q2);})
const Var kVisHadE([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;float ExtraHadE=sr->trk.kalman.tracks[ibesttrk].overlapE;float CalhadE=sr->slc.calE-sr->trk.kalman.tracks[ibesttrk].calE;float vishadE=CalhadE+ExtraHadE;return vishadE;})
Definition: NumuCCIncVars.h:57
const NuTruthVar kTrueMuKEVsCosST
const Var kResMuPt([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return-5.0f;if(abs(sr->mc.nu[0].pdg)!=14|| !sr->mc.nu[0].iscc) return-5.0f;int bestidx=sr->trk.kalman.idxremid;int nkals=sr->trk.kalman.ntracks; TVector3 beamdir=NuMIBeamDirection(sr->hdr.det);if(nkals< 1|| nkals< bestidx|| bestidx< 0) return-5.0f;float mupt=-5, muRecoE;int nprims=sr->mc.nu[0].prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(sr->mc.nu[0].prim[iprim].pdg)==13){TVector3 p=sr->mc.nu[0].prim[iprim].p.Vect();mupt=(p-p.Dot(beamdir)*beamdir).Mag();}break;}if(mupt==-5) return-5.0f;muRecoE=TAMuE(sr->trk.kalman.tracks[0].len);TVector3 dir=sr->trk.kalman.tracks[0].dir;TVector3 recop=TMath::Sqrt(muRecoE *muRecoE-util::sqr(MuonMass()))*dir;double recopt=(recop-recop.Dot(beamdir)*beamdir).Mag();return float((recopt-mupt)/mupt);})
const Var kRecoq2_AngleUp
const Var kQ
const Var kRecoMuKEVsCosVsEnu_onlyMuKEDw
const Var kNeutronMass([](const caf::SRProxy *sr){return NeutronMass();})
const Var kTrueNuE
Proxy for caf::StandardRecord.
Definition: SRProxy.h:1993
const Var kRecoMuEDw
Collect information describing the x-axis of an analysis histogram.
Definition: HistAxis.h:15
const Var kRecoEavail([](const caf::SRProxy *sr){return 1.68 *kNumuHadVisE(sr)+0.02 *pow(kNumuHadVisE(sr), 2);})
const Var kResMuP([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return-5.0f;if(abs(sr->mc.nu[0].pdg)!=14|| !sr->mc.nu[0].iscc) return-5.0f;int bestidx=sr->trk.kalman.idxremid;int nkals=sr->trk.kalman.ntracks; if(nkals< 1|| nkals< bestidx|| bestidx< 0) return-5.0f;float mup=-5, muRecoE;int nprims=sr->mc.nu[0].prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(sr->mc.nu[0].prim[iprim].pdg)==13){return float(sr->mc.nu[0].prim[iprim].p.Vect().Mag());} }if(mup==-5) return-5.0f;muRecoE=TAMuE(sr->trk.kalman.tracks[0].len);double recop=TMath::Sqrt(muRecoE *muRecoE-util::sqr(MuonMass()));return float((recop-mup)/mup);})
const Var kIncXsecNuEDw
const Var kRecoMuPsqrUp([](const caf::SRProxy *sr){float muonpsqr=std::pow(kRecoMuEUp(sr), 2)-kMuonMass2(sr);return(std::max(muonpsqr,(float) 0.0));})
const Var kRecoMuPz([](const caf::SRProxy *sr){double E=TAMuE(sr->trk.kalman.tracks[0].len);TVector3 dir=sr->trk.kalman.tracks[0].dir;TVector3 pvec=TMath::Sqrt(E *E-util::sqr(MuonMass()))*dir;TVector3 beamdir=NuMIBeamDirection(sr->hdr.det);return pvec.Dot(beamdir);})
const Var kResMuPz([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return-5.0f;if(abs(sr->mc.nu[0].pdg)!=14|| !sr->mc.nu[0].iscc) return-5.0f;TVector3 beamdir=NuMIBeamDirection(sr->hdr.det);float mupz=-5, muRecoE;int nprims=sr->mc.nu[0].prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(sr->mc.nu[0].prim[iprim].pdg)==13){TVector3 p=sr->mc.nu[0].prim[iprim].p.Vect();mupz=p.Dot(beamdir);}break;}if(mupz==-5) return-5.0f;muRecoE=TAMuE(sr->trk.kalman.tracks[0].len);TVector3 dir=sr->trk.kalman.tracks[0].dir;TVector3 recop=TMath::Sqrt(muRecoE *muRecoE-util::sqr(MuonMass()))*dir;double recopz=recop.Dot(beamdir);return float((recopz-mupz)/mupz);})
const NuTruthVar kTrueMuKEST([](const caf::SRNeutrinoProxy *nu){float ke=-5;if(abs(nu->pdg)!=14||!nu->iscc) return ke;int nprims=nu->prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(nu->prim[iprim].pdg)==13){double E=nu->prim[iprim].p.T();ke=E-MuonMass();}}return ke;})
const Var kIncXsecNuE
Definition: NumuCCIncVars.h:92
const Var kMuStopY([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;return sr->trk.kalman.tracks[ibesttrk].stop.Y();})
Definition: NumuCCIncVars.h:52
const Var kResVsTrueE
const Var kRecow
const Var kUncontainedBGWeight([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-1000.0;return-0.00032 *sr->trk.kalman.tracks[0].start.Y()+1.14;})
const Var kResVsRecoMuP
const Var kTrueMuP([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return-5.0;if(abs(sr->mc.nu[0].pdg)!=14||!sr->mc.nu[0].iscc) return-5.0;int nprims=sr->mc.nu[0].prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(sr->mc.nu[0].prim[iprim].pdg)==13){return sr->mc.nu[0].prim[iprim].p.Vect().Mag();}}return-5.0;})
const Var kRecoMuE
const NuTruthVar kTrueMuKEVsCosVsEnuST
const Var kDeltamuKE
const Var kResE
const Var kTruePtVsPz
const Var kRecoMuPUp
const Var kRecoPtVsPz
const HistAxis kTrueMuKEVsCosVsEnuStandardAxis
const Var kRecoMuCosthetaUp([](const caf::SRProxy *sr){return(float) std::cos(kRecoMuThetaUp(sr));})
const Var kMuonLLRPID([](const caf::SRProxy *sr){int bestidx=kMostMuonLikeTrackIdx(sr);float llr=-1e12;if(bestidx< 0||bestidx >=int(sr->trk.kalman.ntracks)) return llr;llr=MuonLLR(sr->trk.kalman.tracks[bestidx].dedxllh, sr->trk.kalman.tracks[bestidx].scatllh);return llr;})
Definition: NumuCCIncVars.h:36
const Var kRecoMuP
T sqr(T x)
More efficient square function than pow(x,2)
Definition: MathUtil.h:23
const HistAxis kRecoMuKEVsCosStandardAxis("Reconstructed T_{#mu} vs cos #{theta};T_{#mu} [GeV];cos #{theta}", angvsmukebins, kRecoMuKEVsCos)
const Var kReMIdTrkLenCat([](const caf::SRProxy *sr){return(sr->energy.numu.ndtrklencat/100);})
const HistAxis kRecoQ2StandardAxis_AngleDw("Reco Q2 (GeV)", q2bins, kRecoq2_AngleDw)
const Binning q2bins
Var Constant(double c)
Use to weight events up and down by some factor.
Definition: Var.cxx:311
const Var kTrueMuKEVsCos
const Var kRecoMuCostheta([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;TVector3 dir=sr->trk.kalman.tracks[ibesttrk].dir;TVector3 beamdir=NuMIBeamDirection(sr->hdr.det);return(float) dir.Dot(beamdir);})
const Var kTrueMuE
const Var kTrueMuPz([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return-5.0;if(abs(sr->mc.nu[0].pdg)!=14||!sr->mc.nu[0].iscc) return-5.0;TVector3 beamdir=NuMIBeamDirection(sr->hdr.det);int nprims=sr->mc.nu[0].prim.size();for(int iprim=0;iprim< nprims;iprim++){if(abs(sr->mc.nu[0].prim[iprim].pdg)==13){TVector3 p=sr->mc.nu[0].prim[iprim].p.Vect();return p.Dot(beamdir);}}return-5.0;})
const HistAxis kRecoQ2StandardAxis_AngleUp("Reco Q2 (GeV)", q2bins, kRecoq2_AngleUp)
const NuTruthVar kTrueEST([](const caf::SRNeutrinoProxy *nu){return nu->E;})
const Var kTrkLenCat([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f; if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat< 0) return 0.f; if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat > 0) return float(sr->trk.kalman.tracks[ibesttrk].lenincat/100.); if(sr->trk.kalman.tracks[ibesttrk].leninact< 0 && sr->trk.kalman.tracks[ibesttrk].lenincat > 0) return float((sr->trk.kalman.tracks[ibesttrk].leninact/100.) +(sr->trk.kalman.tracks[ibesttrk].lenincat/100.));return-1000.f;})
Definition: NumuCCIncVars.h:75
const Var kIncXsecMuonEDw([](const caf::SRProxy *sr){float mue_act_dw=0.9921;float mue_cat_dw=0.9880;float muonE=0.0;float muonEact=0.0;float muonEcat=0.0;float muonEactandcat=0.0;float trkLenAct=0.f;float trkLenCat=0.f;trkLenAct=kTrkLenAct(sr);trkLenCat=kTrkLenCat(sr);int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat< 0) muonEact=mue_act_dw *MuonEAct(trkLenAct);else if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat > 0){muonEcat=MuonECat(trkLenCat);muonEactandcat=MuonEActandCat(trkLenAct);muonE=mue_act_dw *muonEactandcat+mue_cat_dw *muonEcat;}return muonE+muonEact;})
const Var kRecoMuKEVsCos
const HistAxis kRecoMuKEVsCosVsEavailStandardAxisAngleDw("Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)", angvsmukevseavailbins, kRecoMuKEVsCosVsEavailAngleDw)
const Var kMuonLength([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;return float(sr->trk.kalman.tracks[ibesttrk].len/100.);})
Definition: NumuCCIncVars.h:55
const NuTruthHistAxis kTrueQ2StandardAxisST("True Q2 (GeV)", q2bins, kTrueQ2_NT)
float VisibleHadE(float vishadE)
const Var kRecoMuKEVsCosVsEnu_onlyMuKEUp
const Binning enubins
const Var kRecoMuKEVsCosVsEavailAngleUp
const NuTruthVar kTrueMuKEVsCosVsEavailST
const Var kMuStartX([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;return sr->trk.kalman.tracks[ibesttrk].start.X();})
Definition: NumuCCIncVars.h:47
const Var kAveragededx40([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;if(sr->trk.kalman.tracks[ibesttrk].avedEdxlast40cm==-5) return-1000.f;return float(sr->trk.kalman.tracks[ibesttrk].avedEdxlast40cm);})
Definition: NumuCCIncVars.h:61
const Var kMeasfrac
const Var kRemid([](const caf::SRProxy *sr){return(sr->sel.remid.pid);})
const Var kIncXsecNuEUp
const Var kRecoHadE
const Var kResVsRecoMuPt
float MuonEActandCat(double trklenactandcat)
const Var kRecoq
const HistAxis kRecoMuKEVsCosVsEavailStandardAxisUp("Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)", angvsmukevseavailbins, kRecoMuKEVsCosVsEavailUp)
const Var kRecoMuKEVsCosVsEnuDw
const Var kweightedten([](const caf::SRProxy *){return 1.1;})
const Var kNumuCCXsecNuE
Definition: NumuEFxs.h:32
const Var kbkgDISdown([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return 0.;assert(sr->mc.nnu==1);if((!sr->mc.nu[0].iscc)&&sr->mc.nu[0].mode==caf::kDIS) return 0.909090;else return 1.;})
const Var kScatLL
const Var kMostMuonLikeTrackIdx([](const caf::SRProxy *sr){float maxllr=-1e12;int bestidx=-5;for(unsigned int itrk=0;itrk< sr->trk.kalman.ntracks;itrk++){float llr=MuonLLR(sr->trk.kalman.tracks[itrk].dedxllh, sr->trk.kalman.tracks[itrk].scatllh);if(llr > maxllr){maxllr=llr;bestidx=itrk;}}return bestidx;})
Definition: NumuCCIncVars.h:34
const HistAxis kRecoMuKEVsCosVsEnuStandardAxisUp("Reco. T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)", angvsmukevsebins, kRecoMuKEVsCosVsEnuUp)
const Binning angvsmukebins
const Var kTrkLenAct([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f; if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat< 0) return float((sr->trk.kalman.tracks[ibesttrk].leninact/100.) +(sr->trk.kalman.tracks[ibesttrk].lenincat/100.)); if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat > 0) return float(sr->trk.kalman.tracks[ibesttrk].leninact/100.); if(sr->trk.kalman.tracks[ibesttrk].leninact< 0 && sr->trk.kalman.tracks[ibesttrk].lenincat > 0) return 0.f;return-1000.f;})
Definition: NumuCCIncVars.h:73
const Var kDedxLL
const HistAxis kRecoEStandardAxis_MuonEDw("Reconstructed Neutrino Energy (GeV)", enubins, kRecoEDw)
const HistAxis kRecoMuKEVsCosVsEnuStandardAxisDw("Reco. T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)", angvsmukevsebins, kRecoMuKEVsCosVsEnuDw)
const Var kHadEonTrack([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;return(float) sr->trk.kalman.tracks[ibesttrk].overlapE;})
Definition: NumuCCIncVars.h:59
const Var kTruePVsCos
double MuonMass()
HistAxis HistAxisFromNuTruthHistAxis(NuTruthHistAxis ntha, double _default)
Definition: HistAxis.cxx:95
const Var kIncXsecHadE([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;float ExtraHadE=sr->trk.kalman.tracks[ibesttrk].overlapE;float CalhadE=sr->slc.calE-sr->trk.kalman.tracks[ibesttrk].calE;float vishadE=CalhadE+ExtraHadE;float hadE=0.0;hadE=VisibleHadE(vishadE);return hadE;})
Definition: NumuCCIncVars.h:87
const Var kRecoMuKEVsCosVsEnuUp
const Var kRecoEDw
const HistAxis kTrueMuKEVsCosVsEavailStandardAxis
float MuonEAct(double trklenact)
const Var kRecoq2_MuonEUp
const NuTruthVar kTrueYST([](const caf::SRNeutrinoProxy *sr){return float(sr->y);})
const Var kRecoMuPt([](const caf::SRProxy *sr){int bestidx=sr->trk.kalman.idxremid;int nkals=sr->trk.kalman.ntracks;if(nkals< 1|| nkals< bestidx|| bestidx< 0) return-5.0f;double E=TAMuE(sr->trk.kalman.tracks[0].len);TVector3 dir=sr->trk.kalman.tracks[0].dir;TVector3 pvec=TMath::Sqrt(E *E-util::sqr(MuonMass()))*dir;TVector3 beamdir=NuMIBeamDirection(sr->hdr.det);return float((pvec-pvec.Dot(beamdir)*beamdir).Mag());})
const Var kRecoPVsCos
const Var kIncXsecMuonE([](const caf::SRProxy *sr){float muonE=0.0;float muonEact=0.0;float muonEcat=0.0;float muonEactandcat=0.0;float trkLenAct=0.f;float trkLenCat=0.f;trkLenAct=kTrkLenAct(sr);trkLenCat=kTrkLenCat(sr);int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat< 0) muonEact=MuonEAct(trkLenAct);else if(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat > 0){muonEcat=MuonECat(trkLenCat);muonEactandcat=MuonEActandCat(trkLenAct);muonE=muonEactandcat+muonEcat;}return muonE+muonEact;})
Definition: NumuCCIncVars.h:82
const Var kW
const Var kRecoMuKEDw
const Var kNProngs([](const caf::SRProxy *sr){return(sr->vtx.elastic[0].fuzzyk.npng);})
const Var kRecoMuThetaDw
const Var kResVsTrueMuPz
const Var kTrkLenActandCat
Definition: NumuCCIncVars.h:77
const Var kEPerLength([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks > 0 && sr->trk.kalman.idxremid!=999) return TAMuE(sr->trk.kalman.tracks[0].len)/sr->trk.kalman.tracks[0].len;return-5.f;})
const Var kTrueMuKE
const Var kNeutronMass2([](const caf::SRProxy *sr){return util::sqr(NeutronMass());})
const Var kRecoMuKEVsCosVsEavailAngleDw
const HistAxis kRecoMuKEVsCosVsEnuStandardAxis_onlyMuKEUp("Reco. T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)", angvsmukevsebins, kRecoMuKEVsCosVsEnu_onlyMuKEUp)
const Var kRecoMuKEVsCosVsEavailDw
const Var kThetaSystShift
double NeutronMass()
Var VarFromNuTruthVar(const NuTruthVar &stv, double _default)
Definition: Var.cxx:336
const Var kRecoMuThetaUp
const HistAxis kRecoMuKEVsCosVsEnuStandardAxis("Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)", angvsmukevsebins, kRecoMuKEVsCosVsEnu)
const Var kRecoMuCosthetaDw([](const caf::SRProxy *sr){return(float) std::cos(kRecoMuThetaDw(sr));})
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:324
const Var kResVsTrueMuP
const Var kMuonMass([](const caf::SRProxy *sr){return MuonMass();})
const HistAxis kRecoMuKEVsCosVsEavailStandardAxisAngleUp("Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)", angvsmukevseavailbins, kRecoMuKEVsCosVsEavailAngleUp)
const Var kRecoEUp
const Var kTrueHadE
const Var kMuStopZ([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;return sr->trk.kalman.tracks[ibesttrk].stop.Z();})
Definition: NumuCCIncVars.h:53
const Var kRecoMuTheta([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;TVector3 dir=sr->trk.kalman.tracks[ibesttrk].dir;TVector3 beamdir=NuMIBeamDirection(sr->hdr.det);return(float) dir.Angle(beamdir);})
float MuonECat(double trklencat)
const Binning angvsmukevsebins
const Var kRecoMuPsqr([](const caf::SRProxy *sr){float muonpsqr=std::pow(kRecoMuE(sr), 2)-kMuonMass2(sr);return(std::max(muonpsqr,(float) 0.0));})
float MuonLLR(const float dedxll, const float scatll)
const Var kResVsRecoE
const Var kRecoMuPsqrDw([](const caf::SRProxy *sr){float muonpsqr=std::pow(kRecoMuEDw(sr), 2)-kMuonMass2(sr);return(std::max(muonpsqr,(float) 0.0));})
const Var kTrueCatcherE
const Var kDummy([](const caf::SRProxy *sr){return 1;})
const NuTruthHistAxis kTrueMuKEVsCosVsEavailStandardAxisST("True T_{#mu} vs cos #{theta} vs Neutrino Energy (GeV)", angvsmukevseavailbins, kTrueMuKEVsCosVsEavailST)
const HistAxis kTrueMuKEVsCosStandardAxis
const Var kMuStopX([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;return sr->trk.kalman.tracks[ibesttrk].stop.X();})
Definition: NumuCCIncVars.h:51
const Var kMuLength([](const caf::SRProxy *sr){return sr->trk.kalman.tracks[0].len/100;})
const Var kResVsTrueMuPt
const HistAxis kRecoMuKEVsCosVsEavailStandardAxis("Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)", angvsmukevseavailbins, kRecoMuKEVsCosVsEavail)
const Var kMuStartZ([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;return sr->trk.kalman.tracks[ibesttrk].start.Z();})
Definition: NumuCCIncVars.h:49
const NuTruthVar kTrueEavailST
const Var kMuStartY([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return-1000.f;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return-1000.f;return sr->trk.kalman.tracks[ibesttrk].start.Y();})
Definition: NumuCCIncVars.h:48
const HistAxis kRecoMuKEVsCosVsEavailStandardAxisDw("Reco. T_{#mu} vs cos #{theta} vs Available Energy (GeV)", angvsmukevseavailbins, kRecoMuKEVsCosVsEavailDw)
const NuTruthVar kTrueEavail_NT([](const caf::SRNeutrinoProxy *nu){double eAvail=0;for(const auto &particle:nu->prim){double particle_Eavail=0;if(particle.pdg==2212||abs(particle.pdg)==211){double gamma=particle.p.Gamma();particle_Eavail=(gamma-1)/gamma *particle.p.E;}else if(particle.pdg==111 or abs(particle.pdg)==11 or particle.pdg==22) particle_Eavail=particle.p.E;else if(particle.pdg >=2000000000){}else if(particle.pdg >=1000000000){}else if(particle.pdg >=2000 &&particle.pdg!=2212 &&particle.pdg!=2112){particle_Eavail=particle.p.E-0.9382;}else if(particle.pdg<=-2000){particle_Eavail=particle.p.E+0.9382;}else if(particle.pdg!=2112 &&(abs(particle.pdg)< 11||abs(particle.pdg) > 16)){particle_Eavail=particle.p.E;}eAvail+=particle_Eavail;}return eAvail;})
MINERvA "true Eavail" (used in 2p2h xsec)
Definition: TruthVars.h:42
const HistAxis kTrueQ2StandardAxis
const HistAxis kRecoEStandardAxis("Reconstructed Neutrino Energy (GeV)", enubins, kRecoE)
const NuTruthHistAxis kTrueEStandardAxisST("True Neutrino Energy (GeV)", enubins, kTrueEST)
const Var ksigResdown([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return 0.;assert(sr->mc.nnu==1);if((sr->mc.nu[0].iscc)&&sr->mc.nu[0].mode==caf::kRes) return 0.909090;else return 1.;})
const Var kWsqr([](const caf::SRProxy *sr){return(sr->mc.nnu==0)?0.:float(sr->mc.nu[0].W2);})
const Var kResVsRecoMuPz
const NuTruthVar kTrueQ2_NT([](const caf::SRNeutrinoProxy *nu){return nu->q2;})
True square of four-momentum transfer.
Definition: TruthVars.h:26
const Var kRecoMuKEUp
const Var kRecoMuEUp
static constexpr Double_t sr
Definition: Munits.h:164
const Var kTrueEFrac([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return-5.0f;return float(sr->mc.nu[0].visE/sr->mc.nu[0].E);})
const Var kRecoq2_MuonEDw
const Var kResVsTrueCostheta
Template for Var and SpillVar.
Definition: Var.h:16
const Var kRecoMuKEVsCosVsEnu
const Var kResVsRecoCostheta
const Var kMuonMass2([](const caf::SRProxy *sr){return util::sqr(MuonMass());})
const HistAxis kRecoQ2StandardAxis_MuonEUp("Reco Q2 (GeV)", q2bins, kRecoq2_MuonEUp)