Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ModelingParameters.hh File Reference
#include "globals.hh"
#include "G4VisExtent.hh"
#include "G4VisAttributes.hh"
#include "G4VPhysicalVolume.hh"
#include <vector>
#include <utility>
#include "G4ModelingParameters.icc"

Go to the source code of this file.

Classes

class  G4ModelingParameters
class  G4ModelingParameters::PVNameCopyNo
class  G4ModelingParameters::PVPointerCopyNo
class  G4ModelingParameters::VisAttributesModifier
struct  G4ModelingParameters::TimeParameters

Functions

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

Function Documentation

◆ operator<<() [1/4]

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

Definition at line 167 of file G4ModelingParameters.cc.

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

◆ operator<<() [2/4]

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

Definition at line 381 of file G4ModelingParameters.cc.

383{
384 os << "Touchable path: ";
385 if (path.empty()) {
386 os << "empty";
387 } else {
388 os << "physical-volume-name:copy-number pairs:\n ";
390 for (i = path.begin(); i != path.end(); ++i) {
391 if (i != path.begin()) {
392 os << ',';
393 }
394 os << i->GetName() << ':' << i->GetCopyNo();
395 }
396 }
397 return os;
398}
PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator

◆ operator<<() [3/4]

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

Definition at line 413 of file G4ModelingParameters.cc.

415{
416 os << "Touchable path: physical-volume-pointer:copy-number pairs:\n ";
418 for (i = path.begin(); i != path.end(); ++i) {
419 if (i != path.begin()) {
420 os << ',';
421 }
422 os << '(' << (void*)(i->GetPVPointer()) << ')' << i->GetName() << ':' << i->GetCopyNo();
423 }
424 return os;
425}
PVPointerCopyNoPath::const_iterator PVPointerCopyNoPathConstIterator

◆ operator<<() [4/4]

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

Definition at line 427 of file G4ModelingParameters.cc.

430{
431 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator
432 iModifier;
433 for (iModifier = vams.begin();
434 iModifier != vams.end();
435 ++iModifier) {
437 iModifier->GetPVNameCopyNoPath();
438 os << '\n' << vamPath;
439 const G4VisAttributes& vamVisAtts = iModifier->GetVisAttributes();
440 const G4Colour& c = vamVisAtts.GetColour();
441 switch (iModifier->GetVisAttributesSignifier()) {
443 os << " visibility ";
444 if (vamVisAtts.IsVisible()) {
445 os << "true";
446 } else {
447 os << "false";
448 }
449 break;
451 os << " daughtersInvisible ";
452 if (vamVisAtts.IsDaughtersInvisible()) {
453 os << "true";
454 } else {
455 os << "false";
456 }
457 break;
459 os << " colour " << c;
460 break;
462 os << " lineStyle ";
463 switch (vamVisAtts.GetLineStyle()) {
465 os << "unbroken";
466 break;
468 os << "dashed";
469 break;
471 os << "dotted";
472 }
473 break;
475 os << " lineWidth "
476 << vamVisAtts.GetLineWidth();
477 break;
480 os << " forceWireframe ";
481 if (vamVisAtts.IsForceDrawingStyle()) {
482 os << "true";
483 } else {
484 os << "false";
485 }
486 }
487 break;
489 if (vamVisAtts.GetForcedDrawingStyle() == G4VisAttributes::solid) {
490 os << " forceSolid ";
491 if (vamVisAtts.IsForceDrawingStyle()) {
492 os << "true";
493 } else {
494 os << "false";
495 }
496 }
497 break;
499 if (vamVisAtts.GetForcedDrawingStyle() == G4VisAttributes::cloud) {
500 os << " forceCloud ";
501 if (vamVisAtts.IsForceDrawingStyle()) {
502 os << "true";
503 } else {
504 os << "false";
505 }
506 }
507 break;
509 os << " numberOfCloudPoints "
510 << vamVisAtts.GetForcedNumberOfCloudPoints();
511 break;
513 os << " forceAuxEdgeVisible: ";
514 if (!vamVisAtts.IsForceDrawingStyle()) {
515 os << "not ";
516 }
517 os << " forced";
518 if (vamVisAtts.IsForceAuxEdgeVisible()) {
519 os << ": ";
520 if (vamVisAtts.IsForcedAuxEdgeVisible()) {
521 os << "true";
522 } else {
523 os << "false";
524 }
525 }
526 break;
528 os << " lineSegmentsPerCircle "
529 << vamVisAtts.GetForcedLineSegmentsPerCircle();
530 break;
531 }
532 }
533
534 return os;
535}
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