Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DopplerProfile Class Reference

#include <G4DopplerProfile.hh>

Public Member Functions

 G4DopplerProfile (G4int minZ=1, G4int maxZ=100)
 
 ~G4DopplerProfile ()
 
size_t NumberOfProfiles (G4int Z) const
 
const G4VEMDataSetProfiles (G4int Z) const
 
const G4VEMDataSetProfile (G4int Z, G4int ShellIndex) const
 
void PrintData () const
 
G4double RandomSelectMomentum (G4int Z, G4int shellIndex) const
 

Detailed Description

Definition at line 51 of file G4DopplerProfile.hh.

Constructor & Destructor Documentation

◆ G4DopplerProfile()

G4DopplerProfile::G4DopplerProfile ( G4int  minZ = 1,
G4int  maxZ = 100 
)
explicit

Definition at line 51 of file G4DopplerProfile.cc.

52 : zMin(minZ), zMax(maxZ)
53{
54 LoadBiggsP("/doppler/p-biggs");
55
56 for (G4int Z=zMin; Z<zMax+1; Z++)
57 {
58 LoadProfile("/doppler/profile",Z);
59 }
60}
int G4int
Definition: G4Types.hh:85
const G4int Z[17]

◆ ~G4DopplerProfile()

G4DopplerProfile::~G4DopplerProfile ( )

Definition at line 65 of file G4DopplerProfile.cc.

66{
67 for (auto& pos : profileMap)
68 {
69 G4VEMDataSet* dataSet = pos.second;
70 delete dataSet;
71 dataSet = nullptr;
72 }
73}

Member Function Documentation

◆ NumberOfProfiles()

size_t G4DopplerProfile::NumberOfProfiles ( G4int  Z) const

Definition at line 77 of file G4DopplerProfile.cc.

78{
79 G4int n = 0;
80 if (Z>= zMin && Z <= zMax) n = nShells[Z-1];
81 return n;
82}

◆ PrintData()

void G4DopplerProfile::PrintData ( ) const

Definition at line 107 of file G4DopplerProfile.cc.

108{
109 for (G4int Z=zMin; Z<zMax; Z++)
110 {
111 const G4VEMDataSet* profis = Profiles(Z);
112 profis->PrintData();
113 }
114}
const G4VEMDataSet * Profiles(G4int Z) const
virtual void PrintData(void) const =0

◆ Profile()

const G4VEMDataSet * G4DopplerProfile::Profile ( G4int  Z,
G4int  ShellIndex 
) const

Definition at line 98 of file G4DopplerProfile.cc.

99{
100 const G4VEMDataSet* profis = Profiles(Z);
101 const G4VEMDataSet* profi = profis->GetComponent(shellIndex);
102 return profi;
103}
virtual const G4VEMDataSet * GetComponent(G4int componentId) const =0

◆ Profiles()

const G4VEMDataSet * G4DopplerProfile::Profiles ( G4int  Z) const

Definition at line 86 of file G4DopplerProfile.cc.

87{
88 if (Z < zMin || Z > zMax)
89 G4Exception("G4DopplerProfile::Profiles",
90 "em1005",FatalException,"Z outside boundaries");
91 auto pos = profileMap.find(Z);
92 G4VEMDataSet* dataSet = (*pos).second;
93 return dataSet;
94}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59

Referenced by PrintData(), Profile(), and RandomSelectMomentum().

◆ RandomSelectMomentum()

G4double G4DopplerProfile::RandomSelectMomentum ( G4int  Z,
G4int  shellIndex 
) const

Definition at line 227 of file G4DopplerProfile.cc.

228{
229 G4double value = 0.;
230 const G4VEMDataSet* profis = Profiles(Z);
231 value = profis->RandomSelect(shellIndex);
232 return value;
233}
double G4double
Definition: G4Types.hh:83
virtual G4double RandomSelect(G4int componentId=0) const =0

Referenced by G4LivermoreComptonModel::SampleSecondaries(), G4LivermorePolarizedComptonModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), and G4LowEPPolarizedComptonModel::SampleSecondaries().


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