Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_recoil2d.cc
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# Copyright 2019, Lawrence Livermore National Security, LLC.
4# This file is part of the gidiplus package (https://github.com/LLNL/gidiplus).
5# gidiplus is licensed under the MIT license (see https://opensource.org/licenses/MIT).
6# SPDX-License-Identifier: MIT
7# <<END-copyright>>
8*/
9
10#include "GIDI.hpp"
11#include <HAPI.hpp>
12
13namespace GIDI {
14
15namespace Functions {
16
17/*! \class Recoil2d
18 * Class for the GNDS <**recoil**> node.
19 */
20
21/* *********************************************************************************************************//**
22 *
23 * @param a_label [in] The GNDS **label** for *this*.
24 * @param a_href [in] The GNDS **href** for *this*.
25 ***********************************************************************************************************/
26
27Recoil2d::Recoil2d( std::string const &a_label, std::string const &a_href ) :
29 m_xlink( a_href ) {
30
31 setLabel( a_label );
32}
33
34/* *********************************************************************************************************//**
35 *
36 * @param a_construction [in] Used to pass user options to the constructor.
37 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the XYs2d.
38 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
39 * @param a_parent [in] The parent GIDI::Suite.
40 ***********************************************************************************************************/
41
42Recoil2d::Recoil2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
43 Function2dForm( a_construction, a_node, a_setupInfo, FormType::recoil2d, a_parent ),
44 m_xlink( a_node.attribute_as_string( GIDI_hrefChars ) ) {
45
46}
47
48/* *********************************************************************************************************//**
49 ***********************************************************************************************************/
50
54
55/* *********************************************************************************************************//**
56 * Returns the domain minimum for the instance.
57 *
58 * @return The domain minimum for the instance.
59 ***********************************************************************************************************/
60
61double Recoil2d::domainMin( ) const {
62
63 return( 0.0 ); // FIXME
64}
65
66/* *********************************************************************************************************//**
67 * Returns the domain maximum for the instance.
68 *
69 * @return The domain maximum for the instance.
70 ***********************************************************************************************************/
71
72double Recoil2d::domainMax( ) const {
73
74 return( 1.0 ); // FIXME
75}
76
77/* *********************************************************************************************************//**
78 * The angular probability *P(mu|E)* at the point *E* = *a_x2* and *mu* = *a_x1*.
79 * Currently not implemented.
80 *
81 * @param a_x2 [in] The projectile's energy.
82 * @param a_x1 [in] The product's mu value.
83 * @return The value of *P(mu|E)*.
84 ***********************************************************************************************************/
85
86double Recoil2d::evaluate( LUPI_maybeUnused double a_x2, LUPI_maybeUnused double a_x1 ) const {
87
88 throw Exception( "Recoil2d::evaluate: not implemented" );
89}
90
91/* *********************************************************************************************************//**
92 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
93 *
94 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
95 * @param a_indent [in] The amount to indent *this* node.
96 * @param a_embedded [in] If *true*, *this* function is embedded in a higher dimensional function.
97 * @param a_inRegions [in] This is not used in this method.
98 ***********************************************************************************************************/
99
100void Recoil2d::toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, LUPI_maybeUnused bool a_embedded, LUPI_maybeUnused bool a_inRegions ) const {
101
102 a_writeInfo.addNodeStarterEnder( a_indent, moniker( ), a_writeInfo.addAttribute( GIDI_hrefChars, m_xlink ) );
103}
104
105} // End namespace Functions.
106
107} // End namespace GIDI.
#define GIDI_recoilChars
Definition GIDI.hpp:301
#define GIDI_hrefChars
Definition GIDI.hpp:440
#define LUPI_maybeUnused
void setLabel(std::string const &a_label)
Definition GIDI_form.cc:114
Function2dForm(std::string const &a_moniker, FormType a_type, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue)
Definition GIDI_form.cc:476
Recoil2d(std::string const &a_label, std::string const &a_href)
double evaluate(double a_x2, double a_x1) const
void toXMLList_func(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions) const
std::string const & moniker() const
Definition GUPI.hpp:102
void addNodeStarterEnder(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:57
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60
Definition GIDI.hpp:32
FormType
Definition GIDI.hpp:118
@ ptwXY_interpolationLinLin
Definition ptwXY.h:37