14 using namespace genie;
34 RgKey key =
"XSecAlg@Interaction=" + inter_str;
43 if ( citer == cend ) {
48 if ( temp_reg.
Exists(key) ) {
74 else return citer->second;
82 if ( !alg_to_use )
return 0.;
83 else return alg_to_use->
XSec( interaction, kps );
90 if ( !alg_to_use )
return 0.;
91 else return alg_to_use->
Integral( interaction );
99 if ( !alg_to_use )
return false;
125 if ( temp_reg.
Exists(
"DefaultXSecAlg") ) {
127 this->
SubAlg(
"DefaultXSecAlg") );
Cross Section Calculation Interface.
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
THE MAIN GENIE PROJECT NAMESPACE
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
virtual ~HybridXSecAlgorithm()
enum genie::EKinePhaseSpace KinePhaseSpace_t
string AsString(void) const
virtual const Registry & GetConfig(void) const
Summary information for an interaction.
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
virtual double Integral(const Interaction *i) const =0
virtual void Configure(const Registry &config)
const XSecAlgorithmI * ChooseXSecAlg(const Interaction &interaction) const
void Configure(const Registry &config)
A registry. Provides the container for algorithm configuration parameters.
std::map< string, const XSecAlgorithmI * > fXSecAlgMap
virtual bool ValidProcess(const Interaction *i) const =0
Can this cross section algorithm handle the input process?
bool Exists(RgKey key) const
item with input key exists?
const XSecAlgorithmI * fDefaultXSecAlg
Optional XSecAlgorithmI to use by default.
void LoadConfig(void)
Load algorithm configuration.
double Integral(const Interaction *i) const
const UInt_t kISkipProcessChk
if set, skip process validity checks
const Algorithm * SubAlg(const RgKey ®istry_key) const