49 using namespace genie;
63 #ifdef _G_REWEIGHT_CCRES_DEBUG_ 172 bool is_res =
event.Summary()->ProcInfo().IsResonant();
173 bool is_cc =
event.Summary()->ProcInfo().IsWeakCC();
174 if(!is_res || !is_cc)
return 1.;
176 int nupdg =
event.Probe()->Pdg();
199 AlgId id(
"genie::ReinSehgalRESPXSec",
"Default");
234 #ifdef _G_REWEIGHT_CCRES_DEBUG_ 235 fTestFile =
new TFile(
"./ccres_reweight_test.root",
"recreate");
236 fTestNtp =
new TNtupleD(
"testntp",
"",
"E:Q2:W:wght");
243 if(!tweaked)
return 1.0;
254 if(!tweaked)
return 1.0;
260 double old_xsec =
event.DiffXSec();
261 double old_weight =
event.Weight();
263 double new_weight = old_weight * (new_xsec/old_xsec);
275 if(!tweaked)
return 1.0;
281 double old_xsec =
event.DiffXSec();
282 double old_weight =
event.Weight();
284 double new_weight = old_weight * (new_xsec/old_xsec);
292 double old_integrated_xsec =
fXSecModelDef -> Integral(interaction);
293 double twk_integrated_xsec =
fXSecModel -> Integral(interaction);
294 assert(twk_integrated_xsec > 0);
295 new_weight *= (old_integrated_xsec/twk_integrated_xsec);
303 #ifdef _G_REWEIGHT_CCRES_DEBUG_ 305 double Q2 = interaction->
Kine().
Q2(
true);
306 double W = interaction->
Kine().
W(
true);
307 fTestNtp->Fill(E,Q2,W,new_weight);
virtual const Registry & GetConfig(void) const
Get configuration registry.
Cross Section Calculation Interface.
tweak Mv CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
double W(bool selected=false) const
tweak Mv CCRES, affects d2sigma(CCRES)/dWdQ2 in shape only (normalized to constant integral) ...
#include "Numerical/GSFunc.h"
static const int kModeNormAndMaMvShape
double Q2(const Interaction *const i)
Registry * fXSecModelConfig
config in tweaked model
Kinematics * KinePtr(void) const
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
double CalcWeightMaMv(const EventRecord &event)
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
Algorithm abstract base class.
RgDbl GetDouble(RgKey key) const
void Reset(void)
set all nuisance parameters to default values
static const int kModeMaMv
double OneSigmaErr(GSyst_t syst, int sign=0) const
bool fRewNumu
reweight nu_mu CC?
XSecAlgorithmI * fXSecModelDef
default model
Summary information for an interaction.
void UseSelectedKinematics(void)
bool fRewNue
reweight nu_e CC?
const Kinematics & Kine(void) const
virtual void Configure(const Registry &config)
Configure the algorithm.
static const double kASmallNum
An enumeration of systematic parameters.
void AdoptSubstructure(void)
Algorithm * AdoptAlgorithm(const AlgId &algid) const
bool fRewNuebar
reweight nu_e_bar CC?
double CalcWeightMaMvShape(const EventRecord &event)
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?
Algorithm ID (algorithm name + configuration set name)
tweak CCRES normalization
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
static AlgFactory * Instance()
tweak Ma CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
A registry. Provides the container for algorithm configuration parameters.
string fMvPath
M_{V} path in configuration.
tweak Ma CCRES, affects d2sigma(CCRES)/dWdQ2 in shape only (normalized to constant integral) ...
string fMaPath
M_{A} path in configuration.
const InitialState & InitState(void) const
int fMode
0: Ma/Mv, 1: Norm and MaShape/MvShape
static GSystUncertainty * Instance(void)
bool fRewNumubar
reweight nu_mu_bar CC?
double Q2(bool selected=false) const
void ClearRunningValues(void)
The GENIE Algorithm Factory.
double CalcWeightNorm(const EventRecord &event)
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...
void SetSystematic(GSyst_t syst, double val)
update the value for the specified nuisance param
Event finding and building.
XSecAlgorithmI * fXSecModel
tweaked model