GENIEGenerator
Loading...
Searching...
No Matches
MKFFEM.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 or see $GENIE/LICENSE
6
7 Author: Igor Kakorin <kakorin@jinr.ru>, Joint Institute for Nuclear Research
8 based on code of Costas Andreopoulos <c.andreopoulos \at cern.ch>
9 University of Liverpool
10
11 For the class documentation see the corresponding header file.
12
13
14*/
15//____________________________________________________________________________
16
17#include <TMath.h>
18
28
29using namespace genie;
30using namespace genie::constants;
31
32//____________________________________________________________________________
34QELFormFactorsModelI("genie::MKFFEM")
35{
36
37}
38//____________________________________________________________________________
39MKFFEM::MKFFEM(string config) :
40QELFormFactorsModelI("genie::MKFFEM", config)
41{
42
43}
44//____________________________________________________________________________
46{
47
48}
49//____________________________________________________________________________
50double MKFFEM::F1P(const Interaction * interaction) const
51{
52 fELFF.Calculate(interaction);
53 double t = this->tau(interaction);
54 double T = 1 / (1 - t);
55 return T * (fELFF.Gep() - t * fELFF.Gmp());
56}
57//____________________________________________________________________________
58double MKFFEM::F2P(const Interaction * interaction) const
59{
60 fELFF.Calculate(interaction);
61 double t = this->tau(interaction);
62 double T = 1 / (1 - t);
63 return T * (fELFF.Gmp() - fELFF.Gep());
64}
65//____________________________________________________________________________
66double MKFFEM::F1N(const Interaction * interaction) const
67{
68 fELFF.Calculate(interaction);
69 double t = this->tau(interaction);
70 double T = 1 / (1 - t);
71 return T * (fELFF.Gen() - t * fELFF.Gmn());
72}
73//____________________________________________________________________________
74double MKFFEM::F2N(const Interaction * interaction) const
75{
76 fELFF.Calculate(interaction);
77 double t = this->tau(interaction);
78 double T = 1 / (1 - t);
79 return T * (fELFF.Gmn() - fELFF.Gen());
80}
81//____________________________________________________________________________
82double MKFFEM::F1V(const Interaction * interaction) const
83{
84 double F1p = this->F1P(interaction);
85 double F1n = this->F1N(interaction);
86
87 double _F1V = F1p + F1n;
88 return _F1V;
89}
90//____________________________________________________________________________
91double MKFFEM::xiF2V(const Interaction * interaction) const
92{
93 double F2p = this->F2P(interaction);
94 double F2n = this->F2N(interaction);
95
96 double _xiF2V = F2p + F2n;
97 return _xiF2V;
98}
99//____________________________________________________________________________
100double MKFFEM::FA(const Interaction * /*interaction*/ ) const
101{
102 return 0.;
103}
104//____________________________________________________________________________
105double MKFFEM::Fp(const Interaction * /*interaction*/ ) const
106{
107 return 0.;
108}
109//____________________________________________________________________________
110void MKFFEM::Configure(const Registry & config)
111{
112 Algorithm::Configure(config);
113 this->LoadConfig();
114}
115//____________________________________________________________________________
116void MKFFEM::Configure(string config)
117{
118 Algorithm::Configure(config);
119 this->LoadConfig();
120}
121//____________________________________________________________________________
123{
124// Load configuration data from its configuration Registry (or global defaults)
125// to private data members
126 fElFFModel =
127 dynamic_cast<const ELFormFactorsModelI *> (this->SubAlg("ElasticFormFactorsModel"));
128 assert(fElFFModel);
129 fELFF.SetModel(fElFFModel);
130
131
132}
133//____________________________________________________________________________
134double MKFFEM::tau(const Interaction * interaction) const
135{
136// computes q^2 / (4 * MNucl^2)
137
138 //-- get kinematics & initial state parameters
139 const Kinematics & kinematics = interaction->Kine();
140 // const InitialState & init_state = interaction->InitState();
141 double q2 = kinematics.q2();
142
143 PDGLibrary * pdglib = PDGLibrary::Instance();
144 double M = (pdglib->Find(kPdgProton)->Mass() + pdglib->Find(kPdgNeutron)->Mass())/2;
145
146 //-- calculate q^2 / (4*Mnuc^2)
147 return q2/(4*M*M);
148}
149//____________________________________________________________________________
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62
const Algorithm * SubAlg(const RgKey &registry_key) const
Pure abstract base class. Defines the ELFormFactorsModelI interface to be implemented by any algorith...
Summary information for an interaction.
Definition Interaction.h:56
const Kinematics & Kine(void) const
Definition Interaction.h:71
Generated/set kinematical variables for an event.
Definition Kinematics.h:39
double q2(bool selected=false) const
double tau(const Interaction *interaction) const
Definition MKFFEM.cxx:134
double F1V(const Interaction *interaction) const
Compute the form factor F1V for the input interaction.
Definition MKFFEM.cxx:82
ELFormFactors fELFF
Definition MKFFEM.h:62
void Configure(const Registry &config)
Definition MKFFEM.cxx:110
double F2N(const Interaction *interaction) const
Definition MKFFEM.cxx:74
double F1N(const Interaction *interaction) const
Definition MKFFEM.cxx:66
double xiF2V(const Interaction *interaction) const
Compute the form factor xi*F2V for the input interaction.
Definition MKFFEM.cxx:91
void LoadConfig(void)
Definition MKFFEM.cxx:122
const ELFormFactorsModelI * fElFFModel
Definition MKFFEM.h:60
double F1P(const Interaction *interaction) const
Definition MKFFEM.cxx:50
double FA(const Interaction *interaction) const
Compute the form factor FA for the input interaction.
Definition MKFFEM.cxx:100
double F2P(const Interaction *interaction) const
Definition MKFFEM.cxx:58
double Fp(const Interaction *interaction) const
Compute the form factor Fp for the input interaction.
Definition MKFFEM.cxx:105
Singleton class to load & serve a TDatabasePDG.
Definition PDGLibrary.h:36
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
A registry. Provides the container for algorithm configuration parameters.
Definition Registry.h:65
Basic constants.
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
const int kPdgProton
Definition PDGCodes.h:81
const int kPdgNeutron
Definition PDGCodes.h:83