GENIEGenerator
Loading...
Searching...
No Matches
NuclearModelI.h
Go to the documentation of this file.
1//____________________________________________________________________________
2/*!
3
4\class genie::NuclearModelI
5
6\brief Pure abstract base class.
7 Defines the NuclearModelI interface to be implemented by any physics
8 model describing the distribution of nucleons within a nuclei
9
10\author Costas Andreopoulos <c.andreopoulos \at cern.ch>
11 University of Liverpool
12
13\created October 09, 2004
14
15\cpright Copyright (c) 2003-2025, The GENIE Collaboration
16 For the full text of the license visit http://copyright.genie-mc.org
17
18
19 Important revisions after version 2.0.0 :
20 @ Mar 18, 2016 - JJ (SD)
21 Added option for GenerateNucleon() to be called with a target and a radius
22 as the arguments. Currently used by LocalFGM. Calls
23 GenerateNucleon() with the radius set to 0 for all other NuclearModelI
24 implementations.
25
26 @ Jul 2020 - Marco Roda
27 Added fooks for FermiMomentum and LocalFermiMomentum
28
29*/
30//____________________________________________________________________________
31
32#ifndef _NUCLEAR_MODEL_I_H_
33#define _NUCLEAR_MODEL_I_H_
34
35#include <string>
36
37#include <TVector3.h>
38
43
44namespace genie {
45
46class NuclearModelI : public Algorithm {
47
48public:
49 virtual ~NuclearModelI() {};
50
51 virtual bool GenerateNucleon (const Target &) const = 0;
52 virtual bool GenerateNucleon (const Target & tgt,
53 double hitNucleonRadius) const;
54
55 virtual double Prob (double p, double w, const Target &) const = 0;
56 virtual double Prob (double p, double w, const Target & tgt,
57 double hitNucleonRadius) const;
58
59 virtual NuclearModel_t ModelType (const Target &) const = 0;
60
61 virtual double FermiMomentum( const Target &, int nucleon_pdg ) const ;
62 virtual double LocalFermiMomentum( const Target &, int nucleon_pdg, double radius ) const ;
63
64
65 inline double RemovalEnergy (void) const
66 {
67 return fCurrRemovalEnergy;
68 }
69
70 inline double Momentum (void) const
71 {
72 return fCurrMomentum.Mag();
73 }
74
75 inline const TVector3& Momentum3 (void) const
76 {
77 return fCurrMomentum;
78 }
79
84
85 // These setters have to be const. I hate it. We should really update this class interface
86 inline void SetMomentum3(const TVector3 & mom) const
87 {
88 fCurrMomentum = mom;
89 };
90 inline void SetRemovalEnergy(double E) const
91 {
93 }
94
95protected:
97 : Algorithm()
99 , fCurrMomentum(0,0,0)
101 , fKFTable(nullptr)
102 , fKFTableName("Unspecified")
103 {};
104 NuclearModelI(std::string name)
105 : Algorithm(name)
107 , fCurrMomentum(0,0,0)
109 , fKFTable(nullptr)
110 , fKFTableName("Unspecified")
111 {};
112 NuclearModelI(std::string name, std::string config)
113 : Algorithm(name, config)
115 , fCurrMomentum(0,0,0)
117 , fKFTable(nullptr)
118 , fKFTableName("Unspecified")
119 {};
120
121 virtual void LoadConfig() ;
122
123 const string & FermiMomentumTableName() const { return fKFTableName; }
125
126 mutable double fCurrRemovalEnergy;
127 mutable TVector3 fCurrMomentum;
129
130
131 private:
132
135
136};
137
138} // genie namespace
139#endif // _NUCLEAR_MODEL_I_H_
A table of Fermi momentum constants.
virtual void LoadConfig()
void SetMomentum3(const TVector3 &mom) const
FermiMoverInteractionType_t fFermiMoverInteractionType
void SetRemovalEnergy(double E) const
const TVector3 & Momentum3(void) const
virtual double Prob(double p, double w, const Target &) const =0
virtual bool GenerateNucleon(const Target &) const =0
const genie::FermiMomentumTable * fKFTable
virtual NuclearModel_t ModelType(const Target &) const =0
const genie::FermiMomentumTable & FermiMomentumTable() const
NuclearModelI(std::string name)
FermiMoverInteractionType_t GetFermiMoverInteractionType(void) const
virtual double FermiMomentum(const Target &, int nucleon_pdg) const
virtual double LocalFermiMomentum(const Target &, int nucleon_pdg, double radius) const
const string & FermiMomentumTableName() const
NuclearModelI(std::string name, std::string config)
double Momentum(void) const
double RemovalEnergy(void) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition Target.h:40
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
enum genie::EFermiMoverInteractionType FermiMoverInteractionType_t
enum genie::ENuclearModel NuclearModel_t
@ kFermiMoveDefault