49 using namespace genie;
63 #ifdef _G_REWEIGHT_DIS_DEBUG_ 143 double fracerr_aht = 0.;
144 double fracerr_bht = 0.;
145 double fracerr_cv1u = 0.;
146 double fracerr_cv2u = 0.;
186 if(!tweaked)
return 1.0;
191 if(!is_dis)
return 1.;
193 bool charm =
event.Summary()->ExclTag().IsCharmEvent();
198 if(is_cc && !
fRewCC)
return 1.;
199 if(is_nc && !
fRewNC)
return 1.;
207 bool selected =
true;
208 double W = interaction->
Kine().
W (selected);
209 double Q2 = interaction->
Kine().
Q2(selected);
211 if(!passes_kine_cuts)
return 1.;
227 #ifdef _G_REWEIGHT_DIS_DEBUG_ 229 double x = interaction->
Kine().
x(
true);
230 double y = interaction->
Kine().
y(
true);
231 int ccnc = (is_cc) ? 1 : 0;
235 fTestNtp->Fill(E,x,y,nupdg,nuc,qrk,sea,ccnc,wght);
247 double old_xsec =
event.DiffXSec();
248 double old_weight =
event.Weight();
250 double weight = old_weight * (twk_xsec/old_xsec);
263 double old_xsec =
event.DiffXSec();
264 double old_weight =
event.Weight();
266 double weight = old_weight * (twk_xsec/old_xsec);
269 double old_integrated_xsec =
fXSecModelDef -> Integral(interaction);
270 double twk_integrated_xsec =
fXSecModel -> Integral(interaction);
272 assert(twk_integrated_xsec > 0);
273 weight *= (old_integrated_xsec/twk_integrated_xsec);
282 AlgId id(
"genie::QPMDISPXSec",
"Default");
327 #ifdef _G_REWEIGHT_DIS_DEBUG_ 328 fTestFile =
new TFile(
"./dis_reweight_test.root",
"recreate");
329 fTestNtp =
new TNtupleD(
"testntp",
"",
"E:x:y:nu:nuc:qrk:sea:ccnc:wght");
virtual const Registry & GetConfig(void) const
Get configuration registry.
Cross Section Calculation Interface.
double W(bool selected=false) const
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?
bool HitSeaQrk(void) const
bool IsWeakCC(void) const
void SetSystematic(GSyst_t syst, double val)
update the value for the specified nuisance param
#include "Numerical/GSFunc.h"
double fBhtBYTwkDial
tweak dial for BY parameter: Bht
double Q2(const Interaction *const i)
int HitNucPdg(void) const
Kinematics * KinePtr(void) const
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
int HitQrkPdg(void) const
void SetBhtBYPath(string p)
tweak the Bodek-Yang model parameter B_{ht} - shape only effect to d2sigma(DIS)/dxdy ...
Algorithm abstract base class.
double x(bool selected=false) const
void SetAhtBYPath(string p)
void SetWminCut(double W)
RgDbl GetDouble(RgKey key) const
XSecAlgorithmI * fXSecModelDef
default model
XSecAlgorithmI * fXSecModel
tweaked model
double OneSigmaErr(GSyst_t syst, int sign=0) const
double y(bool selected=false) const
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
Summary information for an interaction.
void UseSelectedKinematics(void)
bool fRewNue
reweight nu_e?
double fCV1uBYTwkDial
tweak dial for BY parameter: CV1u
static const int kModeABCV12uShape
bool IsWeakNC(void) const
int fMode
0: Aht,Bht,CV1u,CV2u, 1:AhtShape,BhtShape,CV1uShape,CV2uShape
bool fRewNuebar
reweight nu_e_bar?
void SetQ2minCut(double Q2)
void SetCV2uBYPath(string p)
tweak the Bodek-Yang model parameter CV2u - incl. both shape and normalization effect ...
const Kinematics & Kine(void) const
virtual void Configure(const Registry &config)
Configure the algorithm.
static const double kASmallNum
void Reset(void)
set all nuisance parameters to default values
An enumeration of systematic parameters.
void AdoptSubstructure(void)
Algorithm * AdoptAlgorithm(const AlgId &algid) const
double fCV2uBYTwkDial
tweak dial for BY parameter: CV2u
double fWmin
W_{min} cut. Reweight only events with W > W_{min}.
double fAhtBYTwkDial
tweak dial for BY parameter: Aht
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
bool IsDeepInelastic(void) const
Algorithm ID (algorithm name + configuration set name)
tweak the Bodek-Yang model parameter A_{ht} - incl. both shape and normalization effect ...
double fQ2min
Q2_{min} cut. Reweight only events with Q2 > Q2_{min}.
tweak the Bodek-Yang model parameter A_{ht} - shape only effect to d2sigma(DIS)/dxdy ...
void SetCV1uBYPath(string p)
static AlgFactory * Instance()
double CalcWeightABCV12u(const genie::EventRecord &event)
rew. Aht,Bht,CV1u,CV2u
A registry. Provides the container for algorithm configuration parameters.
Registry * fXSecModelConfig
config in tweaked model
tweak the Bodek-Yang model parameter CV1u - shape only effect to d2sigma(DIS)/dxdy ...
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
static GSystUncertainty * Instance(void)
tweak the Bodek-Yang model parameter CV1u - incl. both shape and normalization effect ...
double Q2(bool selected=false) const
void ClearRunningValues(void)
const Target & Tgt(void) const
static const int kModeABCV12u
The GENIE Algorithm Factory.
double CalcWeightABCV12uShape(const genie::EventRecord &event)
rew. AhtShape,BhtShape,CV1uShape,CV2uShape
bool fRewNumu
reweight nu_mu?
tweak the Bodek-Yang model parameter CV2u - shape only effect to d2sigma(DIS)/dxdy ...
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...
bool fRewNumubar
reweight nu_mu_bar?
Event finding and building.
tweak the Bodek-Yang model parameter B_{ht} - incl. both shape and normalization effect ...