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 <constantinos.andreopoulos \at cern.ch>
11  University of Liverpool & STFC Rutherford Appleton Laboratory
12 
13 \created October 09, 2004
14 
15 \cpright Copyright (c) 2003-2020, 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 
44 namespace genie {
45 
46 class NuclearModelI : public Algorithm {
47 
48 public:
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 
81  {
83  }
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 
95 protected:
97  : Algorithm()
99  , fCurrMomentum(0,0,0)
101  , fKFTable(nullptr)
102  , fKFTableName("Unspecified")
103  {};
105  : Algorithm(name)
106  , fCurrRemovalEnergy(0)
107  , fCurrMomentum(0,0,0)
109  , fKFTable(nullptr)
110  , fKFTableName("Unspecified")
111  {};
113  : Algorithm(name, config)
114  , fCurrRemovalEnergy(0)
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 
134  string fKFTableName;
135 
136 };
137 
138 } // genie namespace
139 #endif // _NUCLEAR_MODEL_I_H_
virtual ~NuclearModelI()
Definition: NuclearModelI.h:49
static QCString name
Definition: declinfo.cpp:673
virtual double LocalFermiMomentum(const Target &, int nucleon_pdg, double radius) const
double RemovalEnergy(void) const
Definition: NuclearModelI.h:65
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
std::string string
Definition: nybbler.cc:12
double Momentum(void) const
Definition: NuclearModelI.h:70
NuclearModelI(std::string name)
Algorithm abstract base class.
Definition: Algorithm.h:53
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
Definition: NuclearModelI.h:46
A table of Fermi momentum constants.
const TVector3 & Momentum3(void) const
Definition: NuclearModelI.h:75
FermiMoverInteractionType_t GetFermiMoverInteractionType(void) const
Definition: NuclearModelI.h:80
virtual NuclearModel_t ModelType(const Target &) const =0
const genie::FermiMomentumTable & FermiMomentumTable() const
virtual double FermiMomentum(const Target &, int nucleon_pdg) const
FermiMoverInteractionType_t fFermiMoverInteractionType
static Config * config
Definition: config.cpp:1054
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
p
Definition: test.py:223
enum genie::EFermiMoverInteractionType FermiMoverInteractionType_t
virtual void LoadConfig()
const genie::FermiMomentumTable * fKFTable
enum genie::ENuclearModel NuclearModel_t
void SetRemovalEnergy(double E) const
Definition: NuclearModelI.h:90
void SetMomentum3(const TVector3 &mom) const
Definition: NuclearModelI.h:86
E
Definition: 018_def.c:13
virtual bool GenerateNucleon(const Target &) const =0
NuclearModelI(std::string name, std::string config)
virtual double Prob(double p, double w, const Target &) const =0
const string & FermiMomentumTableName() const