4 #include "G4RegionStore.hh" 5 #include "G4LogicalVolume.hh" 6 #include "G4ProductionCuts.hh" 7 #include "G4SystemOfUnits.hh" 23 std::cout <<
"SimG4CoreApplication ReportRegions WARNING : " 24 <<
"error opening file <" << ss <<
">" << std::endl;
27 G4RegionStore* regStore = G4RegionStore::GetInstance();
29 unsigned int numRegions= regStore->size();
34 fout <<
"#---------------------------------------------------------------------";
35 fout <<
"------------------------------------" << std::endl;
36 fout <<
"## List of Regions, root logical volumes and cuts. " << std::endl;
37 fout <<
"## Number of regions = " << numRegions << std::endl;
40 fout <<
"# " << std::setw(24) <<
" Region, " 41 << std::setw(38) <<
" LogicalVolume, " 42 <<
" Cuts:Gamma, Electron, Positron, Proton, Units" << std::endl;
43 fout <<
"#---------------------------------------------------------------------";
44 fout <<
"------------------------------------" << std::endl;
46 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";
57 std::vector<G4LogicalVolume*>::iterator rootLVItr
58 = region->GetRootLogicalVolumeIterator();
59 size_t numRootLV = region->GetNumberOfRootVolumes();
61 for(
size_t iLV=0; iLV < numRootLV; ++iLV, ++rootLVItr )
71 std::ostringstream regName, lvName;
72 regName << quote << region->GetName() << quote;
73 lvName << quote << lv->GetName() << quote;
74 fout <<
" " << std::setw(26) << regName.str() <<
" ,";
75 fout <<
" " << std::setw(36) << lvName.str() <<
" ,";
78 for( ic= 0; ic< pmax; ++ic)
80 G4double cutLength = prodCuts->GetProductionCut(ic);
81 fout <<
" " << std::setw(5) << cutLength / lengthUnit;
85 fout <<
" , " << lengthUnitName;
91 fout <<
"#---------------------------------------------------------------------";
92 fout <<
"------------------------------------" << std::endl;
void ReportRegions(const std::string &ss)