GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SpectralFunc1d.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::SpectralFunc1d
5 
6 \brief Simpler approach to using spectral functions.
7  A beta version.
8  Implements the NuclearModelI interface.
9 
10 \ref
11 
12 \author Costas Andreopoulos <c.andreopoulos \at cern.ch>
13  University of Liverpool
14 
15 \created October 09, 2004
16 
17 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
18  For the full text of the license visit http://copyright.genie-mc.org
19 
20 */
21 //____________________________________________________________________________
22 
23 #ifndef _SPECTRAL_FUNCTION_1D_H_
24 #define _SPECTRAL_FUNCTION_1D_H_
25 
26 #include <map>
27 
29 
30 using std::map;
31 
32 namespace genie {
33 
34 class Spline;
35 class SpectralFunc1d : public NuclearModelI {
36 
37 public:
39  SpectralFunc1d(string config);
40  virtual ~SpectralFunc1d();
41 
42  using NuclearModelI::GenerateNucleon; // inherit versions not overridden here
43  using NuclearModelI::Prob;
44 
45  //-- implement the NuclearModelI interface
46  bool GenerateNucleon (const Target & t) const;
47  double Prob (double p, double w, const Target & t) const;
49  {
50  return kNucmFermiGas; /// is not really a spectral func model, just a FG model with different momentum distribution
51  }
52 
53  //-- override the Algorithm::Configure methods to load configuration
54  // data to private data members
55  void Configure (const Registry & config);
56  void Configure (string param_set);
57 
58  protected:
59  void LoadConfig (void);
60 
61 private:
62 
63  void CleanUp (void);
64 
65  // Spectral function data
66  // Hopefully, analytical expressions for spectral functions will become available soon.
67  //
70  double fPCutOff;
71  map<int, Spline *> fSFk; ///< All available spectral funcs integrated over removal energy
72  map<int, Spline *> fSFw; ///< Average nucleon removal as a function of pF - computed from the spectral function
73  map<int, double> fNucRmvE; ///< Removal energies as used in FG model
74  map<int, double> fMaxProb; ///< Max SF(k) probability used in rejection method
75 };
76 
77 } // genie namespace
78 #endif // _SPECTRAL_FUNCTION_1D_H_
79 
void Configure(const Registry &config)
bool GenerateNucleon(const Target &t) const
map< int, double > fNucRmvE
Removal energies as used in FG model.
map< int, Spline * > fSFk
All available spectral funcs integrated over removal energy.
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
Definition: NuclearModelI.h:46
NuclearModel_t ModelType(const Target &) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
virtual double Prob(double p, double w, const Target &) const =0
enum genie::ENuclearModel NuclearModel_t
Simpler approach to using spectral functions. A beta version. Implements the NuclearModelI interface...
double Prob(double p, double w, const Target &t) const
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
map< int, double > fMaxProb
Max SF(k) probability used in rejection method.
virtual bool GenerateNucleon(const Target &) const =0
map< int, Spline * > fSFw
Average nucleon removal as a function of pF - computed from the spectral function.