DipoleELFormFactorsModel.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2019, 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: Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
8  University of Liverpool & STFC Rutherford Appleton Lab
9 
10  For the class documentation see the corresponding header file.
11 
12  Important revisions after version 2.0.0 :
13  @ Sep 19, 2009 - CA
14  Moved into the ElFF package from its previous location
15 
16 */
17 //____________________________________________________________________________
18 
19 #include <TMath.h>
20 
25 
26 using namespace genie;
27 
28 //____________________________________________________________________________
30 ELFormFactorsModelI("genie::DipoleELFormFactorsModel")
31 {
32 
33 }
34 //____________________________________________________________________________
36 ELFormFactorsModelI("genie::DipoleELFormFactorsModel", config)
37 {
38 
39 }
40 //____________________________________________________________________________
42 {
43 
44 }
45 //____________________________________________________________________________
46 double DipoleELFormFactorsModel::Gep(const Interaction * interaction) const
47 {
48  // calculate and return GNE
49  double q2 = interaction->Kine().q2();
50  double ge = 1. / TMath::Power(1-q2/fMv2, 2);
51 
52  LOG("ELFormFactors", pDEBUG) << "Gep(q^2 = " << q2 << ") = " << ge;
53  return ge;
54 }
55 //____________________________________________________________________________
56 double DipoleELFormFactorsModel::Gen(const Interaction * /*in*/) const
57 {
58  return 0.;
59 }
60 //____________________________________________________________________________
61 double DipoleELFormFactorsModel::Gmp(const Interaction * interaction) const
62 {
63  // calculate & return Gm
64  double q2 = interaction->Kine().q2();
65  double gm = fMuP / TMath::Power(1-q2/fMv2, 2);
66 
67  LOG("ELFormFactors", pDEBUG) << "Gmp(q^2 = " << q2 << ") = " << gm;
68  return gm;
69 }
70 //____________________________________________________________________________
71 double DipoleELFormFactorsModel::Gmn(const Interaction * interaction) const
72 {
73  // calculate & return Gm
74  double q2 = interaction->Kine().q2();
75  double gm = fMuN / TMath::Power(1-q2/fMv2, 2);
76 
77  LOG("ELFormFactors", pDEBUG) << "Gmn(q^2 = " << q2 << ") = " << gm;
78  return gm;
79 }
80 //____________________________________________________________________________
82 {
83  Algorithm::Configure(config);
84  this->LoadConfig();
85 }
86 //____________________________________________________________________________
88 {
89  Algorithm::Configure(param_set);
90  this->LoadConfig();
91 }
92 //____________________________________________________________________________
94 {
95  // vector mass
96  GetParam( "EL-Mv", fMv ) ;
97  fMv2 = TMath::Power(fMv,2);
98 
99  // anomalous magnetic moments
100  GetParam( "AnomMagnMoment-P", fMuP ) ;
101  GetParam( "AnomMagnMoment-N", fMuN ) ;
102 }
103 //____________________________________________________________________________
104 
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
double Gmn(const Interaction *interaction) const
Compute the elastic form factor G_{mn} for the input interaction.
Definition: config.py:1
Double_t q2[12][num]
Definition: f2_nu.C:137
Summary information for an interaction.
Definition: Interaction.h:56
double q2(bool selected=false) const
Definition: Kinematics.cxx:151
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:97
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:70
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
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
TGeoManager * gm
Definition: make_fe_box.C:4
double Gep(const Interaction *interaction) const
Compute the elastic form factor G_{ep} for the input interaction.
#define pDEBUG
Definition: Messenger.h:64
double Gmp(const Interaction *interaction) const
Compute the elastic form factor G_{mp} for the input interaction.