49 std::getenv(
"G4LATTICEDATA") ? (
const char*)std::getenv(
"G4LATTICEDATA") :
"./CrystalMaps";
55 : verboseLevel(vb), psLatfile(0), pLattice(0), fMapPath(
""),
56 fToken(
""), fValue(0.), fMap(
""), fsPol(
""), fPol(-1), fNX(0), fNY(0) {;}
70 msg <<
"Unable to open " << filename;
71 G4Exception(
"G4LatticeReader::MakeLattice",
"Lattice001",
86 msg <<
"Error reading lattice from " << filename;
87 G4Exception(
"G4LatticeReader::MakeLattice",
"Lattice002",
101 G4cout <<
"G4LatticeReader::OpenFile " << filename <<
G4endl;
106 filepath =
fDataDir +
"/" + filename;
116 size_t lastdir = filepath.rfind(
'/');
117 if (lastdir == std::string::npos)
fMapPath =
".";
118 else fMapPath = filepath.substr(0,lastdir);
188 G4cout <<
" ProcessConstants " <<
beta <<
" " << gamma
204 G4cerr <<
"G4LatticeReader: Invalid map theta dimension " <<
fNX <<
G4endl;
209 G4cerr <<
"G4LatticeReader: Invalid map phi dimension " <<
fNY <<
G4endl;
223 if (fPol<0 || fPol>2) {
233 G4cerr <<
"G4LatticeReader: Unable to process mapfile directive." <<
G4endl;
242 G4cerr <<
"G4LatticeReader: Unable to process mapfile directive." <<
G4endl;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
Definition of the G4LatticeLogical class.
static constexpr double s
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
void SetLDOS(G4double LDOS)
void SetAnhDecConstant(G4double a)
void SetFTDOS(G4double FTDOS)
G4bool LoadMap(G4int, G4int, G4int, G4String)
void SetSTDOS(G4double STDOS)
void SetDynamicalConstants(G4double Beta, G4double Gamma, G4double Lambda, G4double Mu)
void SetScatteringConstant(G4double b)
G4bool Load_NMap(G4int, G4int, G4int, G4String)
G4bool ProcessValue(const G4String &name)
static const G4String fDataDir
G4LatticeLogical * pLattice
G4LatticeLogical * MakeLattice(const G4String &filepath)
G4LatticeReader(G4int vb=0)
std::ifstream * psLatfile
G4bool OpenFile(const G4String &filepath)
G4bool ProcessConstants()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const char * name(G4int ptype)
G4bool contains(const G4String &str, std::string_view ss)
Check if a string contains a given substring.
void to_lower(G4String &str)
Convert string to lowercase.