GENIEGenerator
Loading...
Searching...
No Matches
DipoleELFormFactorsModel.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*
3 Copyright (c) 2003-2025, 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
18using namespace genie;
19
20//____________________________________________________________________________
22ELFormFactorsModelI("genie::DipoleELFormFactorsModel")
23{
24
25}
26//____________________________________________________________________________
28ELFormFactorsModelI("genie::DipoleELFormFactorsModel", config)
29{
30
31}
32//____________________________________________________________________________
37//____________________________________________________________________________
38double 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//____________________________________________________________________________
48double DipoleELFormFactorsModel::Gen(const Interaction * /*in*/) const
49{
50 return 0.;
51}
52//____________________________________________________________________________
53double 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//____________________________________________________________________________
63double 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{
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//____________________________________________________________________________
#define pDEBUG
Definition Messenger.h:63
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62
double Gmn(const Interaction *interaction) const
Compute the elastic form factor G_{mn} for the input interaction.
double Gep(const Interaction *interaction) const
Compute the elastic form factor G_{ep} for the input interaction.
double Gen(const Interaction *interaction) const
Compute the elastic form factor G_{en} for the input interaction.
double Gmp(const Interaction *interaction) const
Compute the elastic form factor G_{mp} for the input interaction.
void Configure(const Registry &config)
Summary information for an interaction.
Definition Interaction.h:56
const Kinematics & Kine(void) const
Definition Interaction.h:71
double q2(bool selected=false) const
A registry. Provides the container for algorithm configuration parameters.
Definition Registry.h:65
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25