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
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PAffineTransform.ddl,v 1.4 1999/12/15 14:51:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// persistenet class of G4AffineTransform
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PVSolid.ddl,v 1.3 1999/12/15 14:51:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4PVSolid
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PAffineTransform.cc,v 1.2 1999/12/15 14:51:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PAffineTransform
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PVSolid.cc,v 1.2 1999/12/15 14:51:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PVSolid
//
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.10 1999/12/01 15:21:06 morita Exp $
# $Id: GNUmakefile,v 1.12 2000/06/08 11:46:43 morita Exp $
name := G4pgeomn
G4ODBMS := true
@@ -17,6 +17,7 @@ CPPFLAGS += \
-I$(G4SCHEMA_HEADER_DIR) \
-I$(G4TMP)/$(G4SYSTEM)/G4pgeomGlobal \
-I$(G4TMP)/$(G4SYSTEM)/G4pcsg \
-I$(G4TMP)/$(G4SYSTEM)/G4pspecsolids \
-I$(G4TMP)/$(G4SYSTEM)/G4pgeomBoolean \
-I$(G4INSTALL)/source/persistency/global/include \
-I$(G4INSTALL)/source/persistency/geometry/global/include \
@@ -29,6 +30,7 @@ CPPFLAGS += \
-I$(G4INSTALL)/source/geometry/volumes/include \
-I$(G4INSTALL)/source/geometry/solids/CSG/include \
-I$(G4INSTALL)/source/geometry/solids/Boolean/include \
-I$(G4INSTALL)/source/geometry/solids/specific/include \
-I$(G4INSTALL)/source/materials/include \
-I$(G4INSTALL)/source/graphics_reps/include
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PGeometryObjectMap.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PGeometryObjectMap
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PLogicalVolume.ddl,v 1.7 1999/12/15 14:51:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PLogicalVolume.ddl,v 1.8 2000/06/09 12:56:01 morita Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4PLogicalVolume
@@ -18,6 +18,7 @@
#include "globals.hh"
#include "G4PersistentTypes.hh"
#include "G4PersistentSchema.hh"
#include "G4VMaterialMap.hh"
#include "HepODBMS/odbms/HepODBMS.h"
#include "G4PVSolid.hh"
@@ -39,7 +40,8 @@ public:
HepRef(G4PVSolid) persSolid);
~G4PLogicalVolume();
G4LogicalVolume* MakeTransientObject(G4VSolid* aSolid);
G4LogicalVolume* MakeTransientObject(G4VSolid* aSolid,
G4Material* aMaterial);
HepRef(G4PVSolid) GetSolid();
void SetSolid( HepRef(G4PVSolid) pSolid );
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PPVParameterised.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PPVParameterised
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PPVPlacement.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// P-versieon of G4PVPlacement Takashi.Sasaki@kek.jp
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PPVReplica.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4PPVReplica
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PVPhysicalVolume.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4PVPhysicalVolume
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PersistentGeomMan.hh,v 1.8 1999/12/15 14:51:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PersistentGeomMan.hh,v 1.9 2000/06/09 12:56:01 morita Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PersistentGeomMan
//
@@ -28,6 +28,7 @@
#include "G4VPersistentSubMan.hh"
#include "G4VPersistentSubDbMan.hh"
#include "G4PGeometryObjectMap.hh"
#include "G4VMaterialMap.hh"
#define G4_PHYS_VOLUME_DEPTH_MAX 1000000
@@ -54,6 +55,7 @@ class G4PersistentGeomMan
private:
HepRef(G4PGeometryObjectMap) f_GeomMap;
G4VMaterialMap* f_MaterialMap;
private:
// interface with G4PersistencyManager
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PGeometryObjectMap.cc,v 1.5 1999/12/15 14:51:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PGeometryObjectMap
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PLogicalVolume.cc,v 1.4 1999/12/15 14:51:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PLogicalVolume.cc,v 1.5 2000/06/09 12:56:44 morita Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// Takashi.Sasaki@kek.jp
@@ -76,10 +76,11 @@ class G4SmartVoxelHeader;
class G4VisAttributes;
class G4FastSimulationManager;
G4LogicalVolume* G4PLogicalVolume::MakeTransientObject(G4VSolid* theSolid)
G4LogicalVolume* G4PLogicalVolume::MakeTransientObject(
G4VSolid* theSolid,
G4Material* theMaterial)
{
// These are null poineters temporaly
G4Material* fMaterial = NULL;
G4SmartVoxelHeader* fVoxel = NULL;
const G4VisAttributes* fVisAttributes = NULL;
@@ -89,22 +90,9 @@ G4LogicalVolume* G4PLogicalVolume::MakeTransientObject(G4VSolid* theSolid)
// G4VSensitiveDetector *pSDetector=0,
// G4UserLimits *pULimits=0);
//--------- Material definition ---------
//
// G4double a, iz, z, density;
//
// a = 207.19*g/mole;
// density = 11.35*g/cm3;
// G4Material* Pb = new G4Material(name="Lead", z=82., a, density);
//
// G4LogicalVolume* testvolume = new G4LogicalVolume(
// theSolid, Pb, fName, 0, 0, 0);
//
//--------- Material definition ---------
G4String name;
G4LogicalVolume* aLogicalVolume = new G4LogicalVolume(
theSolid, fMaterial, name=fName, 0, 0, 0);
theSolid, theMaterial, name=fName, 0, 0, 0);
// if ( aLogicalVolume )
// aLogicalVume->SetVisAttributes(*fVisAttributes);
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PPVParameterised.cc,v 1.2 1999/12/15 14:51:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PPVPlacement.cc,v 1.2 1999/12/15 14:51:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PPVReplica.cc,v 1.2 1999/12/15 14:51:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PVPhysicalVolume.cc,v 1.3 1999/12/15 14:51:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// Takashi.Sasaki@kek.jp
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PersistentGeomMan.cc,v 1.11 2000/02/23 13:10:36 morita Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PersistentGeomMan.cc,v 1.14 2000/06/09 12:56:44 morita Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PersistentGeomMan
//
@@ -31,13 +31,18 @@
// other used classes
#include "G4PBox.hh"
#include "G4PCons.hh"
#include "G4PHype.hh"
#include "G4PPara.hh"
#include "G4PSphere.hh"
#include "G4PTorus.hh"
#include "G4PTrap.hh"
#include "G4PTrd.hh"
#include "G4PTubs.hh"
//#include "G4PEllipticalTube.hh"
#include "G4PHype.hh"
//#include "G4PPolycone.hh"
//#include "G4PPolyhedra.hh"
#include "G4PDisplacedSolid.hh"
#include "G4PIntersectionSolid.hh"
#include "G4PSubtractionSolid.hh"
@@ -124,6 +129,14 @@ G4bool G4PersistentGeomMan::Retrieve( HepDbApplication* dbApp,
{
theWorld = NULL;
G4VMaterialMap* f_Materialmap = G4VMaterialMap::GetMaterialMap();
if(f_verboseLevel>0)
{
if(!f_MaterialMap)
G4cout << "G4PersistentGeomMan::Retrieve"
<< " -- Material Map not provided by user code." << G4endl;
}
// ----------------------- Objectivity Feature ----------------------- //
// Load the geometry object map from the database with read-only mode
if ( ! f_GeomMap.lookupObj( f_DB, f_GeomMapScopeName, oocRead ) )
@@ -319,25 +332,40 @@ HepRef(G4PVSolid) G4PersistentGeomMan::MakePersistentObject (
// Construct persistent and concrete solid object
// according to the entity type of theSolid
if ( theSolidType == "G4Box")
// Pure CSG
if ( theSolidType == "G4Box")
persSolid = new(f_container) G4PBox ( (G4Box*)theSolid );
else if ( theSolidType == "G4Cons")
else if ( theSolidType == "G4Cons")
persSolid = new(f_container) G4PCons ( (G4Cons*)theSolid );
else if ( theSolidType == "G4Hype")
persSolid = new(f_container) G4PHype ( (G4Hype*)theSolid );
else if ( theSolidType == "G4Para")
else if ( theSolidType == "G4Para")
persSolid = new(f_container) G4PPara ( (G4Para*)theSolid );
else if ( theSolidType == "G4Sphere")
else if ( theSolidType == "G4Sphere")
persSolid = new(f_container) G4PSphere( (G4Sphere*)theSolid );
else if ( theSolidType == "G4Torus")
else if ( theSolidType == "G4Torus")
persSolid = new(f_container) G4PTorus ( (G4Torus*)theSolid );
else if ( theSolidType == "G4Trap")
else if ( theSolidType == "G4Trap")
persSolid = new(f_container) G4PTrap ( (G4Trap*)theSolid );
else if ( theSolidType == "G4Trd")
else if ( theSolidType == "G4Trd")
persSolid = new(f_container) G4PTrd ( (G4Trd*)theSolid );
else if ( theSolidType == "G4Tubs")
else if ( theSolidType == "G4Tubs")
persSolid = new(f_container) G4PTubs ( (G4Tubs*)theSolid );
// Specific CSG
// else if ( theSolidType == "G4EllipticalTube")
// persSolid = new(f_container) G4PEllipticalTube
// ( (G4EllipticalTube*)theSolid );
else if ( theSolidType == "G4Hype")
persSolid = new(f_container) G4PHype
( (G4Hype*)theSolid );
// else if ( theSolidType == "G4Polycone")
// persSolid = new(f_container) G4PPolycone
// ( (G4Polycone*)theSolid );
// else if ( theSolidType == "G4Polyhedra")
// persSolid = new(f_container) G4PPolyhedra
// ( (G4Polyhedra*)theSolid );
// Boolian Solids
else if ( theSolidType == "G4UnionSolid" ||
theSolidType == "G4SubtractionSolid" ||
theSolidType == "G4IntersectionSolid" )
@@ -473,14 +501,23 @@ G4LogicalVolume* G4PersistentGeomMan::MakeTransientObject (
// check if the transient version of persSolid exists
G4VSolid* theSolid = f_GeomMap->LookUp(persSolid);
#ifdef G4DEBUG
if ( theSolid == NULL )
{
G4cerr << "G4PersistentGeomMan::MakeTransientObject" <<
" -- transient Solid not found for the persistent Solid" << G4endl;
}
#endif
// Lookup the material from name
G4Material* theMaterial = NULL;
if( f_MaterialMap )
{
theMaterial = f_MaterialMap->LookUp(persLogVol->GetMaterialName());
}
// Construct the persistent version of theLogVol with theSolid
theLogVol = persLogVol->MakeTransientObject(theSolid);
theLogVol = persLogVol->MakeTransientObject(theSolid, theMaterial);
#ifdef G4DEBUG
assert( theLogVol != NULL );
#endif
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PBox.ddl,v 1.3 1999/12/15 14:51:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PBox
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PCSGSolid.ddl,v 1.3 1999/12/15 14:51:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4CSGSolid
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PCons.ddl,v 1.3 1999/12/15 14:51:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4Cons
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PPara.ddl,v 1.4 1999/12/15 14:51:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PPara
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PSphere.ddl,v 1.4 1999/12/15 14:51:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PSphere
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PTorus.ddl,v 1.3 1999/12/15 14:51:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4PTorus
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PTrap.ddl,v 1.4 1999/12/15 14:51:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PTrap
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PTrd.ddl,v 1.3 1999/12/15 14:51:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PTrd
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PTubs.ddl,v 1.3 1999/12/15 14:51:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4PTubs
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PBox.cc,v 1.2 1999/11/17 10:49:02 morita Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PCSGSolid.cc,v 1.2 1999/11/17 10:49:02 morita Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// History:
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PCons.cc,v 1.2 1999/11/17 10:49:02 morita Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PCons
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PPara.cc,v 1.2 1999/11/17 10:49:03 morita Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PPara
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PSphere.cc,v 1.3 1999/11/17 10:49:03 morita Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4PSphere
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PTorus.cc,v 1.3 1999/12/15 14:51:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4PTorus
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PTrap.cc,v 1.2 1999/11/17 10:49:03 morita Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PTrap
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PTrd.cc,v 1.3 1999/12/15 14:51:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// Implementation for G4Trd class
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4PTubs.cc,v 1.2 1999/11/17 10:49:03 morita Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// class G4PTubs
@@ -0,0 +1,44 @@
# $Id: GNUmakefile,v 1.1 2000/05/11 10:09:07 morita Exp $
name := G4pspecsolids
G4ODBMS := true
G4ODBMS_INSTALLATION := true
ifndef G4INSTALL
G4INSTALL = ../../../../..
endif
include $(G4INSTALL)/config/architecture.gmk
G4OODDLX_BOOT := $(G4TMPSCHEMA_BOOT)
CPPFLAGS += \
-Iinclude \
-I$(G4SCHEMA_HEADER_DIR) \
-I$(G4TMP)/$(G4SYSTEM)/G4pgeomGlobal \
-I$(G4TMP)/$(G4SYSTEM)/G4pcsg \
-I$(G4BASE)/persistency/global/include \
-I$(G4BASE)/persistency/geometry/global/include \
-I$(G4BASE)/graphics_reps/include \
-I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/HEPGeometry/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/geometry/magneticfield/include \
-I$(G4BASE)/geometry/volumes/include \
-I$(G4BASE)/geometry/solids/CSG/include \
-I$(G4BASE)/geometry/solids/specific/include
#--------------------------------------------------------------------
include $(G4INSTALL)/config/G4ODBMS_BUILD.gmk
include $(G4INSTALL)/config/common.gmk
#--------------------------------------------------------------------
# Explicit DDL dependencies:
##$(G4SCHEMA_HEADER_DIR)/G4PBox.hh: $(G4SCHEMA_HEADER_DIR)/G4PCSGSolid.hh
#--------------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PHype.ddl,v 1.3 1999/12/15 14:51:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PHype.ddl,v 1.1 2000/05/11 10:10:11 morita Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PHype
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PHype.cc,v 1.2 1999/11/17 10:49:02 morita Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PHype.cc,v 1.1 2000/05/11 10:10:16 morita Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// class G4PHype
//