Geant4  10.02.p03
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)
 

Function Documentation

◆ operator<<() [1/2]

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

Definition at line 821 of file G4PhysicalVolumeModel.cc.

822 {
823  using namespace std;
824 
825  G4Scale3D sc;
826  G4Rotate3D r;
827  G4Translate3D tl;
828  t.getDecomposition(sc, r, tl);
829 
830  const int w = 10;
831 
832  // Transformation itself
833  o << setw(w) << t.xx() << setw(w) << t.xy() << setw(w) << t.xz() << setw(w) << t.dx() << endl;
834  o << setw(w) << t.yx() << setw(w) << t.yy() << setw(w) << t.yz() << setw(w) << t.dy() << endl;
835  o << setw(w) << t.zx() << setw(w) << t.zy() << setw(w) << t.zz() << setw(w) << t.dz() << endl;
836 
837  // Translation
838  o << "= translation:" << endl;
839  o << setw(w) << tl.dx() << setw(w) << tl.dy() << setw(w) << tl.dz() << endl;
840 
841  // Rotation
842  o << "* rotation:" << endl;
843  o << setw(w) << r.xx() << setw(w) << r.xy() << setw(w) << r.xz() << endl;
844  o << setw(w) << r.yx() << setw(w) << r.yy() << setw(w) << r.yz() << endl;
845  o << setw(w) << r.zx() << setw(w) << r.zy() << setw(w) << r.zz() << endl;
846 
847  // Scale
848  o << "* scale:" << endl;
849  o << setw(w) << sc.xx() << setw(w) << sc.yy() << setw(w) << sc.zz() << endl;
850 
851  // Transformed axes
852  o << "Transformed axes:" << endl;
853  o << "x': " << r * G4Vector3D(1., 0., 0.) << endl;
854  o << "y': " << r * G4Vector3D(0., 1., 0.) << endl;
855  o << "z': " << r * G4Vector3D(0., 0., 1.) << endl;
856 
857  return o;
858 }
double xz() const
Definition: Transform3D.h:258
void getDecomposition(Scale3D &scale, Rotate3D &rotation, Translate3D &translation) const
Definition: Transform3D.cc:174
double xy() const
Definition: Transform3D.h:255
HepGeom::Vector3D< G4double > G4Vector3D
Definition: G4Vector3D.hh:35
double yx() const
Definition: Transform3D.h:261
double yy() const
Definition: Transform3D.h:264
double dx() const
Definition: Transform3D.h:279
double dz() const
Definition: Transform3D.h:285
double yz() const
Definition: Transform3D.h:267
double zz() const
Definition: Transform3D.h:276
double zy() const
Definition: Transform3D.h:273
double xx() const
Definition: Transform3D.h:252
double dy() const
Definition: Transform3D.h:282
double zx() const
Definition: Transform3D.h:270
Here is the call graph for this function:

◆ operator<<() [2/2]

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

Definition at line 922 of file G4PhysicalVolumeModel.cc.

923 {
924  G4VPhysicalVolume* pPV = node.GetPhysicalVolume();
925  if (pPV) {
926  os << pPV->GetName()
927  << ':' << node.GetCopyNo()
928  << '[' << node.GetNonCulledDepth() << ']'
929  << ':' << node.GetTransform();
930  if (!node.GetDrawn()) os << " Not ";
931  os << "drawn";
932  } else {
933  os << "Null node";
934  }
935  return os;
936 }
const G4String & GetName() const
Here is the call graph for this function: