GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TransverseEnhancementFFModel.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 
7  Author: Brian Coopersmith, University of Rochester
8 
9  For the class documentation see the corresponding header file.
10 
11 */
12 //____________________________________________________________________________
13 
19 
20 using namespace genie;
21 using namespace genie::constants;
22 using namespace genie::utils::config;
23 
24 //____________________________________________________________________________
26 ELFormFactorsModelI("genie::TransverseEnhancementFFModel")
27 {
28 
29 }
30 //____________________________________________________________________________
32 ELFormFactorsModelI("genie::TransverseEnhancementFFModel", config)
33 {
34 
35 }
36 //____________________________________________________________________________
38 {
39 
40 }
41 //____________________________________________________________________________
42 // Return the electric form factor of the base model.
43 //____________________________________________________________________________
44 double TransverseEnhancementFFModel::Gep(const Interaction * interaction) const
45 {
46  return fElFormFactorsBase->Gep(interaction);
47 }
48 //____________________________________________________________________________
49 // Return the magnetic form factor of the base model, multiplied by the
50 // Transverse Enhancement function.
51 //____________________________________________________________________________
52 double TransverseEnhancementFFModel::Gmp(const Interaction * interaction) const
53 {
54  return GetTransEnhMagFF(fElFormFactorsBase->Gmp(interaction), interaction);
55 }
56 //____________________________________________________________________________
57 // Return the electric form factor of the base model.
58 //____________________________________________________________________________
59 double TransverseEnhancementFFModel::Gen(const Interaction * interaction) const
60 {
61  return fElFormFactorsBase->Gen(interaction);
62 }
63 //____________________________________________________________________________
64 // Return the magnetic form factor of the base model, multiplied by the
65 // Transverse Enhancement function.
66 //____________________________________________________________________________
67 double TransverseEnhancementFFModel::Gmn(const Interaction * interaction) const
68 {
69  return GetTransEnhMagFF(fElFormFactorsBase->Gmn(interaction), interaction);
70 }
71 //____________________________________________________________________________
72 // Multiplies the supplied magnetic form factor by the Transverse Enhancement
73 // function and returns the result.
74 //____________________________________________________________________________
76  double magFF, const Interaction * interaction) const
77 {
78  const Target& target = interaction->InitState().Tgt();
79  double transEnhA, transEnhB;
80  GetTransEnhParams(target, &transEnhA, &transEnhB);
81  if (transEnhA == 0) {
82  return magFF;
83  }
84  double Q2 = interaction->Kine().Q2();
85  double rt = 1 + transEnhA * Q2 * TMath::Exp(-Q2 / transEnhB);
86  return TMath::Sqrt(rt)*magFF;
87 }
88 //____________________________________________________________________________
89 // Returns the Transverse Enhancement parameters as loaded from config files.
90 //____________________________________________________________________________
92  const Target& target, double* teA, double* teB) const {
94  fRangeMagFF_RT_A, teA) ||
96  fRangeMagFF_RT_B, teB) ||
97  *teB == 0) {
98  *teA = 0;
99  *teB = 1;
100  }
101 }
102 //____________________________________________________________________________
104 {
105  Algorithm::Configure(config);
106  this->LoadConfig();
107 }
108 //____________________________________________________________________________
110 {
111  Algorithm::Configure(config);
112  this->LoadConfig();
113 }
114 //____________________________________________________________________________
115 // Loads Transverse enhancement parameters. All parameters are from config
116 // files.
117 //____________________________________________________________________________
119 {
120  LoadAllIsotopesForKey("MagFF_RT_A", "TansverseEnhancementFFModel", GetOwnedConfig(),
121  &fNucMagFF_RT_A);
122  LoadAllNucARangesForKey("MagFF_RT_A", "TransverseEnhancementFFModel", GetOwnedConfig(),
124  LoadAllIsotopesForKey("MagFF_RT_B", "TransverseEnhancementFFModel", GetOwnedConfig(),
125  &fNucMagFF_RT_B);
126  LoadAllNucARangesForKey("MagFF_RT_B", "TransverseEnhancementFFModel", GetOwnedConfig(),
128 }
Registry * GetOwnedConfig(void)
Definition: Algorithm.cxx:279
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
double Gmp(const Interaction *interaction) const
Compute the elastic form factor G_{mp} for the input interaction.
double Gmn(const Interaction *interaction) const
Compute the elastic form factor G_{mn} for the input interaction.
double Gen(const Interaction *interaction) const
Compute the elastic form factor G_{en} for the input interaction.
virtual double Gmn(const Interaction *interaction) const =0
Compute the elastic form factor G_{mn} for the input interaction.
double GetTransEnhMagFF(double magFF, const Interaction *interaction) const
void LoadAllIsotopesForKey(const char *key_name, const char *log_tool_name, Registry *config, map< int, double > *nuc_to_val)
Summary information for an interaction.
Definition: Interaction.h:56
Pure abstract base class. Defines the ELFormFactorsModelI interface to be implemented by any algorith...
virtual double Gen(const Interaction *interaction) const =0
Compute the elastic form factor G_{en} for the input interaction.
double Gep(const Interaction *interaction) const
Compute the elastic form factor G_{ep} for the input interaction.
const Kinematics & Kine(void) const
Definition: Interaction.h:71
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
void GetTransEnhParams(const Target &target, double *transEnhA, double *transEnhB) const
map< pair< int, int >, double > fRangeMagFF_RT_B
bool GetValueFromNuclearMaps(const Target &target, const map< int, double > &nuc_to_val, const map< pair< int, int >, double > &nucA_range_to_val, double *val)
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
virtual double Gep(const Interaction *interaction) const =0
Compute the elastic form factor G_{ep} for the input interaction.
const InitialState & InitState(void) const
Definition: Interaction.h:69
virtual double Gmp(const Interaction *interaction) const =0
Compute the elastic form factor G_{mp} for the input interaction.
double Q2(bool selected=false) const
Definition: Kinematics.cxx:125
const Target & Tgt(void) const
Definition: InitialState.h:66
map< pair< int, int >, double > fRangeMagFF_RT_A
void LoadAllNucARangesForKey(const char *key_name, const char *log_tool_name, Registry *config, map< pair< int, int >, double > *nuc_rangeA_to_val)