1#ifndef __JAANET__JEVTWEIGHTFACTORRADIATIVECORRECTIONS__
2#define __JAANET__JEVTWEIGHTFACTORRADIATIVECORRECTIONS__
62 template<
class JEvtWeightFactor_t = JEvtWeightFactor>
64 public JClonable<JEvtWeightFactor_t, JEvtWeightFactorRadiativeCorrections<JEvtWeightFactor_t> >
90 return std::make_pair(quark.
mass, quark.
charge);
93 THROW(
JValueOutOfRange,
"JEvtWeightFactorRadiativeCorrections::getQuarkParameter(): Invalid quark PDG code " << pdg);
108 if (charged_leptons.
hasPDG(pdg)) {
112 return charged_lepton.
mass;
115 THROW(
JValueOutOfRange,
"JEvtWeightFactorRadiativeCorrections::getChargedLeptonMass(): Invalid charged lepton PDG code " << pdg);
131 THROW(
JIndexOutOfRange,
"JEvtWeightFactorRadiativeCorrections::getFactor(): W2LIST_GSEAGEN_CC unavailable");
139 const double Q2 =
getQ2(evt);
146 const double Sx = Q2 / y + x * mN*mN;
148 const bool antiNeutrino = neutrino.
type < 0;
150 auto [m1, q1] = (antiNeutrino ?
156 if (hasPrimaryQuarkInfo) {
161 const int Ltype = neutrino.
type + (antiNeutrino ? +1 : -1);
164 switch (interactionType) {
169 return getRadiativeCorrectionCCDISNeutrino(y, Sx, mL, q1);
171 }
else if (hasPrimaryQuarkInfo) {
173 return getRadiativeCorrectionCCDISAntiNeutrino(y, Sx, mL, q1);
177 static const double yThreshold = 0.95;
178 static const double RCthreshold = 1.1;
180 double RC = getRadiativeCorrectionCCDISAntiNeutrino(y, Sx, mL, q1);
185 if (y > yThreshold && RC * (1.0 - y) * (1.0 + y) > RCthreshold) {
187 RC = getRadiativeCorrectionCCDISAntiNeutrino(y, Sx, mL, q1);
190 return RC < RCthreshold ? RC : 1.0;
194 return (!antiNeutrino ?
195 getRadiativeCorrectionNCDISNeutrino (y, Sx, Q2, mL, m1, q1) :
196 getRadiativeCorrectionNCDISAntiNeutrino(y, Sx, Q2, mL, m1, q1));
240 template<
class JEvtWeightFactorRadiativeCorrections_T>
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition of GENIE neutrino interaction types.
Utility class to parse parameter values.
Utility class to parse parameter values.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Exception for accessing an index in a collection that is outside of its range.
Exception for accessing a value in a collection that is outside of its range.
Extensions to Evt data format.
static const char *const PRIMARY_QUARK_PDG_KEY
ID string for primary quark user info.
const JPDBSelection & getChargedLeptons()
Retrieve charged lepton entries from particle data book.
double get_target_nucleon_mass(const Evt &evt)
Get target nucleon mass.
@ WEAK_NEUTRAL_CURRENT
Weak neutral current interaction.
@ WEAK_CHARGED_CURRENT
Weak charged current interaction.
const JPDBSelection & getQuarks()
Retrieve quark entries from particle data book.
@ DEEP_INELASTIC
Deep Inelastic Scattering.
double getQ2(const Evt &event)
Get negative squared momentum transfer (Q^2 = -q^2 >= 0) of a neutrino interaction.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
double getRadiativeCorrectionCCDISAntiNeutrino(const double y, const double Sx, const double ml, const JElectricCharge &q1)
Compute the radiative correction factor for anti-neutrino CC DIS interactions according to eqns.
double getRadiativeCorrectionNCDISAntiNeutrino(const double y, const double Sx, const double Q2, const double ml, const double m1, const JElectricCharge &q1)
Compute the radiative correction factor for NC anti-neutrino DIS interactions according to eqns.
double getRadiativeCorrectionNCDISNeutrino(const double y, const double Sx, const double Q2, const double ml, const double m1, const JElectricCharge &q1)
Compute the radiative correction factor for NC neutrino DIS interactions according to eqns.
double getRadiativeCorrectionCCDISNeutrino(const double y, const double Sx, const double ml, const JElectricCharge &q1)
Compute the radiative correction factor for neutrino CC DIS interactions according to eqns.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Auxiliary class for I/O of constant event-weight factor.
JEvtWeightFactorRadiativeCorrectionsHelper(JEvtWeightFactorRadiativeCorrections_T &factor, const JEquationParameters &eqpars)
Constructor.
Class for radiative corrections to the neutrino CC-DIS weights, based on references:
JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) override final
Get properties of this class.
JEvtWeightFactorRadiativeCorrections()
Default constructor.
JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) const override final
Get properties of this class.
JEvtWeightFactorRadiativeCorrections< JEvtWeightFactor_t > JEvtWeightFactorRadiativeCorrections_t
static std::pair< double, JElectricCharge > getQuarkParameters(const int pdg)
Get the quark mass and charge corresponding to a given PDG code.
double getFactor(const Evt &evt) const override final
Get event-weight factor of given event.
static double getChargedLeptonMass(const int pdg)
Get the mass of a charged lepton corresponding to a given PDG code.
static const char *const getTypeKey()
Get type keyword.
static JEquationParameters & getEquationParameters()
Get equation parameters.
Selection of particle data book entries.
bool hasPDG(const int pdg) const
Check if PDB has particle corresponding to given PDG code.
const JParticle & getPDG(const int pdg) const
Get particle corresponding to given PDG code.
Auxiliary class to handle particle name, codes and mass.
JElectricCharge charge
electric charge of particle [|e|/3]
double mass
mass of particle [GeV]
Template class for object cloning.
Auxiliary class for electric charges of SM fields.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
int type
MC: particle type in PDG encoding.
static const int W2LIST_GSEAGEN_BX
Bjorken x.
static const int W2LIST_GSEAGEN_CC
Charged current interaction flag.
static const int W2LIST_GSEAGEN_ICHAN
Interaction channel.
static const int W2LIST_GSEAGEN_BY
Bjorken y.