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
120 ::electromagnetic::kMinQ2Limit;
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.";
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
virtual const Registry & GetConfig(void) const
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
virtual const AlgId & Id(void) const
Get algorithm ID.
Singleton class to load & serve tables of Fermi momentum constants.
const FermiMomentumTable * GetTable(string name)
static FermiMomentumTablePool * Instance(void)
A table of Fermi momentum constants.
double FindClosestKF(int target_pdgc, int nucleon_pdgc) const
virtual double q0Min() const =0
virtual double qMagMax() const =0
virtual double q0Max() const =0
virtual double qMagMin() const =0
Creates hadron tensor objects for use in cross section calculations.
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
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const InitialState & InitState(void) const
static string AsString(KinePhaseSpace_t kps)
double GetKV(KineVar_t kv) const
Abstract interface for an object that computes the elements ( , , etc.) and structure functions ( ,...
virtual double dSigma_dT_dCosTheta_rosenbluth(const Interaction *interaction, double Q_value) const =0
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsWeakNC(void) const
bool IsWeakCC(void) const
A registry. Provides the container for algorithm configuration parameters.
const genie::HadronTensorModelI * fHadronTensorModel
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
const XSecScaleI * fMECScaleAlg
double Integral(const Interaction *i) const
double PairRatio(const Interaction *i, const std::string &final_state_ratio="pnFraction") const
const XSecIntegratorI * fXSecIntegrator
GSL numerical integrator.
void LoadConfig(void)
Load algorithm configuration.
double fXSecCCScale
External scaling factor for this cross section.
void Configure(const Registry &config)
virtual ~SuSAv2MECPXSec()
double Qvalue(const Interaction &interaction) const
const QvalueShifter * fQvalueShifter
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
Cross Section Integrator Interface.
This class is responsible to compute a scaling factor for the XSec.
static const double kMinQ2Limit
bool IsNeutrino(int pdgc)
bool IsChargedLepton(int pdgc)
int IonPdgCodeToZ(int pdgc)
bool IsAntiNeutrino(int pdgc)
int IonPdgCodeToA(int pdgc)
double Qvalue(int targetpdg, int nupdg)
bool Getq0q3FromTlCostl(double Tl, double costl, double Enu, double ml, double &q0, double &q3)
THE MAIN GENIE PROJECT NAMESPACE
enum genie::HadronTensorType HadronTensorType_t
enum genie::EKinePhaseSpace KinePhaseSpace_t
const UInt_t kISkipProcessChk
if set, skip process validity checks