Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4PhysicalVolumeModel.cc File Reference
#include "G4PhysicalVolumeModel.hh"
#include "G4ModelingParameters.hh"
#include "G4VGraphicsScene.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VPVParameterisation.hh"
#include "G4LogicalVolume.hh"
#include "G4VSolid.hh"
#include "G4SubtractionSolid.hh"
#include "G4IntersectionSolid.hh"
#include "G4Material.hh"
#include "G4VisAttributes.hh"
#include "G4BoundingSphereScene.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 <sstream>
#include <iomanip>
Include dependency graph for G4PhysicalVolumeModel.cc:

Go to the source code of this file.

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)
 

Function Documentation

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

Definition at line 802 of file G4PhysicalVolumeModel.cc.

803 {
804  using namespace std;
805 
806  G4Scale3D sc;
807  G4Rotate3D r;
808  G4Translate3D tl;
809  t.getDecomposition(sc, r, tl);
810 
811  const int w = 10;
812 
813  // Transformation itself
814  o << setw(w) << t.xx() << setw(w) << t.xy() << setw(w) << t.xz() << setw(w) << t.dx() << endl;
815  o << setw(w) << t.yx() << setw(w) << t.yy() << setw(w) << t.yz() << setw(w) << t.dy() << endl;
816  o << setw(w) << t.zx() << setw(w) << t.zy() << setw(w) << t.zz() << setw(w) << t.dz() << endl;
817 
818  // Translation
819  o << "= translation:" << endl;
820  o << setw(w) << tl.dx() << setw(w) << tl.dy() << setw(w) << tl.dz() << endl;
821 
822  // Rotation
823  o << "* rotation:" << endl;
824  o << setw(w) << r.xx() << setw(w) << r.xy() << setw(w) << r.xz() << endl;
825  o << setw(w) << r.yx() << setw(w) << r.yy() << setw(w) << r.yz() << endl;
826  o << setw(w) << r.zx() << setw(w) << r.zy() << setw(w) << r.zz() << endl;
827 
828  // Scale
829  o << "* scale:" << endl;
830  o << setw(w) << sc.xx() << setw(w) << sc.yy() << setw(w) << sc.zz() << endl;
831 
832  // Transformed axes
833  o << "Transformed axes:" << endl;
834  o << "x': " << r * G4Vector3D(1., 0., 0.) << endl;
835  o << "y': " << r * G4Vector3D(0., 1., 0.) << endl;
836  o << "z': " << r * G4Vector3D(0., 0., 1.) << endl;
837 
838  return o;
839 }
double yy() const
Definition: Transform3D.h:264
double yx() const
Definition: Transform3D.h:261
void getDecomposition(Scale3D &scale, Rotate3D &rotation, Translate3D &translation) const
Definition: Transform3D.cc:174
double dx() const
Definition: Transform3D.h:279
HepGeom::Vector3D< G4double > G4Vector3D
Definition: G4Vector3D.hh:35
double zz() const
Definition: Transform3D.h:276
double xz() const
Definition: Transform3D.h:258
double xy() const
Definition: Transform3D.h:255
double dy() const
Definition: Transform3D.h:282
double dz() const
Definition: Transform3D.h:285
double yz() const
Definition: Transform3D.h:267
double xx() const
Definition: Transform3D.h:252
double zy() const
Definition: Transform3D.h:273
double zx() const
Definition: Transform3D.h:270

Here is the call graph for this function:

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

Definition at line 903 of file G4PhysicalVolumeModel.cc.

904 {
905  G4VPhysicalVolume* pPV = node.GetPhysicalVolume();
906  if (pPV) {
907  os << pPV->GetName()
908  << ' ' << node.GetCopyNo()
909 // << '[' << node.GetNonCulledDepth() << ']'
910 // << ':' << node.GetTransform()
911  ;
912 // os << " (";
913 // if (!node.GetDrawn()) os << "not ";
914 // os << "drawn)";
915  } else {
916  os << " (Null node)";
917  }
918  return os;
919 }
const G4String & GetName() const

Here is the call graph for this function:

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

Definition at line 922 of file G4PhysicalVolumeModel.cc.

923 {
924  for (const auto& nodeID: path) {
925  os << nodeID << ' ';
926  }
927  return os;
928 }