7#include "TLorentzVector.h"
107inline void TotalEScaleND(
const double * par,
double * erec,
double erecHad,
double erecLep,
bool NotCCnumu) {
109 (*erec) += (*par) * erecHad;
114 (*erec) += (*par) * erecLep;
120inline void TotalEScaleSqrtND(
const double * par,
double * erec,
double erecHad,
double erecLep,
double sqrtErecHad,
double sqrtErecLep,
bool NotCCnumu) {
122 (*erec) += (*par) * sqrtErecHad * erecHad ;
127 (*erec) += (*par) * sqrtErecLep * erecLep;
133inline void TotalEScaleInvSqrtND(
const double * par,
double * erec,
double erecHad,
double erecLep,
double invSqrtErecHad,
double invSqrtErecLep,
bool NotCCnumu) {
135 (*erec) += (*par) * invSqrtErecHad * erecHad ;
140 (*erec) += (*par) * invSqrtErecLep * erecLep;
156inline void HadEScaleND(
const double * par,
double * erec,
double sumEhad) {
159 (*erec) += (*par) * sumEhad;
164inline void HadEScaleSqrtND(
const double * par,
double * erec,
double sumEhad,
double sqrtSumEhad) {
167 (*erec) += (*par) * sqrtSumEhad * sumEhad;
172inline void HadEScaleInvSqrtND(
const double * par,
double * erec,
double sumEhad,
double invSqrtSumEhad) {
175 (*erec) += (*par) * invSqrtSumEhad * sumEhad;
186inline void MuEScaleND(
const double * par,
double * erec,
double erecLep,
bool CCnumu) {
191 (*erec) += (*par) * erecLep;
197inline void MuEScaleSqrtND(
const double * par,
double * erec,
double erecLep,
double sqrtErecLep,
bool CCnumu) {
202 (*erec) += (*par) * sqrtErecLep * erecLep;
208inline void MuEScaleInvSqrtND(
const double * par,
double * erec,
double erecLep,
double invSqrtErecLep,
bool CCnumu) {
213 (*erec) += (*par) * invSqrtErecLep * erecLep;
224inline void NEScaleND(
const double * par,
double * erec,
double eRecoN) {
226 (*erec) += (*par) * eRecoN;
231inline void NEScaleSqrtND(
const double * par,
double * erec,
double eRecoN,
double sqrteRecoN) {
233 (*erec) += (*par) * sqrteRecoN * eRecoN;
238inline void NEScaleInvSqrtND(
const double * par,
double * erec,
double eRecoN,
double invSqrteRecoN) {
240 (*erec) += (*par) * invSqrteRecoN * eRecoN;
250inline void EMEScaleND(
const double * par,
double * erec,
double eRecoPi0,
double erecLep,
bool CCnue) {
252 (*erec) += (*par) * eRecoPi0;
257 (*erec) += (*par) * erecLep;
263inline void EMEScaleSqrtND(
const double * par,
double * erec,
double eRecoPi0,
double erecLep,
double sqrtErecLep,
double sqrteRecoPi0,
bool CCnue) {
265 (*erec) += (*par) * sqrteRecoPi0 * eRecoPi0;
270 (*erec) += (*par) * sqrtErecLep * erecLep;
276inline void EMEScaleInvSqrtND(
const double * par,
double * erec,
double eRecoPi0,
double erecLep,
double invSqrtErecLep,
double invSqrteRecoPi0,
bool CCnue) {
278 (*erec) += (*par) * invSqrteRecoPi0 * eRecoPi0;
283 (*erec) += (*par) * invSqrtErecLep * erecLep;
295inline void HadResND(
const double * par,
double * erec,
double eRecoP,
double eRecoPip,
double eRecoPim,
double eP,
double ePip,
double ePim) {
298 double recoSum = eRecoP + eRecoPip + eRecoPim;
301 double trueSum = eP + ePip + ePim;
303 (*erec) += (*par) * (trueSum - recoSum);
310inline void MuResND(
const double * par,
double * erec,
double erecLep,
double LepE,
bool CCnumu) {
315 (*erec) += (*par) * (LepE - erecLep);
324inline void NResND(
const double * par,
double * erec,
double eRecoN,
double eN) {
326 (*erec) += (*par) * (eN - eRecoN);
334inline void EMResND(
const double * par,
double * erec,
double eRecoPi0,
double ePi0,
double erecLep,
double LepE,
bool CCnue) {
336 (*erec) += (*par) * (ePi0 - eRecoPi0);
341 (*erec) += (*par) * (LepE - erecLep);
357inline void TotalEScaleFD(
const double * par,
double * erec,
double erecHad,
double erecLep,
bool NotCCnumu) {
359 (*erec) += (*par) * erecHad;
364 (*erec) += (*par) * erecLep;
370inline void TotalEScaleSqrtFD(
const double * par,
double * erec,
double erecHad,
double erecLep,
double sqrtErecHad,
double sqrtErecLep,
bool NotCCnumu) {
372 (*erec) += (*par) * sqrtErecHad * erecHad ;
377 (*erec) += (*par) * sqrtErecLep * erecLep;
383inline void TotalEScaleInvSqrtFD(
const double * par,
double * erec,
double erecHad,
double erecLep,
double invSqrtErecHad,
double invSqrtErecLep,
bool NotCCnumu) {
385 (*erec) += (*par) * invSqrtErecHad * erecHad ;
390 (*erec) += (*par) * invSqrtErecLep * erecLep;
406inline void HadEScaleFD(
const double * par,
double * erec,
double sumEhad) {
409 (*erec) += (*par) * sumEhad;
414inline void HadEScaleSqrtFD(
const double * par,
double * erec,
double sumEhad,
double sqrtSumEhad) {
417 (*erec) += (*par) * sqrtSumEhad * sumEhad;
422inline void HadEScaleInvSqrtFD(
const double * par,
double * erec,
double sumEhad,
double invSqrtSumEhad) {
425 (*erec) += (*par) * invSqrtSumEhad * sumEhad;
436inline void MuEScaleFD(
const double * par,
double * erec,
double erecLep,
bool CCnumu) {
441 (*erec) += (*par) * erecLep;
447inline void MuEScaleSqrtFD(
const double * par,
double * erec,
double erecLep,
double sqrtErecLep,
bool CCnumu) {
452 (*erec) += (*par) * sqrtErecLep * erecLep;
458inline void MuEScaleInvSqrtFD(
const double * par,
double * erec,
double erecLep,
double invSqrtErecLep,
bool CCnumu) {
463 (*erec) += (*par) * invSqrtErecLep * erecLep;
474inline void NEScaleFD(
const double * par,
double * erec,
double eRecoN) {
476 (*erec) += (*par) * eRecoN;
481inline void NEScaleSqrtFD(
const double * par,
double * erec,
double eRecoN,
double sqrteRecoN) {
483 (*erec) += (*par) * sqrteRecoN * eRecoN;
488inline void NEScaleInvSqrtFD(
const double * par,
double * erec,
double eRecoN,
double invSqrteRecoN) {
490 (*erec) += (*par) * invSqrteRecoN * eRecoN;
500inline void EMEScaleFD(
const double * par,
double * erec,
double eRecoPi0,
double erecLep,
bool CCnue) {
502 (*erec) += (*par) * eRecoPi0;
507 (*erec) += (*par) * erecLep;
513inline void EMEScaleSqrtFD(
const double * par,
double * erec,
double eRecoPi0,
double erecLep,
double sqrtErecLep,
double sqrteRecoPi0,
bool CCnue) {
515 (*erec) += (*par) * sqrteRecoPi0 * eRecoPi0;
520 (*erec) += (*par) * sqrtErecLep * erecLep;
526inline void EMEScaleInvSqrtFD(
const double * par,
double * erec,
double eRecoPi0,
double erecLep,
double invSqrtErecLep,
double invSqrteRecoPi0,
bool CCnue) {
528 (*erec) += (*par) * invSqrteRecoPi0 * eRecoPi0;
533 (*erec) += (*par) * invSqrtErecLep * erecLep;
545inline void HadResFD(
const double * par,
double * erec,
double eRecoP,
double eRecoPip,
double eRecoPim,
double eP,
double ePip,
double ePim) {
548 double recoSum = eRecoP + eRecoPip + eRecoPim;
551 double trueSum = eP + ePip + ePim;
553 (*erec) += (*par) * (trueSum - recoSum);
560inline void MuResFD(
const double * par,
double * erec,
double erecLep,
double LepE,
bool CCnumu) {
565 (*erec) += (*par) * (LepE - erecLep);
574inline void NResFD(
const double * par,
double * erec,
double eRecoN,
double eN) {
576 (*erec) += (*par) * (eN - eRecoN);
584inline void EMResFD(
const double * par,
double * erec,
double eRecoPi0,
double ePi0,
double erecLep,
double LepE,
bool CCnue) {
586 (*erec) += (*par) * (ePi0 - eRecoPi0);
591 (*erec) += (*par) * (LepE - erecLep);
601inline void CVNNumuFD(
const double * par,
double * cvnnumu) {
603 (*cvnnumu) += (*par);
608inline void CVNNueFD(
const double * par,
double * cvnnue) {
772 std::cerr <<
"Unknown Interaction mode:" << SIMB_mode << std::endl;
823 std::cerr <<
"Invalid mode:" << SIMB_mode << std::endl;
834 std::cerr <<
"Unknown Interaction mode:" << SIMB_mode << std::endl;
885 std::cerr <<
"Invalid mode:" << SIMB_mode << std::endl;
902 switch (GENIE_mode) {
970 switch (GENIE_mode) {
1080 name =
"ccimdannihilation";
1083 name =
"ccamnugamma";
1119 name =
"ncimdannihilation";
1122 name =
"ncamnugamma";
1131 std::cerr <<
"Did not find the MaCh3 mode you specified " << i << std::endl;
1132 name =
"UNKNOWN_BAD";
void TotalEScaleInvSqrtFD(const double *par, double *erec, double erecHad, double erecLep, double invSqrtErecHad, double invSqrtErecLep, bool NotCCnumu)
void TotalEScaleFD(const double *par, double *erec, double erecHad, double erecLep, bool NotCCnumu)
void MuEScaleFD(const double *par, double *erec, double erecLep, bool CCnumu)
void TotalEScaleInvSqrtND(const double *par, double *erec, double erecHad, double erecLep, double invSqrtErecHad, double invSqrtErecLep, bool NotCCnumu)
void EMEScaleSqrtND(const double *par, double *erec, double eRecoPi0, double erecLep, double sqrtErecLep, double sqrteRecoPi0, bool CCnue)
void MuEScaleSqrtND(const double *par, double *erec, double erecLep, double sqrtErecLep, bool CCnumu)
void EMResND(const double *par, double *erec, double eRecoPi0, double ePi0, double erecLep, double LepE, bool CCnue)
void NEScaleND(const double *par, double *erec, double eRecoN)
void EMEScaleSqrtFD(const double *par, double *erec, double eRecoPi0, double erecLep, double sqrtErecLep, double sqrteRecoPi0, bool CCnue)
void NEScaleFD(const double *par, double *erec, double eRecoN)
@ kMaCh3_Spline_CC_IMDAnnihalation
@ kMaCh3_Spline_NC_AMnuGamma
@ kMaCh3_Spline_CC_Diffractive
@ kMaCh3_Spline_NC_GlashowRES
@ kMaCh3_Spline_NC_Nue_EL
@ kMaCh3_Spline_CC_Nue_EL
@ kMaCh3_Spline_CC_GlashowRES
@ kMaCh3_Spline_CC_AMnuGamma
@ kMaCh3_Spline_CC_Single_Kaon
@ kMaCh3_Spline_NC_Diffractive
@ kMaCh3_Spline_NC_IMDAnnihalation
std::string MaCh3mode_ToDUNEString(MaCh3_Mode i)
void MuResFD(const double *par, double *erec, double erecLep, double LepE, bool CCnumu)
int GENIEMode_ToMaCh3Mode(int GENIE_mode, int isCC)
int MaCh3Mode_to_SplineMode(int iMode)
void HadEScaleSqrtFD(const double *par, double *erec, double sumEhad, double sqrtSumEhad)
void NEScaleSqrtND(const double *par, double *erec, double eRecoN, double sqrteRecoN)
void EMEScaleND(const double *par, double *erec, double eRecoPi0, double erecLep, bool CCnue)
void TotalEScaleND(const double *par, double *erec, double erecHad, double erecLep, bool NotCCnumu)
void MuEScaleInvSqrtFD(const double *par, double *erec, double erecLep, double invSqrtErecLep, bool CCnumu)
void NEScaleInvSqrtFD(const double *par, double *erec, double eRecoN, double invSqrteRecoN)
void MuEScaleSqrtFD(const double *par, double *erec, double erecLep, double sqrtErecLep, bool CCnumu)
void HadEScaleND(const double *par, double *erec, double sumEhad)
void NResND(const double *par, double *erec, double eRecoN, double eN)
void CVNNumuFD(const double *par, double *cvnnumu)
void NEScaleSqrtFD(const double *par, double *erec, double eRecoN, double sqrteRecoN)
void HadResFD(const double *par, double *erec, double eRecoP, double eRecoPip, double eRecoPim, double eP, double ePip, double ePim)
void HadResND(const double *par, double *erec, double eRecoP, double eRecoPip, double eRecoPim, double eP, double ePip, double ePim)
void TotalEScaleSqrtND(const double *par, double *erec, double erecHad, double erecLep, double sqrtErecHad, double sqrtErecLep, bool NotCCnumu)
void EMEScaleFD(const double *par, double *erec, double eRecoPi0, double erecLep, bool CCnue)
void EMEScaleInvSqrtFD(const double *par, double *erec, double eRecoPi0, double erecLep, double invSqrtErecLep, double invSqrteRecoPi0, bool CCnue)
void HadEScaleFD(const double *par, double *erec, double sumEhad)
void CVNNueFD(const double *par, double *cvnnue)
void EMEScaleInvSqrtND(const double *par, double *erec, double eRecoPi0, double erecLep, double invSqrtErecLep, double invSqrteRecoPi0, bool CCnue)
void HadEScaleSqrtND(const double *par, double *erec, double sumEhad, double sqrtSumEhad)
void NResFD(const double *par, double *erec, double eRecoN, double eN)
void HadEScaleInvSqrtND(const double *par, double *erec, double sumEhad, double invSqrtSumEhad)
void EMResFD(const double *par, double *erec, double eRecoPi0, double ePi0, double erecLep, double LepE, bool CCnue)
void HadEScaleInvSqrtFD(const double *par, double *erec, double sumEhad, double invSqrtSumEhad)
void TotalEScaleSqrtFD(const double *par, double *erec, double erecHad, double erecLep, double sqrtErecHad, double sqrtErecLep, bool NotCCnumu)
@ kMaCh3_CC_IMDAnnihalation
@ kMaCh3_NC_IMDAnnihalation
void MuResND(const double *par, double *erec, double erecLep, double LepE, bool CCnumu)
void MuEScaleND(const double *par, double *erec, double erecLep, bool CCnumu)
int SIMBMode_ToMaCh3Mode(int SIMB_mode, int isCC)
void MuEScaleInvSqrtND(const double *par, double *erec, double erecLep, double invSqrtErecLep, bool CCnumu)
void NEScaleInvSqrtND(const double *par, double *erec, double eRecoN, double invSqrteRecoN)
double * rw_cvnnue_shifted
double * rw_cvnnumu_shifted
int * npip
number of (post-FSI) primary pi+
int * npim
number of (post-FSI) primary pi-
int * npi0
number of (post-FSI) primary pi0
int * nproton
number of (post-FSI) primary protons
int * nneutron
number of (post-FSI) primary neutrons