Geant4-11
Namespaces | Functions | Variables
G4PhysicalVolumeModel.cc File Reference
#include "G4PhysicalVolumeModel.hh"
#include "G4VGraphicsScene.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PhysicalVolumeStore.hh"
#include "G4VPVParameterisation.hh"
#include "G4LogicalVolume.hh"
#include "G4VSolid.hh"
#include "G4SubtractionSolid.hh"
#include "G4IntersectionSolid.hh"
#include "G4Material.hh"
#include "G4VisAttributes.hh"
#include "G4BoundingExtentScene.hh"
#include "G4PhysicalVolumeSearchScene.hh"
#include "G4TransportationManager.hh"
#include "G4Polyhedron.hh"
#include "HepPolyhedronProcessor.h"
#include "G4AttDefStore.hh"
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UnitsTable.hh"
#include "G4Vector3D.hh"
#include "G4Mesh.hh"
#include <sstream>
#include <iomanip>

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{G4PhysicalVolumeModel.cc}
 

Functions

static std::ostream & operator<< (std::ostream &o, const G4Transform3D t)
 
std::ostream & operator<< (std::ostream &os, const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID &node)
 
std::ostream & operator<< (std::ostream &os, const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &path)
 

Variables

G4int anonymous_namespace{G4PhysicalVolumeModel.cc}::volumeCount = 0
 

Function Documentation

◆ operator<<() [1/3]

static std::ostream & operator<< ( std::ostream &  o,
const G4Transform3D  t 
)
static

Definition at line 945 of file G4PhysicalVolumeModel.cc.

946{
947 using namespace std;
948
949 G4Scale3D sc;
950 G4Rotate3D r;
951 G4Translate3D tl;
952 t.getDecomposition(sc, r, tl);
953
954 const int w = 10;
955
956 // Transformation itself
957 o << setw(w) << t.xx() << setw(w) << t.xy() << setw(w) << t.xz() << setw(w) << t.dx() << endl;
958 o << setw(w) << t.yx() << setw(w) << t.yy() << setw(w) << t.yz() << setw(w) << t.dy() << endl;
959 o << setw(w) << t.zx() << setw(w) << t.zy() << setw(w) << t.zz() << setw(w) << t.dz() << endl;
960
961 // Translation
962 o << "= translation:" << endl;
963 o << setw(w) << tl.dx() << setw(w) << tl.dy() << setw(w) << tl.dz() << endl;
964
965 // Rotation
966 o << "* rotation:" << endl;
967 o << setw(w) << r.xx() << setw(w) << r.xy() << setw(w) << r.xz() << endl;
968 o << setw(w) << r.yx() << setw(w) << r.yy() << setw(w) << r.yz() << endl;
969 o << setw(w) << r.zx() << setw(w) << r.zy() << setw(w) << r.zz() << endl;
970
971 // Scale
972 o << "* scale:" << endl;
973 o << setw(w) << sc.xx() << setw(w) << sc.yy() << setw(w) << sc.zz() << endl;
974
975 // Transformed axes
976 o << "Transformed axes:" << endl;
977 o << "x': " << r * G4Vector3D(1., 0., 0.) << endl;
978 o << "y': " << r * G4Vector3D(0., 1., 0.) << endl;
979 o << "z': " << r * G4Vector3D(0., 0., 1.) << endl;
980
981 return o;
982}
HepGeom::Vector3D< G4double > G4Vector3D
Definition: G4Vector3D.hh:34
double dy() const
Definition: Transform3D.h:287
double zz() const
Definition: Transform3D.h:281
double yz() const
Definition: Transform3D.h:272
double dz() const
Definition: Transform3D.h:290
double dx() const
Definition: Transform3D.h:284
void getDecomposition(Scale3D &scale, Rotate3D &rotation, Translate3D &translation) const
Definition: Transform3D.cc:173
double xy() const
Definition: Transform3D.h:260
double zx() const
Definition: Transform3D.h:275
double yx() const
Definition: Transform3D.h:266
double zy() const
Definition: Transform3D.h:278
double xx() const
Definition: Transform3D.h:257
double yy() const
Definition: Transform3D.h:269
double xz() const
Definition: Transform3D.h:263

References HepGeom::Transform3D::dx(), HepGeom::Transform3D::dy(), HepGeom::Transform3D::dz(), HepGeom::Transform3D::getDecomposition(), HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream &  os,
const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID node 
)

Definition at line 1053 of file G4PhysicalVolumeModel.cc.

1055{
1057 if (pPV) {
1058 os << pPV->GetName()
1059 << ' ' << node.GetCopyNo()
1060// << '[' << node.GetNonCulledDepth() << ']'
1061// << ':' << node.GetTransform()
1062 ;
1063// os << " (";
1064// if (!node.GetDrawn()) os << "not ";
1065// os << "drawn)";
1066 } else {
1067 os << " (Null PV node)";
1068 }
1069 return os;
1070}
const G4String & GetName() const

References G4VPhysicalVolume::GetName().

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream &  os,
const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &  path 
)

Definition at line 1072 of file G4PhysicalVolumeModel.cc.

1074{
1075 if (path.empty()) {
1076 os << " TOP";
1077 } else {
1078 for (const auto& nodeID: path) {
1079 os << ' ' << nodeID;
1080 }
1081 }
1082 return os;
1083}