25 using namespace genie;
55 bool need_to_scale =
false;
73 if(tensor_pdg != target_pdg) need_to_scale =
true;
86 LOG(
"SuSAv2MEC",
pWARN) <<
"Failed to load a hadronic tensor for the" 87 " nuclide " << tensor_pdg;
104 double Delta_Q_value =
Qvalue( * interaction ) ;
108 double Q0min = tensor->
q0Min();
109 double Q0max = tensor->
q0Max();
110 double Q3min = tensor->
qMagMin();
111 double Q3max = tensor->
qMagMax();
112 if (Q0-Delta_Q_value < Q0min || Q0-Delta_Q_value > Q0max || Q3 < Q3min || Q3 > Q3max) {
126 double Q2 = Q3*Q3 - Q0*Q0;
127 if ( Q2 < Q2min )
return 0.;
142 if ( need_to_scale ) {
147 LOG(
"SuSAv2MEC",
pDEBUG) <<
"KF_tgt = " << KF_tgt;
148 LOG(
"SuSAv2MEC",
pDEBUG) <<
"KF_ten = " << KF_ten;
150 double scaleFact = (A_request/A_ten)*(KF_tgt/KF_ten)*(KF_tgt/KF_ten);
162 <<
"Doesn't support transformation from " 209 LOG(
"SuSAv2MEC",
pWARN) <<
"Failed to load a hadronic tensor for the" 225 double Q0min = tensor->
q0Min();
226 double Q0max = tensor->
q0Max();
227 double Q3min = tensor->
qMagMin();
228 double Q3max = tensor->
qMagMax();
229 if (Q0 < Q0min || Q0 > Q0max || Q3 < Q3min || Q3 > Q3max) {
237 double Delta_Q_value =
Qvalue( * interaction ) ;
245 if(xsec_pn==0) xsec_pn = 0.00001*xsec_all;
247 double ratio = (1e10*xsec_pn)/(1e10*xsec_all);
263 if ( !proc_info.
IsMEC() ) {
273 bool prc_ok = ( proc_info.
IsWeakCC() && (is_nu || is_nub) )
274 || ( proc_info.
IsEM() && is_chgl );
276 if ( !prc_ok )
return false;
296 if ( A_request == 4 ) {
300 else if (A_request < 9) {
303 else if (A_request >= 9 && A_request < 15) {
306 else if(A_request >= 15 && A_request < 22) {
313 else if(A_request >= 22 && A_request < 40) {
316 else if(A_request >= 40 && A_request < 56) {
319 else if(A_request >= 56 && A_request < 119) {
322 else if(A_request >= 119 && A_request < 206) {
325 else if(A_request >= 206) {
337 double Delta_Q_value = 2*(Eb_tgt-Eb_ten);
346 double total_Q_value = tensor_Q_value + Delta_Q_value ;
348 Delta_Q_value += Q_value_shift ;
360 if ( isEM ) Delta_Q_value -= 2. * Eb_ten;
362 return Delta_Q_value ;
379 bool good_config = true ;
385 good_config = false ;
386 LOG(
"SuSAv2MECPXSec",
pERROR) <<
"The required HadronTensorAlg does not exist. AlgoID is : " <<
SubAlg(
"HadronTensorAlg")->
Id();
391 good_config = false ;
392 LOG(
"SuSAv2MECPXSec",
pERROR) <<
"The required NumericalIntegrationAlg does not exist. AlgId is : " <<
SubAlg(
"NumericalIntegrationAlg")->
Id() ;
401 this->
GetParam(
"RFG-NucRemovalE@Pdg=1000060120",
fEbC );
402 this->
GetParam(
"RFG-NucRemovalE@Pdg=1000080160",
fEbO );
414 if(
GetConfig().Exists(
"MECScaleAlg") ) {
417 good_config = false ;
418 LOG(
"Susav2MECPXSec",
pERROR) <<
"The required MECScaleAlg cannot be casted. AlgID is : " <<
SubAlg(
"MECScaleAlg")->
Id() ;
424 if(
GetConfig().Exists(
"QvalueShifterAlg") ) {
427 good_config = false ;
428 LOG(
"SuSAv2MECPXSec",
pERROR) <<
"The required QvalueShifterAlg does not exist. AlgId is : " <<
SubAlg(
"QvalueShifterAlg")->
Id() ;
432 if( ! good_config ) {
433 LOG(
"SuSAv2MECPXSec",
pERROR) <<
"Configuration has failed.";
Cross Section Calculation Interface.
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
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)
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.
double PairRatio(const Interaction *i) const
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
virtual const Registry & GetConfig(void) const
static const double kMinQ2Limit
double Qvalue(int targetpdg, int nupdg)
Summary information for an interaction.
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()
virtual double q0Min() const =0
const FermiMomentumTable * GetTable(string name)
virtual double GetScaling(const Interaction &) const =0
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
void Configure(const Registry &config)
virtual double dSigma_dT_dCosTheta_rosenbluth(const Interaction *interaction, double Q_value) 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.
const QvalueShifter * fQvalueShifter
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
double fXSecScale
External scaling factor for this cross section.
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
virtual double qMagMax() const =0
Creates hadron tensor objects for use in cross section calculations.
int IonPdgCodeToZ(int pdgc)
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
const XSecScaleI * fMECScaleAlg
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
const Algorithm * SubAlg(const RgKey ®istry_key) const