26 using namespace genie;
52 int tensor_pdg = target_pdg;
54 bool need_to_scale =
false;
68 if ( A_request <= 4 ) {
73 else if (A_request < 9) {
77 else if (A_request >= 9 && A_request < 15) {
81 else if(A_request >= 15 && A_request < 22) {
85 else if(A_request >= 22 && A_request < 40) {
89 else if(A_request >= 40 && A_request < 56) {
93 else if(A_request >= 56 && A_request < 119) {
97 else if(A_request >= 119 && A_request < 206) {
101 else if(A_request >= 206) {
106 if (tensor_pdg != target_pdg) need_to_scale =
true;
117 LOG(
"SuSAv2QE",
pWARN) <<
"Failed to load a hadronic tensor for the" 118 " nuclide " << tensor_pdg;
136 double Delta_Q_value = Eb_tgt-Eb_ten;
145 double total_Q_value = tensor_Q_value + Delta_Q_value ;
147 Delta_Q_value += Q_value_shift ;
152 double Q0min = tensor->
q0Min();
153 double Q0max = tensor->
q0Max();
154 double Q3min = tensor->
qMagMin();
155 double Q3max = tensor->
qMagMax();
156 if (Q0-Delta_Q_value < Q0min || Q0-Delta_Q_value > Q0max || Q3 < Q3min || Q3 > Q3max) {
170 double Q2 = Q3*Q3 - Q0*Q0;
171 if ( Q2 < Q2min )
return 0.;
188 LOG(
"SuSAv2QE",
pERROR) <<
"Unrecognized probe " << probe_pdg
189 <<
" encountered for a WeakCC process";
210 <<
" encountered in SuSAv2QELPXSec::XSec()";
220 if ( need_to_scale ) {
225 LOG(
"SuSAv2QE",
pDEBUG) <<
"KF_tgt = " << KF_tgt;
226 LOG(
"SuSAv2QE",
pDEBUG) <<
"KF_ten = " << KF_ten;
227 double scaleFact = (KF_ten/KF_tgt);
236 <<
"Doesn't support transformation from " 273 bool prcok = ( proc_info.
IsWeakCC() && ((isP && isnub) || (isN && isnu)) )
274 || ( proc_info.
IsEM() && is_chgl && (isP || isN) );
275 if ( !prcok )
return false;
294 bool good_config = true ;
300 this->
SubAlg(
"HadronTensorAlg") );
305 this->
SubAlg(
"XSec-Integrator") );
314 this->
GetParam(
"RFG-NucRemovalE@Pdg=1000060120",
fEbC );
315 this->
GetParam(
"RFG-NucRemovalE@Pdg=1000080160",
fEbO );
328 if(
GetConfig().Exists(
"QvalueShifterAlg") ) {
334 good_config = false ;
336 LOG(
"SuSAv2QE",
pERROR) <<
"The required QvalueShifterAlg is not valid. AlgID is : " 337 <<
SubAlg(
"QvalueShifterAlg")->
Id() ;
340 if( ! good_config ) {
341 LOG(
"SuSAv2QE",
pERROR) <<
"Configuration has failed.";
Cross Section Calculation Interface.
void LoadConfig(void)
Load algorithm configuration.
bool IsWeakCC(void) const
bool IsNeutrino(int pdgc)
THE MAIN GENIE PROJECT NAMESPACE
Cross Section Integrator Interface.
double Q2(const Interaction *const i)
int HitNucPdg(void) const
bool IsQuasiElastic(void) const
const XSecIntegratorI * fXSecIntegrator
GSL numerical integrator.
const QvalueShifter * fQvalueShifter
bool IsNucleus(void) const
int IonPdgCodeToA(int pdgc)
static FermiMomentumTablePool * Instance(void)
bool IsChargedLepton(int pdgc)
Creates hadron tensor objects for calculations of quasielastic cross sections using the SuSAv2 approa...
Abstract interface for an object that computes the elements ( , , etc.) and structure functions ( ...
A table of Fermi momentum constants.
virtual double qMagMin() const =0
enum genie::HadronTensorType HadronTensorType_t
enum genie::EKinePhaseSpace KinePhaseSpace_t
virtual const HadronTensorI * GetTensor(int tensor_pdg, HadronTensorType_t type) const =0
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
virtual const Registry & GetConfig(void) const
static const double kMinQ2Limit
double Qvalue(int targetpdg, int nupdg)
Summary information for an interaction.
bool IsWeakNC(void) const
Singleton class to load & serve tables of Fermi momentum constants.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
virtual double q0Min() const =0
const FermiMomentumTable * GetTable(string name)
static constexpr double cm2
static string AsString(KinePhaseSpace_t kps)
virtual ~SuSAv2QELPXSec()
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)
string AsString(void) const
bool Getq0q3FromTlCostl(double Tl, double costl, double Enu, double ml, double &q0, double &q3)
double GetKV(KineVar_t kv) const
const HadronTensorModelI * fHadronTensorModel
double fXSecScale
External scaling factor for this cross section.
virtual double dSigma_dT_dCosTheta_rosenbluth(const Interaction *interaction, double Q_value) const =0
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
virtual const AlgId & Id(void) const
Get algorithm ID.
A registry. Provides the container for algorithm configuration parameters.
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
virtual double qMagMax() const =0
void Configure(const Registry &config)
double FindClosestKF(int target_pdgc, int nucleon_pdgc) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
double Integral(const Interaction *i) const
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
virtual double q0Max() const =0
Initial State information.
const Algorithm * SubAlg(const RgKey ®istry_key) const