#include <G4LatticeLogical.hh>
|
| G4LatticeLogical () |
|
virtual | ~G4LatticeLogical ()=default |
|
void | SetVerboseLevel (G4int vb) |
|
G4bool | LoadMap (G4int, G4int, G4int, G4String) |
|
G4bool | Load_NMap (G4int, G4int, G4int, G4String) |
|
virtual G4double | MapKtoV (G4int, const G4ThreeVector &) const |
|
virtual G4ThreeVector | MapKtoVDir (G4int, const G4ThreeVector &) const |
|
void | Dump (std::ostream &os) const |
|
void | DumpMap (std::ostream &os, G4int pol, const G4String &name) const |
|
void | Dump_NMap (std::ostream &os, G4int pol, const G4String &name) const |
|
void | SetDynamicalConstants (G4double Beta, G4double Gamma, G4double Lambda, G4double Mu) |
|
void | SetScatteringConstant (G4double b) |
|
void | SetAnhDecConstant (G4double a) |
|
void | SetLDOS (G4double LDOS) |
|
void | SetSTDOS (G4double STDOS) |
|
void | SetFTDOS (G4double FTDOS) |
|
G4double | GetBeta () const |
|
G4double | GetGamma () const |
|
G4double | GetLambda () const |
|
G4double | GetMu () const |
|
G4double | GetScatteringConstant () const |
|
G4double | GetAnhDecConstant () const |
|
G4double | GetLDOS () const |
|
G4double | GetSTDOS () const |
|
G4double | GetFTDOS () const |
|
Definition at line 40 of file G4LatticeLogical.hh.
◆ anonymous enum
◆ G4LatticeLogical()
G4LatticeLogical::G4LatticeLogical |
( |
| ) |
|
Definition at line 38 of file G4LatticeLogical.cc.
39{
40 for (
G4int i = 0; i < 3; i++) {
43 fMap[i][j][k] = 0.;
44 fN_map[i][j][k].
set(0., 0., 0.);
45 }
46 }
47 }
48}
void set(double x, double y, double z)
◆ ~G4LatticeLogical()
virtual G4LatticeLogical::~G4LatticeLogical |
( |
| ) |
|
|
virtualdefault |
◆ Dump()
void G4LatticeLogical::Dump |
( |
std::ostream & | os | ) |
const |
Definition at line 199 of file G4LatticeLogical.cc.
200{
201 os << "dyn " << fBeta << " " << fGamma << " " << fLambda << " " << fMu << "\nscat " << fB
202 << " decay " << fA << "\nLDOS " << fLDOS << " STDOS " << fSTDOS << " FTDOS " << fFTDOS
203 << std::endl;
204
208
212}
void DumpMap(std::ostream &os, G4int pol, const G4String &name) const
void Dump_NMap(std::ostream &os, G4int pol, const G4String &name) const
Referenced by operator<<().
◆ Dump_NMap()
void G4LatticeLogical::Dump_NMap |
( |
std::ostream & | os, |
|
|
G4int | pol, |
|
|
const G4String & | name ) const |
Definition at line 230 of file G4LatticeLogical.cc.
231{
232 os <<
"VDir " <<
name <<
" "
233 << (pol == 0 ? "L"
234 : pol == 1 ? "FT"
235 : pol == 2 ? "ST"
236 : "??")
237 << " " << fDresTheta << " " << fDresPhi << std::endl;
238
239 for (
G4int iTheta = 0; iTheta < fDresTheta; iTheta++) {
240 for (
G4int iPhi = 0; iPhi < fDresPhi; iPhi++) {
241 os << fN_map[pol][iTheta][iPhi].
x() <<
" " << fN_map[pol][iTheta][iPhi].
y() <<
" "
242 << fN_map[pol][iTheta][iPhi].
z() << std::endl;
243 }
244 }
245}
const char * name(G4int ptype)
Referenced by Dump().
◆ DumpMap()
void G4LatticeLogical::DumpMap |
( |
std::ostream & | os, |
|
|
G4int | pol, |
|
|
const G4String & | name ) const |
Definition at line 214 of file G4LatticeLogical.cc.
215{
216 os <<
"VG " <<
name <<
" "
217 << (pol == 0 ? "L"
218 : pol == 1 ? "FT"
219 : pol == 2 ? "ST"
220 : "??")
221 << " " << fVresTheta << " " << fVresPhi << std::endl;
222
223 for (
G4int iTheta = 0; iTheta < fVresTheta; iTheta++) {
224 for (
G4int iPhi = 0; iPhi < fVresPhi; iPhi++) {
225 os << fMap[pol][iTheta][iPhi] << std::endl;
226 }
227 }
228}
Referenced by Dump().
◆ GetAnhDecConstant()
G4double G4LatticeLogical::GetAnhDecConstant |
( |
| ) |
const |
|
inline |
◆ GetBeta()
G4double G4LatticeLogical::GetBeta |
( |
| ) |
const |
|
inline |
◆ GetFTDOS()
G4double G4LatticeLogical::GetFTDOS |
( |
| ) |
const |
|
inline |
◆ GetGamma()
G4double G4LatticeLogical::GetGamma |
( |
| ) |
const |
|
inline |
◆ GetLambda()
G4double G4LatticeLogical::GetLambda |
( |
| ) |
const |
|
inline |
◆ GetLDOS()
G4double G4LatticeLogical::GetLDOS |
( |
| ) |
const |
|
inline |
◆ GetMu()
G4double G4LatticeLogical::GetMu |
( |
| ) |
const |
|
inline |
◆ GetScatteringConstant()
G4double G4LatticeLogical::GetScatteringConstant |
( |
| ) |
const |
|
inline |
◆ GetSTDOS()
G4double G4LatticeLogical::GetSTDOS |
( |
| ) |
const |
|
inline |
◆ Load_NMap()
Definition at line 89 of file G4LatticeLogical.cc.
90{
92 G4cerr <<
"G4LatticeLogical::LoadMap exceeds maximum resolution of " <<
MAXRES <<
" by "
94 return false;
95 }
96
97 std::ifstream fMapFile(map.data());
98 if (! fMapFile.is_open()) {
99 return false;
100 }
101
104 for (
G4int theta = 0; theta < tRes; theta++) {
105 for (
G4int phi = 0; phi < pRes; phi++) {
106 fMapFile >> x >> y >> z;
108 fN_map[polarizationState][theta][phi] = dir.
unit();
109 }
110 }
111
112 if (verboseLevel != 0) {
113 G4cout <<
"\nG4LatticeLogical::Load_NMap(" << map <<
") successful"
114 << " (Vdir " << tRes << " x " << pRes << " for polarization " << polarizationState
116 }
117
118 fDresTheta = tRes;
119 fDresPhi = pRes;
120 return true;
121}
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
Referenced by G4LatticeReader::ProcessNMap().
◆ LoadMap()
Definition at line 53 of file G4LatticeLogical.cc.
54{
56 G4cerr <<
"G4LatticeLogical::LoadMap exceeds maximum resolution of " <<
MAXRES <<
" by "
58 return false;
59 }
60
61 std::ifstream fMapFile(map.data());
62 if (! fMapFile.is_open()) {
63 return false;
64 }
65
67 for (
G4int theta = 0; theta < tRes; theta++) {
68 for (
G4int phi = 0; phi < pRes; phi++) {
69 fMapFile >> vgrp;
70 fMap[polarizationState][theta][phi] = vgrp * (m / s);
71 }
72 }
73
74 if (verboseLevel != 0) {
75 G4cout <<
"\nG4LatticeLogical::LoadMap(" << map <<
") successful"
76 << " (Vg scalars " << tRes << " x " << pRes << " for polarization " << polarizationState
78 }
79
80 fVresTheta = tRes;
81 fVresPhi = pRes;
82 return true;
83}
Referenced by G4LatticeReader::ProcessMap().
◆ MapKtoV()
Definition at line 128 of file G4LatticeLogical.cc.
129{
131
132 tRes = pi / fVresTheta;
133 pRes = twopi / fVresPhi;
134
137
138 if (phi < 0) {
139 phi = phi + twopi;
140 }
141 if (theta > pi) {
142 theta = theta - pi;
143 }
144
145 G4double Vg = fMap[polarizationState][int(theta / tRes)][int(phi / pRes)];
146
147 if (Vg == 0) {
148 G4cout <<
"\nFound v=0 for polarization " << polarizationState <<
" theta " << theta <<
" phi "
149 << phi << " translating to map coords "
150 <<
"theta " << int(theta / tRes) <<
" phi " << int(phi / pRes) <<
G4endl;
151 }
152
153 if (verboseLevel > 1) {
154 G4cout <<
"G4LatticeLogical::MapKtoV theta,phi=" << theta <<
" " << phi <<
" : ith,iph "
155 << int(theta / tRes) <<
" " << int(phi / pRes) <<
" : V " << Vg <<
G4endl;
156 }
157
158 return Vg;
159}
Referenced by G4LatticePhysical::MapKtoV().
◆ MapKtoVDir()
Definition at line 166 of file G4LatticeLogical.cc.
167{
169
170 tRes = pi / (fDresTheta - 1);
171 pRes = 2 * pi / (fDresPhi - 1);
172
175
176 if (theta > pi) {
177 theta = theta - pi;
178 }
179
180 if (phi < 0) {
181 phi = phi + 2 * pi;
182 }
183
184 auto iTheta = int(theta / tRes + 0.5);
185 auto iPhi = int(phi / pRes + 0.5);
186
187 if (verboseLevel > 1) {
188 G4cout <<
"G4LatticeLogical::MapKtoVDir theta,phi=" << theta <<
" " << phi <<
" : ith,iph "
189 << iTheta << " " << iPhi << " : dir " << fN_map[polarizationState][iTheta][iPhi]
191 }
192
193 return fN_map[polarizationState][iTheta][iPhi];
194}
Referenced by G4LatticePhysical::MapKtoVDir().
◆ SetAnhDecConstant()
void G4LatticeLogical::SetAnhDecConstant |
( |
G4double | a | ) |
|
|
inline |
◆ SetDynamicalConstants()
◆ SetFTDOS()
void G4LatticeLogical::SetFTDOS |
( |
G4double | FTDOS | ) |
|
|
inline |
◆ SetLDOS()
void G4LatticeLogical::SetLDOS |
( |
G4double | LDOS | ) |
|
|
inline |
◆ SetScatteringConstant()
void G4LatticeLogical::SetScatteringConstant |
( |
G4double | b | ) |
|
|
inline |
◆ SetSTDOS()
void G4LatticeLogical::SetSTDOS |
( |
G4double | STDOS | ) |
|
|
inline |
◆ SetVerboseLevel()
void G4LatticeLogical::SetVerboseLevel |
( |
G4int | vb | ) |
|
|
inline |
The documentation for this class was generated from the following files: