29 #include "Framework/Conventions/GBuild.h" 40 using namespace genie;
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__ 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;
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;
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;
Pure Abstract Base Class. Defines the DISStructureFuncModelI interface to be implemented by any algor...
bool HitSeaQrk(void) const
bool IsWeakCC(void) const
double fVcd
CKM element Vcd used.
bool IsNeutrino(int pdgc)
THE MAIN GENIE PROJECT NAMESPACE
double fQ2min
min Q^2 allowed for PDFs: PDF(Q2<Q2min):=PDF(Q2min)
int HitNucPdg(void) const
PDF * fPDFc
computed PDFs @ (slow-rescaling-var,Q2)
int HitQrkPdg(void) const
Generated/set kinematical variables for an event.
double fVud
CKM element Vud used.
bool IsDarkMatter(int pdgc)
bool IsChargedLepton(int pdgc)
double x(bool selected=false) const
bool fIncludeNuclMod
include nuclear factor (shadowing, anti-shadowing,...)?
double fMc
charm mass used
bool IsAntiSQuark(int pdgc)
Pure abstract base class. Defines the PDFModelI interface to be implemented by wrapper classes to exi...
virtual void InitPDF(void)
bool IsAntiDQuark(int pdgc)
PDF * fPDF
computed PDFs @ (x,Q2)
bool fIncludeR
include R (~FL) in DIS SF calculation?
void ScaleDownValence(double kscale)
double y(bool selected=false) const
virtual double NuclMod(const Interaction *i) const
Summary information for an interaction.
const TLorentzVector & HitNucP4(void) const
double SlowRescalingVar(double x, double Q2, double M, double mc)
bool IsWeakNC(void) const
const UInt_t kINoNuclearCorrection
if set, inhibit nuclear corrections
static QChar PDF((ushort) 0x202c)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool KVSet(KineVar_t kv) const
virtual double Q2(const Interaction *i) const
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsAntiNeutrino(int pdgc)
const Kinematics & Kine(void) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
virtual void Configure(const Registry &config)
bool IsAboveCharmThreshold(double x, double Q2, double M, double mc)
bool fCharmOff
turn charm production off?
static const double kNucleonMass2
virtual double ScalingVar(const Interaction *i) const
void Configure(const Registry &config)
void Calculate(double x, double q2)
double fLowQ2CutoffF1F2
Set min for relation between 2xF1 and F2.
virtual void Calculate(const Interaction *interaction) const
Calculate the structure functions F1-F6 for the input interaction.
double fVus
CKM element Vcs used.
virtual ~QPMDISStrucFuncBase()
double fVcs
CKM element Vcs used.
virtual void KFactors(const Interaction *i, double &kuv, double &kdv, double &kus, double &kds) const
void ScaleUpValence(double kscale)
TLorentzVector * HitNucP4Ptr(void) const
bool HitQrkIsSet(void) const
bool IsDarkMatter(void) const
A registry. Provides the container for algorithm configuration parameters.
const UInt_t kIAssumeFreeNucleon
bool IsAntiCQuark(int pdgc)
virtual double R(const Interaction *i) const
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
double Q2(bool selected=false) const
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
virtual void CalcPDFs(const Interaction *i) const
bool fUse2016Corrections
Use 2016 SF relation corrections.
void ScaleUpSea(double kscale)
void ScaleCharm(double kscale)
double DISNuclFactor(double x, int A)
double RWhitlow(double x, double Q2)
void ScaleDownSea(double kscale)
double ProbeE(RefFrame_t rf) const
bool IsAntiUQuark(int pdgc)
Initial State information.
virtual void LoadConfig(void)
void ScaleStrange(double kscale)
const Algorithm * SubAlg(const RgKey ®istry_key) const