40 for (
G4int i = 0; i < 3; i++) {
44 fN_map[i][j][k].
set(0., 0., 0.);
56 G4cerr <<
"G4LatticeLogical::LoadMap exceeds maximum resolution of " <<
MAXRES <<
" by "
61 std::ifstream fMapFile(map.data());
62 if (! fMapFile.is_open()) {
67 for (
G4int theta = 0; theta < tRes; theta++) {
68 for (
G4int phi = 0; phi < pRes; phi++) {
70 fMap[polarizationState][theta][phi] = vgrp * (m / s);
74 if (verboseLevel != 0) {
75 G4cout <<
"\nG4LatticeLogical::LoadMap(" << map <<
") successful"
76 <<
" (Vg scalars " << tRes <<
" x " << pRes <<
" for polarization " << polarizationState
92 G4cerr <<
"G4LatticeLogical::LoadMap exceeds maximum resolution of " <<
MAXRES <<
" by "
97 std::ifstream fMapFile(map.data());
98 if (! fMapFile.is_open()) {
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();
112 if (verboseLevel != 0) {
113 G4cout <<
"\nG4LatticeLogical::Load_NMap(" << map <<
") successful"
114 <<
" (Vdir " << tRes <<
" x " << pRes <<
" for polarization " << polarizationState
132 tRes = pi / fVresTheta;
133 pRes = twopi / fVresPhi;
145 G4double Vg = fMap[polarizationState][int(theta / tRes)][int(phi / pRes)];
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;
153 if (verboseLevel > 1) {
154 G4cout <<
"G4LatticeLogical::MapKtoV theta,phi=" << theta <<
" " << phi <<
" : ith,iph "
155 << int(theta / tRes) <<
" " << int(phi / pRes) <<
" : V " << Vg <<
G4endl;
170 tRes = pi / (fDresTheta - 1);
171 pRes = 2 * pi / (fDresPhi - 1);
184 auto iTheta = int(theta / tRes + 0.5);
185 auto iPhi = int(phi / pRes + 0.5);
187 if (verboseLevel > 1) {
188 G4cout <<
"G4LatticeLogical::MapKtoVDir theta,phi=" << theta <<
" " << phi <<
" : ith,iph "
189 << iTheta <<
" " << iPhi <<
" : dir " << fN_map[polarizationState][iTheta][iPhi]
193 return fN_map[polarizationState][iTheta][iPhi];
201 os <<
"dyn " << fBeta <<
" " << fGamma <<
" " << fLambda <<
" " << fMu <<
"\nscat " << fB
202 <<
" decay " << fA <<
"\nLDOS " << fLDOS <<
" STDOS " << fSTDOS <<
" FTDOS " << fFTDOS
216 os <<
"VG " << name <<
" "
221 <<
" " << fVresTheta <<
" " << fVresPhi << std::endl;
223 for (
G4int iTheta = 0; iTheta < fVresTheta; iTheta++) {
224 for (
G4int iPhi = 0; iPhi < fVresPhi; iPhi++) {
225 os << fMap[pol][iTheta][iPhi] << std::endl;
232 os <<
"VDir " << name <<
" "
237 <<
" " << fDresTheta <<
" " << fDresPhi << std::endl;
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;
Definition of the G4LatticeLogical class.
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
virtual G4double MapKtoV(G4int, const G4ThreeVector &) const
void DumpMap(std::ostream &os, G4int pol, const G4String &name) const
G4bool LoadMap(G4int, G4int, G4int, G4String)
void Dump_NMap(std::ostream &os, G4int pol, const G4String &name) const
virtual G4ThreeVector MapKtoVDir(G4int, const G4ThreeVector &) const
void Dump(std::ostream &os) const
G4bool Load_NMap(G4int, G4int, G4int, G4String)