#include <G4LatticeLogical.hh>
|
| G4LatticeLogical () |
|
virtual | ~G4LatticeLogical () |
|
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 41 of file G4LatticeLogical.hh.
◆ anonymous enum
◆ G4LatticeLogical()
G4LatticeLogical::G4LatticeLogical |
( |
| ) |
|
Definition at line 39 of file G4LatticeLogical.cc.
40 : verboseLevel(0), fVresTheta(0), fVresPhi(0), fDresTheta(0), fDresPhi(0),
41 fA(0), fB(0), fLDOS(0), fSTDOS(0), fFTDOS(0),
42 fBeta(0), fGamma(0), fLambda(0), fMu(0) {
43 for (
G4int i=0; i<3; i++) {
46 fMap[i][j][k] = 0.;
47 fN_map[i][j][k].
set(0.,0.,0.);
48 }
49 }
50 }
51}
void set(double x, double y, double z)
◆ ~G4LatticeLogical()
G4LatticeLogical::~G4LatticeLogical |
( |
| ) |
|
|
virtual |
◆ Dump()
void G4LatticeLogical::Dump |
( |
std::ostream & |
os | ) |
const |
Definition at line 201 of file G4LatticeLogical.cc.
201 {
202 os << "dyn " << fBeta << " " << fGamma << " " << fLambda << " " << fMu
203 << "\nscat " << fB << " decay " << fA
204 << "\nLDOS " << fLDOS << " STDOS " << fSTDOS << " FTDOS " << fFTDOS
205 << std::endl;
206
210
214}
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 228 of file G4LatticeLogical.cc.
229 {
230 os <<
"VDir " <<
name <<
" " << (pol==0?
"L":pol==1?
"FT":pol==2?
"ST":
"??")
231 << " " << fDresTheta << " " << fDresPhi << std::endl;
232
233 for (
G4int iTheta=0; iTheta<fDresTheta; iTheta++) {
234 for (
G4int iPhi=0; iPhi<fDresPhi; iPhi++) {
235 os << fN_map[pol][iTheta][iPhi].
x()
236 <<
" " << fN_map[pol][iTheta][iPhi].
y()
237 <<
" " << fN_map[pol][iTheta][iPhi].
z()
238 << std::endl;
239 }
240 }
241}
const char * name(G4int ptype)
Referenced by Dump().
◆ DumpMap()
void G4LatticeLogical::DumpMap |
( |
std::ostream & |
os, |
|
|
G4int |
pol, |
|
|
const G4String & |
name |
|
) |
| const |
Definition at line 216 of file G4LatticeLogical.cc.
217 {
218 os <<
"VG " <<
name <<
" " << (pol==0?
"L":pol==1?
"FT":pol==2?
"ST":
"??")
219 << " " << fVresTheta << " " << fVresPhi << std::endl;
220
221 for (
G4int iTheta=0; iTheta<fVresTheta; iTheta++) {
222 for (
G4int iPhi=0; iPhi<fVresPhi; iPhi++) {
223 os << fMap[pol][iTheta][iPhi] << std::endl;
224 }
225 }
226}
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 97 of file G4LatticeLogical.cc.
98 {
100 G4cerr <<
"G4LatticeLogical::LoadMap exceeds maximum resolution of "
102 return false;
103 }
104
105 std::ifstream fMapFile(map.
data());
106 if(!fMapFile.is_open()) return false;
107
110 for (
G4int theta = 0; theta<tRes; theta++) {
111 for (
G4int phi = 0; phi<pRes; phi++) {
112 fMapFile >> x >> y >> z;
114 fN_map[polarizationState][theta][phi] = dir.
unit();
115 }
116 }
117
118 if (verboseLevel) {
119 G4cout <<
"\nG4LatticeLogical::Load_NMap(" << map <<
") successful"
120 << " (Vdir " << tRes << " x " << pRes << " for polarization "
121 << polarizationState <<
")." <<
G4endl;
122 }
123
124 fDresTheta=tRes;
125 fDresPhi=pRes;
126 return true;
127}
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
const char * data() const
Referenced by G4LatticeReader::ProcessNMap().
◆ LoadMap()
Definition at line 61 of file G4LatticeLogical.cc.
62 {
64 G4cerr <<
"G4LatticeLogical::LoadMap exceeds maximum resolution of "
66 return false;
67 }
68
69 std::ifstream fMapFile(map.
data());
70 if (!fMapFile.is_open()) return false;
71
73 for (
G4int theta = 0; theta<tRes; theta++) {
74 for (
G4int phi = 0; phi<pRes; phi++) {
75 fMapFile >> vgrp;
76 fMap[polarizationState][theta][phi] = vgrp * (m/s);
77 }
78 }
79
80 if (verboseLevel) {
81 G4cout <<
"\nG4LatticeLogical::LoadMap(" << map <<
") successful"
82 << " (Vg scalars " << tRes << " x " << pRes << " for polarization "
83 << polarizationState <<
")." <<
G4endl;
84 }
85
86 fVresTheta=tRes;
87 fVresPhi=pRes;
88 return true;
89}
Referenced by G4LatticeReader::ProcessMap().
◆ MapKtoV()
Definition at line 135 of file G4LatticeLogical.cc.
136 {
138
140 pRes=twopi/fVresPhi;
141
144
145 if(phi<0) phi = phi + twopi;
146 if(theta>pi) theta=theta-
pi;
147
148 G4double Vg = fMap[polarizationState][int(theta/tRes)][int(phi/pRes)];
149
150 if(Vg == 0){
151 G4cout<<
"\nFound v=0 for polarization "<<polarizationState
152 <<" theta "<<theta<<" phi "<<phi<< " translating to map coords "
153 <<
"theta "<< int(theta/tRes) <<
" phi " << int(phi/pRes)<<
G4endl;
154 }
155
156 if (verboseLevel>1) {
157 G4cout <<
"G4LatticeLogical::MapKtoV theta,phi=" << theta <<
" " << phi
158 << " : ith,iph " << int(theta/tRes) << " " << int(phi/pRes)
159 <<
" : V " << Vg <<
G4endl;
160 }
161
162 return Vg;
163}
Referenced by G4LatticePhysical::MapKtoV().
◆ MapKtoVDir()
Definition at line 171 of file G4LatticeLogical.cc.
172 {
174
175 tRes=
pi/(fDresTheta-1);
176 pRes=2*
pi/(fDresPhi-1);
177
180
181 if(theta>pi) theta=theta-
pi;
182
183 if(phi<0) phi = phi + 2*
pi;
184
185 G4int iTheta = int(theta/tRes+0.5);
186 G4int iPhi = int(phi/pRes+0.5);
187
188 if (verboseLevel>1) {
189 G4cout <<
"G4LatticeLogical::MapKtoVDir theta,phi=" << theta <<
" " << phi
190 << " : ith,iph " << iTheta << " " << iPhi
191 <<
" : dir " << fN_map[polarizationState][iTheta][iPhi] <<
G4endl;
192 }
193
194 return fN_map[polarizationState][iTheta][iPhi];
195}
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: