30 using namespace genie;
67 if ( interaction->
ProcInfo().
IsEM() ) Q2min = genie::utils::kinematics
72 double Q2 = Q3*Q3 - Q0*Q0;
73 if ( Q2 < Q2min )
return 0.;
88 int tensor_pdg_susa = target_pdg;
89 int tensor_pdg_crpa = target_pdg;
92 bool need_to_scale_susa =
false;
93 bool need_to_scale_crpa =
false;
136 if(A_request == 40 && Z_request == 18){
181 double Eb_ten_susa=0;
182 double Eb_ten_crpa=0;
184 if ( A_request <= 4 ) {
192 else if (A_request < 9) {
199 else if (A_request >= 9 && A_request < 15) {
206 else if(A_request >= 15 && A_request < 22) {
213 else if(A_request == 40 && Z_request == 18) {
217 tensor_pdg_crpa = 1000180400;
221 else if(A_request >= 22 && A_request < 40) {
228 else if(A_request >= 40 && A_request < 56) {
235 else if(A_request >= 56 && A_request < 119) {
242 else if(A_request >= 119 && A_request < 206) {
249 else if(A_request >= 206) {
257 if (tensor_pdg_susa != target_pdg) need_to_scale_susa =
true;
258 if (tensor_pdg_crpa != target_pdg) need_to_scale_crpa =
true;
270 if ( !tensor_susa ) {
271 LOG(
"SuSAv2QE",
pWARN) <<
"Failed to load a SuSAv2 hadronic tensor for the"
272 " nuclide " << tensor_pdg_susa;
284 if ( !tensor_blen ) {
285 LOG(
"SuSAv2QE",
pWARN) <<
"Failed to load a blending SuSAv2 hadronic tensor for the"
286 " nuclide " << tensor_pdg_crpa;
297 if ( !tensor_crpa ) {
298 LOG(
"SuSAv2QE",
pWARN) <<
"Failed to load a CRPA or HF hadronic tensor for the"
299 " nuclide " << tensor_pdg_crpa;
313 double Delta_Q_value_susa = Eb_tgt-Eb_ten_susa;
314 double Delta_Q_value_crpa = Eb_tgt-Eb_ten_crpa;
315 double Delta_Q_value_blen = Eb_tgt-Eb_ten_crpa;
324 double total_Q_value_susa = tensor_Q_value_susa + Delta_Q_value_susa ;
328 double total_Q_value_crpa = tensor_Q_value_crpa + Delta_Q_value_crpa ;
331 Delta_Q_value_susa += Q_value_shift_susa;
332 Delta_Q_value_crpa += Q_value_shift_crpa;
333 Delta_Q_value_blen += Q_value_shift_crpa;
339 double Q0min = tensor_susa->
q0Min();
340 double Q0max = tensor_susa->
q0Max();
341 double Q3min = tensor_susa->
qMagMin();
342 double Q3max = tensor_susa->
qMagMax();
343 if (Q0-Delta_Q_value_susa < Q0min || Q0-Delta_Q_value_susa > Q0max || Q3 < Q3min || Q3 > Q3max) {
350 double Q0min = tensor_crpa->
q0Min();
351 double Q0max = tensor_crpa->
q0Max();
352 double Q3min = tensor_crpa->
qMagMin();
353 double Q3max = tensor_crpa->
qMagMax();
354 if (Q0-Delta_Q_value_crpa < Q0min || Q0-Delta_Q_value_crpa > Q0max || Q3 < Q3min || Q3 > Q3max) {
360 double Q0min = tensor_blen->
q0Min();
361 double Q0max = tensor_blen->
q0Max();
362 double Q3min = tensor_blen->
qMagMin();
363 double Q3max = tensor_blen->
qMagMax();
364 if (Q0-Delta_Q_value_blen < Q0min || Q0-Delta_Q_value_blen > Q0max || Q3 < Q3min || Q3 > Q3max) {
370 double Q0min = tensor_crpa->
q0Min();
371 double Q0max = tensor_blen->
q0Max();
372 double Q3min = tensor_crpa->
qMagMin();
373 double Q3max = tensor_blen->
qMagMax();
374 if (Q0-Delta_Q_value_crpa < Q0min || Q0-Delta_Q_value_blen > Q0max || Q3 < Q3min || Q3 > Q3max) {
383 double xsec_susa = 0;
384 double xsec_crpa = 0;
385 double xsec_blen = 0;
391 xsec_susa =
XSecScaling(xsec_susa, interaction, target_pdg, tensor_pdg_susa, need_to_scale_susa);
400 LOG(
"SuSAv2QE",
pDEBUG) <<
"SuSAv2 (blending) XSec in cm2 / atom is " << xsec_blen/(
units::cm2);
405 int N_tensor = A_tensor-Z_tensor;
410 xsec_blen =
XSecScaling(xsec_blen, interaction, target_pdg, tensor_pdg_crpa, need_to_scale_crpa);
421 int N_tensor = A_tensor-Z_tensor;
428 xsec_crpa =
XSecScaling(xsec_crpa, interaction, target_pdg, tensor_pdg_crpa, need_to_scale_crpa);
448 double CRPAFrac = 1 - SuSAFrac;
449 xsec = SuSAFrac*xsec_blen + CRPAFrac*xsec_crpa;
450 LOG(
"SuSAv2QE",
pDEBUG) <<
"Q0 is " << Q0;
451 LOG(
"SuSAv2QE",
pDEBUG) <<
"SuSAFrac is " << SuSAFrac;
452 LOG(
"SuSAv2QE",
pDEBUG) <<
"CRPAFrac is " << CRPAFrac;
453 LOG(
"SuSAv2QE",
pDEBUG) <<
"xsec is " << xsec;
457 xsec = TMath::Sin(phi_q)*TMath::Sin(phi_q)*xsec_blen + TMath::Cos(phi_q)*TMath::Cos(phi_q)*xsec_crpa;
458 LOG(
"SuSAv2QE",
pDEBUG) <<
"Q3 is " << Q3;
459 LOG(
"SuSAv2QE",
pDEBUG) <<
"SuSAFrac is " << TMath::Sin(phi_q)*TMath::Sin(phi_q);
460 LOG(
"SuSAv2QE",
pDEBUG) <<
"CRPAFrac is " << TMath::Cos(phi_q)*TMath::Cos(phi_q);
461 LOG(
"SuSAv2QE",
pDEBUG) <<
"xsec is " << xsec;
466 double xsec_scale = 1 ;
475 <<
"Doesn't support transformation from "
503 LOG(
"SuSAv2QE",
pERROR) <<
"Unrecognized probe " << probe_pdg
504 <<
" encountered for a WeakCC process";
525 <<
" encountered in SuSAv2QELPXSec::XSec()";
538 if ( need_to_scale ) {
543 LOG(
"SuSAv2QE",
pDEBUG) <<
"KF_tgt = " << KF_tgt;
544 LOG(
"SuSAv2QE",
pDEBUG) <<
"KF_ten = " << KF_ten;
545 double scaleFact = (KF_ten/KF_tgt);
581 bool prcok = ( proc_info.
IsWeakCC() && ((isP && isnub) || (isN && isnu)) )
582 || ( proc_info.
IsEM() && is_chgl && (isP || isN) );
583 if ( !prcok )
return false;
602 bool good_config = true ;
611 GetParam(
"Model-Config", modelChoice ) ;
622 this->
SubAlg(
"HadronTensorAlg") );
627 this->
SubAlg(
"XSec-Integrator") );
636 this->
GetParam(
"RFG-NucRemovalE@Pdg=1000060120",
fEbC );
637 this->
GetParam(
"RFG-NucRemovalE@Pdg=1000080160",
fEbO );
649 if(
GetConfig().Exists(
"QvalueShifterAlg") ) {
655 good_config = false ;
657 LOG(
"SuSAv2QE",
pERROR) <<
"The required QvalueShifterAlg is not valid. AlgID is : "
658 <<
SubAlg(
"QvalueShifterAlg")->
Id() ;
661 if( ! good_config ) {
662 LOG(
"SuSAv2QE",
pERROR) <<
"Configuration has failed.";
Cross Section Calculation Interface.
void LoadConfig(void)
Load algorithm configuration.
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
int blendMode
Blending start/end q0 value for the combined models.
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)
virtual double dSigma_dT_dCosTheta_rosenbluth(const Interaction *interaction, double Q_value) const =0
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.
enum genie::HadronTensorType HadronTensorType_t
enum genie::EKinePhaseSpace KinePhaseSpace_t
virtual double q0Max() 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...
double fXSecCCScale
External scaling factor for this cross section.
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 XSecScaling(double xsec, const Interaction *i, int target_pdg, int tensor_pdg, bool need_to_scale) const
virtual double qMagMax() const =0
virtual double q0Min() 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.
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
int IonPdgCodeToZ(int pdgc)
virtual double qMagMin() 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
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
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
Initial State information.
const Algorithm * SubAlg(const RgKey ®istry_key) const