Import Geant4 8.3.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.111 2006/11/30 10:39:40 gcosmo Exp $
|
||||
$Id: History,v 1.115 2007/04/11 08:00:12 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,21 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
April 11, 2007 G.Cosmo geommng-V08-02-02
|
||||
- Added 'get' methods to stores for retrivial of volumes/solid by name.
|
||||
- Modified signature of G4VPhysicalVolume::CheckOverlaps() to introduce
|
||||
ability of handling tolerances for overlaps.
|
||||
- Coworks with tag "geomvol-V08-02-02".
|
||||
|
||||
March 20, 2007 G.Cosmo geommng-V08-02-01
|
||||
- Do not reset RegionRootFlag in RemoveRootLogicalVolume() if volume is the
|
||||
world, since the volume itself may be already removed from the store if
|
||||
G4LogicalVolumeStore::Clean() is called.
|
||||
|
||||
January 31, 2007 G.Cosmo geommng-V08-02-00
|
||||
- Added flag for controlling verbosity to CheckOverlaps() method.
|
||||
By default, verbosity is ON.
|
||||
|
||||
November 30, 2006 G.Cosmo geommng-V08-01-08
|
||||
- Corrected deregistration and deletion of world default region, now
|
||||
happening through G4RunManagerKernel. Affected codes: G4LogicalVolume
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogicalVolumeStore.hh,v 1.12 2006/06/29 18:30:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4LogicalVolumeStore.hh,v 1.13 2007/04/10 10:13:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// class G4LogicalVolumeStore
|
||||
//
|
||||
@@ -75,6 +75,10 @@ class G4LogicalVolumeStore : public std::vector<G4LogicalVolume*>
|
||||
static void Clean();
|
||||
// Delete all volumes from the store.
|
||||
|
||||
G4LogicalVolume* GetVolume(const G4String& name, G4bool verbose=true) const;
|
||||
// Return the pointer of the first volume in the collection having
|
||||
// that name.
|
||||
|
||||
virtual ~G4LogicalVolumeStore();
|
||||
// Destructor: takes care to delete allocated logical volumes.
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhysicalVolumeStore.hh,v 1.14 2006/06/29 18:31:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4PhysicalVolumeStore.hh,v 1.15 2007/04/10 10:13:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// class G4PhysicalVolume
|
||||
//
|
||||
@@ -78,6 +78,11 @@ class G4PhysicalVolumeStore : public std::vector<G4VPhysicalVolume*>
|
||||
// store; the flag will guarantee that physical volumes to be deregistered
|
||||
// from LV's list of daughters.
|
||||
|
||||
G4VPhysicalVolume* GetVolume(const G4String& name,
|
||||
G4bool verbose=true) const;
|
||||
// Return the pointer of the first volume in the collection having
|
||||
// that name.
|
||||
|
||||
virtual ~G4PhysicalVolumeStore();
|
||||
// Destructor: takes care to delete allocated physical volumes.
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SolidStore.hh,v 1.12 2006/06/29 18:32:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4SolidStore.hh,v 1.13 2007/04/10 10:13:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// class G4SolidStore
|
||||
//
|
||||
@@ -75,6 +75,10 @@ class G4SolidStore : public std::vector<G4VSolid*>
|
||||
static void Clean();
|
||||
// Delete all solids from the store.
|
||||
|
||||
G4VSolid* GetSolid(const G4String& name, G4bool verbose=true) const;
|
||||
// Return the pointer of the first solid in the collection having
|
||||
// that name.
|
||||
|
||||
virtual ~G4SolidStore();
|
||||
// Destructor: takes care to delete allocated solids.
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VPhysicalVolume.hh,v 1.15 2006/09/18 14:03:25 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4VPhysicalVolume.hh,v 1.17 2007/04/11 08:00:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// class G4VPhysicalVolume
|
||||
@@ -165,7 +165,8 @@ class G4VPhysicalVolume
|
||||
// is regular, voxel-like. Value is id for structure type.
|
||||
// If non-zero the volume is a candidate for specialised
|
||||
// navigation such as 'nearest neighbour' directly on volumes.
|
||||
virtual G4bool CheckOverlaps(G4int res=1000);
|
||||
virtual G4bool CheckOverlaps(G4int res=1000, G4double tol=0.,
|
||||
G4bool verbose=true);
|
||||
// Verifies if the placed volume is overlapping with existing
|
||||
// daughters or with the mother volume. Provides default resolution
|
||||
// for the number of points to be generated and verified.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogicalVolumeStore.cc,v 1.17 2006/11/30 10:39:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4LogicalVolumeStore.cc,v 1.18 2007/04/10 10:13:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// G4LogicalVolumeStore
|
||||
//
|
||||
@@ -152,6 +152,28 @@ void G4LogicalVolumeStore::DeRegister(G4LogicalVolume* pVolume)
|
||||
}
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Retrieve the first volume pointer in the container having that name
|
||||
// ***************************************************************************
|
||||
//
|
||||
G4LogicalVolume*
|
||||
G4LogicalVolumeStore::GetVolume(const G4String& name, G4bool verbose) const
|
||||
{
|
||||
for (iterator i=GetInstance()->begin(); i!=GetInstance()->end(); i++)
|
||||
{
|
||||
if ((*i)->GetName() == name) { return *i; }
|
||||
}
|
||||
if (verbose)
|
||||
{
|
||||
G4cerr << "ERROR - G4LogicalVolumeStore::GetVolume()" << G4endl
|
||||
<< " Volume " << name << " NOT found in store !" << G4endl
|
||||
<< " Returning NULL pointer." << G4endl;
|
||||
G4Exception("G4LogicalVolumeStore::GetVolume()", "InvalidQuery",
|
||||
JustWarning, "Volume NOT found in store !");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Return ptr to Store, setting if necessary
|
||||
// ***************************************************************************
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhysicalVolumeStore.cc,v 1.18 2006/11/30 10:39:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4PhysicalVolumeStore.cc,v 1.19 2007/04/10 10:13:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// G4PhysicalVolumeStore
|
||||
//
|
||||
@@ -166,6 +166,28 @@ void G4PhysicalVolumeStore::DeRegister(G4VPhysicalVolume* pVolume)
|
||||
}
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Retrieve the first volume pointer in the container having that name
|
||||
// ***************************************************************************
|
||||
//
|
||||
G4VPhysicalVolume*
|
||||
G4PhysicalVolumeStore::GetVolume(const G4String& name, G4bool verbose) const
|
||||
{
|
||||
for (iterator i=GetInstance()->begin(); i!=GetInstance()->end(); i++)
|
||||
{
|
||||
if ((*i)->GetName() == name) { return *i; }
|
||||
}
|
||||
if (verbose)
|
||||
{
|
||||
G4cerr << "ERROR - G4PhysicalVolumeStore::GetVolume()" << G4endl
|
||||
<< " Volume " << name << " NOT found in store !" << G4endl
|
||||
<< " Returning NULL pointer." << G4endl;
|
||||
G4Exception("G4PhysicalVolumeStore::GetVolume()", "InvalidQuery",
|
||||
JustWarning, "Volume NOT found in store !");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Return ptr to Store, setting if necessary
|
||||
// ***************************************************************************
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Region.cc,v 1.21 2006/07/17 08:36:47 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4Region.cc,v 1.22 2007/03/20 22:29:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// class G4Region Implementation
|
||||
@@ -239,8 +239,11 @@ void G4Region::RemoveRootLogicalVolume(G4LogicalVolume* lv)
|
||||
pos = std::find(fRootVolumes.begin(),fRootVolumes.end(),lv);
|
||||
if (pos != fRootVolumes.end())
|
||||
{
|
||||
if (fRootVolumes.size() != 1) // Avoid resetting flag for world since
|
||||
{ // volume may be already deleted !
|
||||
lv->SetRegionRootFlag(false);
|
||||
}
|
||||
fRootVolumes.erase(pos);
|
||||
lv->SetRegionRootFlag(false);
|
||||
}
|
||||
|
||||
// Scan recursively the tree of daugther volumes and reset regions
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RegionStore.cc,v 1.12 2006/11/30 10:39:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4RegionStore.cc,v 1.13 2007/04/10 10:13:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// G4RegionStore
|
||||
//
|
||||
@@ -224,7 +224,10 @@ G4Region* G4RegionStore::GetRegion(const G4String& name, G4bool verbose) const
|
||||
if (verbose)
|
||||
{
|
||||
G4cerr << "ERROR - G4RegionStore::GetRegion()" << G4endl
|
||||
<< " Region " << name << " NOT found in store !" << G4endl;
|
||||
<< " Region " << name << " NOT found in store !" << G4endl
|
||||
<< " Returning NULL pointer." << G4endl;
|
||||
G4Exception("G4RegionStore::GetRegion()", "InvalidQuery",
|
||||
JustWarning, "Region NOT found in store !");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SolidStore.cc,v 1.16 2006/11/30 10:39:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4SolidStore.cc,v 1.17 2007/04/10 10:13:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// G4SolidStore
|
||||
//
|
||||
@@ -152,6 +152,27 @@ void G4SolidStore::DeRegister(G4VSolid* pSolid)
|
||||
}
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Retrieve the first solid pointer in the container having that name
|
||||
// ***************************************************************************
|
||||
//
|
||||
G4VSolid* G4SolidStore::GetSolid(const G4String& name, G4bool verbose) const
|
||||
{
|
||||
for (iterator i=GetInstance()->begin(); i!=GetInstance()->end(); i++)
|
||||
{
|
||||
if ((*i)->GetName() == name) { return *i; }
|
||||
}
|
||||
if (verbose)
|
||||
{
|
||||
G4cerr << "ERROR - G4SolidStore::GetSolid()" << G4endl
|
||||
<< " Solid " << name << " not found in store !" << G4endl
|
||||
<< " Returning NULL pointer." << G4endl;
|
||||
G4Exception("G4SolidStore::GetSolid()", "InvalidQuery",
|
||||
JustWarning, "Solid NOT found in store !");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Return ptr to Store, setting if necessary
|
||||
// ***************************************************************************
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VPhysicalVolume.cc,v 1.12 2006/09/18 14:03:25 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4VPhysicalVolume.cc,v 1.14 2007/04/11 08:00:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// class G4VPhysicalVolume Implementation
|
||||
@@ -95,7 +95,7 @@ G4RotationMatrix* G4VPhysicalVolume::GetObjectRotation() const
|
||||
// Only implemented for placed and parameterised volumes.
|
||||
// Not required for replicas.
|
||||
//
|
||||
G4bool G4VPhysicalVolume::CheckOverlaps(G4int)
|
||||
G4bool G4VPhysicalVolume::CheckOverlaps(G4int, G4double, G4bool)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user