GENIEGenerator
Loading...
Searching...
No Matches
TransverseEnhancementFFModel.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
7 Author: Brian Coopersmith, University of Rochester
8
9 For the class documentation see the corresponding header file.
10
11*/
12//____________________________________________________________________________
13
19
20using namespace genie;
21using namespace genie::constants;
22using namespace genie::utils::config;
23
24//____________________________________________________________________________
26ELFormFactorsModelI("genie::TransverseEnhancementFFModel")
27{
28
29}
30//____________________________________________________________________________
32ELFormFactorsModelI("genie::TransverseEnhancementFFModel", config)
33{
34
35}
36//____________________________________________________________________________
41//____________________________________________________________________________
42// Return the electric form factor of the base model.
43//____________________________________________________________________________
44double 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//____________________________________________________________________________
52double 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//____________________________________________________________________________
59double 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//____________________________________________________________________________
67double 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//____________________________________________________________________________
108//____________________________________________________________________________
114//____________________________________________________________________________
115// Loads Transverse enhancement parameters. All parameters are from config
116// files.
117//____________________________________________________________________________
119{
120 LoadAllIsotopesForKey("MagFF_RT_A", "TansverseEnhancementFFModel", GetOwnedConfig(),
122 LoadAllNucARangesForKey("MagFF_RT_A", "TransverseEnhancementFFModel", GetOwnedConfig(),
124 LoadAllIsotopesForKey("MagFF_RT_B", "TransverseEnhancementFFModel", GetOwnedConfig(),
126 LoadAllNucARangesForKey("MagFF_RT_B", "TransverseEnhancementFFModel", GetOwnedConfig(),
128}
Registry * GetOwnedConfig(void)
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62
const Target & Tgt(void) const
Summary information for an interaction.
Definition Interaction.h:56
const Kinematics & Kine(void) const
Definition Interaction.h:71
const InitialState & InitState(void) const
Definition Interaction.h:69
double Q2(bool selected=false) const
A registry. Provides the container for algorithm configuration parameters.
Definition Registry.h:65
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition Target.h:40
double GetTransEnhMagFF(double magFF, const Interaction *interaction) const
double Gmp(const Interaction *interaction) const
Compute the elastic form factor G_{mp} for the input interaction.
void GetTransEnhParams(const Target &target, double *transEnhA, double *transEnhB) const
double Gen(const Interaction *interaction) const
Compute the elastic form factor G_{en} for the input interaction.
double Gmn(const Interaction *interaction) const
Compute the elastic form factor G_{mn} for the input interaction.
map< pair< int, int >, double > fRangeMagFF_RT_B
double Gep(const Interaction *interaction) const
Compute the elastic form factor G_{ep} for the input interaction.
map< pair< int, int >, double > fRangeMagFF_RT_A
Basic constants.
Simple functions for loading and reading nucleus dependent keys from config files.
void LoadAllIsotopesForKey(const char *key_name, const char *log_tool_name, Registry *config, map< int, double > *nuc_to_val)
bool GetValueFromNuclearMaps(const Target &target, const map< int, double > &nuc_to_val, const map< pair< int, int >, double > &nucA_range_to_val, double *val)
void LoadAllNucARangesForKey(const char *key_name, const char *log_tool_name, Registry *config, map< pair< int, int >, double > *nuc_rangeA_to_val)
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25