194 G4cout<<
"\nk-V fMap exceeds maximum resolution of "<<
MAXRES<<
" by "<<
MAXRES<<
". terminating."<<endl;
203 fMapFile.open(m.data());
204 if(!fMapFile.is_open())
return false;
206 for(
int theta = 0; theta<fThetaRes; theta++){
207 for(
int phi = 0; phi<fPhiRes; phi++){
208 fMapFile>>fMap[polarizationState][theta][phi];
213 G4cout<<
"\nXLogicalLattice::LoadMap() sucessful (Vg scalars)."<<endl;
228 G4cout<<
"\nk-V map exceeds maximum resolution of "<<
MAXRES<<
" by "<<
MAXRES<<
" terminating."<<endl;
237 fMapFile.open(m.data());
238 if(!fMapFile.is_open())
return false;
240 for(
int theta = 0; theta<fThetaRes; theta++){
241 for(
int phi = 0; phi<fPhiRes; phi++){
242 for(
int coord = 0; coord<3; coord++){
243 fMapFile>>fN_map[polarizationState][theta][phi][coord];
250 G4cout<<
"\nXLogicalLattice::Load_NMap() sucessful"<<endl;
266 double theta, phi, tRes, pRes;
268 tRes=
pi/(fVresTheta);
269 pRes=2*
pi/(fVresPhi);
275 if(phi<0) phi = phi + 2*
pi;
276 if(theta>pi) theta=theta-
pi;
278 if(fMap[polarizationState][
int(theta/tRes)][
int(phi/pRes)]==0){
279 G4cout<<
"\nFound v=0 for polarization "<<polarizationState<<
" theta "<<theta<<
" phi "<<phi<<
" translating to map coords " <<
"theta "<<
int(theta/tRes) <<
" phi " <<
int(phi/pRes)<<endl;
283 return fMap[polarizationState][
int(theta/tRes)][
int(phi/pRes)];
297 double theta, phi, tRes, pRes;
299 tRes=
pi/(fDresTheta-1);
300 pRes=2*
pi/(fDresPhi-1);
305 if(theta>
pi) theta=theta-
pi;
307 if(phi<0) phi = phi + 2*
pi;
314 fN_map[polarizationState][iTheta][iPhi][1],
315 fN_map[polarizationState][iTheta][iPhi][2]);