42 using namespace genie;
53 #ifdef _G_REWEIGHT_CCQE_VEC_DEBUG_ 100 if(!tweaked)
return 1.;
106 if(!is_qe || !is_cc)
return 1.;
111 int nupdg =
event.Probe()->Pdg();
129 double old_weight =
event.Weight();
130 double def_xsec =
event.DiffXSec();
135 assert(def_integrated_xsec > 0.);
136 assert(dpl_integrated_xsec > 0.);
139 double def_ratio = def_xsec / def_integrated_xsec;
140 double dpl_ratio = dpl_xsec / dpl_integrated_xsec;
142 assert(def_ratio > 0.);
145 double weight = old_weight * (dial * dpl_ratio + (1-dial)*def_ratio) / def_ratio;
147 #ifdef _G_REWEIGHT_CCQE_VEC_DEBUG_ 149 double Q2 = interaction->
Kine().
Q2(
true);
151 E,Q2,weight,def_integrated_xsec,dpl_integrated_xsec,def_xsec,dpl_xsec);
162 AlgId id0(
"genie::LwlynSmithQELCCPXSec",
"Default");
167 AlgId id1(
"genie::LwlynSmithQELCCPXSec",
"DipoleELFF");
179 #ifdef _G_REWEIGHT_CCQE_VEC_DEBUG_ 180 fTestFile =
new TFile(
"./ccqevec_reweight_test.root",
"recreate");
181 fTestNtp =
new TNtupleD(
"testntp",
"",
"E:Q2:wght:sig0:sig:dsig0:dsig");
Cross Section Calculation Interface.
void SetSystematic(GSyst_t syst, double val)
update the value for the specified nuisance param
bool IsWeakCC(void) const
#include "Numerical/GSFunc.h"
XSecAlgorithmI * fXSecModel_dpl
CCQE model with dipole f/f ("maximally" tweaked)
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.
bool IsCharmEvent(void) const
Summary information for an interaction.
void UseSelectedKinematics(void)
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
virtual double Integral(const Interaction *i) const =0
const Kinematics & Kine(void) const
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
XSecAlgorithmI * fXSecModel_bba
CCQE model with BBA05 f/f (default)
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
bool fRewNue
reweight nu_e CC?
static const double kASmallNum
An enumeration of systematic parameters.
void AdoptSubstructure(void)
Algorithm * AdoptAlgorithm(const AlgId &algid) const
tweak elastic nucleon form factors (BBA/default -> dipole) - shape only effect of dsigma(CCQE)/dQ2 ...
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()
void Reset(void)
set all nuisance parameters to default values
~GReWeightNuXSecCCQEvec()
const UInt_t kIAssumeFreeNucleon
const XclsTag & ExclTag(void) const
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?
bool fRewNuebar
reweight nu_e_bar CC?
bool fRewNumubar
reweight nu_mu_bar CC?
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
double Q2(bool selected=false) const
The GENIE Algorithm Factory.
double ProbeE(RefFrame_t rf) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
bool fRewNumu
reweight nu_mu CC?
Event finding and building.