GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GalsterELFormFactorsModel.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Author: Igor Kakorin <kakorin@jinr.ru>, Joint Institute for Nuclear Research
8 
9  For the class documentation see the corresponding header file.
10 
11  Important revisions after version 2.0.0 :
12 
13 */
14 //____________________________________________________________________________
15 
16 #include <TMath.h>
17 
23 
24 using namespace genie;
25 
26 //____________________________________________________________________________
28 ELFormFactorsModelI("genie::GalsterELFormFactorsModel")
29 {
30 
31 }
32 //____________________________________________________________________________
34 ELFormFactorsModelI("genie::GalsterELFormFactorsModel", config)
35 {
36 
37 }
38 //____________________________________________________________________________
40 {
41 
42 }
43 //____________________________________________________________________________
44 double GalsterELFormFactorsModel::Gep(const Interaction * interaction) const
45 {
46  double q2 = interaction->Kine().q2();
47  double mv2 = fMv2; // elastic vector mass^2
48  double GD = 1./TMath::Power(1-q2/mv2,2.); // dipole form factor
49  double gep = GD;
50  return gep;
51 }
52 //____________________________________________________________________________
53 double GalsterELFormFactorsModel::Gmp(const Interaction * interaction) const
54 {
55  double gmp = fMuP*this->Gep(interaction);
56  return gmp;
57 }
58 //____________________________________________________________________________
59 double GalsterELFormFactorsModel::Gen(const Interaction * interaction) const
60 {
61  double q2 = interaction->Kine().q2();
62  double M;
64  {
65  PDGLibrary * pdglib = PDGLibrary::Instance();
66  M = (pdglib->Find(kPdgProton)->Mass() + pdglib->Find(kPdgNeutron)->Mass())/2;
67  }
68  else
69  {
70  const Target & tgt = interaction->InitState().Tgt();
71  M = tgt.HitNucMass(); // Mnucl
72  }
73 
74  double M2 = TMath::Power(M,2); // Mnucl^2
75  double t = -q2/(4*M2); // q2<0
76  double p = fGenp; // parameter p
77  double gen = -1.*fMuN*t*this->Gep(interaction) / (1 + p*t);
78  return gen;
79 }
80 //____________________________________________________________________________
81 double GalsterELFormFactorsModel::Gmn(const Interaction * interaction) const
82 {
83  double gmn = fMuN*this->Gep(interaction);
84  return gmn;
85 }
86 //____________________________________________________________________________
88 {
89  Algorithm::Configure(config);
90  this->LoadConfig();
91 }
92 //____________________________________________________________________________
94 {
95  Algorithm::Configure(param_set);
96  this->LoadConfig();
97 }
98 //____________________________________________________________________________
100 {
101 
102  GetParamDef( "isIsoscalarNucleon", fIsIsoscalarNucleon, false);
103 
104  //-- load Galster model parameters
105 
106  // Krutov parameters
107  GetParam( "Galster-Gen-p", fGenp ) ;
108 
109  // vector mass
110  GetParam( "EL-Mv",fMv ) ;
111  fMv2 = TMath::Power(fMv,2);
112 
113  // anomalous magnetic moments
114  GetParam( "AnomMagnMoment-P", fMuP ) ;
115  GetParam( "AnomMagnMoment-N", fMuN ) ;
116 }
117 //____________________________________________________________________________
118 
119 
double Gmp(const Interaction *interaction) const
Compute the elastic form factor G_{mp} for the input interaction.
double Gep(const Interaction *interaction) const
Compute the elastic form factor G_{ep} for the input interaction.
double HitNucMass(void) const
Definition: Target.cxx:233
std::mt19937 gen(rd())
Summary information for an interaction.
Definition: Interaction.h:56
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
Pure abstract base class. Defines the ELFormFactorsModelI interface to be implemented by any algorith...
const Kinematics & Kine(void) const
Definition: Interaction.h:71
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
double fMuN
Anomalous neutron magnetic moment.
bool fIsIsoscalarNucleon
Is assuming isoscalar nucleon?
double fMuP
Anomalous proton magnetic moment.
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
double Gmn(const Interaction *interaction) const
Compute the elastic form factor G_{mn} for the input interaction.
Singleton class to load &amp; serve a TDatabasePDG.
Definition: PDGLibrary.h:35
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
void Configure(const Registry &config)
const InitialState & InitState(void) const
Definition: Interaction.h:69
const int kPdgProton
Definition: PDGCodes.h:81
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
Definition: InitialState.h:66
const int kPdgNeutron
Definition: PDGCodes.h:83
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
double Gen(const Interaction *interaction) const
Compute the elastic form factor G_{en} for the input interaction.