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
216 return latFind->second;
220 G4cerr <<
"G4LatticeManager:: Found no matching lattices for "
230 LatticeVolMap::const_iterator latFind =
fPLatticeList.find(Vol);
233 G4cout <<
"G4LatticeManager::GetLattice found " << latFind->second
236 return latFind->second;
240 G4cerr <<
"G4LatticeManager::GetLattice found no matching lattices for "
267 G4int polarizationState,
271 G4cout <<
"G4LatticeManager::MapKtoV using lattice " << theLattice
275 return theLattice ? theLattice->
MapKtoV(polarizationState, k) : 300.*m/s;
285 G4int polarizationState,
289 G4cout <<
"G4LatticeManager::MapKtoVDir using lattice " << theLattice
293 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