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 <constantinos.andreopoulos \at cern.ch>
11  University of Liverpool & STFC Rutherford Appleton Laboratory
12 
13 \created May 07, 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 //____________________________________________________________________________
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
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
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
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
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
virtual bool GenerateNucleon(const Target &) const =0
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 double Prob(double p, double w, const Target &) const =0