pow[a_,b_]:=a^b

(*The coefficients C1, C3, CLminus, ... are defined in paper  M.Kabirnezhad  Phys.Rev.D 97, 013002 *)

(*sum(1|3)(Re|Im)(M|P|OM|OP)(M|P)(M|P) implies real or imaginary part of amplitudes sumed by all resonances with  I=1/2 or 3/2. For boson polarazation: M <-> (e^L), P <-> (e^R), OM <-> (SuperMinus[e]), OP <-> (SuperPlus[e]).
For nucleon polarazation P imply helicity +1/2, M imply helicity -1/2.
H(M|P|OM|OP)(M|P)(M|P) implies the difference between vectors and axial background contribution. The meaning of all symbols are the same as for resonance part*)

CL2=CLminus*CLminus+CLplus*CLplus;
CR2=CRminus*CRminus+CRplus*CRplus;
CLR=CLminus*CRminus+CLplus*CRplus;


(* The general expression for the differential cross section CC-processesses as coded in MK programms.
The expressions for NC processess are analogous and have the same mistakes, but is not conisdered here  
The mistype in cross section for process ν+n -> μ+p+(π^0) (file mk_imode2.cc line 1201 symbol 1243) is marked by red. The mistype was sum1Re0MMM.  *)
XSecMK =
CL2*((C1*sum1ImMPP+C3*sum3ImMPP)*(C1*sum1ImMPP+C3*sum3ImMPP)+(C1*sum1ImMMP+C3*sum3ImMMP)*(C1*sum1ImMMP+C3*sum3ImMMP)+(C1*sum1ImMPM+C3*sum3ImMPM)*(C1*sum1ImMPM+C3*sum3ImMPM)+(C1*sum1ImMMM+C3*sum3ImMMM)*(C1*sum1ImMMM+C3*sum3ImMMM)+pow[(HMPP+C3*sum3ReMPP+C1*sum1ReMPP),2]+pow[(HMMP+C3*sum3ReMMP+C1*sum1ReMMP),2]+pow[(HMPM+C3*sum3ReMPM+C1*sum1ReMPM),2]+pow[(HMMM+C3*sum3ReMMM+C1*sum1ReMMM),2])+
CR2*((C1*sum1ImPPP+C3*sum3ImPPP)*(C1*sum1ImPPP+C3*sum3ImPPP)+(C1*sum1ImPMP+C3*sum3ImPMP)*(C1*sum1ImPMP+C3*sum3ImPMP)+(C1*sum1ImPPM+C3*sum3ImPPM)*(C1*sum1ImPPM+C3*sum3ImPPM)+(C1*sum1ImPMM+C3*sum3ImPMM)*(C1*sum1ImPMM+C3*sum3ImPMM)+pow[(HPPP+C3*sum3RePPP+C1*sum1RePPP),2]+pow[(HPMP+C3*sum3RePMP+C1*sum1RePMP),2]+pow[(HPPM+C3*sum3RePPM+C1*sum1RePPM),2]+pow[(HPMM+C3*sum3RePMM+C1*sum1RePMM),2])+
CSminus*CSminus*((C1*sum1Im0MPP+C3*sum3Im0MPP)*(C1*sum1Im0MPP+C3*sum3Im0MPP)+(C1*sum1Im0MMP+C3*sum3Im0MMP)*(C1*sum1Im0MMP+C3*sum3Im0MMP)+(C1*sum1Im0MPM+C3*sum3Im0MPM)*(C1*sum1Im0MPM+C3*sum3Im0MPM)+(C1*sum1Im0MMM+C3*sum3Im0MMM)*(C1*sum1Im0MMM+C3*sum3Im0MMM)+pow[(H0MPP+C3*sum3Re0MPP+C1*sum1Re0MPP),2]+pow[(H0MMP+C3*sum3Re0MMP+C1*sum1Re0MMP),2]+pow[(H0MPM+C3*sum3Re0MPM+C1*sum1Re0MPM),2]+pow[(H0MMM+C3*sum3Re0MMM+C1*sum1Re0MMM),2])+
CSplus*CSplus*((C1*sum1Im0PPP+C3*sum3Im0PPP)*(C1*sum1Im0PPP+C3*sum3Im0PPP)+(C1*sum1Im0PMP+C3*sum3Im0PMP)*(C1*sum1Im0PMP+C3*sum3Im0PMP)+(C1*sum1Im0PPM+C3*sum3Im0PPM)*(C1*sum1Im0PPM+C3*sum3Im0PPM)+(C1*sum1Im0PMM+C3*sum3Im0PMM)*(C1*sum1Im0PMM+C3*sum3Im0PMM)+pow[(H0PPP+C3*sum3Re0PPP+C1*sum1Re0PPP),2]+pow[(H0PMP+C3*sum3Re0PMP+C1*sum1Re0PMP),2]+pow[(H0PPM+C3*sum3Re0PPM+C1*sum1Re0PPM),2]+pow[(H0PMM+C3*sum3Re0PMM+C1*sum1Re0PMM),2])+
2*Cos[phi]*(CLminus*CSminus*((C1*sum1ImMPP+C3*sum3ImMPP)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P+C3*sum3RePPP+C1*sum1RePPP)+(HMMP+C3*sum3ReMMP+C1*sum1ReMMP)*(HPMP+C3*sum3RePMP+C1*sum1RePMP)+(HMPM+C3*sum3ReMPM+C1*sum1ReMPM)*(HPPM+C3*sum3RePPM+C1*sum1RePPM)+(HMMM+C3*sum3ReMMM+C1*sum1ReMMM)*(HPMM+C3*sum3RePMM+C1*sum1RePMM))-
2*Sin[2*phi]*CLR*((C1*sum1ImMPP+C3*sum3ImMPP)*(HPPP+C3*sum3RePPP+C1*sum1RePPP)+(C1*sum1ImMMP+C3*sum3ImMMP)*(HPMP+C3*sum3RePMP+C1*sum1RePMP)+(C1*sum1ImMPM+C3*sum3ImMPM)*(HPPM+C3*sum3RePPM+C1*sum1RePPM)+(C1*sum1ImMMM+C3*sum3ImMMM)*(HPMM+C3*sum3RePMM+C1*sum1RePMM)-(HMPP+C3*sum3ReMPP+C1*sum1ReMPP)*(C1*sum1ImPPP+C3*sum3ImPPP)-(HMMP+C3*sum3ReMMP+C1*sum1ReMMP)*(C1*sum1ImPMP+C3*sum3ImPMP)-(HMPM+C3*sum3ReMPM+C1*sum1ReMPM)*(C1*sum1ImPPM+C3*sum3ImPPM)-(HMMM+C3*sum3ReMMM+C1*sum1ReMMM)*(C1*sum1ImPMM+C3*sum3ImPMM));


(* The definitions of helicity amplitudes *) 

(*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*)
(* Uncomment the code between >>>>>>>>>> lines and comment betwwen <<<<<<<<<<<<<<<<<< to switch on uncorrect phases assumed in the code probided by MK *)

sum3PPPC=(sum3RePPP+I*sum3ImPPP)*Exp[-2*I*phi];
sum3PMPC=(sum3RePMP+I*sum3ImPMP)*Exp[-I*phi];
sum3PPMC=(sum3RePPM+I*sum3ImPPM)*Exp[-I*phi];
sum3PMMC=(sum3RePMM+I*sum3ImPMM);

sum3MPPC=(sum3ReMPP+I*sum3ImMPP);
sum3MMPC=(sum3ReMMP+I*sum3ImMMP)*Exp[I*phi];
sum3MPMC=(sum3ReMPM+I*sum3ImMPM)*Exp[I*phi];
sum3MMMC=(sum3ReMMM+I*sum3ImMMM)*Exp[2*I*phi];

sum1PPPC=(sum1RePPP+I*sum1ImPPP)*Exp[-2*I*phi];
sum1PMPC=(sum1RePMP+I*sum1ImPMP)*Exp[-I*phi];
sum1PPMC=(sum1RePPM+I*sum1ImPPM)*Exp[-I*phi];
sum1PMMC=(sum1RePMM+I*sum1ImPMM);

sum1MPPC=(sum1ReMPP+I*sum1ImMPP);
sum1MMPC=(sum1ReMMP+I*sum1ImMMP)*Exp[I*phi];
sum1MPMC=(sum1ReMPM+I*sum1ImMPM)*Exp[I*phi];
sum1MMMC=(sum1ReMMM+I*sum1ImMMM)*Exp[2*I*phi];


HPPPC=HPPP*Exp[-2*I*phi];
HPMPC=HPMP*Exp[-I*phi];
HPPMC=HPPM*Exp[-I*phi];
HPMMC=HPMM;

HMPPC=HMPP;
HMMPC=HMMP*Exp[I*phi];
HMPMC=HMPM*Exp[I*phi];
HMMMC=HMMM*Exp[2*I*phi];
(*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*)


(*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*)
(* Uncomment the code between <<<<<<<<<<<<<<< lines and comment between >>>>>>>>>>>>>>>>> to switch on correct phases *)
(*sum3MPPC=(sum3ReMPP+I*sum3ImMPP)*Exp[-2*I*phi];
sum3MMPC=(sum3ReMMP+I*sum3ImMMP)*Exp[-I*phi];
sum3MPMC=(sum3ReMPM+I*sum3ImMPM)*Exp[-I*phi];
sum3MMMC=(sum3ReMMM+I*sum3ImMMM);

sum3PPPC=(sum3RePPP+I*sum3ImPPP);
sum3PMPC=(sum3RePMP+I*sum3ImPMP)*Exp[I*phi];
sum3PPMC=(sum3RePPM+I*sum3ImPPM)*Exp[I*phi];
sum3PMMC=(sum3RePMM+I*sum3ImPMM)*Exp[2*I*phi];

sum1MPPC=(sum1ReMPP+I*sum1ImMPP)*Exp[-2*I*phi];
sum1MMPC=(sum1ReMMP+I*sum1ImMMP)*Exp[-I*phi];
sum1MPMC=(sum1ReMPM+I*sum1ImMPM)*Exp[-I*phi];
sum1MMMC=(sum1ReMMM+I*sum1ImMMM);

sum1PPPC=(sum1RePPP+I*sum1ImPPP);
sum1PMPC=(sum1RePMP+I*sum1ImPMP)*Exp[I*phi];
sum1PPMC=(sum1RePPM+I*sum1ImPPM)*Exp[I*phi];
sum1PMMC=(sum1RePMM+I*sum1ImPMM)*Exp[2*I*phi];

HMPPC=HMPP*Exp[-2*I*phi];
HMMPC=HMMP*Exp[-I*phi];
HMPMC=HMPM*Exp[-I*phi];
HMMMC=HMMM;

HPPPC=HPPP;
HPMPC=HPMP*Exp[I*phi];
HPPMC=HPPM*Exp[I*phi];
HPMMC=HPMM*Exp[2*I*phi];*)
(*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*)

sum30PPPC=(sum3Re0PPP+I*sum3Im0PPP)*Exp[-I*phi];
sum30PMPC=(sum3Re0PMP+I*sum3Im0PMP);
sum30PPMC=(sum3Re0PPM+I*sum3Im0PPM);
sum30PMMC=(sum3Re0PMM+I*sum3Im0PMM)*Exp[I*phi];

sum30MPPC=(sum3Re0MPP+I*sum3Im0MPP)*Exp[-I*phi];
sum30MMPC=(sum3Re0MMP+I*sum3Im0MMP);
sum30MPMC=(sum3Re0MPM+I*sum3Im0MPM);
sum30MMMC=(sum3Re0MMM+I*sum3Im0MMM)*Exp[I*phi];

sum10PPPC=(sum1Re0PPP+I*sum1Im0PPP)*Exp[-I*phi];
sum10PMPC=(sum1Re0PMP+I*sum1Im0PMP);
sum10PPMC=(sum1Re0PPM+I*sum1Im0PPM);
sum10PMMC=(sum1Re0PMM+I*sum1Im0PMM)*Exp[I*phi];

sum10MPPC=(sum1Re0MPP+I*sum1Im0MPP)*Exp[-I*phi];
sum10MMPC=(sum1Re0MMP+I*sum1Im0MMP);
sum10MPMC=(sum1Re0MPM+I*sum1Im0MPM);
sum10MMMC=(sum1Re0MMM+I*sum1Im0MMM)*Exp[I*phi];

H0PPPC=H0PPP*Exp[-I*phi];
H0PMPC=H0PMP;
H0PPMC=H0PPM;
H0PMMC=H0PMM*Exp[I*phi];

H0MPPC=H0MPP*Exp[-I*phi];
H0MMPC=H0MMP;
H0MPMC=H0MPM;
H0MMMC=H0MMM*Exp[I*phi];

(*  The correct cross section implemented in GENIE and presented in Eq. (18) of paper 
M.Kabirnezhad  Phys.Rev.D 97,013002 *)
XSec=
 Abs[CLminus*(HMPPC+C3*sum3MPPC+C1*sum1MPPC)+CRminus*(HPPPC+C3*sum3PPPC+C1*sum1PPPC)+CSminus*(H0MPPC+C3*sum30MPPC+C1*sum10MPPC)]^2+Abs[CLplus*(HMPPC+C3*sum3MPPC+C1*sum1MPPC)+CRplus*(HPPPC+C3*sum3PPPC+C1*sum1PPPC)+CSplus*(H0PPPC+C3*sum30PPPC+C1*sum10PPPC)]^2+Abs[CLminus*(HMPMC+C3*sum3MPMC+C1*sum1MPMC)+CRminus*(HPPMC+C3*sum3PPMC+C1*sum1PPMC)+CSminus*(H0MPMC+C3*sum30MPMC+C1*sum10MPMC)]^2+Abs[CLplus*(HMPMC+C3*sum3MPMC+C1*sum1MPMC)+CRplus*(HPPMC+C3*sum3PPMC+C1*sum1PPMC)+CSplus*(H0PPMC+C3*sum30PPMC+C1*sum10PPMC)]^2+Abs[CLminus*(HMMMC+C3*sum3MMMC+C1*sum1MMMC)+CRminus*(HPMMC+C3*sum3PMMC+C1*sum1PMMC)+CSminus*(H0MMMC+C3*sum30MMMC+C1*sum10MMMC)]^2+Abs[CLplus*(HMMMC+C3*sum3MMMC+C1*sum1MMMC)+CRplus*(HPMMC+C3*sum3PMMC+C1*sum1PMMC)+CSplus*(H0PMMC+C3*sum30PMMC+C1*sum10PMMC)]^2+Abs[CLminus*(HMMPC+C3*sum3MMPC+C1*sum1MMPC)+CRminus*(HPMPC+C3*sum3PMPC+C1*sum1PMPC)+CSminus*(H0MMPC+C3*sum30MMPC+C1*sum10MMPC)]^2+Abs[CLplus*(HMMPC+C3*sum3MMPC+C1*sum1MMPC)+CRplus*(HPMPC+C3*sum3PMPC+C1*sum1PMPC)+CSplus*(H0PMPC+C3*sum30PMPC+C1*sum10PMPC)]^2;

XSecExp=ComplexExpand[XSec];


(* The difference between cross section coded by MK and correct cross section
 It will be equal to zero if one uncomment uncorrect phases between two lines >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 In case of correct amplitudes it shouldn't be equal to zero *)
XSecDiff=FullSimplify[XSecExp-XSecMK]