52 using std::ostringstream;
54 using namespace genie;
84 const InitialState & init_state = interaction -> InitState();
85 const ProcessInfo & proc_info = interaction -> ProcInfo();
90 double x = kinematics.
x();
91 double y = kinematics.
y();
95 double ml4 = ml2 * ml2;
96 double Mnuc2 = Mnuc * Mnuc;
98 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 100 <<
"Computing d2xsec/dxdy @ E = " << E <<
", x = " << x <<
", y = " <<
y;
107 int sign = (is_nubar_cc) ? -1 : 1;
112 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 133 if(proc_info.
IsEM()) {
141 double front_factor = (g2*Mnuc*
E) /
kPi;
144 double term1 = y * ( x*y + ml2/(2*E*Mnuc) );
145 double term2 = 1 - y - Mnuc*x*y/(2*
E) - ml2/(4*E2);
146 double term3 = sign * (x*y*(1-y/2) - y*ml2/(4*Mnuc*E));
147 double term4 = x*y*ml2/(2*Mnuc*
E) + ml4/(4*Mnuc2*E2);
148 double term5 = -1.*ml2/(2*Mnuc*
E);
150 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 152 <<
"\nd2xsec/dxdy ~ (" << term1 <<
")*F1+(" << term2 <<
")*F2+(" 153 << term3 <<
")*F3+(" << term4 <<
")*F4+(" << term5 <<
")*F5";
162 double xsec = front_factor * (term1 + term2 + term3 + term4 + term5);
163 xsec = TMath::Max(xsec,0.);
165 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 167 <<
"d2xsec/dxdy[FreeN] (E= " << E
168 <<
", x= " << x <<
", y= " << y <<
") = " <<
xsec;
175 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 176 LOG(
"DISPXSec",
pINFO) <<
"D/R Join scheme - suppression factor R = " <<
R;;
177 LOG(
"DISPXSec",
pINFO) <<
"d2xsec/dxdy[FreeN, D/R Join] " <<
xsec;
205 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 207 <<
"Subtracting charm piece: " << xsec_charm <<
" / out of " <<
xsec;
209 xsec = TMath::Max(0., xsec-xsec_charm);
226 const InitialState & init_state = interaction -> InitState();
227 int probe_pdg = init_state.
ProbePdg();
255 double x = in->
Kine().
x();
256 double y = in->
Kine().
y();
267 R = mprob->Integral(
"width");
279 string algkey = this->
Id().
Key() +
"/DIS-RES-Join";
282 ikey <<
"nu-pdgc:" << ist.
ProbePdg()
296 <<
"\n ** Creating cache branch - key = " <<
key;
298 cbr =
new CacheBranchFx(
"DIS Suppr. Factors in DIS/RES Join Scheme");
302 double WminSpl =
Wmin;
303 double WmaxSpl =
fWcut + 0.1;
304 double dW = (WmaxSpl-WminSpl)/(kN-1);
306 for(
int i=0;
i<kN;
i++) {
307 double W = WminSpl+
i*dW;
312 R = mprob->Integral(
"width");
318 if(!non_zero && R>0) {
322 dW = (WmaxSpl-WminSpl)/(kN-1);
325 <<
"Cached DIS XSec Suppr. factor (@ W=" << W <<
") = " <<
R;
336 if(Wo > Wmin && Wo <
fWcut-1E-2) {
338 R = cache_branch(Wo);
343 if (Wo > Wmin && Wo <
fWcut-1E-2) Ro =
R;
344 else if (Wo <= Wmin) Ro = 0.0;
348 <<
"DIS/RES Join: DIS xsec suppr. (W=" << Wo <<
") = " << Ro;
363 Registry r(
"QPMDISPXSec_specific",
false ) ;
365 RgKey xdefkey =
"XSecModel@genie::EventGenerator/DIS-CC-CHARM";
366 RgKey local_key =
"CharmXSec" ;
408 fSin48w = TMath::Power( TMath::Sin(thw), 4 );
428 string keysubstr = this->
Id().
Key() +
"/DIS-RES-Join";
439 RgKey local_key =
"CharmXSec" ;
443 <<
"Loading the cross section model: " << xalg;
void SetModel(const DISStructureFuncModelI *model)
Attach an algorithm.
Cross Section Calculation Interface.
Pure Abstract Base Class. Defines the DISStructureFuncModelI interface to be implemented by any algor...
bool IsWeakCC(void) const
double F2(void) const
Get the computed structure function F2.
double J(double q0, double q3, double Enu, double ml)
THE MAIN GENIE PROJECT NAMESPACE
Cross Section Integrator Interface.
double Q2(const Interaction *const i)
int HitNucPdg(void) const
Kinematics * KinePtr(void) const
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
const DISStructureFuncModelI * fDISSFModel
SF model.
double HitNucMass(void) const
Generated/set kinematical variables for an event.
double x(bool selected=false) const
enum genie::EKinePhaseSpace KinePhaseSpace_t
double XYtoW(double Ev, double M, double x, double y)
double fSin48w
sin^4(Weingberg angle)
void AddCacheBranch(string key, CacheBranchI *branch)
void SetCharm(int charm_pdgc=0)
double y(bool selected=false) const
double F4(void) const
Get the computed structure function F4.
Summary information for an interaction.
double F1(void) const
Get the computed structure function F1.
void AddValues(double x, double y)
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
bool IsWeakNC(void) const
bool BareXSecPreCalc(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
const XSecIntegratorI * fXSecIntegrator
diff. xsec integrator
static const double kAem2
void Configure(const Registry &config)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
string CacheBranchKey(string k0, string k1="", string k2="") const
double XYtoQ2(double Ev, double M, double x, double y)
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)
static const double kNeutronMass
double fScale
cross section scaling factor
string InteractionTypeAsString(void) const
virtual TH1D * MultiplicityProb(const Interaction *, Option_t *opt="") const =0
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
CacheBranchI * FindCacheBranch(string key)
finding/adding cache branches
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
double F5(void) const
Get the computed structure function F5.
bool IsDeepInelastic(void) const
XclsTag * ExclTagPtr(void) const
const XSecAlgorithmI * fCharmProdModel
double fWcut
apply DIS/RES joining scheme < Wcut
double F3(void) const
Get the computed structure function F3.
const HadronizationModelI * fHadronizationModel
hadronic multip. model
virtual const AlgId & Id(void) const
Get algorithm ID.
void SetW(double W, bool selected=false)
static RunOpt * Instance(void)
static const double kPionMass
bool HitNucIsSet(void) const
A registry. Provides the container for algorithm configuration parameters.
const UInt_t kIAssumeFreeNucleon
Pure abstract base class. Defines the HadronizationModelI interface to be implemented by any algorith...
bool IsNeutronOrProton(int pdgc)
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
assert(nhit_max >=nhit_nbins)
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
void Calculate(const Interaction *interaction)
Calculate the S/F's for the input interaction using the attached algorithm.
bool fUseCache
cache reduction factors used in joining scheme
void RmMatchedCacheBranches(string key_substring)
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
static Cache * Instance(void)
A simple cache branch storing the cached data in a TNtuple.
double Integral(const Interaction *i) const
double DISRESJoinSuppressionFactor(const Interaction *in) const
void Set(RgIMapPair entry)
double ProbeE(RefFrame_t rf) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
const UInt_t kISkipProcessChk
if set, skip process validity checks
static AlgConfigPool * Instance()
bool fUsingDisResJoin
use a DIS/RES joining scheme?
Initial State information.
const Algorithm * SubAlg(const RgKey ®istry_key) const