25 using namespace genie;
55 bool need_to_scale =
false;
73 if(tensor_pdg != target_pdg) need_to_scale =
true;
84 LOG(
"SuSAv2MEC",
pWARN) <<
"Failed to load a hadronic tensor for the"
85 " nuclide " << tensor_pdg;
102 double Delta_Q_value =
Qvalue( * interaction ) ;
106 double Q0min = tensor->
q0Min();
107 double Q0max = tensor->
q0Max();
108 double Q3min = tensor->
qMagMin();
109 double Q3max = tensor->
qMagMax();
110 if (Q0-Delta_Q_value < Q0min || Q0-Delta_Q_value > Q0max || Q3 < Q3min || Q3 > Q3max) {
119 if ( interaction->
ProcInfo().
IsEM() ) Q2min = genie::utils::kinematics
124 double Q2 = Q3*Q3 - Q0*Q0;
125 if ( Q2 < Q2min )
return 0.;
140 if ( need_to_scale ) {
145 LOG(
"SuSAv2MEC",
pDEBUG) <<
"KF_tgt = " << KF_tgt;
146 LOG(
"SuSAv2MEC",
pDEBUG) <<
"KF_ten = " << KF_ten;
148 double scaleFact = (A_request/A_ten)*(KF_tgt/KF_ten)*(KF_tgt/KF_ten);
164 <<
"Doesn't support transformation from "
174 const std::string& final_state_ratio)
const
216 LOG(
"SuSAv2MEC",
pWARN) <<
"Failed to load a hadronic tensor for the"
222 LOG(
"SuSAv2MEC",
pWARN) <<
"Failed to load pn hadronic tensor for the"
228 LOG(
"SuSAv2MEC",
pWARN) <<
"Failed to load pp hadronic tensor for the"
244 double Q0min = tensor->
q0Min();
245 double Q0max = tensor->
q0Max();
246 double Q3min = tensor->
qMagMin();
247 double Q3max = tensor->
qMagMax();
248 if (Q0 < Q0min || Q0 > Q0max || Q3 < Q3min || Q3 > Q3max) {
256 double Delta_Q_value =
Qvalue( * interaction ) ;
263 if (final_state_ratio ==
"pnFraction") {
268 if(xsec_pn==0) xsec_pn = 0.00001*xsec_all;
270 double pn_ratio = (1e10*xsec_pn)/(1e10*xsec_all);
274 }
else if (final_state_ratio ==
"ppFraction") {
277 if(xsec_pp==0) xsec_pp = 0.00001*xsec_all;
279 double pp_ratio = (1e10*xsec_pp)/(1e10*xsec_all);
299 if ( !proc_info.
IsMEC() ) {
309 bool prc_ok = ( proc_info.
IsWeakCC() && (is_nu || is_nub) )
310 || ( proc_info.
IsEM() && is_chgl );
312 if ( !prc_ok )
return false;
332 if ( A_request == 4 ) {
336 else if (A_request < 9) {
339 else if (A_request >= 9 && A_request < 15) {
342 else if(A_request >= 15 && A_request < 22) {
349 else if(A_request >= 22 && A_request < 40) {
352 else if(A_request >= 40 && A_request < 56) {
355 else if(A_request >= 56 && A_request < 119) {
358 else if(A_request >= 119 && A_request < 206) {
361 else if(A_request >= 206) {
373 double Delta_Q_value = 2*(Eb_tgt-Eb_ten);
382 double total_Q_value = tensor_Q_value + Delta_Q_value ;
384 Delta_Q_value += Q_value_shift ;
396 if ( isEM ) Delta_Q_value -= 2. * Eb_ten;
398 return Delta_Q_value ;
415 bool good_config = true ;
423 good_config = false ;
424 LOG(
"SuSAv2MECPXSec",
pERROR) <<
"The required HadronTensorAlg does not exist. AlgoID is : " <<
SubAlg(
"HadronTensorAlg")->
Id();
429 good_config = false ;
430 LOG(
"SuSAv2MECPXSec",
pERROR) <<
"The required NumericalIntegrationAlg does not exist. AlgId is : " <<
SubAlg(
"NumericalIntegrationAlg")->
Id() ;
439 this->
GetParam(
"RFG-NucRemovalE@Pdg=1000060120",
fEbC );
440 this->
GetParam(
"RFG-NucRemovalE@Pdg=1000080160",
fEbO );
452 if(
GetConfig().Exists(
"MECScaleAlg") ) {
455 good_config = false ;
456 LOG(
"Susav2MECPXSec",
pERROR) <<
"The required MECScaleAlg cannot be casted. AlgID is : " <<
SubAlg(
"MECScaleAlg")->
Id() ;
462 if(
GetConfig().Exists(
"QvalueShifterAlg") ) {
465 good_config = false ;
466 LOG(
"SuSAv2MECPXSec",
pERROR) <<
"The required QvalueShifterAlg does not exist. AlgId is : " <<
SubAlg(
"QvalueShifterAlg")->
Id() ;
470 if( ! good_config ) {
471 LOG(
"SuSAv2MECPXSec",
pERROR) <<
"Configuration has failed.";
Cross Section Calculation Interface.
virtual const HadronTensorI * GetTensor(int tensor_pdg, HadronTensorType_t type) const =0
bool IsWeakCC(void) const
bool IsNeutrino(int pdgc)
Cross Section Integrator Interface.
double Q2(const Interaction *const i)
int HitNucPdg(void) const
const genie::HadronTensorModelI * fHadronTensorModel
This class is responsible to compute a scaling factor for the XSec.
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
int IonPdgCodeToA(int pdgc)
static FermiMomentumTablePool * Instance(void)
virtual double dSigma_dT_dCosTheta_rosenbluth(const Interaction *interaction, double Q_value) const =0
const XSecIntegratorI * fXSecIntegrator
GSL numerical integrator.
bool IsChargedLepton(int pdgc)
Abstract interface for an object that computes the elements ( , , etc.) and structure functions ( ...
A table of Fermi momentum constants.
enum genie::HadronTensorType HadronTensorType_t
enum genie::EKinePhaseSpace KinePhaseSpace_t
virtual double q0Max() const =0
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.
double Integral(const Interaction *i) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
virtual ~SuSAv2MECPXSec()
const FermiMomentumTable * GetTable(string name)
static string AsString(KinePhaseSpace_t kps)
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
virtual void Configure(const Registry &config)
bool Getq0q3FromTlCostl(double Tl, double costl, double Enu, double ml, double &q0, double &q3)
void LoadConfig(void)
Load algorithm configuration.
double GetKV(KineVar_t kv) const
virtual double qMagMax() const =0
void Configure(const Registry &config)
virtual double q0Min() const =0
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
double Qvalue(const Interaction &interaction) const
virtual const AlgId & Id(void) const
Get algorithm ID.
A registry. Provides the container for algorithm configuration parameters.
double fXSecCCScale
External scaling factor for this cross section.
virtual double GetScaling(const Interaction &) const =0
const QvalueShifter * fQvalueShifter
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
Creates hadron tensor objects for use in cross section calculations.
int IonPdgCodeToZ(int pdgc)
virtual double qMagMin() const =0
double FindClosestKF(int target_pdgc, int nucleon_pdgc) 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
double PairRatio(const Interaction *i, const std::string &final_state_ratio="pnFraction") const
const XSecScaleI * fMECScaleAlg
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
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
const Algorithm * SubAlg(const RgKey ®istry_key) const