15 #include "TLorentzVector.h" 19 #include "Conventions/Units.h" 20 #include "EVGCore/EventRecord.h" 21 #include "GHEP/GHepUtils.h" 22 #include "Messenger/Messenger.h" 24 using genie::Messenger;
26 #include "ReWeight/GReWeightI.h" 27 #include "ReWeight/GSystSet.h" 28 #include "ReWeight/GSyst.h" 29 #include "ReWeight/GReWeight.h" 30 #include "ReWeight/GReWeightNuXSecNCEL.h" 31 #include "ReWeight/GReWeightNuXSecCCQE.h" 32 #include "ReWeight/GReWeightNuXSecCCRES.h" 33 #include "ReWeight/GReWeightNuXSecCOH.h" 34 #include "ReWeight/GReWeightNonResonanceBkg.h" 35 #include "ReWeight/GReWeightFGM.h" 36 #include "ReWeight/GReWeightDISNuclMod.h" 37 #include "ReWeight/GReWeightResonanceDecay.h" 38 #include "ReWeight/GReWeightFZone.h" 39 #include "ReWeight/GReWeightINuke.h" 40 #include "ReWeight/GReWeightAGKY.h" 41 #include "ReWeight/GReWeightNuXSecCCQEvec.h" 42 #include "ReWeight/GReWeightNuXSecNCRES.h" 43 #include "ReWeight/GReWeightNuXSecDIS.h" 44 #include "ReWeight/GReWeightNuXSecNC.h" 45 #include "ReWeight/GSystUncertainty.h" 46 #include "ReWeight/GReWeightUtils.h" 48 #include "Geo/ROOTGeomAnalyzer.h" 49 #include "Geo/GeomVolSelectorFiducial.h" 50 #include "Geo/GeomVolSelectorRockBox.h" 51 #include "Utils/StringUtils.h" 52 #include "Utils/XmlParserUtils.h" 53 #include "Interaction/InitialState.h" 54 #include "Interaction/Interaction.h" 55 #include "Interaction/Kinematics.h" 56 #include "Interaction/KPhaseSpace.h" 57 #include "Interaction/ProcessInfo.h" 58 #include "Interaction/XclsTag.h" 59 #include "GHEP/GHepParticle.h" 60 #include "PDG/PDGCodeList.h" 61 #include "Conventions/Constants.h" 80 fReweightQEVec(false),
81 fReweightCCRes(false),
82 fReweightNCRes(false),
83 fReweightResBkg(false),
84 fReweightResDecay(false),
89 fReweightDISNucMod(false),
91 fReweightFZone(false),
92 fReweightINuke(false),
101 LOG_INFO(
"GENIEReweight") <<
"Create GENIEReweight object";
103 fWcalc =
new genie::rew::GReWeight();
236 double nominal_value;
238 return nominal_value;
243 int label = (int)rLabel;
244 bool in_loop =
false;
245 bool found_par =
false;
246 double parameter = -10000;
255 if(found_par)
return parameter;
257 LOG_WARN(
"GENIEReweight") <<
"Parameter " << label <<
" not set yet or does not exist";
262 LOG_WARN(
"GENIEReweight") <<
"Vector of parameters has not been initialized yet (Size is 0).";
269 int label = (int)rLabel;
270 LOG_INFO(
"GENIEReweight") <<
"Adding parameter: " << genie::rew::GSyst::AsString(genie::rew::EGSyst(label)) <<
". With value: " <<
value;
278 int label = (int)rLabel;
293 LOG_INFO(
"GENIEReweight") <<
"Configure weight calculator";
463 fWcalc =
new genie::rew::GReWeight();
471 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for NC Elastic Reweighting";
483 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for QE Axial Mass Reweighting";
491 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for QE Vector Mass Reweighting";
498 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Z-expansion QE Reweighting";
509 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for CC Resonance Reweighting";
520 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for NC Resonance Reweighting";
531 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for CC and NC Resonance Reweighting";
545 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Coherant Reweighting";
554 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Non-Resonance Background Reweighting (Neutrino Single Pion)";
565 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Non-Resonance Background Reweighting (Anti-Neutrino Single Pion)";
575 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Non-Resonance Background Reweighting (Neutrino Two Pion)";
586 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Non-Resonance Background Reweighting (Anti-Neutrino Two Pion)";
596 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Resoncance Decay Parameters";
611 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for NC Cross Section Scale";
618 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for DIS Form Factor Model Reweighting";
637 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for DIS Nuclear Model";
644 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for DIS AGKY Hadronization Model Reweighting";
656 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Intranuke Model Reweighting";
672 LOG_WARN(
"GENIEReweight") <<
"That is not a valid Intranuke parameter Intranuke not configured";
679 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Formation Zone Reweighting";
686 LOG_INFO(
"GENIEReweight") <<
"Configuring GENIEReweight for Fermi Gas Model Reweighting";
697 LOG_INFO(
"GENIEReweight") <<
"Adding NC elastic weight calculator";
698 fWcalc->AdoptWghtCalc(
"xsec_ncel",
new GReWeightNuXSecNCEL );
703 LOG_INFO(
"GENIEReweight") <<
"Adding CCQE axial FF weight calculator ";
704 fWcalc->AdoptWghtCalc(
"xsec_ccqe",
new GReWeightNuXSecCCQE );
705 GReWeightNuXSecCCQE *rwccqe = dynamic_cast <GReWeightNuXSecCCQE*> (
fWcalc->WghtCalc(
"xsec_ccqe"));
708 LOG_INFO(
"GENIEReweight") <<
"in z-expansion mode";
709 rwccqe->SetMode(GReWeightNuXSecCCQE::kModeZExp);
712 LOG_INFO(
"GENIEReweight") <<
"in axial mass (QE) rate+shape mode";
713 rwccqe->SetMode(GReWeightNuXSecCCQE::kModeMa);
716 LOG_INFO(
"GENIEReweight") <<
"in axial mass (QE) shape only mode";
722 LOG_INFO(
"GENIEReweight") <<
"Adding CCQE vector FF weight calculator";
723 fWcalc->AdoptWghtCalc(
"xsec_ccqe_vec",
new GReWeightNuXSecCCQEvec );
728 LOG_INFO(
"GENIEReweight") <<
"Adding CC resonance weight calculator";
729 fWcalc->AdoptWghtCalc(
"xsec_ccres",
new GReWeightNuXSecCCRES );
731 LOG_INFO(
"GENIEReweight") <<
"in axial mass (Res) rate+shape mode";
732 GReWeightNuXSecCCRES * rwccres =
dynamic_cast<GReWeightNuXSecCCRES *
> (
fWcalc->WghtCalc(
"xsec_ccres"));
733 rwccres->SetMode(GReWeightNuXSecCCRES::kModeMaMv);
736 LOG_INFO(
"GENIEReweight") <<
"in axial mass (Res) shape only mode";
742 LOG_INFO(
"GENIEReweight") <<
"Adding NC resonance weight calculator";
743 fWcalc->AdoptWghtCalc(
"xsec_ncres",
new GReWeightNuXSecNCRES );
745 LOG_INFO(
"GENIEReweight") <<
"in axial mass (Res) rate+shape mode";
746 GReWeightNuXSecNCRES * rwncres =
dynamic_cast<GReWeightNuXSecNCRES *
> (
fWcalc->WghtCalc(
"xsec_ncres"));
747 rwncres->SetMode(GReWeightNuXSecNCRES::kModeMaMv);
750 LOG_INFO(
"GENIEReweight") <<
"in axial mass (Res) shape only mode";
756 LOG_INFO(
"GENIEReweight") <<
"Adding low Q^2 DIS (KNO) weight calculator";
757 fWcalc->AdoptWghtCalc(
"xsec_nonresbkg",
new GReWeightNonResonanceBkg );
762 LOG_INFO(
"GENIEReweight") <<
"Adding resonance decay weight calculator";
763 fWcalc->AdoptWghtCalc(
"hadro_res_decay",
new GReWeightResonanceDecay );
768 LOG_INFO(
"GENIEReweight") <<
"Adding NC total cross section weight calculator";
769 fWcalc->AdoptWghtCalc(
"xsec_nc",
new GReWeightNuXSecNC );
774 LOG_INFO(
"GENIEReweight") <<
"Adding DIS (Bodek-Yang) weight calculator";
775 fWcalc->AdoptWghtCalc(
"xsec_dis",
new GReWeightNuXSecDIS );
777 LOG_INFO(
"GENIEReweight") <<
"in shape+rate mode";
778 GReWeightNuXSecDIS * rwdis =
dynamic_cast<GReWeightNuXSecDIS *
> (
fWcalc->WghtCalc(
"xsec_dis"));
779 rwdis->SetMode(GReWeightNuXSecDIS::kModeABCV12u);
782 LOG_INFO(
"GENIEReweight") <<
"in shape only mode";
788 LOG_INFO(
"GENIEReweight") <<
"Adding coherant interaction model weight calculator";
789 fWcalc->AdoptWghtCalc(
"xsec_coh",
new GReWeightNuXSecCOH );
794 LOG_INFO(
"GENIEReweight") <<
"Adding hadronization (AGKY) model weight calculator";
795 fWcalc->AdoptWghtCalc(
"hadro_agky",
new GReWeightAGKY );
800 LOG_INFO(
"GENIEReweight") <<
"Adding DIS nuclear model weight calculator";
801 fWcalc->AdoptWghtCalc(
"nuclear_dis",
new GReWeightDISNuclMod );
806 LOG_INFO(
"GENIEReweight") <<
"Adding Fermi Gas Model (FGM) weight calculator";
807 fWcalc->AdoptWghtCalc(
"nuclear_qe",
new GReWeightFGM );
812 LOG_INFO(
"GENIEReweight") <<
"Adding Formation Zone weight calculator";
813 fWcalc->AdoptWghtCalc(
"hadro_fzone",
new GReWeightFZone );
818 LOG_INFO(
"GENIEReweight") <<
"Adding the Intra-Nuke weight calculator";
819 fWcalc->AdoptWghtCalc(
"hadro_intranuke",
new GReWeightINuke );
824 GSystSet & syst =
fWcalc->Systematics();
842 int iLabel = (int) label;
847 GSystUncertainty * gsysterr = GSystUncertainty::Instance();
856 sign = genie::utils::rew::Sign(value-nominal_def);
857 frac_err = gsysterr->OneSigmaErr( (GSyst_t)iLabel, sign);
858 sigma = (value - nominal_def)/(frac_err*nominal_def);
867 double wgt =
fWcalc->CalcWeight(evr);
void AddReweightValue(ReweightLabel_t rLabel, double value)
Change a reweight parameter. If it hasn't been added yet add it.
tweak inelastic probability for pions, for given total rescattering probability
void ReweightIntraNuke(ReweightLabel_t name, double sigma)
Simple Configuration of the Formation Zone reweight calculator.
tweak absorption probability for nucleons, for given total rescattering probability ...
void ReweightQEVec(double mv)
enum rwgt::EReweightLabel ReweightLabel_t
void ConfigureINuke()
configure the weight parameters being used
tweak the 2pi non-RES bkg in the RES region, for v+n CC
tweak the 1pi non-RES bkg in the RES region, for vbar+p NC
tweak Mv CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
tweak the Bodek-Yang model parameter B_{ht} - incl. both shape and normalization effect ...
#define LOG_INFO(category)
tweak axial nucleon form factors (dipole -> z-expansion) - shape only effect of dsigma(CCQE)/dQ2 ...
void ConfigureCCRes()
Configure the NCRES calculator.
void ConfigureResBkg()
Configure the ResDecay weight calculator.
void ConfigureDIS()
Configure the Coherant model weight calculator.
void Configure()
Reconfigure the weight calculators.
tweak the Bodek-Yang model parameter CV2u - incl. both shape and normalization effect ...
tweak Ma CCRES, affects d2sigma(CCRES)/dWdQ2 in shape only (normalized to constant integral) ...
void ConfigureQEVec()
Configure the CCRES calculator.
void ReweightAGKY(double xF, double pT)
Simple Configuration of the Intranuke Nuclear model.
tweak the 2pi non-RES bkg in the RES region, for v+p CC
void ReweightResDecay(double gamma, double eta, double theta)
Simple Configuration of the Total NC cross section.
tweak inelastic probability for nucleons, for given total rescattering probability ...
void ConfigureParameters()
void ReweightCCRes(double ma, double mv=0.0)
Simple Configurtion of the NC Resonance weight calculator.
void ReweightDIS(double aht, double bht, double cv1u, double cv2u)
Simple Configuration of the DIS nuclear model.
std::map< int, double > fNominalParameters
tweak Z-expansion CCQE normalization (energy independent)
void ConfigureNC()
Configure the DIS (Bodek-Yang) weight calculator.
void ReweightFGM(double kF, double sf)
End of Simple Reweight Configurations.
void ConfigureFGM()
Configure the Formation Zone weight calculator.
double CalculateWeight(const genie::EventRecord &evr) const
tweak Resonance -> X + gamma branching ratio, eg Delta+(1232) -> p gamma
void ReweightQEMA(double ma)
Simple Configuration of the CCQE vector weight calculator.
tweak the 1pi non-RES bkg in the RES region, for vbar+p CC
tweak pion production probability for nucleons, for given total rescattering probability ...
tweak xF distribution for low multiplicity (N + pi) DIS f/s produced by AGKY
std::vector< int > fReWgtParameterName
void ConfigureFZone()
Configure the intranuke weight calculator.
tweak the 2pi non-RES bkg in the RES region, for v+p NC
tweak CCQE normalization (maintains dependence on neutrino energy)
void ReweightQEZExp(double norm, double a1, double a2, double a3, double a4)
Simple Configuration of the CC Resonance weight calculator.
tweak the 2pi non-RES bkg in the RES region, for vbar+n CC
tweak CCQE normalization (energy independent)
tweak the 2pi non-RES bkg in the RES region, for vbar+n NC
tweak the 2pi non-RES bkg in the RES region, for vbar+p NC
void ReweightNonResRvbarp1pi(double sigma)
Simple Configuration of the Non-Resonance Background weight calculator. Here it is being configured f...
void ConfigureQEMA()
Configure the QE vector FF weight calculator.
void ReweightCoh(double ma, double r0)
Simple Configuration of the Non-Resonance Background weight calculator.
void ConfgureResDecay()
Configure the NC weight calculator.
tweak pT distribution for low multiplicity (N + pi) DIS f/s produced by AGKY
tweak the 2pi non-RES bkg in the RES region, for v+n NC
tweak elastic probability for nucleons, for given total rescattering probability
void SetNominalValues()
Return the nominal value for the given parameter.
tweak Ma NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
tweak Z-expansion coefficient 1, affects dsigma(CCQE)/dQ2 both in shape and normalization ...
GENIEReweight()
<constructor
tweak Mv NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
tweak the 1pi non-RES bkg in the RES region, for v+n CC
genie::rew::GReWeight * fWcalc
void ReweightResGanged(double ma, double mv=0.0)
Simple Configuration of the Coherant weight calculator.
void ConfigureNCRes()
Configure the ResBkg (kno) weight calculator.
tweak absorption probability for pions, for given total rescattering probability
tweak NCRES normalization
tweak Z-expansion coefficient 2, affects dsigma(CCQE)/dQ2 both in shape and normalization ...
void Reconfigure()
Simple Configuration functions for configuring a single weight calculator.
Wrapper for reweight neutrino interactions with GENIE base class.
void ChangeParameterValue(ReweightLabel_t rLabel, double value)
Configure the weight calculators.
void ReweightNonResRvbarp2pi(double sigma)
Simple Configuration of the Resonance decay model weight calculator.
tweak the Bodek-Yang model parameter CV1u - incl. both shape and normalization effect ...
tweak the 1pi non-RES bkg in the RES region, for vbar+n NC
void ReweightNCRes(double ma, double mv=0.0)
Simple Configuration of the NC and CC Resonance weight calculator with the axial mass parameter for N...
tweak the 1pi non-RES bkg in the RES region, for vbar+n CC
tweak mean free path for pions
tweak the 1pi non-RES bkg in the RES region, for v+p NC
tweak the Bodek-Yang model parameter A_{ht} - shape only effect to d2sigma(DIS)/dxdy ...
void ConfigureAGKY()
Configure the DIS nuclear model weight calculator.
void ConfigureNCEL()
Configure the MaQE weight calculator.
distort pi angular distribution in Delta -> N + pi
double NominalParameterValue(ReweightLabel_t rLabel)
Return the configured value of the given parameter.
tweak DIS nuclear modification (shadowing, anti-shadowing, EMC). Does not appear to be working in GEN...
~GENIEReweight()
Set the nominal values for the reweight parameters.
tweak the inclusive DIS CC normalization (not currently working in genie)
tweak the Bodek-Yang model parameter CV2u - shape only effect to d2sigma(DIS)/dxdy ...
tweak Z-expansion coefficient 3, affects dsigma(CCQE)/dQ2 both in shape and normalization ...
tweak Mv CCRES, affects d2sigma(CCRES)/dWdQ2 in shape only (normalized to constant integral) ...
tweak Resonance -> X + eta branching ratio, eg N+(1440) -> p eta
std::string value(boost::any const &)
std::vector< double > fReWgtParameterValue
double ReweightParameterValue(ReweightLabel_t rLabel)
Add reweight parameters to the list.
tweak the Bodek-Yang model parameter B_{ht} - shape only effect to d2sigma(DIS)/dxdy ...
tweak Ma NCEL, affects dsigma(NCEL)/dQ2 both in shape and normalization
void ReweightNCEL(double ma, double eta)
Simple Configurtion of the CCQE axial weight calculator.
void ReweightNonResRvp1pi(double sigma)
Simple Configuration of the Non-Resonance Background weight calculator.
tweak charge exchange probability for nucleons, for given total rescattering probability ...
tweak the Bodek-Yang model parameter A_{ht} - incl. both shape and normalization effect ...
double CalculateSigma(ReweightLabel_t label, double value)
Calculate the weights.
tweak Z-expansion coefficient 4, affects dsigma(CCQE)/dQ2 both in shape and normalization ...
tweak Ma NCRES, affects d2sigma(NCRES)/dWdQ2 in shape only (normalized to constant integral) ...
tweak Ma CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
tweak NCEL strange axial form factor eta, affects dsigma(NCEL)/dQ2 both in shape and normalization ...
tweak the 2pi non-RES bkg in the RES region, for vbar+p CC
tweak Ma CCQE, affects dsigma(CCQE)/dQ2 in shape only (normalized to constant integral) ...
tweak pion production probability for pions, for given total rescattering probability ...
tweak Ma CCQE, affects dsigma(CCQE)/dQ2 both in shape and normalization
tweak Mv NCRES, affects d2sigma(NCRES)/dWdQ2 in shape only (normalized to constant integral) ...
tweak charge exchange probability for pions, for given total rescattering probability ...
tweak the Bodek-Yang model parameter CV1u - shape only effect to d2sigma(DIS)/dxdy ...
tweak elastic nucleon form factors (BBA/default -> dipole) - shape only effect of dsigma(CCQE)/dQ2 ...
tweak mean free path for nucleons
void ReweightNC(double norm)
Simple Configuration of the DIS FF model weight calculator.
void ReweightNonResRvp2pi(double sigma)
Simple Configuration of the Non-Resonance Background weight calculator.
tweak the 1pi non-RES bkg in the RES region, for v+p CC
void ReweightFormZone(double sigma)
Simple Configuration of the Fermigas model reweight calculator.
tweak Ma for COH pion production
tweak elastic probability for pions, for given total rescattering probability
void ConfigureDISNucMod()
Configure the FG model weight calculator.
tweak CCRES normalization
tweak the 1pi non-RES bkg in the RES region, for v+n NC
tweak the ratio of ( CC) / ( CC) (not currently working in genie)
void ReweightDISnucl(bool mode)
Simple Configuration of the DIS AGKY hadronization model.
tweak R0 for COH pion production
void ConfigureCoh()
Configure the hadronization (AGKY) weight calculator.