53G4LatticeManager::G4LatticeManager() : verboseLevel(0) {
57G4LatticeManager::~G4LatticeManager() {
64 for (LatticeLogReg::iterator lm=
fLLattices.begin();
69 for (LatticePhyReg::iterator pm=
fPLattices.begin();
104 if (!Mat || !Lat)
return false;
112 G4cout <<
"G4LatticeManager::RegisterLattice: "
113 <<
" Total number of logical lattices: " <<
fLLatticeList.size()
125 G4cout <<
"G4LatticeManager::LoadLattice material " << Mat->
GetName()
126 <<
" " << latDir <<
G4endl;
135 G4cerr <<
"ERROR creating " << latDir <<
" lattice for material "
147 G4cout <<
"G4LatticeManager::LoadLattice volume " << Vol->
GetName()
148 <<
" " << latDir <<
G4endl;
155 if (!lLattice)
return 0;
173 if (!Vol || !Lat)
return false;
186 G4cout <<
"G4LatticeManager::RegisterLattice: "
187 <<
" Total number of physical lattices: " <<
fPLatticeList.size()-1
196 if (!Vol || !LLat)
return false;
210 LatticeMatMap::const_iterator latFind =
fLLatticeList.find(Mat);
213 G4cout <<
"G4LatticeManager::GetLattice found " << latFind->second
215 return latFind->second;
219 G4cerr <<
"G4LatticeManager:: Found no matching lattices for "
229 LatticeVolMap::const_iterator latFind =
fPLatticeList.find(Vol);
232 G4cout <<
"G4LatticeManager::GetLattice found " << latFind->second
233 <<
" for " << (Vol?Vol->
GetName():
"default") <<
"." <<
G4endl;
234 return latFind->second;
238 G4cerr <<
"G4LatticeManager::GetLattice found no matching lattices for "
265 G4int polarizationState,
269 G4cout <<
"G4LatticeManager::MapKtoV using lattice " << theLattice
273 return theLattice ? theLattice->
MapKtoV(polarizationState, k) : 300.*m/s;
283 G4int polarizationState,
287 G4cout <<
"G4LatticeManager::MapKtoVDir using lattice " << theLattice
291 return theLattice ? theLattice->
MapKtoVDir(polarizationState, k) : k.
unit();
Definition of the G4LatticeLogical class.
Definition of the G4LatticePhysical class.
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
LatticeMatMap fLLatticeList
G4bool RegisterLattice(G4VPhysicalVolume *, G4LatticePhysical *)
G4double MapKtoV(G4VPhysicalVolume *, G4int, const G4ThreeVector &) const
G4LatticeLogical * GetLattice(G4Material *) const
static G4LatticeManager * GetLatticeManager()
G4bool HasLattice(G4Material *) const
LatticeVolMap fPLatticeList
G4ThreeVector MapKtoVDir(G4VPhysicalVolume *, G4int, const G4ThreeVector &) const
G4LatticeLogical * LoadLattice(G4Material *, const G4String &latDir)
G4double MapKtoV(G4int, G4ThreeVector) const
G4ThreeVector MapKtoVDir(G4int, G4ThreeVector) const
G4LatticeLogical * MakeLattice(const G4String &filepath)
G4Material * GetMaterial() const
const G4String & GetName() const
G4LogicalVolume * GetLogicalVolume() const
const G4RotationMatrix * GetFrameRotation() const
const G4String & GetName() const