Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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 157 of file G4ModelingParameters.cc.

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

◆ operator<<() [2/4]

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

Definition at line 342 of file G4ModelingParameters.cc.

344{
345 os << "Touchable path: ";
346 if (path.empty()) {
347 os << "empty";
348 } else {
349 os << "physical-volume-name:copy-number pairs:\n ";
351 for (i = path.begin(); i != path.end(); ++i) {
352 if (i != path.begin()) {
353 os << ',';
354 }
355 os << i->GetName() << ':' << i->GetCopyNo();
356 }
357 }
358 return os;
359}
PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator

◆ operator<<() [3/4]

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

Definition at line 374 of file G4ModelingParameters.cc.

376{
377 os << "Touchable path: physical-volume-pointer:copy-number pairs:\n ";
379 for (i = path.begin(); i != path.end(); ++i) {
380 if (i != path.begin()) {
381 os << ',';
382 }
383 os << '(' << (void*)(i->GetPVPointer()) << ')' << i->GetName() << ':' << i->GetCopyNo();
384 }
385 return os;
386}
PVPointerCopyNoPath::const_iterator PVPointerCopyNoPathConstIterator

◆ operator<<() [4/4]

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

Definition at line 388 of file G4ModelingParameters.cc.

391{
392 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator
393 iModifier;
394 for (iModifier = vams.begin();
395 iModifier != vams.end();
396 ++iModifier) {
398 iModifier->GetPVNameCopyNoPath();
399 os << '\n' << vamPath;
400 const G4VisAttributes& vamVisAtts = iModifier->GetVisAttributes();
401 const G4Colour& c = vamVisAtts.GetColour();
402 switch (iModifier->GetVisAttributesSignifier()) {
404 os << " visibility ";
405 if (vamVisAtts.IsVisible()) {
406 os << "true";
407 } else {
408 os << "false";
409 }
410 break;
412 os << " daughtersInvisible ";
413 if (vamVisAtts.IsDaughtersInvisible()) {
414 os << "true";
415 } else {
416 os << "false";
417 }
418 break;
420 os << " colour " << c;
421 break;
423 os << " lineStyle ";
424 switch (vamVisAtts.GetLineStyle()) {
426 os << "unbroken";
427 break;
429 os << "dashed";
430 break;
432 os << "dotted";
433 }
434 break;
436 os << " lineWidth "
437 << vamVisAtts.GetLineWidth();
438 break;
441 os << " forceWireframe ";
442 if (vamVisAtts.IsForceDrawingStyle()) {
443 os << "true";
444 } else {
445 os << "false";
446 }
447 }
448 break;
450 if (vamVisAtts.GetForcedDrawingStyle() == G4VisAttributes::solid) {
451 os << " forceSolid ";
452 if (vamVisAtts.IsForceDrawingStyle()) {
453 os << "true";
454 } else {
455 os << "false";
456 }
457 }
458 break;
460 if (vamVisAtts.GetForcedDrawingStyle() == G4VisAttributes::cloud) {
461 os << " forceCloud ";
462 if (vamVisAtts.IsForceDrawingStyle()) {
463 os << "true";
464 } else {
465 os << "false";
466 }
467 }
468 break;
470 os << " numberOfCloudPoints "
471 << vamVisAtts.GetForcedNumberOfCloudPoints();
472 break;
474 os << " forceAuxEdgeVisible: ";
475 if (!vamVisAtts.IsForceDrawingStyle()) {
476 os << "not ";
477 }
478 os << " forced";
479 if (vamVisAtts.IsForceAuxEdgeVisible()) {
480 os << ": ";
481 if (vamVisAtts.IsForcedAuxEdgeVisible()) {
482 os << "true";
483 } else {
484 os << "false";
485 }
486 }
487 break;
489 os << " lineSegmentsPerCircle "
490 << vamVisAtts.GetForcedLineSegmentsPerCircle();
491 break;
492 }
493 }
494
495 return os;
496}
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