373 if ( ispr ) { qrkd = 1 ; qrku = 2; }
374 else { qrkd = 2 ; qrku = 1; }
381 double sign3 = isnu ? +1. : -1.;
384 if ( pdg_iq== 1 && !sea_iq && pdg_fq== 2 ) { qpdf1 = qrkd; qpdf2 = -qrkd; Cp2 = 2*
fSF.
Vud*
fSF.
Vud; Cp3 = 2*
fSF.
Vud*
fSF.
Vud; }
385 else if ( pdg_iq== 1 && !sea_iq && pdg_fq== 4 ) { qpdf1 = qrkd; qpdf2 = -qrkd; Cp2 = 2*
fSF.
Vcd*
fSF.
Vcd; Cp3 = 2*
fSF.
Vcd*
fSF.
Vcd; }
386 else if ( pdg_iq== 1 && !sea_iq && pdg_fq== 6 ) { qpdf1 = qrkd; qpdf2 = -qrkd; Cp2 = 2*
fSF.
Vtd*
fSF.
Vtd; Cp3 = 2*
fSF.
Vtd*
fSF.
Vtd; }
396 else if ( pdg_iq==-2 && sea_iq && pdg_fq==-1 ) { qpdf1 = -qrku; Cp2 = 2*
fSF.
Vud*
fSF.
Vud; Cp3 = -2*
fSF.
Vud*
fSF.
Vud; }
397 else if ( pdg_iq==-2 && sea_iq && pdg_fq==-3 ) { qpdf1 = -qrku; Cp2 = 2*
fSF.
Vus*
fSF.
Vus; Cp3 = -2*
fSF.
Vus*
fSF.
Vus; }
398 else if ( pdg_iq==-2 && sea_iq && pdg_fq==-5 ) { qpdf1 = -qrku; Cp2 = 2*
fSF.
Vub*
fSF.
Vub; Cp3 = -2*
fSF.
Vub*
fSF.
Vub; }
404 if ( pdg_iq== 2 && !sea_iq && pdg_fq== 1 ) { qpdf1 = qrku; qpdf2 = -qrku; Cp2 = 2*
fSF.
Vud*
fSF.
Vud; Cp3 = 2*
fSF.
Vud*
fSF.
Vud; }
405 else if ( pdg_iq== 2 && !sea_iq && pdg_fq== 3 ) { qpdf1 = qrku; qpdf2 = -qrku; Cp2 = 2*
fSF.
Vus*
fSF.
Vus; Cp3 = 2*
fSF.
Vus*
fSF.
Vus; }
406 else if ( pdg_iq== 2 && !sea_iq && pdg_fq== 5 ) { qpdf1 = qrku; qpdf2 = -qrku; Cp2 = 2*
fSF.
Vub*
fSF.
Vub; Cp3 = 2*
fSF.
Vub*
fSF.
Vub; }
413 else if ( pdg_iq==-1 && sea_iq && pdg_fq==-2 ) { qpdf1 = -qrkd; Cp2 = 2*
fSF.
Vud*
fSF.
Vud; Cp3 = -2*
fSF.
Vud*
fSF.
Vud; }
414 else if ( pdg_iq==-1 && sea_iq && pdg_fq==-4 ) { qpdf1 = -qrkd; Cp2 = 2*
fSF.
Vcd*
fSF.
Vcd; Cp3 = -2*
fSF.
Vcd*
fSF.
Vcd; }
415 else if ( pdg_iq==-1 && sea_iq && pdg_fq==-6 ) { qpdf1 = -qrkd; Cp2 = 2*
fSF.
Vtd*
fSF.
Vtd; Cp3 = -2*
fSF.
Vtd*
fSF.
Vtd; }
425 double c2u = TMath::Power( 1./2. - 4./3.*
fSF.
Sin2ThW,2) + 1./4.;
426 double c2d = TMath::Power(-1./2. + 2./3.*
fSF.
Sin2ThW,2) + 1./4.;
429 if ( pdg_iq== 1 && !sea_iq && pdg_fq== 1 ) { qpdf1 = qrkd; qpdf2 = -qrkd; Cp2 = c2d; Cp3 = c3d; }
430 else if ( pdg_iq== 2 && !sea_iq && pdg_fq== 2 ) { qpdf1 = qrku; qpdf2 = -qrku; Cp2 = c2u; Cp3 = c3u; }
431 else if ( pdg_iq== 1 && sea_iq && pdg_fq== 1 ) { qpdf1 = -qrkd; Cp2 = c2d; Cp3 = c3d; }
432 else if ( pdg_iq== 2 && sea_iq && pdg_fq== 2 ) { qpdf1 = -qrku; Cp2 = c2u; Cp3 = c3u; }
433 else if ( pdg_iq== 3 && sea_iq && pdg_fq== 3 ) { qpdf1 = 3; Cp2 = c2d; Cp3 = c3d; }
434 else if ( pdg_iq== 4 && sea_iq && pdg_fq== 4 ) { qpdf1 = 4; Cp2 = c2u; Cp3 = c3u; }
435 else if ( pdg_iq== 5 && sea_iq && pdg_fq== 5 ) { qpdf1 = 5; Cp2 = c2d; Cp3 = c3d; }
436 else if ( pdg_iq==-1 && sea_iq && pdg_fq==-1 ) { qpdf1 = -qrkd; Cp2 = c2d; Cp3 = -c3d; }
437 else if ( pdg_iq==-2 && sea_iq && pdg_fq==-2 ) { qpdf1 = -qrku; Cp2 = c2u; Cp3 = -c3u; }
438 else if ( pdg_iq==-3 && sea_iq && pdg_fq==-3 ) { qpdf1 = -3; Cp2 = c2d; Cp3 = -c3d; }
439 else if ( pdg_iq==-4 && sea_iq && pdg_fq==-4 ) { qpdf1 = -4; Cp2 = c2u; Cp3 = -c3u; }
440 else if ( pdg_iq==-5 && sea_iq && pdg_fq==-5 ) { qpdf1 = -5; Cp2 = c2d; Cp3 = -c3d; }
444 std::ofstream sf_stream(sfFile.c_str());
447 for(
int sf = 1; sf < 4; sf++) {
448 for (
unsigned int i=0; i<
sf_q2_array.size(); i++ ) {
450 for (
unsigned int j=0; j<
sf_x_array.size(); j++ ) {
457 if ( Q2*(1/z-1)+mass_nucl*mass_nucl <= TMath::Power(mass_nucl+
mPDFQrk[TMath::Abs(pdg_fq)],2) ) { sf_stream << 0. <<
" ";
continue; }
461 if ( Q2*(1/z-1)+mass_nucl*mass_nucl <= TMath::Power(mass_nucl+
mPDFQrk[TMath::Abs(pdg_fq)],2) ) { sf_stream << 0. <<
" ";
continue; }
470 double xPDF = TMath::Max( z,
xPDFmin );
471 double Q2PDF = TMath::Max( Q2,
Q2PDFmin );
472 Q2PDF = TMath::Min( Q2PDF,
Q2PDFmax );
475 #ifdef __GENIE_LHAPDF6_ENABLED__
476 double fPDF = fmax( pdf->xfxQ2(qpdf1, xPDF, Q2PDF)/z , 0.);
477 if (qpdf2!= -999) fPDF -= fmax( pdf->xfxQ2(qpdf2, xPDF, Q2PDF)/z , 0.);
479 #ifdef __GENIE_LHAPDF5_ENABLED__
480 double fPDF = fmax( LHAPDF::xfx(xPDF, TMath::Sqrt(Q2PDF), qpdf1)/z , 0.);
481 if (qpdf2!= -999) fPDF -= fmax( LHAPDF::xfx(xPDF, TMath::Sqrt(Q2PDF), qpdf2)/z , 0.);
486 if ( sf==1 ) tmp = fPDF*Cp2/2;
487 else if ( sf==2 ) tmp = fPDF*Cp2*z;
488 else if ( sf==3 ) tmp = fPDF*Cp3*sign3;
491 LOG(
"HEDISStrucFunc",
pDEBUG) <<
"QrkSFLO" << sf <<
"[x=" << x <<
"," << Q2 <<
"] = " << tmp;
492 sf_stream << tmp <<
" ";
bool HitSeaQrk(void) const
bool IsWeakCC(void) const
bool IsNeutrino(int pdgc)
double Q2(const Interaction *const i)
int HitNucPdg(void) const
int HitQrkPdg(void) const
double HitNucMass(void) const
vector< double > sf_q2_array
std::map< int, double > mPDFQrk
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
int FinalQuarkPdg(void) const
const XclsTag & ExclTag(void) const
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
vector< double > sf_x_array
const Target & Tgt(void) const