Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.3 1999/11/10 18:20:55 johna Exp $
# $Id: GNUmakefile,v 1.4 2000/04/07 13:32:42 gcosmo Exp $
# --------------------------------------------------------------
# GNUmakefile for modeling library. John Allison, 31/12/1997.
# --------------------------------------------------------------
@@ -17,6 +17,7 @@ CPPFLAGS += -I$(G4BASE)/global/HEPGeometry/include
CPPFLAGS += -I$(G4BASE)/geometry/management/include
CPPFLAGS += -I$(G4BASE)/geometry/volumes/include
CPPFLAGS += -I$(G4BASE)/geometry/solids/CSG/include
CPPFLAGS += -I$(G4BASE)/geometry/solids/specific/include
CPPFLAGS += -I$(G4BASE)/geometry/solids/Boolean/include
CPPFLAGS += -I$(G4BASE)/materials/include
CPPFLAGS += -I$(G4BASE)/global/HEPRandom/include
+22 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.3 1999/11/25 14:18:40 johna Exp $
$Id: History,v 1.7 2000/05/29 09:59:14 johna Exp $
-------------------------------------------------------------------
=========================================================
@@ -20,6 +20,27 @@ committal in the CVS repository !
History file for visualization/modeling
---------------------------------------
29th May 2000 John Allison
- Moved code for maintaining depth, physical and logical volume
pointers from VisitGeometryAndGetVisReps to DescribeAndDescend to
handle daughters of replicas correctly (Guy Barrand).
22nd May 2000 John Allison (modeling-V01-01-00)
- Added G4VTreeGraphicsScene (DTREE).
- Commented out pVPV->SetCopyNo(n) on Makoto's advice in
G4PhysicalVolumeModel.cc.
vis-V01-01-01 12th April 2000 John Allison
- Made G4PhysicalVolumeModel::DescribeSolid virtual.
- G4PhysicalVolumeModel::DescribeSolid no longer deals with composite
solids - now programmed into CompositeSolid::CreatePolyhedron, where
CompositeSolid means G4IntersectionSolid, G4SubtractionSolid and
G4UnionSolid.
- G4PhysicalVolumeModel::DescribeSolid no longer deals with displaced
solids - now programmed into G4DisplacedSolid::CreatePolyhedron.
- Added G4LogicalVolumeModel::DescribeSolid, which explicitly adds
components of composite solids as white forced-wireframe objects.
vis-V00-01-10 25th November 1999 John Allison
- Adapted header files of modeling for Software Reference Manual.
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4BoundingSphereScene.hh,v 1.6 1999/12/15 14:54:28 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4BoundingSphereScene.hh,v 1.7 2000/05/15 11:08:49 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 7th June 1997
@@ -45,9 +45,7 @@ public:
void AddThis (const G4Polyhedra& s) {Accrue (s);}
void AddThis (const G4VSolid& s) {Accrue (s);}
void PreAddThis (const G4Transform3D& objectTransformation,
const G4VisAttributes&) {
fpObjectTransformation = &objectTransformation;
}
const G4VisAttributes&);
void PostAddThis () {}
G4VisExtent GetBoundingSphereExtent ();
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4FlavoredParallelWorldModel.hh,v 1.5 1999/12/15 14:54:29 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// P. Mora de Freitas et M.Verderi - 19 June 1998.
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HitsModel.hh,v 1.4 1999/12/15 14:54:29 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 26th August 1998.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HitsModel.icc,v 1.4 1999/12/15 14:54:29 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
inline G4String G4HitsModel::GetCurrentTag () const {
return fGlobalTag;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LogicalVolumeModel.hh,v 1.3 1999/12/15 14:54:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4LogicalVolumeModel.hh,v 1.4 2000/04/12 13:02:36 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 26th July 1999.
@@ -49,6 +49,14 @@ public: // With description
protected:
// This called from G4PhysicalVolumeModel::DescribeAndDescend by the
// virtual function mechanism.
void DescribeSolid
(const G4Transform3D& theAT,
G4VSolid* pSol,
const G4VisAttributes* pVisAttribs,
G4VGraphicsScene& sceneHandler);
/////////////////////////////////////////////////////////
// Data members...
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4ModelingParameters.hh,v 1.5 1999/12/15 14:54:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 31st December 1997.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4ModelingParameters.icc,v 1.3 1999/12/15 14:54:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 31st December 1997.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4NullModel.hh,v 1.4 1999/12/15 14:54:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 4th April 1998.
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PhysicalVolumeModel.hh,v 1.8 2000/01/11 17:19:04 johna Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PhysicalVolumeModel.hh,v 1.9 2000/04/12 13:02:03 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 31st December 1997.
@@ -93,10 +93,10 @@ protected:
const G4Transform3D&,
G4VGraphicsScene&);
void DescribeSolid (const G4Transform3D& theAT,
G4VSolid* pSol,
const G4VisAttributes* pVisAttribs,
G4VGraphicsScene& sceneHandler);
virtual void DescribeSolid (const G4Transform3D& theAT,
G4VSolid* pSol,
const G4VisAttributes* pVisAttribs,
G4VGraphicsScene& sceneHandler);
G4bool IsThisCulled (const G4LogicalVolume*,
const G4Material*);
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PhysicalVolumeSearchScene.hh,v 1.6 1999/12/15 14:54:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PhysicalVolumeSearchScene.hh,v 1.7 2000/05/22 07:36:57 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 10th August 1998.
@@ -56,7 +56,7 @@ public:
const G4Transform3D& GetFoundTransformation () const;
////////////////////////////////////////////////////////////////
// Functions not used by required by the abstract interface.
// Functions not used but required by the abstract interface.
virtual void BeginPrimitives (const G4Transform3D& objectTransformation) {}
virtual void EndPrimitives () {}
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PhysicalVolumeSearchScene.icc,v 1.3 1999/12/15 14:54:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 10th August 1998.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4TrajectoriesModel.hh,v 1.4 1999/12/15 14:54:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 26th August 1998.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4TrajectoriesModel.icc,v 1.4 1999/12/15 14:54:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
inline G4String G4TrajectoriesModel::GetCurrentTag () const {
return fGlobalTag;
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VModel.hh,v 1.5 1999/12/15 14:54:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 31st December 1997.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VModel.icc,v 1.4 1999/12/15 14:54:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 31st December 1997.
@@ -0,0 +1,80 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VTreeGraphicsScene.hh,v 1.1 2000/05/22 07:39:25 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 18th May 2000
// An artificial graphics scene to find dump geometry hierarchy.
#ifndef G4VTREEGRAPHICSSCENE_HH
#define G4VTREEGRAPHICSSCENE_HH
#include "G4VGraphicsScene.hh"
#include "G4VisExtent.hh"
#include "G4Box.hh"
#include "G4Cons.hh"
#include "G4Tubs.hh"
#include "G4Trd.hh"
#include "G4Trap.hh"
#include "G4Sphere.hh"
#include "G4Para.hh"
#include "G4Torus.hh"
#include "G4Polycone.hh"
#include "G4Polyhedra.hh"
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
class G4VTreeGraphicsScene: public G4VGraphicsScene {
public:
G4VTreeGraphicsScene();
virtual ~G4VTreeGraphicsScene ();
void AddThis (const G4Box& s) {Dump (s);}
void AddThis (const G4Cons & s) {Dump (s);}
void AddThis (const G4Tubs& s) {Dump (s);}
void AddThis (const G4Trd& s) {Dump (s);}
void AddThis (const G4Trap& s) {Dump (s);}
void AddThis (const G4Sphere& s) {Dump (s);}
void AddThis (const G4Para& s) {Dump (s);}
void AddThis (const G4Torus& s) {Dump (s);}
void AddThis (const G4Polycone& s) {Dump (s);}
void AddThis (const G4Polyhedra& s) {Dump (s);}
void AddThis (const G4VSolid& s) {Dump (s);}
void PreAddThis (const G4Transform3D& objectTransformation,
const G4VisAttributes&);
void PostAddThis ();
void EstablishSpecials (G4PhysicalVolumeModel&);
G4int GetFoundDepth () const;
G4VPhysicalVolume* GetFoundVolume () const;
const G4Transform3D& GetFoundTransformation () const;
////////////////////////////////////////////////////////////////
// Functions not used but required by the abstract interface.
virtual void BeginPrimitives (const G4Transform3D& objectTransformation) {}
virtual void EndPrimitives () {}
virtual void AddPrimitive (const G4Polyline&) {}
virtual void AddPrimitive (const G4Text&) {}
virtual void AddPrimitive (const G4Circle&) {}
virtual void AddPrimitive (const G4Square&) {}
virtual void AddPrimitive (const G4Polymarker&) {}
virtual void AddPrimitive (const G4Polyhedron&) {}
virtual void AddPrimitive (const G4NURBS&) {}
protected:
void Dump (const G4VSolid&);
G4int fCurrentDepth; // Current depth of geom. hierarchy.
G4VPhysicalVolume* fpCurrentPV; // Current physical volume.
G4LogicalVolume* fpCurrentLV; // Current logical volume.
const G4Transform3D* fpCurrentObjectTransformation;
};
#include "G4VTreeGraphicsScene.icc"
#endif
@@ -0,0 +1,21 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VTreeGraphicsScene.icc,v 1.1 2000/05/22 07:39:32 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 18th May 2000
// An artificial graphics scene to find dump geometry hierarchy.
inline void G4VTreeGraphicsScene::PreAddThis
(const G4Transform3D& objectTransformation,
const G4VisAttributes&) {
fpCurrentObjectTransformation = &objectTransformation;
}
inline void G4VTreeGraphicsScene::PostAddThis () {}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4BoundingSphereScene.cc,v 1.3 1999/12/15 14:54:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4BoundingSphereScene.cc,v 1.4 2000/05/15 11:09:32 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 7th June 1997
@@ -24,6 +24,12 @@ G4BoundingSphereScene::G4BoundingSphereScene ():
G4BoundingSphereScene::~G4BoundingSphereScene () {}
void G4BoundingSphereScene::PreAddThis
(const G4Transform3D& objectTransformation,
const G4VisAttributes&) {
fpObjectTransformation = &objectTransformation;
}
G4VisExtent G4BoundingSphereScene::GetBoundingSphereExtent () {
return G4VisExtent (fCentre, fRadius);
}
@@ -73,3 +79,4 @@ void G4BoundingSphereScene::AccrueBoundingSphere
}
}
}
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4FlavoredParallelWorldModel.cc,v 1.4 1999/12/15 14:54:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// P. Mora de Freitas et M.Verderi - 19 June 1998.
// Model for flavored parallel world volumes.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HitsModel.cc,v 1.4 1999/12/15 14:54:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 26th August 1998.
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LogicalVolumeModel.cc,v 1.4 2000/01/17 10:34:48 johna Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4LogicalVolumeModel.cc,v 1.5 2000/04/12 13:02:40 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 26th July 1999.
@@ -66,7 +66,7 @@ void G4LogicalVolumeModel::DescribeYourselfTo
G4PhysicalVolumeModel::DescribeYourselfTo (sceneHandler);
fpMP = tpMP;
if (fpTopPV -> GetLogicalVolume () -> GetVoxelHeader ()) {
if (fpTopPV->GetLogicalVolume()->GetVoxelHeader()) {
// Add Voxels.
G4DrawVoxels dv;
G4PlacedPolyhedronList* pPPL =
@@ -81,3 +81,31 @@ void G4LogicalVolumeModel::DescribeYourselfTo
delete pPPL;
}
}
// This called from G4PhysicalVolumeModel::DescribeAndDescend by the
// virtual function mechanism.
void G4LogicalVolumeModel::DescribeSolid
(const G4Transform3D& theAT,
G4VSolid* pSol,
const G4VisAttributes* pVisAttribs,
G4VGraphicsScene& sceneHandler) {
// Look for "constituents". Could be a Boolean solid.
G4VSolid* pSol0 = pSol -> GetConstituentSolid (0);
if (pSol0) { // Composite solid...
G4VSolid* pSol1 = pSol -> GetConstituentSolid (1);
if (!pSol1) {
G4Exception
("G4PhysicalVolumeModel::DescribeSolid:"
" 2nd component solid is missing.");
}
// Draw these constituents white and "forced wireframe"...
G4VisAttributes constituentAttributes;
constituentAttributes.SetForceWireframe(true);
DescribeSolid (theAT, pSol0, &constituentAttributes, sceneHandler);
DescribeSolid (theAT, pSol1, &constituentAttributes, sceneHandler);
}
// In any case draw the original/resultant solid...
sceneHandler.PreAddThis (theAT, *pVisAttribs);
pSol -> DescribeYourselfTo (sceneHandler);
sceneHandler.PostAddThis ();
}
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4ModelingParameters.cc,v 1.4 1999/12/15 14:54:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 31st December 1997.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4NullModel.cc,v 1.3 1999/12/15 14:54:32 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 4th April 1998.
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PhysicalVolumeModel.cc,v 1.8 2000/01/11 17:19:07 johna Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PhysicalVolumeModel.cc,v 1.11 2000/05/29 09:59:15 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 31st December 1997.
@@ -20,8 +20,6 @@
#include "G4VPVParameterisation.hh"
#include "G4LogicalVolume.hh"
#include "G4VSolid.hh"
#include "G4BooleanSolid.hh"
#include "G4DisplacedSolid.hh"
#include "G4Material.hh"
#include "G4VisAttributes.hh"
#include "G4BoundingSphereScene.hh"
@@ -158,14 +156,6 @@ void G4PhysicalVolumeModel::VisitGeometryAndGetVisReps
// local variables to preserve re-entrancy.
G4LogicalVolume* pLV = pVPV -> GetLogicalVolume ();
// Maintain data members and store in working space (via pointers to
// working space).
if (fpCurrentDepth) *fpCurrentDepth = fCurrentDepth;
fpCurrentPV = pVPV;
fpCurrentLV = pLV;
if (fppCurrentPV) *fppCurrentPV = fpCurrentPV;
if (fppCurrentLV) *fppCurrentLV = fpCurrentLV;
G4VSolid* pSol;
G4Material* pMaterial;
@@ -191,7 +181,7 @@ void G4PhysicalVolumeModel::VisitGeometryAndGetVisReps
pMaterial = pP -> ComputeMaterial (n, pVPV);
pP -> ComputeTransformation (n, pVPV);
pSol -> ComputeDimensions (pP, n, pVPV);
pVPV -> SetCopyNo (n);
// pVPV -> SetCopyNo (n); // Uncertain of effect of this.
DescribeAndDescend (pVPV, soughtDepth, pLV, pSol, pMaterial,
theAT, sceneHandler);
}
@@ -249,7 +239,8 @@ void G4PhysicalVolumeModel::VisitGeometryAndGetVisReps
}
pVPV -> SetTranslation (translation);
pVPV -> SetRotation (pRotation);
pVPV -> SetCopyNo (n);
// pVPV -> SetCopyNo (n); // Has no effect and might even be
// dangerous.
pSol = pLV -> GetSolid ();
pMaterial = pLV -> GetMaterial ();
DescribeAndDescend (pVPV, soughtDepth, pLV, pSol, pMaterial,
@@ -270,6 +261,14 @@ void G4PhysicalVolumeModel::DescribeAndDescend
const G4Transform3D& theAT,
G4VGraphicsScene& sceneHandler) {
// Maintain data members and store in working space (via pointers to
// working space).
if (fpCurrentDepth) *fpCurrentDepth = fCurrentDepth;
fpCurrentPV = pVPV;
fpCurrentLV = pLV;
if (fppCurrentPV) *fppCurrentPV = fpCurrentPV;
if (fppCurrentLV) *fppCurrentLV = fpCurrentLV;
const HepRotation* pObjectRotation = pVPV -> GetObjectRotation ();
const Hep3Vector& translation = pVPV -> GetTranslation ();
G4Transform3D theLT (G4Transform3D (*pObjectRotation, translation));
@@ -338,34 +337,9 @@ void G4PhysicalVolumeModel::DescribeSolid
G4VSolid* pSol,
const G4VisAttributes* pVisAttribs,
G4VGraphicsScene& sceneHandler) {
// Look for "constituents". Could be a Boolean solid.
G4VSolid* pSol0 = pSol -> GetConstituentSolid (0);
if (pSol0) {
// Composite solid - describe components...
DescribeSolid (theAT, pSol0, pVisAttribs, sceneHandler);
G4VSolid* pSol1 = pSol -> GetConstituentSolid (1);
if (!pSol1) {
G4Exception
("G4PhysicalVolumeModel::DescribeSolid:"
" 2nd component solid is missing.");
}
DescribeSolid (theAT, pSol1, pVisAttribs, sceneHandler);
}
else { // Non-composite solid.
G4DisplacedSolid* pDisSol = pSol -> GetDisplacedSolidPtr ();
if (pDisSol) {
sceneHandler.PreAddThis
(theAT *
G4Transform3D (pDisSol -> GetObjectRotation ().inverse (),
pDisSol -> GetObjectTranslation ()),
*pVisAttribs);
}
else {
sceneHandler.PreAddThis (theAT, *pVisAttribs);
}
pSol -> DescribeYourselfTo (sceneHandler);
sceneHandler.PostAddThis ();
}
sceneHandler.PreAddThis (theAT, *pVisAttribs);
pSol -> DescribeYourselfTo (sceneHandler);
sceneHandler.PostAddThis ();
}
G4bool G4PhysicalVolumeModel::IsThisCulled (const G4LogicalVolume* pLV,
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PhysicalVolumeSearchScene.cc,v 1.4 1999/12/15 14:54:32 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 10th August 1998.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4TrajectoriesModel.cc,v 1.6 1999/12/15 14:54:32 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 26th August 1998.
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VModel.cc,v 1.4 1999/12/15 14:54:32 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 31st December 1997.
@@ -0,0 +1,43 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VTreeGraphicsScene.cc,v 1.1 2000/05/22 07:39:41 johna Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 18th May 2000
// An artificial graphics scene to find dump geometry hierarchy.
#include "G4VTreeGraphicsScene.hh"
#include "G4VSolid.hh"
#include "G4Vector3D.hh"
#include "G4PhysicalVolumeModel.hh"
G4VTreeGraphicsScene::G4VTreeGraphicsScene():
fCurrentDepth (0),
fpCurrentPV (0),
fpCurrentLV (0),
fpCurrentObjectTransformation (0)
{}
G4VTreeGraphicsScene::~G4VTreeGraphicsScene () {}
void G4VTreeGraphicsScene::EstablishSpecials
(G4PhysicalVolumeModel& pvModel) {
pvModel.DefinePointersToWorkingSpace (&fCurrentDepth,
&fpCurrentPV,
&fpCurrentLV);
}
void G4VTreeGraphicsScene::Dump (const G4VSolid& solid) {
for (G4int i = 0; i < fCurrentDepth; i++ ) G4cout << " ";
G4cout << "\"" << fpCurrentPV -> GetName ()
<< "\", copy no. " << fpCurrentPV -> GetCopyNo ()
<< G4endl;
return;
}