Geant4-11
Public Member Functions | Protected Member Functions | Protected Attributes
G4ShiftedGaussian Class Reference

#include <G4ShiftedGaussian.hh>

Public Member Functions

G4double G4FindShiftedMean (G4double RequestedMean, G4double RequestedStdDev)
 
void G4InsertShiftedMean (G4double ShiftedMean, G4double RequestedMean, G4double RequestedStdDev)
 
void G4SetVerbosity (G4int WhatVerbosity)
 
 G4ShiftedGaussian (G4int Verbosity)
 
 G4ShiftedGaussian (void)
 
 ~G4ShiftedGaussian (void)
 

Protected Member Functions

void Initialize (void)
 

Protected Attributes

std::vector< std::pair< std::pair< G4double, G4double >, G4double > > ShiftedMean_
 
G4int Verbosity_
 

Detailed Description

G4ShiftedGaussian is a class for storing the shifted values used for sampling a Gaussian distribution and returning only positive values; it is integrated into G4FPYSamplingOps

Definition at line 45 of file G4ShiftedGaussian.hh.

Constructor & Destructor Documentation

◆ G4ShiftedGaussian() [1/2]

G4ShiftedGaussian::G4ShiftedGaussian ( void  )

Default constructor

  • Usage: No arguments required
  • Notes:

Definition at line 41 of file G4ShiftedGaussian.cc.

43{
44 // Set the default verbosity
46
47 // Initialize the class
48 Initialize();
49}
static const G4FFGEnumerations::Verbosity Verbosity

References Initialize(), G4FFGDefaultValues::Verbosity, and Verbosity_.

◆ G4ShiftedGaussian() [2/2]

G4ShiftedGaussian::G4ShiftedGaussian ( G4int  Verbosity)

Overloaded constructor

  • Usage:
    • Verbosity: Verbosity level
  • Notes:

Definition at line 51 of file G4ShiftedGaussian.cc.

53{
54 // Set the default verbosity
56
57 // Initialize the class
58 Initialize();
59}

References Initialize(), and Verbosity_.

◆ ~G4ShiftedGaussian()

G4ShiftedGaussian::~G4ShiftedGaussian ( void  )

Default deconstructor.

Definition at line 125 of file G4ShiftedGaussian.cc.

127{
129
130 // Nothing here!
132}
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__

References G4FFG_FUNCTIONENTER__, and G4FFG_FUNCTIONLEAVE__.

Member Function Documentation

◆ G4FindShiftedMean()

G4double G4ShiftedGaussian::G4FindShiftedMean ( G4double  RequestedMean,
G4double  RequestedStdDev 
)

Returns the shifted mean that correlates to a RequestedMean and RequestedStdDev pair. 0 is returned if there is no associated value.

Definition at line 71 of file G4ShiftedGaussian.cc.

74{
76
77 G4int VectorSize = ShiftedMean_.size();
78
79 for(G4int i = 0; i < VectorSize; i++)
80 {
81 if(ShiftedMean_[i].first.first == RequestedMean)
82 {
83 if(ShiftedMean_[i].first.second == RequestedStdDev)
84 {
86 return ShiftedMean_[i].second;
87 }
88 }
89 }
90
92 return 0;
93}
#define G4FFG_SAMPLING_FUNCTIONENTER__
#define G4FFG_SAMPLING_FUNCTIONLEAVE__
int G4int
Definition: G4Types.hh:85
std::vector< std::pair< std::pair< G4double, G4double >, G4double > > ShiftedMean_

References G4FFG_SAMPLING_FUNCTIONENTER__, G4FFG_SAMPLING_FUNCTIONLEAVE__, and ShiftedMean_.

Referenced by G4FPYSamplingOps::CheckAndSetParameters().

◆ G4InsertShiftedMean()

void G4ShiftedGaussian::G4InsertShiftedMean ( G4double  ShiftedMean,
G4double  RequestedMean,
G4double  RequestedStdDev 
)

Inserts a ShiftedMean indexed by the RequestedMean and RequestedStdDev

Definition at line 95 of file G4ShiftedGaussian.cc.

99{
101
102 ShiftedMean_.push_back(
103 std::make_pair(
104 std::make_pair(
105 RequestedMean,
106 RequestedStdDev),
107 ShiftedMean
108 )
109 );
110
112 return;
113}

References G4FFG_SAMPLING_FUNCTIONENTER__, G4FFG_SAMPLING_FUNCTIONLEAVE__, and ShiftedMean_.

Referenced by G4FPYSamplingOps::ShiftParameters().

◆ G4SetVerbosity()

void G4ShiftedGaussian::G4SetVerbosity ( G4int  WhatVerbosity)

Sets the verbosity levels

  • Usage:
    • WhichVerbosity: Combination of levels
  • Notes:
    • SILENT: All verbose output is repressed
    • UPDATES: Only high-level internal changes are reported
    • DAUGHTER_INFO: Displays information about daughter product sampling
    • NEUTRON_INFO: Displays information about neutron sampling
    • GAMMA_INFO: Displays information about gamma sampling
    • ALPHA_INFO: Displays information about alpha sampling
    • MOMENTUM_INFO: Displays information about momentum balancing
    • EXTRAPOLATION_INTERPOLATION_INFO: Displays information about any data extrapolation or interpolation that occurs
    • DEBUG: Reports program flow as it steps through functions
    • PRINT_ALL: Displays any and all output

Definition at line 115 of file G4ShiftedGaussian.cc.

References G4FFG_SAMPLING_FUNCTIONENTER__, G4FFG_SAMPLING_FUNCTIONLEAVE__, and Verbosity_.

Referenced by G4FPYSamplingOps::G4SetVerbosity().

◆ Initialize()

void G4ShiftedGaussian::Initialize ( void  )
protected

Initialize is a common function called by all constructors.

Definition at line 61 of file G4ShiftedGaussian.cc.

63{
65
66 // Nothing here
67
69}

References G4FFG_FUNCTIONENTER__, and G4FFG_FUNCTIONLEAVE__.

Referenced by G4ShiftedGaussian().

Field Documentation

◆ ShiftedMean_

std::vector< std::pair< std::pair< G4double, G4double >, G4double > > G4ShiftedGaussian::ShiftedMean_
protected

Contains the adjusted mean of the POSITIVE only Gaussian distribution associated with a RequestedMean and RequestedStdDev pair.

Definition at line 107 of file G4ShiftedGaussian.hh.

Referenced by G4FindShiftedMean(), and G4InsertShiftedMean().

◆ Verbosity_

G4int G4ShiftedGaussian::Verbosity_
protected

Verbosity level

Definition at line 109 of file G4ShiftedGaussian.hh.

Referenced by G4SetVerbosity(), and G4ShiftedGaussian().


The documentation for this class was generated from the following files: