GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DipoleELFormFactorsModel.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 
17 
18 using namespace genie;
19 
20 //____________________________________________________________________________
22 ELFormFactorsModelI("genie::DipoleELFormFactorsModel")
23 {
24 
25 }
26 //____________________________________________________________________________
28 ELFormFactorsModelI("genie::DipoleELFormFactorsModel", config)
29 {
30 
31 }
32 //____________________________________________________________________________
34 {
35 
36 }
37 //____________________________________________________________________________
38 double DipoleELFormFactorsModel::Gep(const Interaction * interaction) const
39 {
40  // calculate and return GNE
41  double q2 = interaction->Kine().q2();
42  double ge = 1. / TMath::Power(1-q2/fMv2, 2);
43 
44  LOG("ELFormFactors", pDEBUG) << "Gep(q^2 = " << q2 << ") = " << ge;
45  return ge;
46 }
47 //____________________________________________________________________________
48 double DipoleELFormFactorsModel::Gen(const Interaction * /*in*/) const
49 {
50  return 0.;
51 }
52 //____________________________________________________________________________
53 double DipoleELFormFactorsModel::Gmp(const Interaction * interaction) const
54 {
55  // calculate & return Gm
56  double q2 = interaction->Kine().q2();
57  double gm = fMuP / TMath::Power(1-q2/fMv2, 2);
58 
59  LOG("ELFormFactors", pDEBUG) << "Gmp(q^2 = " << q2 << ") = " << gm;
60  return gm;
61 }
62 //____________________________________________________________________________
63 double DipoleELFormFactorsModel::Gmn(const Interaction * interaction) const
64 {
65  // calculate & return Gm
66  double q2 = interaction->Kine().q2();
67  double gm = fMuN / TMath::Power(1-q2/fMv2, 2);
68 
69  LOG("ELFormFactors", pDEBUG) << "Gmn(q^2 = " << q2 << ") = " << gm;
70  return gm;
71 }
72 //____________________________________________________________________________
74 {
75  Algorithm::Configure(config);
76  this->LoadConfig();
77 }
78 //____________________________________________________________________________
80 {
81  Algorithm::Configure(param_set);
82  this->LoadConfig();
83 }
84 //____________________________________________________________________________
86 {
87  // vector mass
88  GetParam( "QEL-Mv", fMv ) ;
89  fMv2 = TMath::Power(fMv,2);
90 
91  // anomalous magnetic moments
92  GetParam( "AnomMagnMoment-P", fMuP ) ;
93  GetParam( "AnomMagnMoment-N", fMuN ) ;
94 }
95 //____________________________________________________________________________
double Gmn(const Interaction *interaction) const
Compute the elastic form factor G_{mn} for the input interaction.
Summary information for an interaction.
Definition: Interaction.h:56
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
void Configure(const Registry &config)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
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
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
double Gen(const Interaction *interaction) const
Compute the elastic form factor G_{en} for the input interaction.
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
double Gep(const Interaction *interaction) const
Compute the elastic form factor G_{ep} for the input interaction.
#define pDEBUG
Definition: Messenger.h:63
double Gmp(const Interaction *interaction) const
Compute the elastic form factor G_{mp} for the input interaction.