925 int tgt_pdgc = target.
Pdg();
931 const double k[4] = {neutrinoMom.E(),neutrinoMom.Px(),neutrinoMom.Py(),neutrinoMom.Pz()};
932 const double kPrime[4] = {leptonMom.E(),leptonMom.Px(),
933 leptonMom.Py(),leptonMom.Pz()};
935 double q2 = qTildeP4.Mag2();
937 const double q[4] = {qTildeP4.E(),qTildeP4.Px(),qTildeP4.Py(),qTildeP4.Pz()};
939 double dq = TMath::Sqrt(TMath::Power(q[1],2)+
940 TMath::Power(q[2],2)+TMath::Power(q[3],2));
942 int sign = (is_neutrino) ? 1 : -1;
953 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 958 double M2 = TMath::Power(M, 2);
959 double FA2 = TMath::Power(FA, 2);
960 double Fp2 = TMath::Power(Fp, 2);
961 double F1V2 = TMath::Power(F1V, 2);
962 double xiF2V2 = TMath::Power(xiF2V, 2);
963 double q02 = TMath::Power(q[0], 2);
964 double dq2 = TMath::Power(dq, 2);
965 double q4 = TMath::Power(q2, 2);
968 double CN=1.,CT=1.,CL=1.,imU=0;
970 tgt_pdgc, A, Z, N, hitNucIsProton, CN, CT, CL, imU,
971 t0, r00, assumeFreeNucleon);
976 if ( !
fRPA || assumeFreeNucleon ) {
982 double tulin[4] = {0.,0.,0.,0.};
983 double rulin[4][4] = { {0.,0.,0.,0.},
994 double t3 = (0.5*q2 + q0*
t0)/dq;
1004 double bR = (q4+4.0*r00*q02+4.0*q2*q0*
t0)/(4.0*dq2);
1005 double gamma = (aR-bR)/2.0;
1006 double delta = (-aR+3.0*bR)/2.0/dq2;
1008 double r03 = (0.5*q2*t0 + q0*r00)/dq;
1012 rulin[1][1] =
gamma;
1013 rulin[2][2] =
gamma;
1015 rulin[3][3] = gamma+delta*dq2;
1019 tulin[0] = inNucleonMomOnShell.E();
1020 tulin[1] = inNucleonMomOnShell.Px();
1021 tulin[2] = inNucleonMomOnShell.Py();
1022 tulin[3] = inNucleonMomOnShell.Pz();
1024 for(
int i=0; i<4; i++)
1025 for(
int j=0; j<4; j++)
1026 rulin[i][j] = tulin[i]*tulin[j];
1030 const int g[4][4] = {{1,0,0,0},{0,-1,0,0},{0,0,-1,0},{0,0,0,-1}};
1031 const std::complex<double> iNum(0,1);
1032 int leviCivitaIndexArray[4];
1033 double imaginaryPart = 0;
1035 std::complex<double> sum(0.0,0.0);
1037 double kPrimek = k[0]*kPrime[0]-k[1]*kPrime[1]-k[2]*kPrime[2]-k[3]*kPrime[3];
1039 std::complex<double> Lmunu(0.0,0.0),Lnumu(0.0,0.0);
1040 std::complex<double> Amunu(0.0,0.0),Anumu(0.0,0.0);
1045 double axx=0.,azz=0.,a0z=0.,a00=0.,axy=0.;
1046 for(
int mu=0;mu<4;mu++){
1047 for(
int nu=mu;nu<4;nu++){
1051 Lmunu = g[mu][mu]*kPrime[mu]*g[nu][nu]*k[nu]+g[nu][nu]*kPrime[nu]*g[mu][mu]*k[mu]-g[mu][nu]*kPrimek;
1056 leviCivitaIndexArray[0] = mu;
1057 leviCivitaIndexArray[1] = nu;
1058 for(
int a=0;
a<4;
a++){
1059 for(
int b=0;
b<4;
b++){
1060 leviCivitaIndexArray[2] =
a;
1061 leviCivitaIndexArray[3] =
b;
1062 imaginaryPart += -
leviCivita(leviCivitaIndexArray)*kPrime[
a]*k[
b];
1067 Lmunu = g[mu][mu]*kPrime[mu]*g[nu][nu]*k[nu]+g[nu][nu]*kPrime[nu]*g[mu][mu]*k[mu] + iNum*imaginaryPart;
1068 Lnumu = g[nu][nu]*kPrime[nu]*g[mu][mu]*k[mu]+g[mu][mu]*kPrime[mu]*g[nu][nu]*k[nu ]- iNum*imaginaryPart;
1071 if(mu ==0 && nu == 0){
1072 Amunu = 16.0*F1V2*(2.0*rulin[0][0]*CN+2.0*q[0]*tulin[0]+q2/2.0)+
1074 (4.0-4.0*rulin[0][0]/M2-4.0*q[0]*tulin[0]/M2-q02*(4.0/q2+1.0/M2)) +
1075 4.0*FA2*(2.0*rulin[0][0]+2.0*q[0]*tulin[0]+(q2/2.0-2.0*M2))-
1076 (2.0*CL*Fp2*q2+8.0*FA*Fp*CL*M)*q02-16.0*F1V*xiF2V*(-q2+q02)*CN;
1079 }
else if(mu == 0 && nu == 3){
1080 Amunu = 16.0*F1V2*((2.0*rulin[0][3]+tulin[0]*dq)*CN+tulin[3]*q[0])+
1082 (-4.0*rulin[0][3]/M2-2.0*(dq*tulin[0]+q[0]*tulin[3])/M2-dq*q[0]*(4.0/q2+1.0/M2))+
1083 4.0*FA2*((2.0*rulin[0][3]+dq*tulin[0])*CL+q[0]*tulin[3])-
1084 (2.0*CL*Fp2*q2+8.0*FA*Fp*CL*M)*dq*q[0]-
1085 16.0*F1V*xiF2V*dq*q[0];
1088 sum += Lmunu*Anumu + Lnumu*Amunu;
1089 }
else if(mu == 3 && nu == 3){
1090 Amunu = 16.0*F1V2*(2.0*rulin[3][3]+2.0*dq*tulin[3]-q2/2.0)+
1091 2.0*q2*xiF2V2*(-4.0-4.0*rulin[3][3]/M2-4.0*dq*tulin[3]/M2-dq2*(4.0/q2+1.0/M2))+
1092 4.0*FA2*(2.0*rulin[3][3]+2.0*dq*tulin[3]-(q2/2.0-2.0*CL*M2))-
1093 (2.0*CL*Fp2*q2+8.0*FA*Fp*CL*M)*dq2-
1094 16.0*F1V*xiF2V*(q2+dq2);
1097 }
else if(mu ==1 && nu == 1){
1098 Amunu = 16.0*F1V2*(2.0*rulin[1][1]-q2/2.0)+
1099 2.0*q2*xiF2V2*(-4.0*CT-4.0*rulin[1][1]/M2) +
1100 4.0*FA2*(2.0*rulin[1][1]-(q2/2.0-2.0*CT*M2))-
1101 16.0*F1V*xiF2V*CT*q2;
1104 }
else if(mu == 2 && nu == 2){
1107 Amunu = 16.0*F1V2*(2.0*rulin[2][2]-q2/2.0)+
1108 2.0*q2*xiF2V2*(-4.0*CT-4.0*rulin[2][2]/M2) +
1109 4.0*FA2*(2.0*rulin[2][2]-(q2/2.0-2.0*CT*M2))-
1110 16.0*F1V*xiF2V*CT*q2;
1112 }
else if(mu ==1 && nu == 2){
1113 Amunu = sign*16.0*iNum*FA*(xiF2V+F1V)*(-dq*tulin[0]*CT + q[0]*tulin[3]);
1116 sum += Lmunu*Anumu+Lnumu*Amunu;
1127 double tmugev = leptonMom.E() - leptonMom.Mag();
1129 std::ofstream ffstream;
1132 ffstream << -q2 <<
"\t" << q[0] <<
"\t" << dq
1133 <<
"\t" << axx <<
"\t" << azz <<
"\t" << a0z
1134 <<
"\t" << a00 <<
"\t" << axy <<
"\t" 1135 << CT <<
"\t" << CL <<
"\t" << CN <<
"\t" 1136 << tmugev <<
"\t" << imU <<
"\t" 1137 << F1V <<
"\t" << xiF2V <<
"\t" 1138 << FA <<
"\t" << Fp <<
"\t" 1139 << tulin[0] <<
"\t"<< tulin[1] <<
"\t" 1140 << tulin[2] <<
"\t"<< tulin[3] <<
"\t" 1141 << rulin[0][0]<<
"\t"<< rulin[0][1]<<
"\t" 1142 << rulin[0][2]<<
"\t"<< rulin[0][3]<<
"\t" 1143 << rulin[1][0]<<
"\t"<< rulin[1][1]<<
"\t" 1144 << rulin[1][2]<<
"\t"<< rulin[1][3]<<
"\t" 1145 << rulin[2][0]<<
"\t"<< rulin[2][1]<<
"\t" 1146 << rulin[2][2]<<
"\t"<< rulin[2][3]<<
"\t" 1147 << rulin[3][0]<<
"\t"<< rulin[3][1]<<
"\t" 1148 << rulin[3][2]<<
"\t"<< rulin[3][3]<<
"\t" 1159 LOG(
"Nieves",
pWARN) <<
"Imaginary part of tensor contraction is nonzero " 1160 <<
"in QEL XSec, real(sum) = " << real(sum)
1161 <<
"imag(sum) = " << imag(sum);
bool fRPA
use RPA corrections
static constexpr double g
int HitNucPdg(void) const
bool IsNucleus(void) const
void CNCTCLimUcalc(TLorentzVector qTildeP4, double M, double r, bool is_neutrino, bool tgtIsNucleus, int tgt_pdgc, int A, int Z, int N, bool hitNucIsProton, double &CN, double &CT, double &CL, double &imU, double &t0, double &r00, bool assumeFreeNucleon) const
QELFormFactors fFormFactors
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool fCompareNievesTensors
print tensors
static const double kASmallNum
double gamma(double KE, const simb::MCParticle *part)
TString fTensorsOutFile
file to print tensors to
double HitNucPosition(void) const
int leviCivita(int input[]) const