Geant4 9.6.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 "G4PhysicalVolumeModel.hh"
#include <vector>
#include <utility>
#include "G4ModelingParameters.icc"

Go to the source code of this file.

Classes

class  G4ModelingParameters
 
class  G4ModelingParameters::PVNameCopyNo
 
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 std::vector< G4ModelingParameters::VisAttributesModifier > &)
 

Function Documentation

◆ operator<<() [1/3]

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

Definition at line 152 of file G4ModelingParameters.cc.

153{
154 os << "Modeling parameters (warning ";
155 if (mp.fWarning) os << "true";
156 else os << "false";
157 os << "):";
158
159 const G4VisAttributes* va = mp.fpDefaultVisAttributes;
160 os << "\n Default vis. attributes: ";
161 if (va) os << *va;
162 else os << "none";
163
164 os << "\n Current requested drawing style: ";
165 switch (mp.fDrawingStyle) {
167 os << "wireframe"; break;
169 os << "hidden line removal (hlr)"; break;
171 os << "surface (hsr)"; break;
173 os << "surface and edges (hlhsr)"; break;
174 default: os << "unrecognised"; break;
175 }
176
177 os << "\n Culling: ";
178 if (mp.fCulling) os << "on";
179 else os << "off";
180
181 os << "\n Culling invisible objects: ";
182 if (mp.fCullInvisible) os << "on";
183 else os << "off";
184
185 os << "\n Density culling: ";
186 if (mp.fDensityCulling) {
187 os << "on - invisible if density less than "
188 << mp.fVisibleDensity / (1. * g / cm3) << " g cm^-3";
189 }
190 else os << "off";
191
192 os << "\n Culling daughters covered by opaque mothers: ";
193 if (mp.fCullCovered) os << "on";
194 else os << "off";
195
196 os << "\n Explode factor: " << mp.fExplodeFactor
197 << " about centre: " << mp.fExplodeCentre;
198
199 os << "\n No. of sides used in circle polygon approximation: "
200 << mp.fNoOfSides;
201
202 os << "\n Section (DCUT) shape (G4VSolid) pointer: ";
203 if (!mp.fpSectionSolid) os << "non-";
204 os << "null";
205
206 os << "\n Cutaway (DCUT) shape (G4VSolid) pointer: ";
207 if (!mp.fpCutawaySolid) os << "non-";
208 os << "null";
209
210 os << "\n Event pointer: " << mp.fpEvent;
211
212 os << "\n Vis attributes modifiers: ";
213 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams =
214 mp.fVisAttributesModifiers;
215 if (vams.empty()) {
216 os << "None";
217 } else {
218 os << vams;
219 }
220
221 return os;
222}

◆ operator<<() [2/3]

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

Definition at line 334 of file G4ModelingParameters.cc.

336{
337// os << "Touchable path: physical-volume-name:copy-number pairs:\n ";
339 for (i = path.begin(); i != path.end(); ++i) {
340 if (i != path.begin()) {
341 os << ", ";
342 }
343 os << i->GetName() << ':' << i->GetCopyNo();
344 }
345 return os;
346}
PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator

◆ operator<<() [3/3]

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

Definition at line 348 of file G4ModelingParameters.cc.

351{
352 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator
353 iModifier;
354 for (iModifier = vams.begin();
355 iModifier != vams.end();
356 ++iModifier) {
358 iModifier->GetPVNameCopyNoPath();
359 os << '\n' << vamPath;
360 const G4VisAttributes& vamVisAtts = iModifier->GetVisAttributes();
361 const G4Colour& c = vamVisAtts.GetColour();
362 switch (iModifier->GetVisAttributesSignifier()) {
364 os << " visibility ";
365 if (vamVisAtts.IsVisible()) {
366 os << "true";
367 } else {
368 os << "false";
369 }
370 break;
372 os << " daughtersInvisible ";
373 if (vamVisAtts.IsDaughtersInvisible()) {
374 os << "true";
375 } else {
376 os << "false";
377 }
378 break;
380 os << " colour " << c;
381 break;
383 os << " lineStyle ";
384 switch (vamVisAtts.GetLineStyle()) {
386 os << "unbroken";
387 break;
389 os << "dashed";
390 break;
392 os << "dotted";
393 }
394 break;
396 os << " lineWidth "
397 << vamVisAtts.GetLineWidth();
398 break;
401 os << " forceWireframe ";
402 if (vamVisAtts.IsForceDrawingStyle()) {
403 os << "true";
404 } else {
405 os << "false";
406 }
407 }
408 break;
410 if (vamVisAtts.GetForcedDrawingStyle() == G4VisAttributes::solid) {
411 os << " forceSolid ";
412 if (vamVisAtts.IsForceDrawingStyle()) {
413 os << "true";
414 } else {
415 os << "false";
416 }
417 }
418 break;
420 os << " forceAuxEdgeVisible ";
421 if (vamVisAtts.IsForceAuxEdgeVisible()) {
422 os << "true";
423 } else {
424 os << "false";
425 }
426 break;
428 os << " lineSegmentsPerCircle "
429 << vamVisAtts.GetForcedLineSegmentsPerCircle();
430 break;
431 }
432 }
433
434 return os;
435}
std::vector< PVNameCopyNo > PVNameCopyNoPath
G4double GetLineWidth() const
G4bool IsDaughtersInvisible() const
G4int GetForcedLineSegmentsPerCircle() const
LineStyle GetLineStyle() const
const G4Colour & GetColour() const
G4bool IsVisible() const
G4bool IsForceAuxEdgeVisible() const
ForcedDrawingStyle GetForcedDrawingStyle() const
G4bool IsForceDrawingStyle() const