Geant4-11
Functions
G4ModelingParameters.cc File Reference
#include "G4ModelingParameters.hh"
#include "G4ios.hh"
#include "G4VisAttributes.hh"
#include "G4ExceptionSeverity.hh"
#include "G4SystemOfUnits.hh"
#include "G4VSolid.hh"
#include "G4DisplacedSolid.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PhysicalVolumeModel.hh"
#include "G4UnitsTable.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const G4ModelingParameters &mp)
 
std::ostream & operator<< (std::ostream &os, const G4ModelingParameters::PVNameCopyNoPath &path)
 
std::ostream & operator<< (std::ostream &os, const G4ModelingParameters::PVPointerCopyNoPath &path)
 
std::ostream & operator<< (std::ostream &os, const std::vector< G4ModelingParameters::VisAttributesModifier > &vams)
 

Function Documentation

◆ operator<<() [1/4]

std::ostream & operator<< ( std::ostream &  os,
const G4ModelingParameters mp 
)

Definition at line 159 of file G4ModelingParameters.cc.

160{
161 os << "Modeling parameters (warning ";
162 if (mp.fWarning) os << "true";
163 else os << "false";
164 os << "):";
165
167 os << "\n Default vis. attributes: ";
168 if (va) os << *va;
169 else os << "none";
170
171 os << "\n Current requested drawing style: ";
172 switch (mp.fDrawingStyle) {
174 os << "wireframe"; break;
176 os << "hidden line removal (hlr)"; break;
178 os << "surface (hsr)"; break;
180 os << "surface and edges (hlhsr)"; break;
182 os << "cloud"; break;
183 default: os << "unrecognised"; break;
184 }
185
186 os << "\n Number of cloud points: " << mp.fNumberOfCloudPoints;
187
188 os << "\n Culling: ";
189 if (mp.fCulling) os << "on";
190 else os << "off";
191
192 os << "\n Culling invisible objects: ";
193 if (mp.fCullInvisible) os << "on";
194 else os << "off";
195
196 os << "\n Density culling: ";
197 if (mp.fDensityCulling) {
198 os << "on - invisible if density less than "
199 << mp.fVisibleDensity / (1. * g / cm3) << " g cm^-3";
200 }
201 else os << "off";
202
203 os << "\n Culling daughters covered by opaque mothers: ";
204 if (mp.fCullCovered) os << "on";
205 else os << "off";
206
207 os << "\n Colour by density: ";
208 if (mp.fCBDAlgorithmNumber <= 0) {
209 os << "inactive";
210 } else {
211 os << "Algorithm " << mp.fCBDAlgorithmNumber << ", Parameters:";
212 for (auto p: mp.fCBDParameters) {
213 os << ' ' << G4BestUnit(p,"Volumic Mass");
214 }
215 }
216
217 os << "\n Explode factor: " << mp.fExplodeFactor
218 << " about centre: " << mp.fExplodeCentre;
219
220 os << "\n No. of sides used in circle polygon approximation: "
221 << mp.fNoOfSides;
222
223 os << "\n Section (DCUT) shape (G4DisplacedSolid) pointer: ";
224 if (!mp.fpSectionSolid) os << "non-";
225 os << "null";
226
227 os << "\n Cutaway (DCUT) shape (G4DisplacedSolid) pointer: ";
228 if (!mp.fpCutawaySolid) os << "non-";
229 os << "null";
230
231 os << "\n Event pointer: " << mp.fpEvent;
232
233 os << "\n Vis attributes modifiers: ";
234 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams =
236 if (vams.empty()) {
237 os << "None";
238 } else {
239 os << vams;
240 }
241
242 os << "\n Special Mesh Rendering: ";
243 if (mp.fSpecialMeshRendering) {
244 os << "on: ";
245 if (mp.fSpecialMeshVolumes.empty()) {
246 os << "all meshes";
247 } else {
248 os << "selected meshes";
249 for (const auto& vol: mp.fSpecialMeshVolumes) {
250 os << "\n " << vol.GetName() << ':' << vol.GetCopyNo();
251 }
252 }
253 } else os << "off";
254
255 return os;
256}
static constexpr double cm3
Definition: G4SIunits.hh:101
static constexpr double g
Definition: G4SIunits.hh:168
#define G4BestUnit(a, b)
G4DisplacedSolid * fpSectionSolid
std::vector< G4double > fCBDParameters
G4DisplacedSolid * fpCutawaySolid
const G4VisAttributes * fpDefaultVisAttributes
std::vector< VisAttributesModifier > fVisAttributesModifiers
std::vector< PVNameCopyNo > fSpecialMeshVolumes

◆ operator<<() [2/4]

std::ostream & operator<< ( std::ostream &  os,
const G4ModelingParameters::PVNameCopyNoPath path 
)

Definition at line 363 of file G4ModelingParameters.cc.

365{
366 os << "Touchable path: ";
367 if (path.empty()) {
368 os << "empty";
369 } else {
370 os << "physical-volume-name:copy-number pairs:\n ";
372 for (i = path.begin(); i != path.end(); ++i) {
373 if (i != path.begin()) {
374 os << ',';
375 }
376 os << i->GetName() << ':' << i->GetCopyNo();
377 }
378 }
379 return os;
380}
PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator

◆ operator<<() [3/4]

std::ostream & operator<< ( std::ostream &  os,
const G4ModelingParameters::PVPointerCopyNoPath path 
)

Definition at line 395 of file G4ModelingParameters.cc.

397{
398 os << "Touchable path: physical-volume-pointer:copy-number pairs:\n ";
400 for (i = path.begin(); i != path.end(); ++i) {
401 if (i != path.begin()) {
402 os << ',';
403 }
404 os << '(' << (void*)(i->GetPVPointer()) << ')' << i->GetName() << ':' << i->GetCopyNo();
405 }
406 return os;
407}
PVPointerCopyNoPath::const_iterator PVPointerCopyNoPathConstIterator

◆ operator<<() [4/4]

std::ostream & operator<< ( std::ostream &  os,
const std::vector< G4ModelingParameters::VisAttributesModifier > &  vams 
)

Definition at line 409 of file G4ModelingParameters.cc.

412{
413 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator
414 iModifier;
415 for (iModifier = vams.begin();
416 iModifier != vams.end();
417 ++iModifier) {
419 iModifier->GetPVNameCopyNoPath();
420 os << '\n' << vamPath;
421 const G4VisAttributes& vamVisAtts = iModifier->GetVisAttributes();
422 const G4Colour& c = vamVisAtts.GetColour();
423 switch (iModifier->GetVisAttributesSignifier()) {
425 os << " visibility ";
426 if (vamVisAtts.IsVisible()) {
427 os << "true";
428 } else {
429 os << "false";
430 }
431 break;
433 os << " daughtersInvisible ";
434 if (vamVisAtts.IsDaughtersInvisible()) {
435 os << "true";
436 } else {
437 os << "false";
438 }
439 break;
441 os << " colour " << c;
442 break;
444 os << " lineStyle ";
445 switch (vamVisAtts.GetLineStyle()) {
447 os << "unbroken";
448 break;
450 os << "dashed";
451 break;
453 os << "dotted";
454 }
455 break;
457 os << " lineWidth "
458 << vamVisAtts.GetLineWidth();
459 break;
462 os << " forceWireframe ";
463 if (vamVisAtts.IsForceDrawingStyle()) {
464 os << "true";
465 } else {
466 os << "false";
467 }
468 }
469 break;
471 if (vamVisAtts.GetForcedDrawingStyle() == G4VisAttributes::solid) {
472 os << " forceSolid ";
473 if (vamVisAtts.IsForceDrawingStyle()) {
474 os << "true";
475 } else {
476 os << "false";
477 }
478 }
479 break;
481 if (vamVisAtts.GetForcedDrawingStyle() == G4VisAttributes::cloud) {
482 os << " forceCloud ";
483 if (vamVisAtts.IsForceDrawingStyle()) {
484 os << "true";
485 } else {
486 os << "false";
487 }
488 }
489 break;
491 os << " numberOfCloudPoints "
492 << vamVisAtts.GetForcedNumberOfCloudPoints();
493 break;
495 os << " forceAuxEdgeVisible: ";
496 if (!vamVisAtts.IsForceDrawingStyle()) {
497 os << "not ";
498 }
499 os << " forced";
500 if (vamVisAtts.IsForceAuxEdgeVisible()) {
501 os << ": ";
502 if (vamVisAtts.IsForcedAuxEdgeVisible()) {
503 os << "true";
504 } else {
505 os << "false";
506 }
507 }
508 break;
510 os << " lineSegmentsPerCircle "
511 << vamVisAtts.GetForcedLineSegmentsPerCircle();
512 break;
513 }
514 }
515
516 return os;
517}
std::vector< PVNameCopyNo > PVNameCopyNoPath
G4int GetForcedNumberOfCloudPoints() const
G4double GetLineWidth() const
G4bool IsDaughtersInvisible() const
G4int GetForcedLineSegmentsPerCircle() const
LineStyle GetLineStyle() const
const G4Colour & GetColour() const
G4bool IsVisible() const
G4bool IsForceAuxEdgeVisible() const
G4bool IsForcedAuxEdgeVisible() const
ForcedDrawingStyle GetForcedDrawingStyle() const
G4bool IsForceDrawingStyle() const