24 : mP_iff(nullptr), m_options(sim_params), m_polarized(polarized),
33 const std::vector<FormFactorCoherentSum>& weighted_formfactors,
36 if (weighted_formfactors.empty())
38 "IInterferenceFunctionStrategy::init: strategy gets no form factors.");
68 double min_array[] = {0.0, 0.0};
69 double max_array[] = {1.0, 1.0};
70 return mP_integrator->integrate(min_array, max_array, (
void*)&sim_element,
77 double par0 = fractions[0];
78 double par1 = fractions[1];
Defines many exception classes in namespace Exceptionss.
Defines class IInterferenceFunctionStrategy.
Defines and implements template class IntegratorMCMiser.
Defines class InterferenceFunctionNone.
Defines class SimulationElement.
Base class of all interference function strategy classes.
double evaluate_for_fixed_angles(double *fractions, size_t dim, void *params) const
virtual double scalarCalculation(const SimulationElement &sim_element) const =0
Evaluates the intensity in the scalar case.
double evaluate(const SimulationElement &sim_element) const
Calculates the intensity for scalar particles/interactions.
std::vector< FormFactorCoherentSum > m_formfactor_wrappers
virtual ~IInterferenceFunctionStrategy()
double evaluateSinglePoint(const SimulationElement &sim_element) const
IInterferenceFunctionStrategy(const SimulationOptions &sim_params, bool polarized)
void init(const std::vector< FormFactorCoherentSum > &weighted_formfactors, const IInterferenceFunction *p_iff)
Initializes the object with form factors and an interference function.
virtual void strategy_specific_post_init()
double MCIntegratedEvaluate(const SimulationElement &sim_element) const
Performs a Monte Carlo integration over the bin for the evaluation of the intensity.
virtual double polarizedCalculation(const SimulationElement &sim_element) const =0
Evaluates the intensity in the polarized case.
std::unique_ptr< IntegratorMCMiser< IInterferenceFunctionStrategy > > mP_integrator
std::unique_ptr< IInterferenceFunction > mP_iff
SimulationOptions m_options
Pure virtual base class of interference functions.
virtual IInterferenceFunction * clone() const =0
Returns a clone of this ISample object.
Default interference function (i.e.
Data stucture containing both input and output of a single detector cell.
double getSolidAngle() const
double getIntegrationFactor(double x, double y) const
Collect the different options for simulation.
size_t getMcPoints() const