29#include "Framework/Conventions/GBuild.h"
82 LOG(
"DISSF",
pDEBUG) <<
"Loading configuration...";
87 fPDF -> SetModel(pdf_model);
88 fPDFc -> SetModel(pdf_model);
125 fSin2thw = TMath::Power(TMath::Sin(thw), 2);
127 LOG(
"DISSF",
pDEBUG) <<
"Done loading configuration";
153 int probe_pdgc = init_state.
ProbePdg();
162 bool is_EM = proc_info.
IsEM();
165 if ( !is_lepton && !is_dm )
return;
166 if ( !is_p && !is_n )
return;
167 if ( tgt.
N() == 0 && is_n )
return;
168 if ( tgt.
Z() == 0 && is_p )
return;
173 double switch_uv = 1.;
174 double switch_us = 1.;
175 double switch_ubar = 1.;
176 double switch_dv = 1.;
177 double switch_ds = 1.;
178 double switch_dbar = 1.;
179 double switch_s = 1.;
180 double switch_sbar = 1.;
181 double switch_c = 1.;
182 double switch_cbar = 1.;
209 if (!sea && is_u ) { switch_uv = 1; }
210 else if ( sea && is_u ) { switch_us = 1; }
211 else if ( sea && is_ubar) { switch_ubar = 1; }
212 else if (!sea && is_d ) { switch_dv = 1; }
213 else if ( sea && is_d ) { switch_ds = 1; }
214 else if ( sea && is_dbar) { switch_dbar = 1; }
215 else if ( sea && is_s ) { switch_s = 1; }
216 else if ( sea && is_sbar) { switch_sbar = 1; }
217 else if ( sea && is_c ) { switch_c = 1; }
218 else if ( sea && is_cbar) { switch_cbar = 1; }
222 if(is_nu && is_CC && is_u )
return;
223 if(is_nu && is_CC && is_c )
return;
224 if(is_nu && is_CC && is_dbar)
return;
225 if(is_nu && is_CC && is_sbar)
return;
226 if(is_nubar && is_CC && is_ubar)
return;
227 if(is_nubar && is_CC && is_cbar)
return;
228 if(is_nubar && is_CC && is_d )
return;
229 if(is_nubar && is_CC && is_s )
return;
241 double F2val=0, xF3val=0;
246 if(is_NC || is_dmi) {
248 if(!is_nu && !is_nubar && !is_dm)
return;
261 double gvu = GL + GR;
262 double gau = GL - GR;
263 double gvd = GLp + GRp;
264 double gad = GLp - GRp;
265 double gvu2 = TMath::Power(gvu, 2.);
266 double gau2 = TMath::Power(gau, 2.);
267 double gvd2 = TMath::Power(gvd, 2.);
268 double gad2 = TMath::Power(gad, 2.);
270 double q2 = (switch_uv *
fuv + switch_us *
fus + switch_c *
fc) * (gvu2+gau2) +
271 (switch_dv *
fdv + switch_ds *
fds + switch_s *
fs) * (gvd2+gad2);
272 double q3 = (switch_uv *
fuv + switch_us *
fus + switch_c *
fc) * (2*gvu*gau) +
273 (switch_dv *
fdv + switch_ds *
fds + switch_s *
fs) * (2*gvd*gad);
275 double qb2 = (switch_ubar *
fus + switch_cbar *
fc) * (gvu2+gau2) +
276 (switch_dbar *
fds + switch_sbar *
fs) * (gvd2+gad2);
277 double qb3 = (switch_ubar *
fus + switch_cbar *
fc) * (2*gvu*gau) +
278 (switch_dbar *
fds + switch_sbar *
fs) * (2*gvd*gad);
280#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
281 LOG(
"DISSF",
pINFO) <<
"f2 : q = " << q2 <<
", bar{q} = " << qb2;
282 LOG(
"DISSF",
pINFO) <<
"xf3: q = " << q3 <<
", bar{q} = " << qb3;
295 q = ( switch_dv *
fdv + switch_ds *
fds ) *
fVud2 +
300 qbar = ( switch_ubar *
fus ) *
fVud2 +
307 q = ( switch_uv *
fuv + switch_us *
fus ) *
fVud2 +
331 double sq23 = TMath::Power(2./3., 2.);
332 double sq13 = TMath::Power(1./3., 2.);
334 double qu = sq23 * ( switch_uv *
fuv + switch_us *
fus );
335 double qd = sq13 * ( switch_dv *
fdv + switch_ds *
fds );
336 double qs = sq13 * ( switch_s *
fs );
337 double qbu = sq23 * ( switch_ubar *
fus );
338 double qbd = sq13 * ( switch_dbar *
fds );
339 double qbs = sq13 * ( switch_sbar *
fs );
341 double q = qu + qd + qs;
342 double qbar = qbu + qbd + qbs;
349 double Q2val = this->
Q2 (interaction);
351 double f = this->
NuclMod (interaction);
352 double r = this->
R (interaction);
354#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
355 LOG(
"DISSF",
pDEBUG) <<
"Nucl. mod = " << f;
356 LOG(
"DISSF",
pDEBUG) <<
"R(=FL/2xF1) = " << r;
368 double bjx = kinematics.
x();
373 fF3 = f * xF3val/bjx;
385 fF3 = f * xF3val / x;
392#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
408 double Q2val = kinematics.
Q2();
416 double x = kinematics.
x();
417 double y = kinematics.
y();
419 double Q2val = 2*Mn*Ev*x*y;
422 LOG(
"DISSF",
pERROR) <<
"Could not compute Q2!";
431 return interaction->
Kine().
x();
435 double & kuv,
double & kdv,
double & kus,
double & kds)
const
467#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
468 LOG(
"DISSF",
pDEBUG) <<
"Nuclear factor for x of " << x <<
" = " << f;
488 double Q2val = this->
Q2(interaction);
503 double Q2val = this->
Q2(interaction);
510 double Q2pdf = TMath::Max(Q2val,
fQ2min);
513#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
514 LOG(
"DISSF",
pDEBUG) <<
"Calculating PDFs @ x = " << x <<
", Q2 = " << Q2pdf;
516 fPDF->Calculate(x, Q2pdf);
522#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
524 <<
"The event is above the charm threshold (mcharm = " <<
fMc <<
")";
527 LOG(
"DISSF",
pINFO) <<
"Charm production is turned off";
532 LOG(
"DISSF",
pINFO) <<
"Unphys. slow rescaling var: xc = " << xc;
535#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
537 <<
"Calculating PDFs @ xc (slow rescaling) = " << x <<
", Q2 = " << Q2val;
539 fPDFc->Calculate(xc, Q2pdf);
545 <<
"The event is below the charm threshold (mcharm = " <<
fMc <<
")";
554 this->
KFactors(interaction, kval_u, kval_d, ksea_u, ksea_d);
556#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
558 LOG(
"DISSF",
pDEBUG) <<
"U: Kval = " << kval_u <<
", Ksea = " << ksea_u;
559 LOG(
"DISSF",
pDEBUG) <<
"D: Kval = " << kval_d <<
", Ksea = " << ksea_d;
569 fPDF->ScaleUpValence (kval_u);
570 fPDF->ScaleDownValence (kval_d);
571 fPDF->ScaleUpSea (ksea_u);
572 fPDF->ScaleDownSea (ksea_d);
573 fPDF->ScaleStrange (ksea_d);
574 fPDF->ScaleCharm (ksea_u);
576 fPDFc->ScaleUpValence (kval_u);
577 fPDFc->ScaleDownValence (kval_d);
578 fPDFc->ScaleUpSea (ksea_u);
579 fPDFc->ScaleDownSea (ksea_d);
580 fPDFc->ScaleStrange (ksea_d);
581 fPDFc->ScaleCharm (ksea_u);
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
virtual void Configure(const Registry &config)
bool GetParamDef(const RgKey &name, T &p, const T &def) const
const Algorithm * SubAlg(const RgKey ®istry_key) const
Initial State information.
const Target & Tgt(void) const
double ProbeE(RefFrame_t rf) const
Summary information for an interaction.
const Kinematics & Kine(void) const
const ProcessInfo & ProcInfo(void) const
const InitialState & InitState(void) const
Generated/set kinematical variables for an event.
bool KVSet(KineVar_t kv) const
double Q2(bool selected=false) const
double y(bool selected=false) const
double x(bool selected=false) const
Pure abstract base class. Defines the PDFModelI interface to be implemented by wrapper classes to exi...
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsWeakNC(void) const
bool IsWeakCC(void) const
bool IsDarkMatter(void) const
virtual void LoadConfig(void)
virtual ~QPMDISStrucFuncBase()
virtual double Q2(const Interaction *i) const
virtual double R(const Interaction *i) const
virtual void InitPDF(void)
virtual double ScalingVar(const Interaction *i) const
double fVus
CKM element Vcs used.
virtual double NuclMod(const Interaction *i) const
double fVud
CKM element Vud used.
PDF * fPDFc
computed PDFs @ (slow-rescaling-var,Q2)
double fLowQ2CutoffF1F2
Set min for relation between 2xF1 and F2.
bool fUse2016Corrections
Use 2016 SF relation corrections.
double fQ2min
min Q^2 allowed for PDFs: PDF(Q2<Q2min):=PDF(Q2min)
double fMc
charm mass used
bool fIncludeNuclMod
include nuclear factor (shadowing, anti-shadowing,...)?
double fVcs
CKM element Vcs used.
double fVcd
CKM element Vcd used.
void Configure(const Registry &config)
virtual void CalcPDFs(const Interaction *i) const
virtual void Calculate(const Interaction *interaction) const
Calculate the structure functions F1-F6 for the input interaction.
bool fIncludeR
include R (~FL) in DIS SF calculation?
virtual void KFactors(const Interaction *i, double &kuv, double &kdv, double &kus, double &kds) const
PDF * fPDF
computed PDFs @ (x,Q2)
bool fCharmOff
turn charm production off?
A registry. Provides the container for algorithm configuration parameters.
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
int HitNucPdg(void) const
const TLorentzVector & HitNucP4(void) const
TLorentzVector * HitNucP4Ptr(void) const
int HitQrkPdg(void) const
bool HitSeaQrk(void) const
bool HitQrkIsSet(void) const
static const double kNucleonMass2
bool IsAntiSQuark(int pdgc)
bool IsAntiUQuark(int pdgc)
bool IsNeutrino(int pdgc)
bool IsAntiCQuark(int pdgc)
bool IsAntiDQuark(int pdgc)
bool IsChargedLepton(int pdgc)
bool IsDarkMatter(int pdgc)
bool IsAntiNeutrino(int pdgc)
double SlowRescalingVar(double x, double Q2, double M, double mc)
bool IsAboveCharmThreshold(double x, double Q2, double M, double mc)
double DISNuclFactor(double x, int A)
double RWhitlow(double x, double Q2)
THE MAIN GENIE PROJECT NAMESPACE
const UInt_t kINoNuclearCorrection
if set, inhibit nuclear corrections
const UInt_t kIAssumeFreeNucleon