GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NuclearModelMap.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::NuclearModelMap
5 
6 \brief This class is a hook for nuclear models and allows associating each
7  one of them with specific nuclei.
8  Is a concrete implementation of the NuclearModelI interface.
9 
10 \author Costas Andreopoulos <c.andreopoulos \at cern.ch>
11  University of Liverpool
12 
13 \created May 07, 2004
14 
15 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
16  For the full text of the license visit http://copyright.genie-mc.org
17 
18 */
19 //____________________________________________________________________________
20 
21 #ifndef _NUCLEAR_MODEL_MAP_H_
22 #define _NUCLEAR_MODEL_MAP_H_
23 
24 #include <map>
26 
27 using std::map;
28 
29 namespace genie {
30 
32 
33 public:
35  NuclearModelMap(string config);
36  virtual ~NuclearModelMap();
37 
38  using NuclearModelI::GenerateNucleon; // inherit versions not overridden here
39  using NuclearModelI::Prob;
40 
41  //-- Allow GenerateNucleon to be called with a radius
42  virtual bool GenerateNucleon (const Target & t,
43  double hitNucleonRadius) const;
44  virtual double Prob (double p, double w, const Target & t,
45  double hitNucleonRadius) const;
46 
47  //-- implement the NuclearModelI interface
48  bool GenerateNucleon (const Target & t) const {
49  return GenerateNucleon(t,0.0);
50  }
51  double Prob (double p, double w, const Target & t) const {
52  return Prob(p,w,t,0.0);
53  }
54  NuclearModel_t ModelType (const Target & t) const;
55 
56  virtual double FermiMomentum( const Target & t, int nucleon_pdg ) const ;
57  virtual double LocalFermiMomentum( const Target & t, int nucleon_pdg, double radius ) const ;
58 
59 
60  //-- override the Algorithm::Configure methods to load configuration
61  // data to private data members
62  void Configure (const Registry & config);
63  void Configure (string config);
64 
65 private:
66  void LoadConfig(void);
67  const NuclearModelI * SelectModel(const Target & t) const;
68 
69  const NuclearModelI * fDefGlobModel; ///< default basic model (should work for all nuclei)
70  map<int, const NuclearModelI *> fRefinedModels; ///< refinements for specific elements
71 };
72 
73 } // genie namespace
74 #endif // _NUCLEAR_MODEL_MAP_H_
virtual double Prob(double p, double w, const Target &t, double hitNucleonRadius) const
virtual double LocalFermiMomentum(const Target &t, int nucleon_pdg, double radius) const
bool GenerateNucleon(const Target &t) const
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
Definition: NuclearModelI.h:46
const NuclearModelI * fDefGlobModel
default basic model (should work for all nuclei)
NuclearModel_t ModelType(const Target &t) 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
virtual bool GenerateNucleon(const Target &t, double hitNucleonRadius) const
map< int, const NuclearModelI * > fRefinedModels
refinements for specific elements
void Configure(const Registry &config)
double Prob(double p, double w, const Target &t) const
enum genie::ENuclearModel NuclearModel_t
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
virtual double FermiMomentum(const Target &t, int nucleon_pdg) const
This class is a hook for nuclear models and allows associating each one of them with specific nuclei...
const NuclearModelI * SelectModel(const Target &t) const
virtual bool GenerateNucleon(const Target &) const =0