15 using namespace genie;
42 for(
unsigned int i = 0 ; i <
fXSections.size() ; ++ i ) {
58 for(
unsigned int i = 0 ; i <
fXSections.size() ; ++ i ) {
72 for(
unsigned int i = 0 ; i <
fXSections.size() ; ++ i ) {
102 bool good_config = true ;
105 bool Normalise = false ;
106 GetParam(
"Normalise", Normalise ) ;
115 good_config = false ;
116 LOG(
"XSecLinearCombinations",
pERROR) <<
"Sum of linear coefficients is zero. Cannot normalize " ;
124 std::vector<RgKey> XSectionsKeys ;
128 good_config = false ;
129 LOG(
"XSecLinearCombinations",
pERROR) <<
"Entries don't match" ;
130 LOG(
"XSecLinearCombinations",
pERROR) <<
"Cross Sections size: " << XSectionsKeys.size() ;
134 for(
unsigned int i = 0 ; i < XSectionsKeys.size() ; ++i ) {
135 fXSections.push_back( dynamic_cast<const XSecAlgorithmI *> ( this->
SubAlg( XSectionsKeys[i] ) ) );
137 good_config = false ;
138 LOG(
"XSecLinearCombinations",
pERROR) <<
"The SubAlg is not a XSecAlgorithmI";
142 if( ! good_config ) {
143 LOG(
"XSecLinearCombinations",
pERROR) <<
"XSecLinearCombilation Configuration has failed.";
Cross Section Calculation Interface.
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
THE MAIN GENIE PROJECT NAMESPACE
int GetParamVect(const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
Handle to load vectors of parameters.
enum genie::EKinePhaseSpace KinePhaseSpace_t
virtual ~XSecLinearCombinations()
double Integral(const Interaction *i) const
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
std::vector< double > fLinearCoefficients
void Configure(const Registry &config)
Summary information for an interaction.
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
constexpr bool is_valid(IDNumber_t< L > const id) noexcept
virtual void Configure(const Registry &config)
std::vector< const XSecAlgorithmI * > fXSections
A registry. Provides the container for algorithm configuration parameters.
int GetParamVectKeys(const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Algorithm * SubAlg(const RgKey ®istry_key) const