GENIEGenerator
Loading...
Searching...
No Matches
genie::LwlynSmithFF Class Reference

Abstract Base Class: implements the QELFormFactorsModelI interface but can not be instantiated. More...

#include <LwlynSmithFF.h>

Inheritance diagram for genie::LwlynSmithFF:
[legend]
Collaboration diagram for genie::LwlynSmithFF:
[legend]

Public Member Functions

virtual ~LwlynSmithFF ()
virtual double F1V (const Interaction *interaction) const
 Compute the form factor F1V for the input interaction.
virtual double xiF2V (const Interaction *interaction) const
 Compute the form factor xi*F2V for the input interaction.
virtual double FA (const Interaction *interaction) const
 Compute the form factor FA for the input interaction.
virtual double Fp (const Interaction *interaction) const
 Compute the form factor Fp for the input interaction.
virtual void Configure (const Registry &config)
virtual void Configure (string config)
Public Member Functions inherited from genie::QELFormFactorsModelI
virtual ~QELFormFactorsModelI ()
Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
virtual void FindConfig (void)
virtual const RegistryGetConfig (void) const
RegistryGetOwnedConfig (void)
virtual const AlgIdId (void) const
 Get algorithm ID.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
virtual void SetId (string name, string config)
const AlgorithmSubAlg (const RgKey &registry_key) const
void AdoptConfig (void)
void AdoptSubstructure (void)
virtual void Print (ostream &stream) const
 Print algorithm info.

Protected Member Functions

 LwlynSmithFF ()
 LwlynSmithFF (string name)
 LwlynSmithFF (string name, string config)
virtual void LoadConfig (void)
virtual double tau (const Interaction *interaction) const
virtual double GVE (const Interaction *interaction) const
virtual double GVM (const Interaction *interaction) const
virtual double F1P (const Interaction *interaction) const
virtual double F2P (const Interaction *interaction) const
virtual double F1N (const Interaction *interaction) const
virtual double F2N (const Interaction *interaction) const
virtual double StrangeF1V (const Interaction *interaction) const
virtual double StrangexiF2V (const Interaction *interaction) const
virtual double StrangeFA (const Interaction *interaction) const
Protected Member Functions inherited from genie::QELFormFactorsModelI
 QELFormFactorsModelI ()
 QELFormFactorsModelI (string name)
 QELFormFactorsModelI (string name, string config)
Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 Algorithm (string name)
 Algorithm (string name, string config)
void Initialize (void)
void DeleteConfig (void)
void DeleteSubstructure (void)
RegistryExtractLocalConfig (const Registry &in) const
RegistryExtractLowerConfig (const Registry &in, const string &alg_key) const
 Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.
template<class T>
bool GetParam (const RgKey &name, T &p, bool is_top_call=true) const
template<class T>
bool GetParamDef (const RgKey &name, T &p, const T &def) const
template<class T>
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters.
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
template<class T>
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters.
template<class T>
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.

Protected Attributes

const ELFormFactorsModelIfElFFModel
const AxialFormFactorModelIfAxFFModel
ELFormFactors fELFF
AxialFormFactor fAxFF
double fMuP
double fMuN
double fSin28w
double fFDratio
bool fCleanUpfElFFModel
Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Additional Inherited Members

Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
static string BuildParamVectSizeKey (const std::string &comm_name)
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatRowSizeKey (const std::string &comm_name)
static string BuildParamMatColSizeKey (const std::string &comm_name)

Detailed Description

Abstract Base Class: implements the QELFormFactorsModelI interface but can not be instantiated.

Its sole purpose of existence is to transmit common implementation (related to the Llewellyn-Smith model for QEL vN scattering) to its concrete subclasses: LwlynSmithFFCC, LwlynSmithFFNC.

Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n May 03, 2004
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 36 of file LwlynSmithFF.h.

Constructor & Destructor Documentation

◆ ~LwlynSmithFF()

LwlynSmithFF::~LwlynSmithFF ( )
virtual

Definition at line 48 of file LwlynSmithFF.cxx.

49{
51 delete fElFFModel;
52 }
53}
const ELFormFactorsModelI * fElFFModel

References fCleanUpfElFFModel, and fElFFModel.

◆ LwlynSmithFF() [1/3]

◆ LwlynSmithFF() [2/3]

LwlynSmithFF::LwlynSmithFF ( string name)
protected

Definition at line 36 of file LwlynSmithFF.cxx.

36 :
38{
39
40}

References genie::QELFormFactorsModelI::QELFormFactorsModelI().

◆ LwlynSmithFF() [3/3]

LwlynSmithFF::LwlynSmithFF ( string name,
string config )
protected

Definition at line 42 of file LwlynSmithFF.cxx.

42 :
43QELFormFactorsModelI(name, config)
44{
45
46}

References genie::QELFormFactorsModelI::QELFormFactorsModelI().

Member Function Documentation

◆ Configure() [1/2]

void LwlynSmithFF::Configure ( const Registry & config)
virtual

Configure the algorithm with an external registry The registry is merged with the top level registry if it is owned, Otherwise a copy of it is added with the highest priority

Reimplemented from genie::Algorithm.

Definition at line 189 of file LwlynSmithFF.cxx.

190{
191 Algorithm::Configure(config);
192 this->LoadConfig();
193}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62
virtual void LoadConfig(void)

References genie::Algorithm::Configure(), and LoadConfig().

◆ Configure() [2/2]

void LwlynSmithFF::Configure ( string config)
virtual

Configure the algorithm from the AlgoConfigPool based on param_set string given in input An algorithm contains a vector of registries coming from different xml configuration files, which are loaded according a very precise prioriy This methods will load a number registries in order of priority: 1) "Tunable" parameter set from CommonParametes. This is loaded with the highest prioriry and it is designed to be used for tuning procedure Usage not expected from the user. 2) For every string defined in "CommonParame" the corresponding parameter set will be loaded from CommonParameter.xml 3) parameter set specified by the config string and defined in the xml file of the algorithm 4) if config is not "Default" also the Default parameter set from the same xml file will be loaded Effectively this avoids the repetion of a parameter when it is not changed in the requested configuration

Reimplemented from genie::Algorithm.

Definition at line 195 of file LwlynSmithFF.cxx.

196{
197 Algorithm::Configure(config);
198 this->LoadConfig();
199}

References genie::Algorithm::Configure(), and LoadConfig().

◆ F1N()

double LwlynSmithFF::F1N ( const Interaction * interaction) const
protectedvirtual

Definition at line 124 of file LwlynSmithFF.cxx.

125{
126 fELFF.Calculate(interaction);
127 double t = this->tau(interaction);
128 double T = 1 / (1 - t);
129 return T * (fELFF.Gen() - t * fELFF.Gmn());
130}
virtual double tau(const Interaction *interaction) const
ELFormFactors fELFF

References fELFF, and tau().

Referenced by StrangeF1V().

◆ F1P()

double LwlynSmithFF::F1P ( const Interaction * interaction) const
protectedvirtual

Definition at line 108 of file LwlynSmithFF.cxx.

109{
110 fELFF.Calculate(interaction);
111 double t = this->tau(interaction);
112 double T = 1 / (1 - t);
113 return T * (fELFF.Gep() - t * fELFF.Gmp());
114}

References fELFF, and tau().

Referenced by StrangeF1V().

◆ F1V()

double LwlynSmithFF::F1V ( const Interaction * interaction) const
virtual

Compute the form factor F1V for the input interaction.

Implements genie::QELFormFactorsModelI.

Reimplemented in genie::LwlynSmithFFCC, genie::LwlynSmithFFDeltaS, genie::LwlynSmithFFNC, and genie::MKFFCC.

Definition at line 140 of file LwlynSmithFF.cxx.

141{
142 double t = this->tau(interaction);
143 double gve = this->GVE(interaction);
144 double gvm = this->GVM(interaction);
145
146 double _F1V = (gve - t*gvm) / (1-t);
147 return _F1V;
148}
virtual double GVE(const Interaction *interaction) const
virtual double GVM(const Interaction *interaction) const

References GVE(), GVM(), and tau().

Referenced by genie::LwlynSmithFFCC::F1V(), genie::LwlynSmithFFNC::F1V(), and genie::MKFFCC::F1V().

◆ F2N()

double LwlynSmithFF::F2N ( const Interaction * interaction) const
protectedvirtual

Definition at line 132 of file LwlynSmithFF.cxx.

133{
134 fELFF.Calculate(interaction);
135 double t = this->tau(interaction);
136 double T = 1 / (1 - t);
137 return T * (fELFF.Gmn() - fELFF.Gen());
138}

References fELFF, and tau().

Referenced by StrangexiF2V().

◆ F2P()

double LwlynSmithFF::F2P ( const Interaction * interaction) const
protectedvirtual

Definition at line 116 of file LwlynSmithFF.cxx.

117{
118 fELFF.Calculate(interaction);
119 double t = this->tau(interaction);
120 double T = 1 / (1 - t);
121 return T * (fELFF.Gmp() - fELFF.Gep());
122}

References fELFF, and tau().

Referenced by StrangexiF2V().

◆ FA()

double LwlynSmithFF::FA ( const Interaction * interaction) const
virtual

Compute the form factor FA for the input interaction.

Implements genie::QELFormFactorsModelI.

Reimplemented in genie::LwlynSmithFFCC, genie::LwlynSmithFFDeltaS, genie::LwlynSmithFFNC, and genie::MKFFCC.

Definition at line 160 of file LwlynSmithFF.cxx.

161{
162 //-- compute FA(q2)
163
164 fAxFF.Calculate(interaction);
165 return fAxFF.FA();
166}
AxialFormFactor fAxFF

References fAxFF.

Referenced by genie::LwlynSmithFFCC::FA(), genie::LwlynSmithFFNC::FA(), genie::MKFFCC::FA(), and Fp().

◆ Fp()

double LwlynSmithFF::Fp ( const Interaction * interaction) const
virtual

Compute the form factor Fp for the input interaction.

Implements genie::QELFormFactorsModelI.

Reimplemented in genie::LwlynSmithFFCC, genie::LwlynSmithFFDeltaS, genie::LwlynSmithFFNC, and genie::MKFFCC.

Definition at line 168 of file LwlynSmithFF.cxx.

169{
170 // get momentum transfer
171 const Kinematics & kine = interaction->Kine();
172 double q2 = kine.q2();
173
174 // get struck nucleon mass & set pion mass
175 const InitialState & init_state = interaction->InitState();
176 double MN = init_state.Tgt().HitNucMass();
177 double MN2 = TMath::Power(MN, 2);
178 double Mpi = kPionMass;
179 double Mpi2 = TMath::Power(Mpi, 2);
180
181 // calculate FA
182 double fa = this->FA(interaction);
183
184 // calculate Fp
185 double _Fp = 2. * MN2 * fa/(Mpi2-q2);
186 return _Fp;
187}
const Target & Tgt(void) const
const Kinematics & Kine(void) const
Definition Interaction.h:71
const InitialState & InitState(void) const
Definition Interaction.h:69
double q2(bool selected=false) const
virtual double FA(const Interaction *interaction) const
Compute the form factor FA for the input interaction.
double HitNucMass(void) const
Definition Target.cxx:233

References FA(), genie::Target::HitNucMass(), genie::Interaction::InitState(), genie::Interaction::Kine(), genie::constants::kPionMass, genie::Kinematics::q2(), and genie::InitialState::Tgt().

Referenced by genie::LwlynSmithFFCC::Fp(), genie::LwlynSmithFFDeltaS::Fp(), and genie::MKFFCC::Fp().

◆ GVE()

double LwlynSmithFF::GVE ( const Interaction * interaction) const
protectedvirtual

Definition at line 259 of file LwlynSmithFF.cxx.

260{
261 //-- compute GVE using CVC
262
263 fELFF.Calculate(interaction);
264 double gve = fELFF.Gep() - fELFF.Gen();
265 return gve;
266}

References fELFF.

Referenced by F1V(), and xiF2V().

◆ GVM()

double LwlynSmithFF::GVM ( const Interaction * interaction) const
protectedvirtual

Definition at line 268 of file LwlynSmithFF.cxx.

269{
270 //-- compute GVM using CVC
271
272 fELFF.Calculate(interaction);
273 double gvm = fELFF.Gmp() - fELFF.Gmn();
274 return gvm;
275}

References fELFF.

Referenced by F1V(), and xiF2V().

◆ LoadConfig()

void LwlynSmithFF::LoadConfig ( void )
protectedvirtual

Definition at line 201 of file LwlynSmithFF.cxx.

202{
203// Load configuration data from its configuration Registry (or global defaults)
204// to private data members
205 fElFFModel =
206 dynamic_cast<const ELFormFactorsModelI *> (this->SubAlg("ElasticFormFactorsModel"));
207 assert(fElFFModel);
208
209 fCleanUpfElFFModel = false;
210 bool useElFFTE = false;
211 GetParam( "UseElFFTransverseEnhancement", useElFFTE ) ;
212 if( useElFFTE ) {
213 const ELFormFactorsModelI* sub_alg = fElFFModel;
214 fElFFModel =
215 dynamic_cast<const ELFormFactorsModelI *> (this->SubAlg("TransverseEnhancement"));
216 dynamic_cast<const TransverseEnhancementFFModel*>(fElFFModel)->SetElFFBaseModel(
217 sub_alg);
218 fCleanUpfElFFModel = true;
219 }
220
221 fELFF.SetModel(fElFFModel);
222
223 fAxFFModel =
224 dynamic_cast<const AxialFormFactorModelI *> (this->SubAlg("AxialFormFactorModel"));
225
226 assert(fAxFFModel);
227 fAxFF.SetModel(fAxFFModel);
228
229 // anomalous magnetic moments
230 GetParam( "AnomMagnMoment-P", fMuP ) ;
231 GetParam( "AnomMagnMoment-N", fMuN ) ;
232
233 // weinberg angle
234 double thw ;
235 GetParam( "WeinbergAngle", thw ) ;
236 fSin28w = TMath::Power(TMath::Sin(thw), 2);
237
238 double d,f ;
239 GetParam( "SU3-D", d ) ;
240 GetParam( "SU3-F", f ) ;
241 fFDratio = f/(d+f);
242}
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Algorithm * SubAlg(const RgKey &registry_key) const
const AxialFormFactorModelI * fAxFFModel

References fAxFF, fAxFFModel, fCleanUpfElFFModel, fELFF, fElFFModel, fFDratio, fMuN, fMuP, fSin28w, genie::Algorithm::GetParam(), and genie::Algorithm::SubAlg().

Referenced by Configure(), and Configure().

◆ StrangeF1V()

double LwlynSmithFF::StrangeF1V ( const Interaction * interaction) const
protectedvirtual

Definition at line 55 of file LwlynSmithFF.cxx.

56{
57 double f1p = this->F1P(interaction);
58 double f1n = this->F1N(interaction);
59 double value = 0.;
60
61 const XclsTag & xcls = interaction->ExclTag();
62 int pdgc = xcls.StrangeHadronPdg();
63
64 if (pdgc == kPdgSigmaM) value = -1.* (f1p + 2 * f1n);
65 else if (pdgc == kPdgLambda) value = -kSqrt3 / kSqrt2 * f1p;
66 else if (pdgc == kPdgSigma0) value = -1.* kSqrt2 / 2 * (f1p + 2 * f1n);
67
68 return value;
69}
const XclsTag & ExclTag(void) const
Definition Interaction.h:72
virtual double F1N(const Interaction *interaction) const
virtual double F1P(const Interaction *interaction) const
int StrangeHadronPdg(void) const
Definition XclsTag.h:55
const int kPdgSigma0
Definition PDGCodes.h:88
const int kPdgLambda
Definition PDGCodes.h:85
const int kPdgSigmaM
Definition PDGCodes.h:89

References genie::Interaction::ExclTag(), F1N(), F1P(), genie::kPdgLambda, genie::kPdgSigma0, genie::kPdgSigmaM, genie::constants::kSqrt2, genie::constants::kSqrt3, and genie::XclsTag::StrangeHadronPdg().

Referenced by genie::LwlynSmithFFDeltaS::F1V().

◆ StrangeFA()

double LwlynSmithFF::StrangeFA ( const Interaction * interaction) const
protectedvirtual

Definition at line 91 of file LwlynSmithFF.cxx.

92{
93 double value = 0.;
94
95 const XclsTag & xcls = interaction->ExclTag();
96 int pdgc = xcls.StrangeHadronPdg();
97
98 if (pdgc == kPdgSigmaM) value = +1 * (1 - 2 * fFDratio);
99 else if (pdgc == kPdgLambda) value = -1 / kSqrt6 * (1 + 2 * fFDratio);
100 else if (pdgc == kPdgSigma0) value = +1 * kSqrt2 / 2 * (1 - 2 * fFDratio);
101
102 fAxFF.Calculate(interaction);
103 value *= fAxFF.FA();
104
105 return value;
106}

References genie::Interaction::ExclTag(), fAxFF, fFDratio, genie::kPdgLambda, genie::kPdgSigma0, genie::kPdgSigmaM, genie::constants::kSqrt2, genie::constants::kSqrt6, and genie::XclsTag::StrangeHadronPdg().

Referenced by genie::LwlynSmithFFDeltaS::FA().

◆ StrangexiF2V()

double LwlynSmithFF::StrangexiF2V ( const Interaction * interaction) const
protectedvirtual

Definition at line 71 of file LwlynSmithFF.cxx.

72{
73 const XclsTag & xcls = interaction->ExclTag();
74 int pdgc = xcls.StrangeHadronPdg();
75
76 double f2p = this->F2P(interaction);
77 double f2n = this->F2N(interaction);
78 double value = 0.;
79
80 if (pdgc == kPdgSigmaM)
81 value = -1.*(f2p + 2.* f2n) ;
82 else if (pdgc == kPdgLambda)
83 value = (-kSqrt3 / kSqrt2 * f2p) ;
84 else if (pdgc == kPdgSigma0)
85 value = -1.* kSqrt2 / 2 * (f2p + 2.* f2n) ;
86
87 return value;
88}
virtual double F2P(const Interaction *interaction) const
virtual double F2N(const Interaction *interaction) const

References genie::Interaction::ExclTag(), F2N(), F2P(), genie::kPdgLambda, genie::kPdgSigma0, genie::kPdgSigmaM, genie::constants::kSqrt2, genie::constants::kSqrt3, and genie::XclsTag::StrangeHadronPdg().

Referenced by genie::LwlynSmithFFDeltaS::xiF2V().

◆ tau()

double LwlynSmithFF::tau ( const Interaction * interaction) const
protectedvirtual

Reimplemented in genie::MKFFCC.

Definition at line 244 of file LwlynSmithFF.cxx.

245{
246// computes q^2 / (4 * MNucl^2)
247
248 //-- get kinematics & initial state parameters
249 const Kinematics & kinematics = interaction->Kine();
250 const InitialState & init_state = interaction->InitState();
251 double q2 = kinematics.q2();
252 double Mnucl = init_state.Tgt().HitNucMass();
253 double Mnucl2 = TMath::Power(Mnucl, 2);
254
255 //-- calculate q^2 / (4*Mnuc^2)
256 return q2/(4*Mnucl2);
257}

References genie::Target::HitNucMass(), genie::Interaction::InitState(), genie::Interaction::Kine(), genie::Kinematics::q2(), and genie::InitialState::Tgt().

Referenced by F1N(), F1P(), F1V(), genie::LwlynSmithFFNC::F1V(), F2N(), F2P(), and xiF2V().

◆ xiF2V()

double LwlynSmithFF::xiF2V ( const Interaction * interaction) const
virtual

Compute the form factor xi*F2V for the input interaction.

Implements genie::QELFormFactorsModelI.

Reimplemented in genie::LwlynSmithFFCC, genie::LwlynSmithFFDeltaS, genie::LwlynSmithFFNC, and genie::MKFFCC.

Definition at line 150 of file LwlynSmithFF.cxx.

151{
152 double t = this->tau(interaction);
153 double gve = this->GVE(interaction);
154 double gvm = this->GVM(interaction);
155
156 double _xiF2V = (gvm-gve) / (1-t);
157 return _xiF2V;
158}

References GVE(), GVM(), and tau().

Referenced by genie::LwlynSmithFFCC::xiF2V(), genie::LwlynSmithFFNC::xiF2V(), and genie::MKFFCC::xiF2V().

Member Data Documentation

◆ fAxFF

AxialFormFactor genie::LwlynSmithFF::fAxFF
mutableprotected

Definition at line 78 of file LwlynSmithFF.h.

Referenced by FA(), LoadConfig(), and StrangeFA().

◆ fAxFFModel

const AxialFormFactorModelI* genie::LwlynSmithFF::fAxFFModel
protected

Definition at line 75 of file LwlynSmithFF.h.

Referenced by LoadConfig().

◆ fCleanUpfElFFModel

bool genie::LwlynSmithFF::fCleanUpfElFFModel
protected

Definition at line 84 of file LwlynSmithFF.h.

Referenced by LoadConfig(), and ~LwlynSmithFF().

◆ fELFF

ELFormFactors genie::LwlynSmithFF::fELFF
mutableprotected

◆ fElFFModel

const ELFormFactorsModelI* genie::LwlynSmithFF::fElFFModel
protected

Definition at line 74 of file LwlynSmithFF.h.

Referenced by LoadConfig(), and ~LwlynSmithFF().

◆ fFDratio

double genie::LwlynSmithFF::fFDratio
protected

Definition at line 83 of file LwlynSmithFF.h.

Referenced by LoadConfig(), and StrangeFA().

◆ fMuN

double genie::LwlynSmithFF::fMuN
protected

Definition at line 81 of file LwlynSmithFF.h.

Referenced by LoadConfig().

◆ fMuP

double genie::LwlynSmithFF::fMuP
protected

Definition at line 80 of file LwlynSmithFF.h.

Referenced by LoadConfig(), and genie::LwlynSmithFFNC::xiF2V().

◆ fSin28w

double genie::LwlynSmithFF::fSin28w
protected

The documentation for this class was generated from the following files: