GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NormXSec.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Igor Kakorin <kakorin@jinr.ru>
7  Joint Institute for Nuclear Research
8 */
9 //____________________________________________________________________________
10 
12 #include "Framework/Conventions/GBuild.h"
14 
15 using namespace genie;
16 //____________________________________________________________________________
18 XSecAlgorithmI("genie::NormXSec")
19 {
20 
21 }
22 //____________________________________________________________________________
23 NormXSec::NormXSec(string config) :
24 XSecAlgorithmI("genie::NormXSec", config)
25 {
26 
27 }
28 //____________________________________________________________________________
30 {
31 
32 }
33 //____________________________________________________________________________
35  const Interaction * interaction, KinePhaseSpace_t kps) const
36 {
37  const Target & tgt = interaction->InitState().Tgt();
38  double A = tgt.A();
39  return A*fNormScale*1e-11;
40 }
41 //_________________________________
42 double NormXSec::Integral(const Interaction * interaction) const
43 {
44  const Target & tgt = interaction->InitState().Tgt();
45  double A = tgt.A();
46  return A*fNormScale*1e-11;
47 }
48 //____________________________________________________________________________
49 bool NormXSec::ValidProcess(const Interaction * interaction) const
50 {
51  return true;
52 }
53 //____________________________________________________________________________
54 bool NormXSec::ValidKinematics(const Interaction * interaction) const
55 {
56  return true;
57 }
58 //____________________________________________________________________________
59 void NormXSec::Configure(const Registry & config)
60 {
61  Algorithm::Configure(config);
62  this->LoadConfig();
63 }
64 //____________________________________________________________________________
65 void NormXSec::Configure(string config)
66 {
67  Algorithm::Configure(config);
68  this->LoadConfig();
69 }
70 //____________________________________________________________________________
72 {
73  GetParamDef( "NormScale", fNormScale, 1.0);
74 }
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
Definition: NormXSec.cxx:34
Cross Section Calculation Interface.
void LoadConfig(void)
Definition: NormXSec.cxx:71
bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
Definition: NormXSec.cxx:54
double fNormScale
Definition: NormXSec.h:51
int A(void) const
Definition: Target.h:70
double Integral(const Interaction *i) const
Definition: NormXSec.cxx:42
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
Definition: NormXSec.cxx:49
virtual ~NormXSec()
Definition: NormXSec.cxx:29
enum genie::EKinePhaseSpace KinePhaseSpace_t
Summary information for an interaction.
Definition: Interaction.h:56
const double e
static constexpr double A
Definition: Units.h:74
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
const InitialState & InitState(void) const
Definition: Interaction.h:69
void Configure(const Registry &config)
Definition: NormXSec.cxx:59
bool GetParamDef(const RgKey &name, T &p, const T &def) const
const Target & Tgt(void) const
Definition: InitialState.h:66