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 <costas.andreopoulos \at stfc.ac.uk>
11  University of Liverpool & STFC Rutherford Appleton Lab
12 
13 \created October 09, 2004
14 
15 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
16  For the full text of the license visit http://copyright.genie-mc.org
17  or see $GENIE/LICENSE
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 */
27 //____________________________________________________________________________
28 
29 #ifndef _NUCLEAR_MODEL_I_H_
30 #define _NUCLEAR_MODEL_I_H_
31 
32 #include <string>
33 
34 #include <TVector3.h>
35 
39 
40 namespace genie {
41 
42 class NuclearModelI : public Algorithm {
43 
44 public:
45  virtual ~NuclearModelI() {};
46 
47  virtual bool GenerateNucleon (const Target &) const = 0;
48  virtual bool GenerateNucleon (const Target & tgt,
49  double hitNucleonRadius) const;
50 
51  virtual double Prob (double p, double w, const Target &) const = 0;
52  virtual double Prob (double p, double w, const Target & tgt,
53  double hitNucleonRadius) const;
54 
55  virtual NuclearModel_t ModelType (const Target &) const = 0;
56 
57  inline double RemovalEnergy (void) const
58  {
59  return fCurrRemovalEnergy;
60  }
61 
62  inline double Momentum (void) const
63  {
64  return fCurrMomentum.Mag();
65  }
66 
67  inline const TVector3& Momentum3 (void) const
68  {
69  return fCurrMomentum;
70  }
71 
73  {
75  }
76 
77  // These setters have to be const. I hate it. We should really update this class interface
78  inline void SetMomentum3(const TVector3 & mom) const
79  {
80  fCurrMomentum = mom;
81  };
82  inline void SetRemovalEnergy(double E) const
83  {
85  }
86 
87 protected:
89  : Algorithm()
91  , fCurrMomentum(0,0,0)
93  {};
95  : Algorithm(name)
97  , fCurrMomentum(0,0,0)
99  {};
101  : Algorithm(name, config)
102  , fCurrRemovalEnergy(0)
103  , fCurrMomentum(0,0,0)
105  {};
106 
107  mutable double fCurrRemovalEnergy;
108  mutable TVector3 fCurrMomentum;
110 
111 };
112 
113 } // genie namespace
114 #endif // _NUCLEAR_MODEL_I_H_
virtual ~NuclearModelI()
Definition: NuclearModelI.h:45
const XML_Char * name
Definition: expat.h:151
double RemovalEnergy(void) const
Definition: NuclearModelI.h:57
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
double Momentum(void) const
Definition: NuclearModelI.h:62
const char * p
Definition: xmltok.h:285
NuclearModelI(std::string name)
Definition: NuclearModelI.h:94
Algorithm abstract base class.
Definition: Algorithm.h:54
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
Definition: NuclearModelI.h:42
Definition: config.py:1
const TVector3 & Momentum3(void) const
Definition: NuclearModelI.h:67
FermiMoverInteractionType_t GetFermiMoverInteractionType(void) const
Definition: NuclearModelI.h:72
virtual NuclearModel_t ModelType(const Target &) const =0
FermiMoverInteractionType_t fFermiMoverInteractionType
Float_t E
Definition: plot.C:20
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:41
enum genie::EFermiMoverInteractionType FermiMoverInteractionType_t
enum genie::ENuclearModel NuclearModel_t
void SetRemovalEnergy(double E) const
Definition: NuclearModelI.h:82
void SetMomentum3(const TVector3 &mom) const
Definition: NuclearModelI.h:78
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
Float_t w
Definition: plot.C:20
enum BeamMode string