5 #include "G4RegionStore.hh" 6 #include "G4LogicalVolume.hh" 7 #include "G4ProductionCuts.hh" 8 #include "G4SystemOfUnits.hh" 22 <<
"> is not opened - no report provided";
25 G4RegionStore* regStore = G4RegionStore::GetInstance();
27 unsigned int numRegions = regStore->size();
32 fout <<
"#---------------------------------------------------------------------";
33 fout <<
"------------------------------------" 35 fout <<
"## List of Regions, root logical volumes and cuts. " 37 fout <<
"## Number of regions = " << numRegions <<
"\n";
40 fout <<
"# " << std::setw(24) <<
" Region, " << std::setw(38) <<
" LogicalVolume, " 41 <<
" Cuts:Gamma, Electron, Positron, Proton, Units" 43 fout <<
"#---------------------------------------------------------------------";
44 fout <<
"------------------------------------" 47 for (
i = 0;
i < numRegions; ++
i) {
48 G4Region*
region = regStore->at(
i);
49 G4ProductionCuts* prodCuts =
region->GetProductionCuts();
53 G4double lengthUnit = CLHEP::mm;
54 G4String lengthUnitName =
"mm";
55 unsigned int pmax = 4;
57 std::vector<G4LogicalVolume*>::iterator rootLVItr =
region->GetRootLogicalVolumeIterator();
58 size_t numRootLV =
region->GetNumberOfRootVolumes();
60 for (
size_t iLV = 0; iLV < numRootLV; ++iLV, ++rootLVItr) {
69 std::ostringstream regName, lvName;
70 regName << quote <<
region->GetName() << quote;
71 lvName << quote << lv->GetName() << quote;
72 fout <<
" " << std::setw(26) << regName.str() <<
" ,";
73 fout <<
" " << std::setw(36) << lvName.str() <<
" ,";
76 for (ic = 0; ic < pmax; ++ic) {
77 G4double cutLength = prodCuts->GetProductionCut(ic);
78 fout <<
" " << std::setw(5) << cutLength / lengthUnit;
82 fout <<
" , " << lengthUnitName;
88 fout <<
"#---------------------------------------------------------------------";
89 fout <<
"------------------------------------"
void ReportRegions(const std::string &ss)
Log< level::Warning, false > LogWarning