26#include "marley/Reaction.hh"
27#include "marley/WeightCalculator.hh"
45 class StrengthVariationWeightCalculator :
public WeightCalculator {
59 static std::vector< std::shared_ptr<
73 std::shared_ptr< std::mt19937_64 > rng,
74 const std::string& resolved_reaction_file );
79 const std::string& resolved_reaction_file );
84 size_t matrix_element_index,
85 const std::string& resolved_reaction_file );
93 std::shared_ptr< std::mt19937_64 >
rng_;
Stores event-related information.
A neutrino-nucleus reaction whose cross section is calculated according to the allowed approximation.
The MARLEY Event generator.
ProcessType
Enumerated type describing the kind of scattering process represented by a Reaction.
@ Unknown
Dummy value used for error handling.
WeightCalculator that varies nuclear matrix element strengths according to their experimental uncerta...
Reaction::ProcessType process_type_
Process type of the matched Reaction.
void ensure_initialized(marley::Generator &gen) const
Lazy initialization of per-instance varied strengths.
std::string resolved_reaction_file_
Resolved path of the reaction input file of interest.
const DiscreteNuclearReaction * dnr_
Pointer to the matched DiscreteNuclearReaction.
size_t me_idx_
Index of the single matrix element to vary (unisim mode)
double sigma_factor_
Signed sigma factor for systematic shifts (shift and unisim modes)
static std::vector< std::shared_ptr< StrengthVariationWeightCalculator > > create_instances(const marley::JSON &config, marley::Generator &gen)
Static factory: validates JSON configuration and creates all variation instances. Called by the Weigh...
VariationMode
Supported variation modes.
bool initialized_
Whether lazy initialization has been completed.
std::vector< double > varied_
Pre-generated varied strengths (one per matrix element in the matched Reaction)
int target_pdg_
Target nucleus PDG code for the matched Reaction.
VariationMode mode_
Variation mode for this instance.
virtual double weight(HepMC3::GenEvent &event, marley::Generator &gen) const override
Compute the weight for the given event.
std::shared_ptr< std::mt19937_64 > rng_
Shared RNG (seeded once, shared across N instances)