45 using namespace genie;
163 bool is_res =
event.Summary()->ProcInfo().IsResonant();
164 bool is_nc =
event.Summary()->ProcInfo().IsWeakNC();
165 if(!is_res || !is_nc)
return 1.;
167 int nupdg =
event.Probe()->Pdg();
190 AlgId id(
"genie::ReinSehgalRESPXSec",
"Default");
229 if(!tweaked)
return 1.0;
240 if(!tweaked)
return 1.0;
246 double old_xsec =
event.DiffXSec();
247 double old_weight =
event.Weight();
249 double new_weight = old_weight * (new_xsec/old_xsec);
261 if(!tweaked)
return 1.0;
267 double old_xsec =
event.DiffXSec();
268 double old_weight =
event.Weight();
270 double new_weight = old_weight * (new_xsec/old_xsec);
278 double old_integrated_xsec =
fXSecModelDef -> Integral(interaction);
279 double twk_integrated_xsec =
fXSecModel -> Integral(interaction);
280 assert(twk_integrated_xsec > 0);
281 new_weight *= (old_integrated_xsec/twk_integrated_xsec);
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
virtual const Registry & GetConfig(void) const
Get configuration registry.
Cross Section Calculation Interface.
Registry * fXSecModelConfig
config in tweaked model
bool fRewNuebar
reweight nu_e_bar NC?
XSecAlgorithmI * fXSecModelDef
default model
#include "Numerical/GSFunc.h"
bool fRewNue
reweight nu_e NC?
bool fRewNumu
reweight nu_mu NC?
double CalcWeightNorm(const EventRecord &event)
Kinematics * KinePtr(void) const
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
Algorithm abstract base class.
RgDbl GetDouble(RgKey key) const
double CalcWeightMaMv(const EventRecord &event)
int fMode
0: Ma/Mv, 1: Norm and MaShape/MvShape
double OneSigmaErr(GSyst_t syst, int sign=0) const
bool fRewNumubar
reweight nu_mu_bar NC?
Summary information for an interaction.
void UseSelectedKinematics(void)
double CalcWeightMaMvShape(const EventRecord &event)
virtual void Configure(const Registry &config)
Configure the algorithm.
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?
void SetSystematic(GSyst_t syst, double val)
update the value for the specified nuisance param
static const double kASmallNum
An enumeration of systematic parameters.
void AdoptSubstructure(void)
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
Algorithm * AdoptAlgorithm(const AlgId &algid) const
static const int kModeMaMv
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
string fMvPath
M_{V} path in configuration.
Algorithm ID (algorithm name + configuration set name)
tweak Mv NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
static AlgFactory * Instance()
void Reset(void)
set all nuisance parameters to default values
tweak NCRES normalization
A registry. Provides the container for algorithm configuration parameters.
static const int kModeNormAndMaMvShape
XSecAlgorithmI * fXSecModel
tweaked model
static GSystUncertainty * Instance(void)
void ClearRunningValues(void)
The GENIE Algorithm Factory.
tweak Ma NCRES, affects d2sigma(NCRES)/dWdQ2 in shape only (normalized to constant integral) ...
tweak Mv NCRES, affects d2sigma(NCRES)/dWdQ2 in shape only (normalized to constant integral) ...
void Set(RgIMapPair entry)
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
string fMaPath
M_{A} path in configuration.
Event finding and building.
tweak Ma NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization