Import Geant4 5.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:15:15 +02:00
parent 37fff30d2e
commit fbd4999cf7
4396 changed files with 56662 additions and 52446 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4GeometryCell.cc,v 1.5 2002/10/22 13:18:46 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4GeometryCellComp.cc,v 1.3 2002/12/13 11:54:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4GeometryCellImportance.cc,v 1.3 2002/10/22 13:18:46 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4GeometryCellStep.cc,v 1.1 2002/10/22 13:18:46 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4GeometryCellStepStream.cc,v 1.1 2002/10/22 13:18:47 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+22 -16
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4IStore.cc,v 1.10 2002/11/04 10:43:07 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4IStore.cc,v 1.12 2003/04/03 10:45:51 dressel Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -35,7 +35,7 @@
#include "G4VPhysicalVolume.hh"
#include "G4GeometryCell.hh"
#include "G4GeometryCellStepStream.hh"
#include "G4LogicalVolume.hh"
G4IStore::G4IStore(const G4VPhysicalVolume &worldvolume) :
fWorldVolume(worldvolume)
@@ -51,9 +51,6 @@ const G4VPhysicalVolume &G4IStore::GetWorldVolume() const
void G4IStore::SetInternalIterator(const G4GeometryCell &gCell) const
{
// if (!IsInWorld(aVolume)) {
// Error("SetInternalIterator: physical volume not in this World");
// }
fCurrentIterator = fGeometryCelli.find(gCell);
}
@@ -62,6 +59,9 @@ void G4IStore::AddImportanceGeometryCell(G4double importance,
if (importance < 0 ) {
Error("AddImportanceGeometryCell: invalid importance value given");
}
if (!IsInWorld(gCell.GetPhysicalVolume()) ) {
Error("AddImportanceGeometryCell: physical volume not in this World");
}
SetInternalIterator(gCell);
if (fCurrentIterator!=fGeometryCelli.end()) {
Error("AddImportanceGeometryCell: Region allready exists");
@@ -82,6 +82,9 @@ void G4IStore::ChangeImportance(G4double importance,
if (importance < 0 ) {
Error("ChangeImportance: Invalid importance value given");
}
if (!IsInWorld(gCell.GetPhysicalVolume()) ) {
Error("ChangeImportance: physical volume not in this World");
}
SetInternalIterator(gCell);
if (fCurrentIterator==fGeometryCelli.end()) {
Error("ChangeImportance: Region does not exist");
@@ -120,23 +123,26 @@ G4double G4IStore::GetImportance(const G4GeometryCell &gCell) const
}
G4bool G4IStore::IsKnown(const G4GeometryCell &gCell) const {
SetInternalIterator(gCell);
return (fCurrentIterator!=fGeometryCelli.end());
G4bool inWorldKnown(IsInWorld(gCell.GetPhysicalVolume()));
if ( inWorldKnown ) {
SetInternalIterator(gCell);
inWorldKnown = (fCurrentIterator!=fGeometryCelli.end());
}
return inWorldKnown;
}
G4bool G4IStore::IsInWorld(const G4VPhysicalVolume &aVolume) const
{
return true;
/*
if (!aVolume) return false;
if (*aVolume==G4ParallelWorld::GetWorldVolume()) {
return true;
G4bool isIn(true);
if (!(aVolume == fWorldVolume)) {
isIn = fWorldVolume.GetLogicalVolume()->IsAncestor(&aVolume);
}
return IsInWorld(aVolume->GetMother());
*/
return isIn;
}
void G4IStore::Error(const G4String &m) const
{
G4cout << "ERROR - G4IStore::" << m << G4endl;
@@ -22,7 +22,7 @@
//
//
// $Id: G4ImportanceAlgorithm.cc,v 1.9 2002/11/04 10:43:07 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4ImportanceFinder.cc,v 1.9 2002/11/04 10:43:07 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4ImportanceSplitExaminer.cc,v 1.6 2002/10/22 13:18:47 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4Nsplit_Weight.cc,v 1.8 2002/12/13 11:54:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParallelNavigator.cc,v 1.14 2002/11/04 10:43:07 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4ParallelNavigator.cc,v 1.16 2003/03/27 09:34:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -43,7 +43,7 @@ G4ParallelNavigator::G4ParallelNavigator(G4VPhysicalVolume &aWorldVolume)
fMaxShiftedTrys(10),
fCurrentTouchableH((fNavigator.SetWorldVolume(&aWorldVolume),
fNavigator.CreateTouchableHistory())),
fVerbose(1)
fVerbose(0)
{}
G4ParallelNavigator::~G4ParallelNavigator()
@@ -208,25 +208,24 @@ ComputeStepLengthShifted(const G4String &m,
const G4ThreeVector &aPosition,
const G4ThreeVector &aDirection)
{
if (fVerbose>=1) {
G4cout.precision(12);
G4cout << "G4ParallelNavigator::ComputeStepLengthShifted: invoked by: "
<< m << G4endl;
}
G4ThreeVector shift_pos(aPosition);
shift_pos+=G4ThreeVector(Shift(aDirection.x()),
Shift(aDirection.y()),
Shift(aDirection.z()));
G4double stepLength = 0.;
G4int trys = 0;
while (stepLength<=2*kCarTolerance && trys < fMaxShiftedTrys) {
if (fVerbose>=1) {
G4cout << "G4ParallelNavigator::ComputeStepLengthShifted: trys = "
shift_pos+=G4ThreeVector(Shift(aDirection.x()),
Shift(aDirection.y()),
Shift(aDirection.z()));
if (fVerbose>=1 || trys >= fMaxShiftedTrys - 1) {
G4cout << "G4ParallelNavigator::ComputeStepLengthShifted: invoked by: "
<< m << G4endl;
G4cout << " trys = "
<< ++trys << G4endl;
G4cout << "shifted position: " << shift_pos
G4cout.precision(12);
G4cout << " shifted position: " << shift_pos
<< ", direction: " << aDirection << G4endl;
}
Locate(shift_pos, aDirection, true, true); // to get into the correct volume
fNavigator.SetGeometricallyLimitedStep();
Locate(shift_pos, aDirection, true, false); // to get into the correct volume
G4double newSafety = 0;
fNavigator.LocateGlobalPointWithinVolume(aPosition); // to place at the correct position
stepLength = fNavigator.ComputeStep( aPosition, aDirection,
@@ -268,12 +267,13 @@ void G4ParallelNavigator::Error(const G4String &m,
G4double G4ParallelNavigator::Shift(G4double d)
{
G4double s=0;
G4double s(0);
G4double ds(10 * kCarTolerance);
if (d>0){
s = 2 * kCarTolerance;
s = ds;
}
else if (d<0) {
s = -2 * kCarTolerance;
s = -1 * ds;
}
return s;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParallelStepper.cc,v 1.8 2002/11/04 10:43:07 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4ParallelStepper.cc,v 1.10 2003/04/03 08:01:36 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -34,8 +34,9 @@
#include "G4ParallelStepper.hh"
#include "G4VPhysicalVolume.hh"
G4ParallelStepper::G4ParallelStepper()
: fPStep(0)
G4ParallelStepper::G4ParallelStepper() :
G4VParallelStepper(),
fPStep(0)
{}
G4ParallelStepper::~G4ParallelStepper()
@@ -46,8 +47,7 @@ G4ParallelStepper::~G4ParallelStepper()
}
G4ParallelStepper::G4ParallelStepper(const G4ParallelStepper &rhs)
:
fPStep(new G4GeometryCellStep(rhs.GetPStep()))
: G4VParallelStepper(), fPStep(new G4GeometryCellStep(rhs.GetPStep()))
{
if (!fPStep) {
Error("G4ParallelStepper:: new failed to create a G4GeometryCellStep!");
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParallelWorld.cc,v 1.6 2002/11/04 10:43:07 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VCellScorer.cc,v 1.5 2002/12/13 11:54:20 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VCellScorerStore.cc,v 1.3 2002/10/28 09:53:51 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VGCellFinder.cc,v 1.1 2002/10/16 14:30:01 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VIStore.cc,v 1.1 2002/10/14 12:36:50 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VImportanceAlgorithm.cc,v 1.1 2002/10/14 12:36:50 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VImportanceSplitExaminer.cc,v 1.1 2002/10/14 12:36:50 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VPGeoDriver.cc,v 1.1 2002/10/14 12:36:50 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VParallelStepper.cc,v 1.1 2002/10/14 12:36:50 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VScorer.cc,v 1.1 2002/10/28 09:53:51 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4VWeightWindowAlgorithm.cc,v 1.1 2002/10/14 12:36:50 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -22,7 +22,7 @@
//
//
// $Id: G4WeightWindowAlgorithm.cc,v 1.5 2002/10/16 14:29:07 dressel Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file