61 fLastNonSequentialCopyNo(-99)
72 if (outFileName ==
"G4cout") {
79 static G4bool firstTime =
true;
82 G4cout <<
"G4ASCIITreeSceneHandler::BeginModeling: writing to ";
83 if (outFileName ==
"G4cout") {
84 G4cout <<
"G4 standard output (G4cout)";
86 G4cout <<
"file \"" << outFileName <<
"\"";
93 if (outFileName !=
"G4cout") {
102 const G4int detail = verbosity % 10;
103 os <<
"# Set verbosity with \"/vis/ASCIITree/verbose <verbosity>\":";
108 os <<
"\n# Now printing with verbosity " << verbosity;
109 os <<
"\n# Format is: PV:n";
110 if (detail >= 1) os <<
" / LV (SD,RO)";
111 if (detail >= 2) os <<
" / Solid(type)";
112 if (detail >= 3) os <<
", volume, density";
113 if (detail >= 5) os <<
", daughter-subtracted volume and mass";
114 if (detail >= 6) os <<
", physical volume dump";
115 if (detail >= 7) os <<
", polyhedron dump";
117 "\n# Abbreviations: PV = Physical Volume, LV = Logical Volume,"
118 "\n# SD = Sensitive Detector, RO = Read Out Geometry.";
124 const G4int detail = verbosity % 10;
145 std::vector<G4Scene::Model>::const_iterator i;
146 for (i = models.begin(); i != models.end(); ++i) {
159 G4cout <<
"Overall volume of \""
165 <<
" and the daughter-included mass";
168 G4cout <<
" to unlimited depth";
170 G4cout <<
", ignoring daughters at depth "
182 if (outFileName !=
"G4cout") {
184 G4cout <<
"Output file \"" << outFileName <<
"\" closed." <<
G4endl;
188 G4cout <<
"G4ASCIITreeSceneHandler::EndModeling" <<
G4endl;
196 if (!pPVModel)
return;
217 G4int detail = verbosity % 10;
225 const G4bool isAmenableToSupression =
226 (verbosity < 10 && isSimpleReplica) || (verbosity < 3 && isParameterised);
227 if (isAmenableToSupression) {
229 PVPath::const_reverse_iterator thisID = drawnPVPath.rbegin();
230 PVPath::const_reverse_iterator motherID = ++drawnPVPath.rbegin();
234 if (i->back().GetPhysicalVolume()->GetLogicalVolume() ==
235 thisID->GetPhysicalVolume()->GetLogicalVolume()) {
254 if (motherID == drawnPVPath.rend() &&
257 if (motherID != drawnPVPath.rend() &&
259 motherID->GetPhysicalVolume()->GetLogicalVolume() ==
260 (*i)[i->size() - 2].GetPhysicalVolume()->GetLogicalVolume())
274 if (verbosity < 10 && !isParameterised &&
278 if (isAmenableToSupression) {
279 G4Exception(
"G4ASCIITreeSceneHandler::RequestPrimitives",
282 "Volume amenable to suppressed printing unexpected");
313 for (
size_t i = 0; i < drawnPVPath.size(); i++ ) *
fpOutFile <<
" ";
315 <<
"\":" << currentCopyNo;
318 if (verbosity < 10) {
333 <<
" (" << nReplicas <<
" parametrised volumes)";
341 <<
" (" << nReplicas <<
" replicas)";
346 if (verbosity < 10) {
357 << pCurrentLV->
GetName() <<
"\"";
380 if (pCurrentMaterial) {
383 <<
" (" << pCurrentMaterial->
GetName() <<
")";
390 if (pCurrentMaterial) {
398 G4double daughter_subtracted_volume =
399 daughter_subtracted_mass / pCurrentMaterial->
GetDensity();
401 <<
G4BestUnit(daughter_subtracted_volume,
"Volume")
403 <<
G4BestUnit(daughter_subtracted_mass,
"Mass");
409 const std::map<G4String,G4AttDef>* attDefs = pPVModel->
GetAttDefs();
416 fRestOfLine <<
"\nLocal polyhedron coordinates:\n" << *polyhedron;
418 polyhedron->Transform(*transform);
419 fRestOfLine <<
"\nGlobal polyhedron coordinates:\n" << *polyhedron;
423 fLVSet.insert(pCurrentLV);