Geant4 11.2.2
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
 

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 163 of file G4ModelingParameters.cc.

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

◆ operator<<() [2/4]

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

Definition at line 372 of file G4ModelingParameters.cc.

374{
375 os << "Touchable path: ";
376 if (path.empty()) {
377 os << "empty";
378 } else {
379 os << "physical-volume-name:copy-number pairs:\n ";
381 for (i = path.begin(); i != path.end(); ++i) {
382 if (i != path.begin()) {
383 os << ',';
384 }
385 os << i->GetName() << ':' << i->GetCopyNo();
386 }
387 }
388 return os;
389}
PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator

◆ operator<<() [3/4]

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

Definition at line 404 of file G4ModelingParameters.cc.

406{
407 os << "Touchable path: physical-volume-pointer:copy-number pairs:\n ";
409 for (i = path.begin(); i != path.end(); ++i) {
410 if (i != path.begin()) {
411 os << ',';
412 }
413 os << '(' << (void*)(i->GetPVPointer()) << ')' << i->GetName() << ':' << i->GetCopyNo();
414 }
415 return os;
416}
PVPointerCopyNoPath::const_iterator PVPointerCopyNoPathConstIterator

◆ operator<<() [4/4]

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

Definition at line 418 of file G4ModelingParameters.cc.

421{
422 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator
423 iModifier;
424 for (iModifier = vams.begin();
425 iModifier != vams.end();
426 ++iModifier) {
428 iModifier->GetPVNameCopyNoPath();
429 os << '\n' << vamPath;
430 const G4VisAttributes& vamVisAtts = iModifier->GetVisAttributes();
431 const G4Colour& c = vamVisAtts.GetColour();
432 switch (iModifier->GetVisAttributesSignifier()) {
434 os << " visibility ";
435 if (vamVisAtts.IsVisible()) {
436 os << "true";
437 } else {
438 os << "false";
439 }
440 break;
442 os << " daughtersInvisible ";
443 if (vamVisAtts.IsDaughtersInvisible()) {
444 os << "true";
445 } else {
446 os << "false";
447 }
448 break;
450 os << " colour " << c;
451 break;
453 os << " lineStyle ";
454 switch (vamVisAtts.GetLineStyle()) {
456 os << "unbroken";
457 break;
459 os << "dashed";
460 break;
462 os << "dotted";
463 }
464 break;
466 os << " lineWidth "
467 << vamVisAtts.GetLineWidth();
468 break;
471 os << " forceWireframe ";
472 if (vamVisAtts.IsForceDrawingStyle()) {
473 os << "true";
474 } else {
475 os << "false";
476 }
477 }
478 break;
480 if (vamVisAtts.GetForcedDrawingStyle() == G4VisAttributes::solid) {
481 os << " forceSolid ";
482 if (vamVisAtts.IsForceDrawingStyle()) {
483 os << "true";
484 } else {
485 os << "false";
486 }
487 }
488 break;
490 if (vamVisAtts.GetForcedDrawingStyle() == G4VisAttributes::cloud) {
491 os << " forceCloud ";
492 if (vamVisAtts.IsForceDrawingStyle()) {
493 os << "true";
494 } else {
495 os << "false";
496 }
497 }
498 break;
500 os << " numberOfCloudPoints "
501 << vamVisAtts.GetForcedNumberOfCloudPoints();
502 break;
504 os << " forceAuxEdgeVisible: ";
505 if (!vamVisAtts.IsForceDrawingStyle()) {
506 os << "not ";
507 }
508 os << " forced";
509 if (vamVisAtts.IsForceAuxEdgeVisible()) {
510 os << ": ";
511 if (vamVisAtts.IsForcedAuxEdgeVisible()) {
512 os << "true";
513 } else {
514 os << "false";
515 }
516 }
517 break;
519 os << " lineSegmentsPerCircle "
520 << vamVisAtts.GetForcedLineSegmentsPerCircle();
521 break;
522 }
523 }
524
525 return os;
526}
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