40 using namespace genie;
132 double twk_dial = it->second;
134 fRCurr[syst] = TMath::Max(0.,curr);
143 if(!is_dis)
return 1.;
145 bool selected =
true;
146 double W = interaction->
Kine().
W(selected);
147 bool in_transition = (W<
fWmin);
148 if(!in_transition)
return 1.;
159 TIter event_iter(&event);
160 while ( (p = dynamic_cast<GHepParticle *>(event_iter.Next())) ) {
164 if(imom == -1)
continue;
177 if(nhadmult < 2 || nhadmult > 3)
return 1.;
178 if(nnuc != 1)
return 1.;
183 double curr =
fRCurr[syst];
184 double def =
fRDef[syst];
186 if(def>0. && curr>=0.) {
187 double wght = curr / def;
202 fRDef.insert(map<GSyst_t,double>::value_type(
204 fRDef.insert(map<GSyst_t,double>::value_type(
206 fRDef.insert(map<GSyst_t,double>::value_type(
208 fRDef.insert(map<GSyst_t,double>::value_type(
210 fRDef.insert(map<GSyst_t,double>::value_type(
212 fRDef.insert(map<GSyst_t,double>::value_type(
214 fRDef.insert(map<GSyst_t,double>::value_type(
216 fRDef.insert(map<GSyst_t,double>::value_type(
218 fRDef.insert(map<GSyst_t,double>::value_type(
220 fRDef.insert(map<GSyst_t,double>::value_type(
222 fRDef.insert(map<GSyst_t,double>::value_type(
224 fRDef.insert(map<GSyst_t,double>::value_type(
226 fRDef.insert(map<GSyst_t,double>::value_type(
228 fRDef.insert(map<GSyst_t,double>::value_type(
230 fRDef.insert(map<GSyst_t,double>::value_type(
232 fRDef.insert(map<GSyst_t,double>::value_type(
236 for( ; it !=
fRDef.end(); ++it) {
237 fRCurr.insert(map<GSyst_t,double>::value_type(it->first, it->second));
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
tweak the 1pi non-RES bkg in the RES region, for v+p CC
void Reset(void)
set all nuisance parameters to default values
double W(bool selected=false) const
tweak the 1pi non-RES bkg in the RES region, for v+p NC
static GSyst_t RBkg(InteractionType_t itype, int probe, int hitnuc, int npi)
InteractionType_t InteractionTypeId(void) const
map< GSyst_t, double > fRTwkDial
#include "Numerical/GSFunc.h"
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
int HitNucPdg(void) const
A singleton class holding all configuration registries built while parsing all loaded XML configurati...
~GReWeightNonResonanceBkg()
tweak the 1pi non-RES bkg in the RES region, for vbar+n CC
RgDbl GetDouble(RgKey key) const
double OneSigmaErr(GSyst_t syst, int sign=0) const
int FirstMother(void) const
Summary information for an interaction.
tweak the 2pi non-RES bkg in the RES region, for vbar+p NC
map< GSyst_t, double > fRCurr
tweak the 2pi non-RES bkg in the RES region, for vbar+n NC
tweak the 1pi non-RES bkg in the RES region, for v+n CC
const Kinematics & Kine(void) const
tweak the 2pi non-RES bkg in the RES region, for v+n CC
GReWeightNonResonanceBkg()
tweak the 2pi non-RES bkg in the RES region, for vbar+n CC
An enumeration of systematic parameters.
tweak the 1pi non-RES bkg in the RES region, for vbar+p CC
tweak the 2pi non-RES bkg in the RES region, for v+p NC
Registry * GlobalParameterList(void) const
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
bool IsDeepInelastic(void) const
tweak the 2pi non-RES bkg in the RES region, for v+n NC
void SetWminCut(double W)
A registry. Provides the container for algorithm configuration parameters.
tweak the 1pi non-RES bkg in the RES region, for v+n NC
tweak the 2pi non-RES bkg in the RES region, for vbar+p CC
double fWmin
W_{min} cut. Reweight only events with W < W_{min}.
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?
static GSystUncertainty * Instance(void)
const Target & Tgt(void) const
map< GSyst_t, double > fRDef
tweak the 1pi non-RES bkg in the RES region, for vbar+p NC
const int kPdgHadronicSyst
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
enum genie::EInteractionType InteractionType_t
STDHEP-like event record entry that can fit a particle or a nucleus.
tweak the 2pi non-RES bkg in the RES region, for v+p CC
tweak the 1pi non-RES bkg in the RES region, for vbar+n NC
Event finding and building.
static AlgConfigPool * Instance()
void SetSystematic(GSyst_t syst, double val)
update the value for the specified nuisance param