void G3CLRead(G4String &, char *);
TG4GeometryManager* TG4GeometryManager::fgInstance = 0;
+const G4double TG4GeometryManager::fgLimitDensity = 0.001*(g/cm3);
+const G4double TG4GeometryManager::fgMaxStep = 10*cm;
//_____________________________________________________________________________
TG4GeometryManager::TG4GeometryManager()
- : fMediumCounter(0),
+ : TG4Verbose("geometryManager"),
+ fMediumCounter(0),
fMaterialCounter(0),
fMatrixCounter(0),
fUseG3TMLimits(false),
}
//_____________________________________________________________________________
-TG4GeometryManager::TG4GeometryManager(const TG4GeometryManager& right) {
+TG4GeometryManager::TG4GeometryManager(const TG4GeometryManager& right)
+ : TG4Verbose("geometryManager") {
//
TG4Globals::Exception(
"Attempt to copy TG4GeometryManager singleton.");
// create new material only if it does not yet exist
G4Material* material = fGeometryServices->FindMaterial(a, z, dens);
if (material) {
- // add verbose
- G4cout << "!!! Material " << namein << " already exists as "
- << material->GetName() << G4endl;
+ // verbose
+ if (VerboseLevel() > 1) {
+ G4cout << "!!! Material " << namein << " already exists as "
+ << material->GetName() << G4endl;
+ }
G3Mat.put(kmat, material);
}
else
G4Material* material
= fGeometryServices->FindMaterial(ain, zin, dens, nlmat, wmatin);
if (material) {
- // add verbose
- G4cout << "!!! Material " << namein << " already exists as "
- << material->GetName() << G4endl;
+ // verbose
+ if (VerboseLevel() > 1) {
+ G4cout << "!!! Material " << namein << " already exists as "
+ << material->GetName() << G4endl;
+ }
G3Mat.put(kmat, material);
}
else
// set material properties table
material->SetMaterialPropertiesTable(table);
- // add verbose
- G4cout << "The tables for UV photon tracking set for "
- << material->GetName() << G4endl;
-
+ // verbose
+ if (VerboseLevel() > 0) {
+ G4cout << "The tables for UV photon tracking set for "
+ << material->GetName() << G4endl;
+ }
for (i=0; i<npckov; i++)
G4cout << ppckovDbl[i] << " " << rindexDbl[i] << G4endl;
G3Vol.VTEStat();
// print G4 geometry statistics
- // add verbose
- G4cout << "G4 Stat: instantiated "
- << fGeometryServices->NofG4LogicalVolumes()
- << " logical volumes \n"
- << " "
- << fGeometryServices->NofG4PhysicalVolumes()
- << " physical volumes" << G4endl;
+ if (VerboseLevel() > 0) {
+ G4cout << "G4 Stat: instantiated "
+ << fGeometryServices->NofG4LogicalVolumes()
+ << " logical volumes \n"
+ << " "
+ << fGeometryServices->NofG4PhysicalVolumes()
+ << " physical volumes" << G4endl;
+ }
// position the first entry
// (in Geant3 the top volume cannot be positioned)
for (G4int i=0; i<lvStore->size(); i++) {
G4LogicalVolume* lv = (*lvStore)[i];
-
+
// get limits from G3Med
G4int mediumIndex = fGeometryServices->GetMediumId(lv);
G4UserLimits* limits = G3Med.get(mediumIndex)->GetLimits();
tg4Limits = new TG4Limits(name, cuts, controls);
}
+ // limit max step for low density materials (< AIR)
+ if (lv->GetMaterial()->GetDensity() < fgLimitDensity )
+ tg4Limits->SetMaxAllowedStep(fgMaxStep);
+
// update controls in limits according to the setup
// in the passed vector
tg4Limits->Update(controls);
// Processes g3calls.dat file and fills G3 tables.
// ---
- // add verbose
- G4cout << "Reading the call list file " << filePath << "..." << G4endl;
+ // verbose
+ if (VerboseLevel() > 0) {
+ G4cout << "Reading the call list file " << filePath << "..." << G4endl;
+ }
G3CLRead(filePath, NULL);
- // add verbose
- G4cout << "Call list file read completed. Build geometry" << G4endl;
+ if (VerboseLevel() > 0) {
+ G4cout << "Call list file read completed. Build geometry" << G4endl;
+ }
}