39 using namespace genie;
50 #ifdef _G_REWEIGHT_NCEL_DEBUG_ 110 fMaCurr = TMath::Max(0., fMaCurr );
111 fEtaCurr = TMath::Max(0., fEtaCurr );
128 if(!is_qe || !is_nc)
return 1.;
130 int nupdg =
event.Probe()->Pdg();
138 bool tweaked = tweaked_ma || tweaked_eta;
139 if(!tweaked)
return 1.0;
144 double old_xsec =
event.DiffXSec();
145 double old_weight =
event.Weight();
147 double new_weight = old_weight * (new_xsec/old_xsec);
154 #ifdef _G_REWEIGHT_NCEL_DEBUG_ 156 double Q2 = interaction->
Kine().
Q2(
true);
157 fTestNtp->Fill(E,Q2,new_weight);
168 AlgId id(
"genie::AhrensNCELPXSec",
"Default");
198 #ifdef _G_REWEIGHT_NCEL_DEBUG_ 199 fTestFile =
new TFile(
"./ncel_reweight_test.root",
"recreate");
200 fTestNtp =
new TNtupleD(
"testntp",
"",
"E:Q2:wght");
virtual const Registry & GetConfig(void) const
Get configuration registry.
Cross Section Calculation Interface.
bool fRewNumu
reweight nu_mu CC?
tweak NCEL strange axial form factor eta, affects dsigma(NCEL)/dQ2 both in shape and normalization ...
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
#include "Numerical/GSFunc.h"
void SetSystematic(GSyst_t syst, double val)
update the value for the specified nuisance param
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?
double Q2(const Interaction *const i)
Kinematics * KinePtr(void) const
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
bool IsQuasiElastic(void) const
Algorithm abstract base class.
void Reset(void)
set all nuisance parameters to default values
tweak Ma NCEL, affects dsigma(NCEL)/dQ2 both in shape and normalization
RgDbl GetDouble(RgKey key) const
Registry * fXSecModelConfig
config in tweaked model
XSecAlgorithmI * fXSecModel
tweaked model
void SetEtaPath(string p)
bool fRewNuebar
reweight nu_e_bar CC?
double OneSigmaErr(GSyst_t syst, int sign=0) const
XSecAlgorithmI * fXSecModelDef
default model
Summary information for an interaction.
void UseSelectedKinematics(void)
bool IsWeakNC(void) const
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
const Kinematics & Kine(void) const
virtual void Configure(const Registry &config)
Configure the algorithm.
string fEtaPath
eta path in config Registry
static const double kASmallNum
An enumeration of systematic parameters.
void AdoptSubstructure(void)
Algorithm * AdoptAlgorithm(const AlgId &algid) const
string fMaPath
M_{A} path in config Registry.
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Algorithm ID (algorithm name + configuration set name)
static AlgFactory * Instance()
bool fRewNue
reweight nu_e CC?
A registry. Provides the container for algorithm configuration parameters.
const UInt_t kIAssumeFreeNucleon
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
static GSystUncertainty * Instance(void)
double Q2(bool selected=false) const
void ClearRunningValues(void)
The GENIE Algorithm Factory.
void Set(RgIMapPair entry)
double ProbeE(RefFrame_t rf) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
Event finding and building.
bool fRewNumubar
reweight nu_mu_bar CC?