34 using namespace genie;
67 <<
"Adding event generation driver for initial state = " 68 << init_state.AsString();
71 fGPool.insert( GEVGPool::value_type(init_state.AsString(), evg_driver) );
79 map<ScatteringType_t,KinePhaseSpace_t>::value_type(sct,kps));
92 const InitialState & init_state = interaction.InitState();
96 <<
"Adding generator driver for init state: " << init_state.
AsString();
99 fGPool.insert( GEVGPool::value_type(init_state.
AsString(), evg_driver) );
107 <<
"No event generator thread for interaction: " << interaction;
115 <<
"No cross section model for interaction: " << interaction;
130 interaction.KinePtr()->UseSelectedKinematics();
134 if(interaction.ProcInfo().IsQuasiElastic())
137 double old_xsec =
event.DiffXSec();
138 double old_weight =
event.Weight();
139 double new_xsec = xsec_model->
XSec(&interaction,kps);
140 double new_weight = old_weight * (new_xsec/old_xsec);
143 double old_integrated_xsec =
event.XSec();
144 double new_integrated_xsec = xsec_model->
Integral(&interaction);
145 assert(new_integrated_xsec > 0);
146 new_weight *= (old_integrated_xsec/new_integrated_xsec);
150 if(interaction.ProcInfo().IsQuasiElastic())
154 interaction.KinePtr()->ClearRunningValues();
157 <<
"Event d{xsec}/dK : " << old_xsec <<
" --> " << new_xsec;
159 <<
"Event weight : " << old_weight <<
" ---> " << new_weight;
Cross Section Calculation Interface.
#include "Numerical/GSFunc.h"
virtual Interaction * Summary(void) const
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
const EventGeneratorI * FindGenerator(const Interaction *interaction) const
Defines the EventGeneratorI interface.
GEVGDriver * FindDriver(const InitialState &init) const
enum genie::EKinePhaseSpace KinePhaseSpace_t
Summary information for an interaction.
void DiffCrossSecType(ScatteringType_t sct, KinePhaseSpace_t kps)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
virtual double Integral(const Interaction *i) const =0
string AsString(void) const
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
enum genie::EScatteringType ScatteringType_t
const UInt_t kIAssumeFreeNucleon
void Configure(int nu_pdgc, int Z, int A)
map< ScatteringType_t, KinePhaseSpace_t > fCrossSecModelPhSp
double NewWeight(const EventRecord &event, bool shape_only=false)
Event finding and building.
void HandleInitState(const InitialState &init_state)
Initial State information.