18 #include "G4PhysicalVolumeStore.hh"
19 #include "G4LogicalVolumeStore.hh"
20 #include "G4VPhysicalVolume.hh"
21 #include "G4LogicalVolume.hh"
22 #include "G4VSolid.hh"
23 #include "G4Material.hh"
25 #include "G4VisAttributes.hh"
26 #include "G4UserLimits.hh"
27 #include "G4TransportationManager.hh"
33 std::vector<std::string> defNames;
34 nodeNames_ =
p.getUntrackedParameter<std::vector<std::string>>(
"NodeNames", defNames);
35 G4cout <<
"PrintGeomSummary:: initialised for " <<
nodeNames_.size() <<
" nodes:" << G4endl;
65 (*job)()->get<IdealGeometryRecord>().get(pDD);
68 const auto& gra = cpv->
graph();
75 for (
adjl_iterator git = gra.begin(); git != gra.end(); ++git) {
81 for (Graph::edge_list::const_iterator cit = git->begin(); cit != git->end(); ++cit) {
87 G4cout <<
"Finds " <<
solidMap_.size() <<
" different solids in the tree" << G4endl;
92 std::map<DDSolidShape, std::string>::iterator it =
solidShape_.find(solid.
shape());
113 G4cout <<
" Number of G4VPhysicalVolume's for " <<
name <<
": " <<
pvs_.size() << G4endl;
116 const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
117 std::vector<G4LogicalVolume*>::const_iterator lvcite;
118 for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++) {
119 if ((*lvcite)->GetName() == (G4String)(
nodeNames_[
k])) {
127 const G4PhysicalVolumeStore*
pvs = G4PhysicalVolumeStore::GetInstance();
128 std::vector<G4VPhysicalVolume*>::const_iterator pvcite;
129 for (pvcite =
pvs->begin(); pvcite !=
pvs->end(); pvcite++) {
130 if ((*pvcite)->GetName() == (G4String)(
nodeNames_[
k])) {
143 G4VSolid* sl = lv->GetSolid();
147 for (
int ii = 0;
ii < (
int)(lv->GetNoDaughters());
ii++)
148 fillLV(lv->GetDaughter(
ii)->GetLogicalVolume());
154 for (
int ii = 0;
ii < (
int)(
pv->GetLogicalVolume()->GetNoDaughters());
ii++)
155 fillPV(
pv->GetLogicalVolume()->GetDaughter(
ii));
160 out << G4endl << G4endl <<
"@@@@@@@@@@@@@@@@@@ Dumping Summary For Node " <<
name << G4endl;
161 out <<
" Number of G4VSolid's: " <<
sls_.size() << G4endl;
162 out <<
" Number of G4LogicalVolume's: " <<
lvs_.size() << G4endl;
163 out <<
" Number of Touchable's: " <<
touch_.size() << G4endl;
165 out << G4endl <<
"Occurence of each type of shape among Solids" << G4endl;
167 for (std::vector<G4VSolid*>::iterator it =
sls_.begin(); it !=
sls_.end(); ++it) {
173 out << G4endl <<
"Occurence of each type of shape among Logical Volumes" << G4endl;
175 for (std::vector<G4LogicalVolume*>::iterator it =
lvs_.begin(); it !=
lvs_.end(); ++it) {
181 out << G4endl <<
"Occurence of each type of shape among Touchables" << G4endl;
183 for (std::vector<G4LogicalVolume*>::iterator it =
touch_.begin(); it !=
touch_.end(); ++it) {
191 return G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
196 if (
name.find(
"_refl") <
name.size()) {
200 std::map<std::string, DDSolidShape>::const_iterator jt =
solidMap_.find(
name);
204 kount_[shape] = (
refl) ? std::pair<int, int>(0, 1) : std::pair<int, int>(1, 0);
207 : std::pair<int, int>(++((
itr->second).first), ((
itr->second).second));
215 out <<
"Shape [" <<
k <<
"] " << shape <<
" # " << (
itr->second).
first <<
" : " << (
itr->second).second << G4endl;