GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LwlynSmithFF.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 
6  Costas Andreopoulos <c.andreopoulos \at cern.ch>
7  University of Liverpool
8 */
9 //____________________________________________________________________________
10 
11 #include <TMath.h>
12 
25 
26 using namespace genie;
27 using namespace genie::constants;
28 
29 //____________________________________________________________________________
32 {
33 
34 }
35 //____________________________________________________________________________
38 {
39 
40 }
41 //____________________________________________________________________________
42 LwlynSmithFF::LwlynSmithFF(string name, string config) :
43 QELFormFactorsModelI(name, config)
44 {
45 
46 }
47 //____________________________________________________________________________
49 {
50  if (fCleanUpfElFFModel) {
51  delete fElFFModel;
52  }
53 }
54 //____________________________________________________________________________
55 double LwlynSmithFF::StrangeF1V(const Interaction * interaction) const
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 }
70 //____________________________________________________________________________
71 double LwlynSmithFF::StrangexiF2V(const Interaction * interaction) const
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 }
89 
90 //____________________________________________________________________________
91 double LwlynSmithFF::StrangeFA(const Interaction * interaction) const
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 }
107 //____________________________________________________________________________
108 double LwlynSmithFF::F1P(const Interaction * interaction) const
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 }
115 //____________________________________________________________________________
116 double LwlynSmithFF::F2P(const Interaction * interaction) const
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 }
123 //____________________________________________________________________________
124 double LwlynSmithFF::F1N(const Interaction * interaction) const
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 }
131 //____________________________________________________________________________
132 double LwlynSmithFF::F2N(const Interaction * interaction) const
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 }
139 //____________________________________________________________________________
140 double LwlynSmithFF::F1V(const Interaction * interaction) const
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 }
149 //____________________________________________________________________________
150 double LwlynSmithFF::xiF2V(const Interaction * interaction) const
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 }
159 //____________________________________________________________________________
160 double LwlynSmithFF::FA(const Interaction * interaction) const
161 {
162  //-- compute FA(q2)
163 
164  fAxFF.Calculate(interaction);
165  return fAxFF.FA();
166 }
167 //____________________________________________________________________________
168 double LwlynSmithFF::Fp(const Interaction * interaction) const
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 }
188 //____________________________________________________________________________
189 void LwlynSmithFF::Configure(const Registry & config)
190 {
191  Algorithm::Configure(config);
192  this->LoadConfig();
193 }
194 //____________________________________________________________________________
195 void LwlynSmithFF::Configure(string config)
196 {
197  Algorithm::Configure(config);
198  this->LoadConfig();
199 }
200 //____________________________________________________________________________
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 
222 
223  fAxFFModel =
224  dynamic_cast<const AxialFormFactorModelI *> (this->SubAlg("AxialFormFactorModel"));
225 
226  assert(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 }
243 //____________________________________________________________________________
244 double LwlynSmithFF::tau(const Interaction * interaction) const
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 }
258 //____________________________________________________________________________
259 double LwlynSmithFF::GVE(const Interaction * interaction) const
260 {
261  //-- compute GVE using CVC
262 
263  fELFF.Calculate(interaction);
264  double gve = fELFF.Gep() - fELFF.Gen();
265  return gve;
266 }
267 //____________________________________________________________________________
268 double LwlynSmithFF::GVM(const Interaction * interaction) const
269 {
270  //-- compute GVM using CVC
271 
272  fELFF.Calculate(interaction);
273  double gvm = fELFF.Gmp() - fELFF.Gmn();
274  return gvm;
275 }
276 //____________________________________________________________________________
virtual double StrangeF1V(const Interaction *interaction) const
ELFormFactors fELFF
Definition: LwlynSmithFF.h:77
AxialFormFactor fAxFF
Definition: LwlynSmithFF.h:78
virtual double StrangeFA(const Interaction *interaction) const
virtual double tau(const Interaction *interaction) const
const int kPdgLambda
Definition: PDGCodes.h:85
Pure abstract base class. Defines the AxialFormFactorModelI interface to be implemented by LlewellynS...
virtual double GVM(const Interaction *interaction) const
double HitNucMass(void) const
Definition: Target.cxx:233
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
virtual double StrangexiF2V(const Interaction *interaction) const
const int kPdgSigma0
Definition: PDGCodes.h:88
virtual double GVE(const Interaction *interaction) const
void Calculate(const Interaction *interaction)
Calculate the form factors for the input interaction using the attached algorithm.
void SetModel(const AxialFormFactorModelI *model)
Attach an algorithm.
double Gen(void) const
Get the computed form factor Gen.
Definition: ELFormFactors.h:56
Contains minimal information for tagging exclusive processes.
Definition: XclsTag.h:39
Summary information for an interaction.
Definition: Interaction.h:56
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
int StrangeHadronPdg(void) const
Definition: XclsTag.h:55
Pure abstract base class. Defines the QELFormFactorsModelI interface to be implemented by any algorit...
virtual void Configure(const Registry &config)
Pure abstract base class. Defines the ELFormFactorsModelI interface to be implemented by any algorith...
const Kinematics & Kine(void) const
Definition: Interaction.h:71
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
double FA(void) const
Get the computed axial form factor.
virtual double F1N(const Interaction *interaction) const
virtual double F2N(const Interaction *interaction) const
virtual double xiF2V(const Interaction *interaction) const
Compute the form factor xi*F2V for the input interaction.
const AxialFormFactorModelI * fAxFFModel
Definition: LwlynSmithFF.h:75
void Calculate(const Interaction *interaction)
Calculate the form factors for the input interaction using the attached algorithm.
const int kPdgSigmaM
Definition: PDGCodes.h:89
virtual double FA(const Interaction *interaction) const
Compute the form factor FA for the input interaction.
double Gmn(void) const
Get the computed form factor Gmn.
Definition: ELFormFactors.h:59
virtual void LoadConfig(void)
virtual double F1P(const Interaction *interaction) const
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
virtual double F2P(const Interaction *interaction) const
const XclsTag & ExclTag(void) const
Definition: Interaction.h:72
double Gmp(void) const
Get the computed form factor Gmp.
Definition: ELFormFactors.h:53
double Gep(void) const
Get the computed form factor Gep.
Definition: ELFormFactors.h:50
const InitialState & InitState(void) const
Definition: Interaction.h:69
const ELFormFactorsModelI * fElFFModel
Definition: LwlynSmithFF.h:74
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
Definition: InitialState.h:66
void SetModel(const ELFormFactorsModelI *model)
Attach an algorithm.
Modification of magnetic form factors to match observed enhancement in transverse cross section of th...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
virtual double F1V(const Interaction *interaction) const
Compute the form factor F1V for the input interaction.
Initial State information.
Definition: InitialState.h:48
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:345
virtual double Fp(const Interaction *interaction) const
Compute the form factor Fp for the input interaction.