GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EngelFormFactor.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  Author: Iker de Icaza <i.de-icaza-astiz \at sussex.ac.uk>
7  University of Sussex
8 
9  Costas Andreopoulos <c.andreopoulos \at cern.ch>
10  University of Liverpool
11 */
12 //____________________________________________________________________________
13 
14 #include <TMath.h>
15 
18 
21 
23 
24 using namespace genie;
25 
26 
27 //____________________________________________________________________________
29 Algorithm("genie::EngelFormFactor")
30 {
31 
32 }
33 //____________________________________________________________________________
35 Algorithm("genie::EngelFormFactor", config)
36 {
37 
38 }
39 //____________________________________________________________________________
41 {
42 
43 }
44 //____________________________________________________________________________
45 double EngelFormFactor::FormFactor(const double Q2, const Target & target) const {
46 
47  if(!target.IsValidNucleus()) {
48  LOG("EngelFormFactor", pWARN)
49  << "target: " << target.AsString() << " is not a valid nucleus. ";
50  return 0.;
51  }
52 
53  LOG("EngelFormFactor", pDEBUG)
54  << "Running Engel Form Factor with Q2: " << Q2
55  << " and target: " << target.AsString();
56 
57  const double A = target.A();
58 
59  const double s = 1.*units::fm;
60  const double s2 = s * s;
61  const double R = 1.2*TMath::Power(A, 1./3.)*units::fm;
62  const double r = TMath::Sqrt(R*R - 5.*s*s);
63  const double qr = TMath::Sqrt(Q2) * r;
64 
65  const double f1 = 3. * TMath::Exp(-.5*Q2*s2) * TMath::Power(qr, -3.);
66  const double f2 = TMath::Sin(qr) - qr*TMath::Cos(qr);
67  return f1 * f2;
68 }
69 //____________________________________________________________________________
71 {
72  Algorithm::Configure(config);
73  this->LoadConfig();
74 }
75 //____________________________________________________________________________
76 void EngelFormFactor::Configure(string config)
77 {
78  Algorithm::Configure(config);
79  this->LoadConfig();
80 }
81 //____________________________________________________________________________
83 {
84 
85 }
86 //____________________________________________________________________________
void Configure(const Registry &config)
string AsString(void) const
Definition: Target.cxx:383
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
int A(void) const
Definition: Target.h:70
static constexpr double s
Definition: Units.h:95
Algorithm abstract base class.
Definition: Algorithm.h:54
bool IsValidNucleus(void) const
Definition: Target.cxx:309
double FormFactor(const double Q, const Target &target) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static constexpr double A
Definition: Units.h:74
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
#define pWARN
Definition: Messenger.h:60
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
static constexpr double fm
Definition: Units.h:75
#define pDEBUG
Definition: Messenger.h:63