Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_distributions.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 Distributions {
16
17/*! \class Distribution
18 * This is the base class inherited by all distribution form classes.
19 */
20
21/* *********************************************************************************************************//**
22 *
23 * @param a_moniker [in] The **GNDS** moniker for the distribution.
24 * @param a_type [in] The FormType for the distribution form.
25 * @param a_label [in] The label for the distribution.
26 * @param a_productFrame [in] The frame the product data are in.
27 ***********************************************************************************************************/
28
29Distribution::Distribution( std::string const &a_moniker, FormType a_type, std::string const &a_label, Frame a_productFrame ) :
30 Form( a_moniker, a_type, a_label ),
31 m_productFrame( a_productFrame ) {
32
33}
34
35/* *********************************************************************************************************//**
36 *
37 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the distribution.
38 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
39 * @param a_type [in] The FormType for the distribution form.
40 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
41 ***********************************************************************************************************/
42
43Distribution::Distribution( HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_parent ) :
44 Form( a_node, a_setupInfo, a_type, a_parent ),
45 m_productFrame( parseFrame( a_node, a_setupInfo, GIDI_productFrameChars ) ) {
46
47}
48
49/* *********************************************************************************************************//**
50 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
51 *
52 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
53 * @param a_indent [in] The amount to indent *this* node.
54 ***********************************************************************************************************/
55
56void Distribution::toXMLNodeStarter( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
57
58 std::string attributes;
59
60 attributes += a_writeInfo.addAttribute( GIDI_labelChars, label( ) );
61 attributes += a_writeInfo.addAttribute( GIDI_productFrameChars, frameToString( m_productFrame ) );
62 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
63}
64
65/*! \class MultiGroup3d
66 * Class for the GNDS **multiGroup3d** node.
67 */
68
69/* *********************************************************************************************************//**
70 *
71 * @param a_construction [in] Used to pass user options to the constructor.
72 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the MultiGroup3d.
73 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
74 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
75 ***********************************************************************************************************/
76
77MultiGroup3d::MultiGroup3d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
78 Distribution( a_node, a_setupInfo, FormType::multiGroup3d, a_parent ),
79 m_gridded3d( a_construction, a_node.child( GIDI_gridded3dChars ), a_setupInfo ) {
80
81}
82
83/* *********************************************************************************************************//**
84 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
85 *
86 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
87 * @param a_indent [in] The amount to indent *this* node.
88 ***********************************************************************************************************/
89
90void MultiGroup3d::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
91
92 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
93
94 toXMLNodeStarter( a_writeInfo, a_indent );
95 m_gridded3d.toXMLList( a_writeInfo, indent2 );
96 a_writeInfo.addNodeEnder( moniker( ) );
97}
98
99/*! \class AngularTwoBody
100 * Class for the GNDS **angularTwoBody** node.
101 */
102
103/* *********************************************************************************************************//**
104 *
105 * @param a_label [in] The label for *this* form.
106 * @param a_productFrame [in] The frame the product data as in.
107 * @param a_angular [in] The 2-d functional angular representation.
108 ***********************************************************************************************************/
109
110AngularTwoBody::AngularTwoBody( std::string const &a_label, Frame a_productFrame, Functions::Function2dForm *a_angular ) :
111 Distribution( GIDI_angularTwoBodyChars, FormType::angularTwoBody, a_label, a_productFrame ),
112 m_angular( a_angular ) {
113
114 if( a_angular != nullptr ) a_angular->setAncestor( this );
115}
116
117/* *********************************************************************************************************//**
118 *
119 * @param a_construction [in] Used to pass user options to the constructor.
120 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the AngularTwoBody.
121 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
122 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
123 ***********************************************************************************************************/
124
125AngularTwoBody::AngularTwoBody( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
126 Distribution( a_node, a_setupInfo, FormType::angularTwoBody, a_parent ),
127 m_angular( data2dParse( a_construction, a_node.first_child( ), a_setupInfo, nullptr ) ) {
128
129}
130
131/* *********************************************************************************************************//**
132 ***********************************************************************************************************/
133
135
136 delete m_angular;
137}
138
139/* *********************************************************************************************************//**
140 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
141 *
142 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
143 * @param a_indent [in] The amount to indent *this* node.
144 ***********************************************************************************************************/
145
146void AngularTwoBody::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
147
148 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
149
150 toXMLNodeStarter( a_writeInfo, a_indent );
151 if( m_angular != nullptr ) m_angular->toXMLList( a_writeInfo, indent2 );
152 a_writeInfo.addNodeEnder( moniker( ) );
153}
154
155/*! \class KalbachMann
156 * Class for the GNDS **KalbachMann** node.
157 */
158
159/* *********************************************************************************************************//**
160 *
161 * @param a_construction [in] Used to pass user options to the constructor.
162 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the KalbachMann.
163 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
164 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
165 ***********************************************************************************************************/
166
167KalbachMann::KalbachMann( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
168 Distribution( a_node, a_setupInfo, FormType::KalbachMann, a_parent ),
169 m_f( data2dParse( a_construction, a_node.child( GIDI_fChars ).first_child( ), a_setupInfo, nullptr ) ),
170 m_r( data2dParse( a_construction, a_node.child( GIDI_rChars ).first_child( ), a_setupInfo, nullptr ) ),
171 m_a( nullptr ) {
172
173 HAPI::Node const &aNode = a_node.child( GIDI_aChars );
174 if( !aNode.empty( ) ) m_a = data2dParse( a_construction, aNode.first_child( ), a_setupInfo, nullptr );
175}
176
177/* *********************************************************************************************************//**
178 ***********************************************************************************************************/
179
181
182 delete m_f;
183 delete m_r;
184 delete m_a;
185}
186
187/* *********************************************************************************************************//**
188 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
189 *
190 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
191 * @param a_indent [in] The amount to indent *this* node.
192 ***********************************************************************************************************/
193
194void KalbachMann::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
195
196 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
197
198 toXMLNodeStarter( a_writeInfo, a_indent );
199 m_f->toXMLList( a_writeInfo, indent2 );
200 m_r->toXMLList( a_writeInfo, indent2 );
201 if( m_a != nullptr ) m_a->toXMLList( a_writeInfo, indent2 );
202 a_writeInfo.addNodeEnder( moniker( ) );
203}
204
205/*! \class EnergyAngular
206 * Class for the GNDS **energyAngular** node.
207 */
208
209/* *********************************************************************************************************//**
210 *
211 * @param a_construction [in] Used to pass user options to the constructor.
212 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the EnergyAngular.
213 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
214 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
215 ***********************************************************************************************************/
216
217EnergyAngular::EnergyAngular( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
218 Distribution( a_node, a_setupInfo, FormType::energyAngular, a_parent ),
219 m_energyAngular( data3dParse( a_construction, a_node.first_child( ), a_setupInfo, nullptr ) ) {
220
221}
222
223/* *********************************************************************************************************//**
224 ***********************************************************************************************************/
225
227
228 delete m_energyAngular;
229}
230
231/* *********************************************************************************************************//**
232 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
233 *
234 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
235 * @param a_indent [in] The amount to indent *this* node.
236 ***********************************************************************************************************/
237
238void EnergyAngular::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
239
240 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
241
242 toXMLNodeStarter( a_writeInfo, a_indent );
243 m_energyAngular->toXMLList( a_writeInfo, indent2 );
244 a_writeInfo.addNodeEnder( moniker( ) );
245}
246
247/*! \class EnergyAngularMC
248 * Class for the GNDS **energyAngularMC** node.
249 */
250
251/* *********************************************************************************************************//**
252 *
253 * @param a_construction [in] Used to pass user options to the constructor.
254 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the EnergyAngularMC.
255 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
256 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
257 ***********************************************************************************************************/
258
259EnergyAngularMC::EnergyAngularMC( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
260 Distribution( a_node, a_setupInfo, FormType::energyAngularMC, a_parent ),
261 m_energy( data2dParse( a_construction, a_node.child( GIDI_energyChars ).first_child( ), a_setupInfo, nullptr ) ),
262 m_energyAngular( data3dParse( a_construction, a_node.child( GIDI_energyAngularChars ).first_child( ), a_setupInfo, nullptr ) ) {
263
264}
265
266/* *********************************************************************************************************//**
267 ***********************************************************************************************************/
268
270
271 delete m_energy;
272 delete m_energyAngular;
273}
274
275/* *********************************************************************************************************//**
276 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
277 *
278 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
279 * @param a_indent [in] The amount to indent *this* node.
280 ***********************************************************************************************************/
281
282void EnergyAngularMC::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
283
284 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
285 std::string indent3 = a_writeInfo.incrementalIndent( indent2 );
286
287 toXMLNodeStarter( a_writeInfo, a_indent );
288
289 a_writeInfo.addNodeStarter( indent2, GIDI_energyChars );
290 m_energy->toXMLList( a_writeInfo, indent3 );
291 a_writeInfo.addNodeEnder( GIDI_energyChars );
292
293 a_writeInfo.addNodeStarter( indent2, GIDI_energyAngularChars );
294 m_energyAngular->toXMLList( a_writeInfo, indent3 );
296
297 a_writeInfo.addNodeEnder( moniker( ) );
298}
299
300/*! \class AngularEnergy
301 * Class for the GNDS **angularEnergy** node.
302 */
303
304/* *********************************************************************************************************//**
305 *
306 * @param a_construction [in] Used to pass user options to the constructor.
307 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the AngularEnergy.
308 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
309 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
310 ***********************************************************************************************************/
311
312AngularEnergy::AngularEnergy( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
313 Distribution( a_node, a_setupInfo, FormType::angularEnergy, a_parent ),
314 m_angularEnergy( data3dParse( a_construction, a_node.first_child( ), a_setupInfo, nullptr ) ) {
315
316}
317
318/* *********************************************************************************************************//**
319 ***********************************************************************************************************/
320
322
323 delete m_angularEnergy;
324}
325
326/* *********************************************************************************************************//**
327 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
328 *
329 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
330 * @param a_indent [in] The amount to indent *this* node.
331 ***********************************************************************************************************/
332
333void AngularEnergy::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
334
335 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
336
337 toXMLNodeStarter( a_writeInfo, a_indent );
338 m_angularEnergy->toXMLList( a_writeInfo, indent2 );
339 a_writeInfo.addNodeEnder( moniker( ) );
340}
341
342/*! \class AngularEnergyMC
343 * Class for the GNDS **angularEnergyMC** node.
344 */
345
346/* *********************************************************************************************************//**
347 *
348 * @param a_construction [in] Used to pass user options to the constructor.
349 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the AngularEnergyMC.
350 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
351 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
352 ***********************************************************************************************************/
353
354AngularEnergyMC::AngularEnergyMC( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
355 Distribution( a_node, a_setupInfo, FormType::angularEnergyMC, a_parent ),
356 m_angular( data2dParse( a_construction, a_node.child( GIDI_angularChars ).first_child( ), a_setupInfo, nullptr ) ),
357 m_angularEnergy( data3dParse( a_construction, a_node.child( GIDI_angularEnergyChars ).first_child( ), a_setupInfo, nullptr ) ) {
358
359}
360
361/* *********************************************************************************************************//**
362 ***********************************************************************************************************/
363
365
366 delete m_angular;
367 delete m_angularEnergy;
368}
369
370/* *********************************************************************************************************//**
371 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
372 *
373 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
374 * @param a_indent [in] The amount to indent *this* node.
375 ***********************************************************************************************************/
376
377void AngularEnergyMC::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
378
379 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
380 std::string indent3 = a_writeInfo.incrementalIndent( indent2 );
381
382 toXMLNodeStarter( a_writeInfo, a_indent );
383 a_writeInfo.addNodeStarter( indent2, GIDI_angularChars );
384 m_angular->toXMLList( a_writeInfo, indent3 );
385 a_writeInfo.addNodeEnder( GIDI_angularChars );
386 a_writeInfo.addNodeStarter( indent2, GIDI_angularEnergyChars );
387 m_angularEnergy->toXMLList( a_writeInfo, indent3 );
389 a_writeInfo.addNodeEnder( moniker( ) );
390}
391
392/*! \class Uncorrelated
393 * Class for the GNDS **uncorrelated** node.
394 */
395
396/* *********************************************************************************************************//**
397 *
398 * @param a_construction [in] Used to pass user options to the constructor.
399 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the Uncorrelated.
400 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
401 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
402 ***********************************************************************************************************/
403
404Uncorrelated::Uncorrelated( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
405 Distribution( a_node, a_setupInfo, FormType::uncorrelated, a_parent ),
406 m_angular( data2dParse( a_construction, a_node.child( GIDI_angularChars ).first_child( ), a_setupInfo, nullptr ) ),
407 m_energy( data2dParse( a_construction, a_node.child( GIDI_energyChars ).first_child( ), a_setupInfo, nullptr ) ) {
408
409}
410
411/* *********************************************************************************************************//**
412 ***********************************************************************************************************/
413
415
416 delete m_angular;
417 delete m_energy;
418}
419
420/* *********************************************************************************************************//**
421 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
422 *
423 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
424 * @param a_indent [in] The amount to indent *this* node.
425 ***********************************************************************************************************/
426
427void Uncorrelated::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
428
429 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
430 std::string indent3 = a_writeInfo.incrementalIndent( indent2 );
431
432 toXMLNodeStarter( a_writeInfo, a_indent );
433
434 a_writeInfo.addNodeStarter( indent2, GIDI_angularChars, "" );
435 m_angular->toXMLList( a_writeInfo, indent3 );
436 a_writeInfo.addNodeEnder( GIDI_angularChars );
437
438 a_writeInfo.addNodeStarter( indent2, GIDI_energyChars, "" );
439 m_energy->toXMLList( a_writeInfo, indent3 );
440 a_writeInfo.addNodeEnder( GIDI_energyChars );
441
442 a_writeInfo.addNodeEnder( moniker( ) );
443}
444
445/*! \class LLNLAngularEnergy
446 * Class for the GNDS **LLNLAngularEnergy** node.
447 */
448
449/* *********************************************************************************************************//**
450 *
451 * @param a_construction [in] Used to pass user options to the constructor.
452 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the LLNLAngularEnergy.
453 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
454 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
455 ***********************************************************************************************************/
456
457LLNLAngularEnergy::LLNLAngularEnergy( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
458 Distribution( a_node, a_setupInfo, FormType::LLNL_angularEnergy, a_parent ),
459 m_angular( data2dParse( a_construction, a_node.child( GIDI_LLNLAngularOfAngularEnergyChars ).first_child( ), a_setupInfo, nullptr ) ),
460 m_angularEnergy( data3dParse( a_construction, a_node.child( GIDI_LLNLAngularEnergyOfAngularEnergyChars ).first_child( ), a_setupInfo, nullptr ) ) {
461
462}
463
464/* *********************************************************************************************************//**
465 ***********************************************************************************************************/
466
468
469 delete m_angular;
470 delete m_angularEnergy;
471}
472
473/* *********************************************************************************************************//**
474 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
475 *
476 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
477 * @param a_indent [in] The amount to indent *this* node.
478 ***********************************************************************************************************/
479
480void LLNLAngularEnergy::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
481
482 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
483 std::string indent3 = a_writeInfo.incrementalIndent( indent2 );
484
485 toXMLNodeStarter( a_writeInfo, a_indent );
487 m_angular->toXMLList( a_writeInfo, indent3 );
490 m_angularEnergy->toXMLList( a_writeInfo, indent3 );
492 a_writeInfo.addNodeEnder( moniker( ) );
493}
494
495/*! \class CoherentPhotoAtomicScattering
496 * Class for the GNDS **coherentPhotoAtomicScattering** node.
497 */
498
499/* *********************************************************************************************************//**
500 *
501 * @param a_construction [in] Used to pass user options to the constructor.
502 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the CoherentPhotoAtomicScattering.
503 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
504 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
505 ***********************************************************************************************************/
506
508 SetupInfo &a_setupInfo, Suite *a_parent ) :
509 Distribution( a_node, a_setupInfo, FormType::coherentPhotonScattering, a_parent ),
510 m_href( a_node.attribute_as_string( GIDI_hrefChars ) ) {
511
512}
513
514/*! \class IncoherentPhotoAtomicScattering
515 * Class for the GNDS **incoherentPhotoAtomicScattering** node.
516 */
517
518/* *********************************************************************************************************//**
519 *
520 * @param a_construction [in] Used to pass user options to the constructor.
521 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the IncoherentPhotoAtomicScattering.
522 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
523 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
524 ***********************************************************************************************************/
525
527 SetupInfo &a_setupInfo, Suite *a_parent ) :
528 Distribution( a_node, a_setupInfo, FormType::incoherentPhotonScattering, a_parent ),
529 m_href( a_node.attribute_as_string( GIDI_hrefChars ) ) {
530
531}
532
533/* *********************************************************************************************************//**
534 *
535 * @param a_construction [in] Used to pass user options to the constructor.
536 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the IncoherentPhotoAtomicScattering.
537 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
538 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
539 ***********************************************************************************************************/
540
542 SetupInfo &a_setupInfo, Suite *a_parent ) :
543 Distribution( a_node, a_setupInfo, FormType::incoherentBoundToFreePhotonScattering, a_parent ),
544 m_href( a_node.attribute_as_string( GIDI_hrefChars ) ) {
545}
546
547/*! \class ThermalNeutronScatteringLaw
548 * Class for the GNDS **thermalNeutronScatteringLaw** node.
549 */
550
551/* *********************************************************************************************************//**
552 *
553 * @param a_construction [in] Used to pass user options to the constructor.
554 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the ThermalNeutronScatteringLaw.
555 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
556 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
557 ***********************************************************************************************************/
558
560 SetupInfo &a_setupInfo, Suite *a_parent ) :
561 Distribution( a_node, a_setupInfo, FormType::thermalNeutronScatteringLaw, a_parent ),
562 m_href( a_node.attribute_as_string( GIDI_hrefChars ) ) {
563
564}
565
566/*! \class Branching3d
567 * Class for the GNDS **branching3d** node.
568 */
569
570/* *********************************************************************************************************//**
571 *
572 * @param a_construction [in] Used to pass user options to the constructor.
573 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the Branching3d.
574 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
575 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
576 ***********************************************************************************************************/
577
578Branching3d::Branching3d( LUPI_maybeUnused Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
579 Distribution( a_node, a_setupInfo, FormType::branching3d, a_parent ),
580 m_initialState( a_setupInfo.m_initialState ) {
581
582}
583
584/*! \class Reference3d
585 * Class for the GNDS **reference** distribution node.
586 */
587
588/* *********************************************************************************************************//**
589 *
590 * @param a_construction [in] Used to pass user options to the constructor.
591 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the Reference3d.
592 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
593 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
594 ***********************************************************************************************************/
595
596Reference3d::Reference3d( LUPI_maybeUnused Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
597 Distribution( a_node, a_setupInfo, FormType::reference3d, a_parent ),
598 m_href( a_node.attribute_as_string( GIDI_hrefChars ) ) {
599
600}
601
602/* *********************************************************************************************************//**
603 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
604 *
605 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
606 * @param a_indent [in] The amount to indent *this* node.
607 ***********************************************************************************************************/
608
609void Reference3d::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
610
611 std::string attributes;
612
613 attributes += a_writeInfo.addAttribute( GIDI_labelChars, label( ) );
614 attributes += a_writeInfo.addAttribute( GIDI_hrefChars, href( ) );
615 a_writeInfo.addNodeStarterEnder( a_indent, moniker( ), attributes );
616}
617
618/*! \class CoulombPlusNuclearElastic
619 * Class for the GNDS **CoulombPlusNuclearElastic** distribution node.
620 */
621
622/* *********************************************************************************************************//**
623 *
624 * @param a_construction [in] Used to pass user options to the constructor.
625 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the CoulombPlusNuclearElastic.
626 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
627 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
628 ***********************************************************************************************************/
629
631 Distribution( a_node, a_setupInfo, FormType::CoulombPlusNuclearElastic3d, a_parent ),
632 m_href( a_node.attribute_as_string( GIDI_hrefChars ) ) {
633
634}
635
636/* *********************************************************************************************************//**
637 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
638 *
639 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
640 * @param a_indent [in] The amount to indent *this* node.
641 ***********************************************************************************************************/
642
643void CoulombPlusNuclearElastic::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
644
645 std::string attributes;
646
647 attributes += a_writeInfo.addAttribute( GIDI_labelChars, label( ) );
648 attributes += a_writeInfo.addAttribute( GIDI_hrefChars, href( ) );
649 a_writeInfo.addNodeStarterEnder( a_indent, moniker( ), attributes );
650}
651
652/*! \class LLNLLegendre
653 * Class for the LLNL/GNDS **LLNLLegendre** distribution node.
654 */
655
656/* *********************************************************************************************************//**
657 * This class is woefully inadequate but some form is needed by the method Product::isCompleteParticle.
658 *
659 * @param a_construction [in] Used to pass user options to the constructor.
660 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the LLNLLegendre.
661 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
662 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
663 ***********************************************************************************************************/
664
665LLNLLegendre::LLNLLegendre( LUPI_maybeUnused Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
666 Distribution( a_node, a_setupInfo, FormType::LLNLLegendre, a_parent ) {
667
668}
669
670/* *********************************************************************************************************//**
671 * Fills the argument *a_writeInfo* with the XML lines that represent *this*.
672 *
673 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
674 * @param a_indent [in] The amount to indent *this* node.
675 ***********************************************************************************************************/
676
677void LLNLLegendre::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
678
679 std::string attributes;
680
681 attributes += a_writeInfo.addAttribute( GIDI_labelChars, label( ) );
682 a_writeInfo.addNodeStarterEnder( a_indent, moniker( ), attributes );
683}
684
685/*! \class Unspecified
686 * Class for the GNDS **unspecified** node.
687 */
688
689/* *********************************************************************************************************//**
690 *
691 * @param a_construction [in] Used to pass user options to the constructor.
692 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the Unspecified.
693 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
694 * @param a_parent [in] The **m_distribution** member of GIDI::Product this distribution form belongs to.
695 ***********************************************************************************************************/
696
697Unspecified::Unspecified( LUPI_maybeUnused Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
698 Distribution( a_node, a_setupInfo, FormType::unspecified, a_parent ) {
699
700}
701
702/* *********************************************************************************************************//**
703 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
704 *
705 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
706 * @param a_indent [in] The amount to indent *this* node.
707 ***********************************************************************************************************/
708
709void Unspecified::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
710
711 toXMLNodeStarter( a_writeInfo, a_indent );
712 a_writeInfo.addNodeEnder( moniker( ) );
713}
714
715} // End of namespace Distributions.
716
717} // End of namespace GIDI.
#define GIDI_LLNLAngularOfAngularEnergyChars
Definition GIDI.hpp:353
#define GIDI_fChars
Definition GIDI.hpp:390
#define GIDI_angularChars
Definition GIDI.hpp:345
#define GIDI_productFrameChars
Definition GIDI.hpp:433
#define GIDI_rChars
Definition GIDI.hpp:391
#define GIDI_hrefChars
Definition GIDI.hpp:440
#define GIDI_LLNLAngularEnergyOfAngularEnergyChars
Definition GIDI.hpp:354
#define GIDI_energyAngularChars
Definition GIDI.hpp:348
#define GIDI_aChars
Definition GIDI.hpp:392
#define GIDI_labelChars
Definition GIDI.hpp:438
#define GIDI_angularEnergyChars
Definition GIDI.hpp:350
#define GIDI_angularTwoBodyChars
Definition GIDI.hpp:343
#define GIDI_gridded3dChars
Definition GIDI.hpp:317
#define GIDI_energyChars
Definition GIDI.hpp:346
#define LUPI_maybeUnused
AngularEnergyMC(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Functions::Function3dForm const * angularEnergy() const
Definition GIDI.hpp:2334
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
AngularEnergy(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
AngularTwoBody(std::string const &a_label, Frame a_productFrame, Functions::Function2dForm *a_angular=nullptr)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
Branching3d(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
CoherentPhotoAtomicScattering(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
CoulombPlusNuclearElastic(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
void toXMLNodeStarter(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
Distribution(std::string const &a_moniker, FormType a_type, std::string const &a_label, Frame a_productFrame)
EnergyAngularMC(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
EnergyAngular(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Functions::Function3dForm const * energyAngular() const
Definition GIDI.hpp:2296
IncoherentBoundToFreePhotoAtomicScattering(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
IncoherentPhotoAtomicScattering(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
KalbachMann(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
LLNLAngularEnergy(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
LLNLLegendre(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
MultiGroup3d(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Reference3d(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
std::string const & href() const
Definition GIDI.hpp:2508
ThermalNeutronScatteringLaw(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
Uncorrelated(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Unspecified(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
std::string const & label() const
Definition GIDI.hpp:658
Form(FormType a_type)
Definition GIDI_form.cc:25
void setAncestor(Ancestry *a_ancestor)
Definition GUPI.hpp:106
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
void addNodeEnder(std::string const &a_moniker)
Definition GUPI.hpp:59
std::string incrementalIndent(std::string const &indent)
Definition GUPI.hpp:52
void addNodeStarter(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:55
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60
bool empty() const
Definition HAPI_Node.cc:150
Node first_child() const
Definition HAPI_Node.cc:82
Node child(const char *name) const
Definition HAPI_Node.cc:72
Definition GIDI.hpp:32
FormType
Definition GIDI.hpp:118
@ CoulombPlusNuclearElastic3d
Definition GIDI.hpp:136
@ incoherentBoundToFreePhotonScattering
Definition GIDI.hpp:135
@ LLNL_angularEnergy
Definition GIDI.hpp:134
@ thermalNeutronScatteringLaw
Definition GIDI.hpp:135
@ incoherentPhotonScattering
Definition GIDI.hpp:135
@ coherentPhotonScattering
Definition GIDI.hpp:135
Functions::Function2dForm * data2dParse(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *parent)
Frame
Definition GIDI.hpp:146
std::string frameToString(Frame a_frame)
Definition GIDI_misc.cc:375
Frame parseFrame(HAPI::Node const &a_node, SetupInfo &a_setupInfo, std::string const &a_name)
Functions::Function3dForm * data3dParse(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *parent)