Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -5,28 +5,44 @@ which **must** added in reverse chronological order (newest at the top).
|
||||
It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
## 2022-11-23 John Apostolakis (geomnav-V11-00-09)
|
||||
- G4MultiLevelLocator: refresh candidate intersection point when needed
|
||||
|
||||
## 2022-11-10 John Apostolakis (geomnav-V11-00-08)
|
||||
- Improved diagnostic message in G4MultiLevelLocator - they missed to print
|
||||
the stored information on trial integration steps in one error case.
|
||||
- G4MultiLevelLocator: small print formatting change.
|
||||
|
||||
## 2022-11-10 Gabriele Cosmo (geomnav-V11-00-07)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
## 2022-10-05 Gabriele Cosmo (geomnav-V11-00-06)
|
||||
- Fixed compilation warnings on Intel-icx compiler for variables set
|
||||
but not used.
|
||||
|
||||
## 2022-05-10 Guilherme Amadio (geomnav-V11-00-05)
|
||||
- G4Navigator: minor improvements to ComputeSafety/ComputeStep/LocateGlobalPointAndSetup
|
||||
- G4Navigator: minor improvements to ComputeSafety(), ComputeStep()
|
||||
and LocateGlobalPointAndSetup().
|
||||
|
||||
## 2022-03-11 Pedro Arce (geomnav-V11-00-04)
|
||||
- `G4RegularNavigation`: reset the zero step counter when a non-zero step was performed, to avoid aborted events. Correct tabulation.
|
||||
Fixes as proposed in [GitHub PR #38](https://github.com/Geant4/geant4/pull/38)
|
||||
- G4RegularNavigation: reset the zero step counter when a non-zero step was
|
||||
performed, to avoid aborted events. Corrected tabulation.
|
||||
Fixes as proposed in [GitHub PR #38](https://github.com/Geant4/geant4/pull/38)
|
||||
|
||||
## 2022-02-14 Sergio Losilla (geomnav-V11-00-03)
|
||||
- /geometry/run/test also checks for overlaps in parallel worlds if
|
||||
/geometry/run/check_parallel is set to true.
|
||||
|
||||
## 2022-01-08 Gabriele Cosmo (geomnav-V11-00-02)
|
||||
- `G4VIntersectionLocator`: Fixed compilation warning on Intel-icx compiler
|
||||
- G4VIntersectionLocator: Fixed compilation warning on Intel-icx compiler
|
||||
for unused data.
|
||||
|
||||
## 2022-01-05 Jonas Hahnfeld (geomnav-V11-00-01)
|
||||
- `G4TransportationManager`: Add constant `kMassNavigatorId`
|
||||
- `G4SafetyHelper`: Use it
|
||||
- G4TransportationManager: Add constant `kMassNavigatorId`.
|
||||
- G4SafetyHelper: Use it.
|
||||
|
||||
## 2021-12-10 Ben Morgan (geomnav-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
- Change to new Markdown History format.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ class G4ParameterisedNavigation : public G4VoxelNavigation
|
||||
EAxis fVoxelAxis = kUndefined;
|
||||
G4int fVoxelNoSlices = 0;
|
||||
G4double fVoxelSliceWidth = 0.0;
|
||||
size_t fVoxelNodeNo = 0;
|
||||
std::size_t fVoxelNodeNo = 0;
|
||||
G4SmartVoxelHeader* fVoxelHeader = nullptr;
|
||||
};
|
||||
|
||||
|
||||
@@ -69,11 +69,11 @@ class G4PartialPhantomParameterisation : public G4PhantomParameterisation
|
||||
|
||||
G4ThreeVector GetTranslation(const G4int copyNo ) const;
|
||||
|
||||
size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const;
|
||||
size_t GetMaterialIndex( size_t copyNo) const;
|
||||
std::size_t GetMaterialIndex( std::size_t nx, std::size_t ny, std::size_t nz) const;
|
||||
std::size_t GetMaterialIndex( std::size_t copyNo) const;
|
||||
|
||||
G4Material* GetMaterial( size_t nx, size_t ny, size_t nz) const;
|
||||
G4Material* GetMaterial( size_t copyNo ) const;
|
||||
G4Material* GetMaterial( std::size_t nx, std::size_t ny, std::size_t nz) const;
|
||||
G4Material* GetMaterial( std::size_t copyNo ) const;
|
||||
|
||||
void SetFilledIDs( std::multimap<G4int,G4int> fid )
|
||||
{
|
||||
@@ -89,11 +89,11 @@ class G4PartialPhantomParameterisation : public G4PhantomParameterisation
|
||||
|
||||
private:
|
||||
|
||||
void ComputeVoxelIndices(const G4int copyNo, size_t& nx,
|
||||
size_t& ny, size_t& nz ) const;
|
||||
void ComputeVoxelIndices(const G4int copyNo, std::size_t& nx,
|
||||
std::size_t& ny, std::size_t& nz ) const;
|
||||
// Convert the copyNo to voxel numbers in x, y and z.
|
||||
|
||||
void CheckCopyNo( const G4int copyNo ) const;
|
||||
void CheckCopyNo( const G4long copyNo ) const;
|
||||
// Check that the copy number is within limits.
|
||||
|
||||
private:
|
||||
|
||||
@@ -67,7 +67,7 @@ class G4Polyhedra;
|
||||
|
||||
class G4PhantomParameterisation : public G4VPVParameterisation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4PhantomParameterisation();
|
||||
~G4PhantomParameterisation();
|
||||
@@ -122,21 +122,21 @@ class G4PhantomParameterisation : public G4VPVParameterisation
|
||||
|
||||
inline void SetMaterials(std::vector<G4Material*>& mates );
|
||||
|
||||
inline void SetMaterialIndices( size_t* matInd );
|
||||
inline void SetMaterialIndices( std::size_t* matInd );
|
||||
|
||||
void SetVoxelDimensions( G4double halfx, G4double halfy, G4double halfz );
|
||||
void SetNoVoxels( size_t nx, size_t ny, size_t nz );
|
||||
void SetNoVoxels( std::size_t nx, std::size_t ny, std::size_t nz );
|
||||
|
||||
inline G4double GetVoxelHalfX() const;
|
||||
inline G4double GetVoxelHalfY() const;
|
||||
inline G4double GetVoxelHalfZ() const;
|
||||
inline size_t GetNoVoxelsX() const;
|
||||
inline size_t GetNoVoxelsY() const;
|
||||
inline size_t GetNoVoxelsZ() const;
|
||||
inline size_t GetNoVoxels() const;
|
||||
inline std::size_t GetNoVoxelsX() const;
|
||||
inline std::size_t GetNoVoxelsY() const;
|
||||
inline std::size_t GetNoVoxelsZ() const;
|
||||
inline std::size_t GetNoVoxels() const;
|
||||
|
||||
inline std::vector<G4Material*> GetMaterials() const;
|
||||
inline size_t* GetMaterialIndices() const;
|
||||
inline std::size_t* GetMaterialIndices() const;
|
||||
inline G4VSolid* GetContainerSolid() const;
|
||||
|
||||
G4ThreeVector GetTranslation(const G4int copyNo ) const;
|
||||
@@ -144,11 +144,11 @@ class G4PhantomParameterisation : public G4VPVParameterisation
|
||||
G4bool SkipEqualMaterials() const;
|
||||
void SetSkipEqualMaterials( G4bool skip );
|
||||
|
||||
size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const;
|
||||
size_t GetMaterialIndex( size_t copyNo) const;
|
||||
std::size_t GetMaterialIndex( std::size_t nx, std::size_t ny, std::size_t nz) const;
|
||||
std::size_t GetMaterialIndex( std::size_t copyNo) const;
|
||||
|
||||
G4Material* GetMaterial( size_t nx, size_t ny, size_t nz) const;
|
||||
G4Material* GetMaterial( size_t copyNo ) const;
|
||||
G4Material* GetMaterial( std::size_t nx, std::size_t ny, std::size_t nz) const;
|
||||
G4Material* GetMaterial( std::size_t copyNo ) const;
|
||||
|
||||
void CheckVoxelsFillContainer( G4double contX, G4double contY,
|
||||
G4double contZ ) const;
|
||||
@@ -156,27 +156,27 @@ class G4PhantomParameterisation : public G4VPVParameterisation
|
||||
|
||||
private:
|
||||
|
||||
void ComputeVoxelIndices(const G4int copyNo, size_t& nx,
|
||||
size_t& ny, size_t& nz ) const;
|
||||
void ComputeVoxelIndices(const G4int copyNo, std::size_t& nx,
|
||||
std::size_t& ny, std::size_t& nz ) const;
|
||||
// Convert the copyNo to voxel numbers in x, y and z.
|
||||
|
||||
void CheckCopyNo( const G4int copyNo ) const;
|
||||
void CheckCopyNo( const G4long copyNo ) const;
|
||||
// Check that the copy number is within limits.
|
||||
|
||||
protected:
|
||||
|
||||
G4double fVoxelHalfX = 0.0, fVoxelHalfY = 0.0, fVoxelHalfZ = 0.0;
|
||||
// Half dimension of voxels (assume they are boxes).
|
||||
size_t fNoVoxelsX = 0, fNoVoxelsY = 0, fNoVoxelsZ = 0;
|
||||
std::size_t fNoVoxelsX = 0, fNoVoxelsY = 0, fNoVoxelsZ = 0;
|
||||
// Number of voxel in x, y and z dimensions.
|
||||
size_t fNoVoxelsXY = 0;
|
||||
std::size_t fNoVoxelsXY = 0;
|
||||
// Number of voxels in x times number of voxels in y (for speed-up).
|
||||
size_t fNoVoxels = 0;
|
||||
std::size_t fNoVoxels = 0;
|
||||
// Total number of voxels (for speed-up).
|
||||
|
||||
std::vector<G4Material*> fMaterials;
|
||||
// List of materials of the voxels.
|
||||
size_t* fMaterialIndices = nullptr;
|
||||
std::size_t* fMaterialIndices = nullptr;
|
||||
// Index in fMaterials that correspond to each voxel.
|
||||
|
||||
G4VSolid* fContainerSolid = nullptr;
|
||||
|
||||
@@ -38,7 +38,9 @@ SetVoxelDimensions( G4double halfx, G4double halfy, G4double halfz )
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
inline
|
||||
void G4PhantomParameterisation::SetNoVoxels( size_t nx, size_t ny, size_t nz )
|
||||
void G4PhantomParameterisation::SetNoVoxels( std::size_t nx,
|
||||
std::size_t ny,
|
||||
std::size_t nz )
|
||||
{
|
||||
fNoVoxelsX = nx;
|
||||
fNoVoxelsY = ny;
|
||||
@@ -56,7 +58,7 @@ void G4PhantomParameterisation::SetMaterials( std::vector<G4Material*>& mates )
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
inline
|
||||
void G4PhantomParameterisation::SetMaterialIndices( size_t* matInd )
|
||||
void G4PhantomParameterisation::SetMaterialIndices( std::size_t* matInd )
|
||||
{
|
||||
fMaterialIndices = matInd;
|
||||
}
|
||||
@@ -84,28 +86,28 @@ G4double G4PhantomParameterisation::GetVoxelHalfZ() const
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
inline
|
||||
size_t G4PhantomParameterisation::GetNoVoxelsX() const
|
||||
std::size_t G4PhantomParameterisation::GetNoVoxelsX() const
|
||||
{
|
||||
return fNoVoxelsX;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
inline
|
||||
size_t G4PhantomParameterisation::GetNoVoxelsY() const
|
||||
std::size_t G4PhantomParameterisation::GetNoVoxelsY() const
|
||||
{
|
||||
return fNoVoxelsY;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
inline
|
||||
size_t G4PhantomParameterisation::GetNoVoxelsZ() const
|
||||
std::size_t G4PhantomParameterisation::GetNoVoxelsZ() const
|
||||
{
|
||||
return fNoVoxelsZ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
inline
|
||||
size_t G4PhantomParameterisation::GetNoVoxels() const
|
||||
std::size_t G4PhantomParameterisation::GetNoVoxels() const
|
||||
{
|
||||
return fNoVoxels;
|
||||
}
|
||||
@@ -119,7 +121,7 @@ std::vector<G4Material*> G4PhantomParameterisation::GetMaterials() const
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
inline
|
||||
size_t* G4PhantomParameterisation::GetMaterialIndices() const
|
||||
std::size_t* G4PhantomParameterisation::GetMaterialIndices() const
|
||||
{
|
||||
return fMaterialIndices;
|
||||
}
|
||||
|
||||
@@ -73,11 +73,11 @@ class G4TransportationManager
|
||||
// Set the world volume for tracking
|
||||
// This method is to be invoked by G4RunManagerKernel.
|
||||
|
||||
inline size_t GetNoActiveNavigators() const;
|
||||
inline std::size_t GetNoActiveNavigators() const;
|
||||
inline std::vector<G4Navigator*>::iterator GetActiveNavigatorsIterator();
|
||||
// Return an iterator to the list of active navigators
|
||||
|
||||
inline size_t GetNoWorlds() const;
|
||||
inline std::size_t GetNoWorlds() const;
|
||||
inline std::vector<G4VPhysicalVolume*>::iterator GetWorldsIterator();
|
||||
// Return an iterator to the list of registered worlds
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
void G4AuxiliaryNavServices::ReportTolerances()
|
||||
{
|
||||
G4int oldPrec = G4cout.precision(16);
|
||||
G4long oldPrec = G4cout.precision(16);
|
||||
|
||||
G4cout << " Cartesian Tolerance (kCarTolerance): "
|
||||
<< G4GeometryTolerance::GetInstance()->GetSurfaceTolerance()
|
||||
|
||||
@@ -121,7 +121,7 @@ G4bool G4BrentLocator::EstimateIntersectionPoint(
|
||||
|
||||
G4bool restoredFullEndpoint = false;
|
||||
|
||||
G4int oldprc; // cout, cerr precision
|
||||
G4long oldprc; // cout, cerr precision
|
||||
G4int substep_no = 0;
|
||||
|
||||
// Limits for substep number
|
||||
@@ -753,7 +753,7 @@ G4bool G4BrentLocator::EstimateIntersectionPoint(
|
||||
}
|
||||
else if( substep_no >= warn_substeps )
|
||||
{
|
||||
oldprc= G4cout.precision( 10 );
|
||||
oldprc = G4cout.precision( 10 );
|
||||
std::ostringstream message;
|
||||
message << "Many substeps while trying to locate intersection."
|
||||
<< G4endl
|
||||
|
||||
@@ -153,7 +153,7 @@ G4DrawVoxels::ComputeVoxelPolyhedra(const G4LogicalVolume* lv,
|
||||
voxel_plane.SetVisAttributes(voxelsVisAttributes);
|
||||
|
||||
G4SmartVoxelProxy* slice = header->GetSlice(0);
|
||||
G4int slice_no = 0, no_slices = header->GetNoSlices();
|
||||
std::size_t slice_no = 0, no_slices = header->GetNoSlices();
|
||||
G4double beginning = header->GetMinExtent(),
|
||||
step = (header->GetMaxExtent()-beginning)/no_slices;
|
||||
|
||||
|
||||
@@ -133,8 +133,8 @@ void G4GeomTestVolume::TestOverlapInTree() const
|
||||
|
||||
// check overlaps for daughters
|
||||
G4LogicalVolume* logical = current->GetLogicalVolume();
|
||||
G4int ndaughters = logical->GetNoDaughters();
|
||||
for (G4int i=0; i<ndaughters; ++i)
|
||||
std::size_t ndaughters = logical->GetNoDaughters();
|
||||
for (std::size_t i=0; i<ndaughters; ++i)
|
||||
{
|
||||
G4VPhysicalVolume* daughter = logical->GetDaughter(i);
|
||||
daughter->CheckOverlaps(resolution, tolerance, verbosity, maxErr);
|
||||
@@ -142,7 +142,7 @@ void G4GeomTestVolume::TestOverlapInTree() const
|
||||
|
||||
// append the queue of volumes
|
||||
G4LogicalVolume* previousLogical = nullptr;
|
||||
for (G4int i=0; i<ndaughters; ++i)
|
||||
for (std::size_t i=0; i<ndaughters; ++i)
|
||||
{
|
||||
G4VPhysicalVolume* daughter = logical->GetDaughter(i);
|
||||
G4LogicalVolume* daughterLogical = daughter->GetLogicalVolume();
|
||||
@@ -194,7 +194,7 @@ void G4GeomTestVolume::TestRecursiveOverlap( G4int slevel, G4int depth )
|
||||
std::set<const G4LogicalVolume *> tested;
|
||||
|
||||
const G4LogicalVolume *logical = target->GetLogicalVolume();
|
||||
G4int nDaughter = logical->GetNoDaughters();
|
||||
G4int nDaughter = (G4int)logical->GetNoDaughters();
|
||||
for( auto iDaughter=0; iDaughter<nDaughter; ++iDaughter )
|
||||
{
|
||||
G4VPhysicalVolume *daughter = logical->GetDaughter(iDaughter);
|
||||
|
||||
@@ -49,7 +49,7 @@ std::ostream& operator<< ( std::ostream& os,
|
||||
//
|
||||
std::ostream& G4LocatorChangeLogger::StreamInfo(std::ostream& os) const
|
||||
{
|
||||
G4int oldprc = os.precision(16);
|
||||
G4long oldprc = os.precision(16);
|
||||
G4LocatorChangeRecord::ReportVector( os, this->fName, *this );
|
||||
os.precision(oldprc);
|
||||
return os;
|
||||
@@ -65,7 +65,7 @@ std::ostream& G4LocatorChangeLogger::ReportEndChanges( std::ostream& os,
|
||||
using std::setw;
|
||||
G4int prec= 16;
|
||||
const G4bool confirm = true;
|
||||
G4int oldprc = os.precision(prec);
|
||||
G4long oldprc = os.precision(prec);
|
||||
|
||||
auto itrecA= startA.cbegin();
|
||||
auto itrecB= endB.cbegin();
|
||||
@@ -91,8 +91,6 @@ std::ostream& G4LocatorChangeLogger::ReportEndChanges( std::ostream& os,
|
||||
G4bool isLastA= false;
|
||||
G4bool isLastB= false;
|
||||
|
||||
G4int jA=0, jB=0;
|
||||
|
||||
G4int maxEvent = std::max( startA[ startA.size() - 1 ].GetCount() ,
|
||||
endB[ endB.size() - 1 ].GetCount() );
|
||||
G4int prevA = -1;
|
||||
@@ -173,14 +171,12 @@ std::ostream& G4LocatorChangeLogger::ReportEndChanges( std::ostream& os,
|
||||
if( advanceA )
|
||||
{
|
||||
++itrecA;
|
||||
if( !isLastA ) { ++jA; }
|
||||
eventA = isLastA ? maxEvent : (*itrecA).GetCount();
|
||||
}
|
||||
|
||||
if( advanceB )
|
||||
{
|
||||
++itrecB;
|
||||
if( !isLastB ) { ++jB; }
|
||||
eventB = isLastB ? maxEvent : (*itrecB).GetCount();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ std::ostream& G4LocatorChangeRecord::ReportVector ( std::ostream& os,
|
||||
return os;
|
||||
}
|
||||
|
||||
G4int oldprc = os.precision(prec);
|
||||
G4long oldprc = os.precision(prec);
|
||||
|
||||
// std::vector<G4LocatorChangeRecord>::const_iterator
|
||||
auto itRec
|
||||
@@ -104,17 +104,18 @@ G4LocatorChangeRecord::ReportEndChanges (
|
||||
using std::setw;
|
||||
G4int prec= 16;
|
||||
const G4bool confirm = true;
|
||||
G4int oldprc = os.precision(prec);
|
||||
G4long oldprc = os.precision(prec);
|
||||
|
||||
std::vector<G4LocatorChangeRecord>::const_iterator itrecA, itrecB;
|
||||
itrecA= startA.begin();
|
||||
itrecB= endB.begin();
|
||||
|
||||
os << "====================================================================="
|
||||
<< G4endl;
|
||||
os << " Size of individual change record: startA : " << startA.size()
|
||||
<< " endB : " << endB.size() << G4endl;
|
||||
os << "====================================================================="
|
||||
os << G4endl;
|
||||
os << "=========================================================================================";
|
||||
os << G4endl << " ** Change records: " << G4endl;
|
||||
os << " * endPoints A (start) and B (end): combined changes of AB intervals" << G4endl;
|
||||
os << " * Sizes of change records: start(A) : " << startA.size()
|
||||
<< " end(B) : " << endB.size() << G4endl;
|
||||
os << "========================================================================================="
|
||||
<< G4endl;
|
||||
|
||||
os << setw( 7 ) << "Change#" << " "
|
||||
@@ -132,8 +133,6 @@ G4LocatorChangeRecord::ReportEndChanges (
|
||||
G4bool isLastA= false;
|
||||
G4bool isLastB= false;
|
||||
|
||||
G4int jA=0, jB=0;
|
||||
|
||||
G4int maxEvent = std::max( startA[ startA.size() - 1 ].GetCount() ,
|
||||
endB[ endB.size() - 1 ].GetCount() );
|
||||
G4int prevA = -1;
|
||||
@@ -211,14 +210,14 @@ G4LocatorChangeRecord::ReportEndChanges (
|
||||
if( advanceA )
|
||||
{
|
||||
++itrecA;
|
||||
if( !isLastA ) { ++jA; eventA = (*itrecA).GetCount(); }
|
||||
if( !isLastA ) { eventA = (*itrecA).GetCount(); }
|
||||
else { eventA = maxEvent; }
|
||||
}
|
||||
|
||||
if( advanceB )
|
||||
{
|
||||
++itrecB;
|
||||
if( !isLastB ) { ++jB; eventB = (*itrecB).GetCount(); }
|
||||
if( !isLastB ) { eventB = (*itrecB).GetCount(); }
|
||||
else { eventB = maxEvent; }
|
||||
}
|
||||
|
||||
@@ -258,7 +257,7 @@ std::ostream& operator<< ( std::ostream& os, const G4LocatorChangeRecord& e )
|
||||
//
|
||||
std::ostream& G4LocatorChangeRecord::StreamInfo(std::ostream& os) const
|
||||
{
|
||||
G4int oldprc = os.precision(16);
|
||||
G4long oldprc = os.precision(16);
|
||||
os << " count = " << fEventCount
|
||||
<< " iter= " << fIteration
|
||||
<< " Location code = " << fCodeLocation
|
||||
|
||||
@@ -253,21 +253,44 @@ G4bool G4MultiLevelLocator::EstimateIntersectionPoint(
|
||||
|
||||
do // Loop checking, 07.10.2016, J.Apostolakis
|
||||
{ // REPEAT param
|
||||
|
||||
#ifdef G4DEBUG_FIELD
|
||||
if( CurrentA_PointVelocity.GetCurveLength() >=
|
||||
CurrentB_PointVelocity.GetCurveLength() )
|
||||
G4ThreeVector Point_A = CurrentA_PointVelocity.GetPosition();
|
||||
G4ThreeVector Point_B = CurrentB_PointVelocity.GetPosition();
|
||||
|
||||
#ifdef G4DEBUG_FIELD
|
||||
const G4double lenA = CurrentA_PointVelocity.GetCurveLength() ;
|
||||
const G4double lenB = CurrentB_PointVelocity.GetCurveLength() ;
|
||||
G4double curv_lenAB = lenB - lenA;
|
||||
G4double distAB = (Point_B - Point_A).mag();
|
||||
if( curv_lenAB < distAB * ( 1. - 10.*fiEpsilonStep ) )
|
||||
{
|
||||
G4cerr << "ERROR> (Start) Point A coincides with or has gone past (end) point B"
|
||||
<< "MLL: iters = " << substep_no << G4endl;
|
||||
// G4LocatorChangeRecord::ReportVector(G4cerr, "endPointB", endChangeB );
|
||||
// G4cerr<<"EndPoints A(start) and B(end): combined changes " << G4endl;
|
||||
G4LocatorChangeLogger::ReportEndChanges(G4cerr, endChangeA, endChangeB);
|
||||
G4long op=G4cerr.precision(6);
|
||||
G4cerr << " Difference = " << distAB - curv_lenAB
|
||||
<< " exceeds limit of relative dist (10*epsilon)= " << 10*fiEpsilonStep
|
||||
<< " i.e. limit = " << 10 * fiEpsilonStep * distAB << G4endl;
|
||||
G4cerr.precision(9);
|
||||
G4cerr << " Len A, B = " << lenA << " " << lenB << G4endl
|
||||
<< " Position A: " << Point_A << G4endl
|
||||
<< " Position B: " << Point_B << G4endl;
|
||||
G4cerr.precision(op);
|
||||
// G4LocatorChangeRecord::ReportVector(G4cerr, "endPointB", endChangeB );
|
||||
// G4cerr<<"EndPoints A(start) and B(end): combined changes " << G4endl;
|
||||
if (fCheckMode) {
|
||||
G4LocatorChangeLogger::ReportEndChanges(G4cerr, endChangeA, endChangeB);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
G4ThreeVector Point_A = CurrentA_PointVelocity.GetPosition();
|
||||
G4ThreeVector Point_B = CurrentB_PointVelocity.GetPosition();
|
||||
|
||||
if( !validIntersectP ){
|
||||
G4ExceptionDescription errmsg;
|
||||
errmsg << "Assertion FAILURE - invalid (stale) Interection point. Substep: "
|
||||
<< substep_no << " call: " << fNumCalls << G4endl;
|
||||
if (fCheckMode)
|
||||
G4LocatorChangeRecord::ReportEndChanges(errmsg, endChangeA, endChangeB );
|
||||
G4Exception("G4MultiLevelLocator::EstimateIntersectionPoint", "GeomNav0004",
|
||||
JustWarning, errmsg);
|
||||
}
|
||||
|
||||
// F = a point on true AB path close to point E
|
||||
// (the closest if possible)
|
||||
//
|
||||
@@ -282,26 +305,25 @@ G4bool G4MultiLevelLocator::EstimateIntersectionPoint(
|
||||
recApproxPoint.push_back(G4LocatorChangeRecord(G4LocatorChangeRecord::kInvalidCL,
|
||||
substep_no, eventCount, ApproxIntersecPointV ) );
|
||||
G4double lenIntsc= ApproxIntersecPointV.GetCurveLength();
|
||||
G4double lenB = CurrentB_PointVelocity.GetCurveLength();
|
||||
G4double checkVsEnd= lenB - lenIntsc;
|
||||
|
||||
if( lenIntsc > lenB )
|
||||
{
|
||||
std::ostringstream errmsg;
|
||||
errmsg.precision(17);
|
||||
G4double ratio = checkVsEnd / lenB;
|
||||
G4double ratioTol = std::fabs(ratio) / tolerance;
|
||||
errmsg << "Intermediate F point is past end B point" << G4endl
|
||||
<< " l( intersection ) = " << lenIntsc << G4endl
|
||||
<< " l( endpoint ) = " << lenB << G4endl;
|
||||
errmsg.precision(8);
|
||||
errmsg << " l_end - l_inters = " << checkVsEnd << G4endl
|
||||
<< " / l_end = " << ratio << G4endl
|
||||
<< " ratio / tolerance = " << ratioTol << G4endl;
|
||||
if( ratioTol < 1.0 )
|
||||
G4Exception(MethodName, "GeomNav0003", JustWarning, errmsg );
|
||||
else
|
||||
G4Exception(MethodName, "GeomNav0003", FatalException, errmsg );
|
||||
std::ostringstream errmsg;
|
||||
errmsg.precision(17);
|
||||
G4double ratio = checkVsEnd / lenB;
|
||||
G4double ratioTol = std::fabs(ratio) / tolerance;
|
||||
errmsg << "Intermediate F point is past end B point" << G4endl
|
||||
<< " l( intersection ) = " << lenIntsc << G4endl
|
||||
<< " l( endpoint ) = " << lenB << G4endl;
|
||||
errmsg.precision(8);
|
||||
errmsg << " l_end - l_inters = " << checkVsEnd << G4endl
|
||||
<< " / l_end = " << ratio << G4endl
|
||||
<< " ratio / tolerance = " << ratioTol << G4endl;
|
||||
if( ratioTol < 1.0 )
|
||||
G4Exception(MethodName, "GeomNav0003", JustWarning, errmsg );
|
||||
else
|
||||
G4Exception(MethodName, "GeomNav0003", FatalException, errmsg );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -476,6 +498,7 @@ G4bool G4MultiLevelLocator::EstimateIntersectionPoint(
|
||||
}
|
||||
else // not Intersects_FB
|
||||
{
|
||||
validIntersectP = false; // Intersections are now stale
|
||||
if( fin_section_depth[depth] )
|
||||
{
|
||||
// If B is the original endpoint, this means that whatever
|
||||
@@ -560,11 +583,6 @@ G4bool G4MultiLevelLocator::EstimateIntersectionPoint(
|
||||
// [ Implementation: a counter for # of recomputations
|
||||
// => avoids extra work]
|
||||
}
|
||||
// else
|
||||
// Move forward the other points
|
||||
// - or better flag it, so that they are re-computed when next used
|
||||
// [ Implementation: a counter for # of recomputations
|
||||
// => avoids extra work]
|
||||
if (fCheckMode)
|
||||
{
|
||||
++eventCount;
|
||||
@@ -578,23 +596,29 @@ G4bool G4MultiLevelLocator::EstimateIntersectionPoint(
|
||||
if( CurrentB_PointVelocity.GetCurveLength() < CurrentA_PointVelocity.GetCurveLength() )
|
||||
errorEndPt = 2;
|
||||
}
|
||||
|
||||
|
||||
if( errorEndPt > 1 ) // errorEndPt = 1 is milder, just: len(B)=len(A)
|
||||
{
|
||||
std::ostringstream errmsg;
|
||||
ReportReversedPoints(errmsg,
|
||||
CurveStartPointVelocity, CurveEndPointVelocity,
|
||||
NewSafety, fiEpsilonStep,
|
||||
CurrentA_PointVelocity, CurrentB_PointVelocity,
|
||||
SubStart_PointVelocity, CurrentE_Point,
|
||||
ApproxIntersecPointV, substep_no, substep_no_p, depth);
|
||||
errmsg << G4endl << " * Location: " << MethodName
|
||||
<< "- After EndIf(Intersects_AF)" << G4endl;
|
||||
errmsg << " * Bool flags: Recalculated = " << recalculatedB
|
||||
<< " Intersects_AF = " << Intersects_AF
|
||||
<< " Intersects_FB = " << Intersects_FB << G4endl;
|
||||
errmsg << " * Number of calls to MLL:EIP= " << fNumCalls << G4endl;
|
||||
G4Exception(MethodName, "GeomNav0003", FatalException, errmsg);
|
||||
std::ostringstream errmsg;
|
||||
|
||||
ReportReversedPoints(errmsg,
|
||||
CurveStartPointVelocity, CurveEndPointVelocity,
|
||||
NewSafety, fiEpsilonStep,
|
||||
CurrentA_PointVelocity, CurrentB_PointVelocity,
|
||||
SubStart_PointVelocity, CurrentE_Point,
|
||||
ApproxIntersecPointV, substep_no, substep_no_p, depth);
|
||||
|
||||
if (fCheckMode) {
|
||||
G4LocatorChangeRecord::ReportEndChanges(errmsg, endChangeA, endChangeB );
|
||||
}
|
||||
|
||||
errmsg << G4endl << " * Location: " << MethodName
|
||||
<< "- After EndIf(Intersects_AF)" << G4endl;
|
||||
errmsg << " * Bool flags: Recalculated = " << recalculatedB
|
||||
<< " Intersects_AF = " << Intersects_AF
|
||||
<< " Intersects_FB = " << Intersects_FB << G4endl;
|
||||
errmsg << " * Number of calls to MLL:EIP= " << fNumCalls << G4endl;
|
||||
G4Exception(MethodName, "GeomNav0003", FatalException, errmsg);
|
||||
}
|
||||
if( restoredFullEndpoint )
|
||||
{
|
||||
@@ -619,10 +643,12 @@ G4bool G4MultiLevelLocator::EstimateIntersectionPoint(
|
||||
G4cout << " Start: ";
|
||||
printStatus( CurveStartPointVelocity, CurveEndPointVelocity,
|
||||
-1.0, NewSafety, 0 );
|
||||
|
||||
G4cout << " ** Change records: " << G4endl;
|
||||
G4cout << "endPoints A (start) and B (end): combined changes of AB intervals" << G4endl;
|
||||
G4LocatorChangeRecord::ReportEndChanges(G4cout, endChangeA, endChangeB );
|
||||
if( fCheckMode ) {
|
||||
G4LocatorChangeRecord::ReportEndChanges(G4cout, endChangeA, endChangeB );
|
||||
} else {
|
||||
G4cout << " ** For more information enable 'check mode' in G4MultiLevelLocator "
|
||||
<< "-- (it saves and can output change records) " << G4endl;
|
||||
}
|
||||
}
|
||||
G4cout << " Point A: ";
|
||||
printStatus( CurrentA_PointVelocity, CurrentA_PointVelocity,
|
||||
@@ -637,6 +663,7 @@ G4bool G4MultiLevelLocator::EstimateIntersectionPoint(
|
||||
|
||||
} while ( ( ! found_approximate_intersection )
|
||||
&& ( ! there_is_no_intersection )
|
||||
&& validIntersectP // New condition: must refresh intersection !!
|
||||
&& ( substep_no_p <= param_substeps) ); // UNTIL found or
|
||||
// failed param substep
|
||||
|
||||
@@ -761,16 +788,12 @@ G4bool G4MultiLevelLocator::EstimateIntersectionPoint(
|
||||
}
|
||||
} // if did_len
|
||||
|
||||
unsigned int levelPops = 0;
|
||||
|
||||
G4bool unfinished = Second_half;
|
||||
while ( unfinished && (depth>0) ) // Loop checking, 07.10.2016, JA
|
||||
{
|
||||
// Second part of curve (InterMed[depth],Intermed[depth-1]))
|
||||
// On the depth-1 level normally we are on the 'second_half'
|
||||
|
||||
++levelPops;
|
||||
|
||||
// Find new trial intersection point needed at start of the loop
|
||||
//
|
||||
SubStart_PointVelocity = *ptrInterMedFT[depth];
|
||||
@@ -878,7 +901,6 @@ G4bool G4MultiLevelLocator::EstimateIntersectionPoint(
|
||||
G4cout << "MLL - WARNING Potential FAILURE: Conditions not met!"
|
||||
<< G4endl
|
||||
<< " Depth = " << depth << G4endl
|
||||
<< " Levels popped = " << levelPops
|
||||
<< " Num Substeps= " << substep_no << G4endl;
|
||||
G4cout << " Found intersection= " << found_approximate_intersection
|
||||
<< G4endl;
|
||||
|
||||
@@ -250,8 +250,8 @@ void G4MultiNavigator::PrepareNavigators()
|
||||
|
||||
// Message the transportation-manager to find active navigators
|
||||
|
||||
std::vector<G4Navigator*>::iterator pNavigatorIter;
|
||||
fNoActiveNavigators= pTransportManager-> GetNoActiveNavigators();
|
||||
std::vector<G4Navigator*>::const_iterator pNavigatorIter;
|
||||
fNoActiveNavigators = (G4int)pTransportManager-> GetNoActiveNavigators();
|
||||
|
||||
if( fNoActiveNavigators > fMaxNav )
|
||||
{
|
||||
@@ -560,7 +560,7 @@ G4MultiNavigator::PrintLimited()
|
||||
{
|
||||
stepLen = fTrueMinStep; // did not limit (went as far as asked)
|
||||
}
|
||||
G4int oldPrec = G4cout.precision(9);
|
||||
G4long oldPrec = G4cout.precision(9);
|
||||
|
||||
G4cout << std::setw(5) << num << " "
|
||||
<< std::setw(12) << stepLen << " "
|
||||
|
||||
@@ -109,7 +109,7 @@ G4NavigationLogger::PreComputeStepLog(const G4VPhysicalVolume* motherPhysical,
|
||||
if ( fVerbose > 1 )
|
||||
{
|
||||
static const G4int precVerf = 16; // Precision
|
||||
G4int oldprec = G4cout.precision(precVerf);
|
||||
G4long oldprec = G4cout.precision(precVerf);
|
||||
G4cout << " - Information on mother / key daughters ..." << G4endl;
|
||||
G4cout << " Type " << std::setw(12) << "Solid-Name" << " "
|
||||
<< std::setw(3*(6+precVerf)) << " local point" << " "
|
||||
@@ -236,7 +236,7 @@ G4NavigationLogger::AlongComputeStepLog(const G4VSolid* sampleSolid,
|
||||
if ( fVerbose > 1 )
|
||||
{
|
||||
static const G4int precVerf= 20; // Precision
|
||||
G4int oldprec = G4cout.precision(precVerf);
|
||||
G4long oldprec = G4cout.precision(precVerf);
|
||||
G4cout << "Daughter "
|
||||
<< std::setw(12) << sampleSolid->GetName() << " "
|
||||
<< std::setw(4+precVerf) << samplePoint << " "
|
||||
@@ -451,8 +451,8 @@ G4NavigationLogger::PostComputeStepLog(const G4VSolid* motherSolid,
|
||||
if( ( motherStep < 0.0 ) || ( motherStep >= kInfinity) )
|
||||
{
|
||||
G4String fType = fId + "::ComputeStep()";
|
||||
G4int oldPrOut = G4cout.precision(16);
|
||||
G4int oldPrErr = G4cerr.precision(16);
|
||||
G4long oldPrOut = G4cout.precision(16);
|
||||
G4long oldPrErr = G4cerr.precision(16);
|
||||
std::ostringstream message;
|
||||
message << "Current point is outside the current solid !" << G4endl
|
||||
<< " Problem in Navigation" << G4endl
|
||||
@@ -468,7 +468,7 @@ G4NavigationLogger::PostComputeStepLog(const G4VSolid* motherSolid,
|
||||
if ( fVerbose > 1 )
|
||||
{
|
||||
static const G4int precVerf = 20; // Precision
|
||||
G4int oldprec = G4cout.precision(precVerf);
|
||||
G4long oldprec = G4cout.precision(precVerf);
|
||||
G4cout << " Mother " << std::setw(12) << motherSolid->GetName() << " "
|
||||
<< std::setw(4+precVerf) << localPoint << " "
|
||||
<< std::setw(4+precVerf) << motherSafety << " "
|
||||
@@ -526,7 +526,7 @@ G4NavigationLogger::PrintDaughterLog (const G4VSolid* sampleSolid,
|
||||
{
|
||||
if ( fVerbose >= 1 )
|
||||
{
|
||||
G4int oldPrec = G4cout.precision(8);
|
||||
G4long oldPrec = G4cout.precision(8);
|
||||
G4cout << "Daughter "
|
||||
<< std::setw(15) << sampleSafety << " ";
|
||||
if (withStep) // (sampleStep != -1.0 )
|
||||
|
||||
@@ -154,7 +154,7 @@ G4Navigator::LocateGlobalPointAndSetup( const G4ThreeVector& globalPoint,
|
||||
#ifdef G4VERBOSE
|
||||
if( fVerbose > 2 )
|
||||
{
|
||||
G4int oldcoutPrec = G4cout.precision(8);
|
||||
G4long oldcoutPrec = G4cout.precision(8);
|
||||
G4cout << "*** G4Navigator::LocateGlobalPointAndSetup: ***" << G4endl;
|
||||
G4cout << " Called with arguments: " << G4endl
|
||||
<< " Globalpoint = " << globalPoint << G4endl
|
||||
@@ -169,7 +169,6 @@ G4Navigator::LocateGlobalPointAndSetup( const G4ThreeVector& globalPoint,
|
||||
#endif
|
||||
|
||||
G4int noLevelsExited = 0;
|
||||
G4int noLevelsEntered = 0;
|
||||
|
||||
if ( !relativeSearch )
|
||||
{
|
||||
@@ -222,10 +221,6 @@ G4Navigator::LocateGlobalPointAndSetup( const G4ThreeVector& globalPoint,
|
||||
else
|
||||
if ( fEntering )
|
||||
{
|
||||
// assert( fBlockedPhysicalVolume!=0 );
|
||||
|
||||
++noLevelsEntered; // count the first level entered too
|
||||
|
||||
switch (VolumeType(fBlockedPhysicalVolume))
|
||||
{
|
||||
case kNormal:
|
||||
@@ -524,8 +519,6 @@ G4Navigator::LocateGlobalPointAndSetup( const G4ThreeVector& globalPoint,
|
||||
|
||||
if ( noResult )
|
||||
{
|
||||
++noLevelsEntered;
|
||||
|
||||
// Entering a daughter after ascending
|
||||
//
|
||||
// The blocked volume is no longer valid - it was for another level
|
||||
@@ -570,7 +563,7 @@ G4Navigator::LocateGlobalPointAndSetup( const G4ThreeVector& globalPoint,
|
||||
#ifdef G4VERBOSE
|
||||
if( fVerbose >= 4 )
|
||||
{
|
||||
G4int oldcoutPrec = G4cout.precision(8);
|
||||
G4long oldcoutPrec = G4cout.precision(8);
|
||||
G4String curPhysVol_Name("None");
|
||||
if (targetPhysical) { curPhysVol_Name = targetPhysical->GetName(); }
|
||||
G4cout << " Return value = new volume = " << curPhysVol_Name << G4endl;
|
||||
@@ -1180,7 +1173,7 @@ G4double G4Navigator::ComputeStep( const G4ThreeVector& pGlobalpoint,
|
||||
//
|
||||
if( fValidExitNormal || fCalculatedExitNormal )
|
||||
{
|
||||
G4int depth = fHistory.GetDepth();
|
||||
G4int depth = (G4int)fHistory.GetDepth();
|
||||
if( depth > 0 )
|
||||
{
|
||||
fExitNormalGlobalFrame = fHistory.GetTransform(depth-1)
|
||||
@@ -1311,7 +1304,7 @@ void G4Navigator::ResetState()
|
||||
//
|
||||
void G4Navigator::SetupHierarchy()
|
||||
{
|
||||
const G4int depth = fHistory.GetDepth();
|
||||
const G4int depth = (G4int)fHistory.GetDepth();
|
||||
for ( auto i = 1; i <= depth; ++i )
|
||||
{
|
||||
switch ( fHistory.GetVolumeType(i) )
|
||||
@@ -1943,7 +1936,7 @@ G4TouchableHistoryHandle G4Navigator::CreateTouchableHistoryHandle() const
|
||||
//
|
||||
void G4Navigator::PrintState() const
|
||||
{
|
||||
G4int oldcoutPrec = G4cout.precision(4);
|
||||
G4long oldcoutPrec = G4cout.precision(4);
|
||||
if( fVerbose >= 4 )
|
||||
{
|
||||
G4cout << "The current state of G4Navigator is: " << G4endl;
|
||||
@@ -2031,8 +2024,8 @@ void G4Navigator::ComputeStepLog(const G4ThreeVector& pGlobalpoint,
|
||||
|
||||
if( diffShiftSaf > fAccuracyForWarning )
|
||||
{
|
||||
G4int oldcoutPrec = G4cout.precision(8);
|
||||
G4int oldcerrPrec = G4cerr.precision(10);
|
||||
G4long oldcoutPrec = G4cout.precision(8);
|
||||
G4long oldcerrPrec = G4cerr.precision(10);
|
||||
std::ostringstream message, suggestion;
|
||||
message << "Accuracy error or slightly inaccurate position shift."
|
||||
<< G4endl
|
||||
@@ -2142,7 +2135,7 @@ std::ostream& operator << (std::ostream &os,const G4Navigator &n)
|
||||
|
||||
// Adapted from G4Navigator::PrintState() const
|
||||
|
||||
G4int oldcoutPrec = os.precision(4);
|
||||
G4long oldcoutPrec = os.precision(4);
|
||||
if( n.fVerbose >= 4 )
|
||||
{
|
||||
os << "The current state of G4Navigator is: " << G4endl;
|
||||
|
||||
@@ -80,7 +80,7 @@ G4NormalNavigation::ComputeStep(const G4ThreeVector& localPoint,
|
||||
G4ThreeVector sampleDirection;
|
||||
G4double ourStep = currentProposedStepLength, ourSafety;
|
||||
G4double motherSafety, motherStep = DBL_MAX;
|
||||
G4int localNoDaughters, sampleNo;
|
||||
G4long localNoDaughters, sampleNo;
|
||||
G4bool motherValidExitNormal = false;
|
||||
G4ThreeVector motherExitNormal;
|
||||
|
||||
@@ -337,7 +337,7 @@ G4double G4NormalNavigation::ComputeSafety(const G4ThreeVector& localPoint,
|
||||
G4LogicalVolume *motherLogical;
|
||||
G4VSolid *motherSolid;
|
||||
G4double motherSafety, ourSafety;
|
||||
G4int localNoDaughters, sampleNo;
|
||||
G4long localNoDaughters, sampleNo;
|
||||
|
||||
motherPhysical = history.GetTopVolume();
|
||||
motherLogical = motherPhysical->GetLogicalVolume();
|
||||
|
||||
@@ -96,7 +96,7 @@ G4double G4ParameterisedNavigation::
|
||||
|
||||
G4bool initialNode, noStep;
|
||||
G4SmartVoxelNode *curVoxelNode;
|
||||
G4int curNoVolumes, contentNo;
|
||||
G4long curNoVolumes, contentNo;
|
||||
G4double voxelSafety;
|
||||
|
||||
// Replication data
|
||||
@@ -227,7 +227,7 @@ G4double G4ParameterisedNavigation::
|
||||
|
||||
for ( contentNo=curNoVolumes-1; contentNo>=0; contentNo-- )
|
||||
{
|
||||
sampleNo = curVoxelNode->GetVolume(contentNo);
|
||||
sampleNo = curVoxelNode->GetVolume((G4int)contentNo);
|
||||
if ( !fBList.IsBlocked(sampleNo) )
|
||||
{
|
||||
fBList.BlockVolume(sampleNo);
|
||||
@@ -270,7 +270,7 @@ G4double G4ParameterisedNavigation::
|
||||
EInside insideIntPt = sampleSolid->Inside(intersectionPoint);
|
||||
if( insideIntPt != kSurface )
|
||||
{
|
||||
G4int oldcoutPrec = G4cout.precision(16);
|
||||
G4long oldcoutPrec = G4cout.precision(16);
|
||||
std::ostringstream message;
|
||||
message << "Navigator gets conflicting response from Solid."
|
||||
<< G4endl
|
||||
@@ -405,7 +405,7 @@ G4ParameterisedNavigation::ComputeSafety(const G4ThreeVector& localPoint,
|
||||
G4int sampleNo, curVoxelNodeNo;
|
||||
|
||||
G4SmartVoxelNode *curVoxelNode;
|
||||
G4int curNoVolumes, contentNo;
|
||||
G4long curNoVolumes, contentNo;
|
||||
G4double voxelSafety;
|
||||
|
||||
// Replication data
|
||||
@@ -456,7 +456,7 @@ G4ParameterisedNavigation::ComputeSafety(const G4ThreeVector& localPoint,
|
||||
|
||||
for ( contentNo=curNoVolumes-1; contentNo>=0; contentNo-- )
|
||||
{
|
||||
sampleNo = curVoxelNode->GetVolume(contentNo);
|
||||
sampleNo = curVoxelNode->GetVolume((G4int)contentNo);
|
||||
|
||||
// Call virtual methods, and copy information if needed
|
||||
//
|
||||
@@ -503,7 +503,7 @@ ComputeVoxelSafety(const G4ThreeVector& localPoint,
|
||||
|
||||
G4double voxelSafety, plusVoxelSafety, minusVoxelSafety;
|
||||
G4double curNodeOffset, minCurCommonDelta, maxCurCommonDelta;
|
||||
G4int minCurNodeNoDelta, maxCurNodeNoDelta;
|
||||
G4long minCurNodeNoDelta, maxCurNodeNoDelta;
|
||||
|
||||
// Compute linear intersection distance to boundaries of max/min
|
||||
// to collected nodes at current level
|
||||
@@ -624,7 +624,7 @@ G4ParameterisedNavigation::LevelLocate( G4NavigationHistory& history,
|
||||
//
|
||||
motherVoxelNode = ParamVoxelLocate(motherVoxelHeader,localPoint);
|
||||
|
||||
voxelNoDaughters = motherVoxelNode->GetNoContained();
|
||||
voxelNoDaughters = (G4int)motherVoxelNode->GetNoContained();
|
||||
if ( voxelNoDaughters==0 ) { return false; }
|
||||
|
||||
pPhysical = motherLogical->GetDaughter(0);
|
||||
|
||||
@@ -69,7 +69,7 @@ GetTranslation(const G4int copyNo ) const
|
||||
{
|
||||
CheckCopyNo( copyNo );
|
||||
|
||||
size_t nx, ny, nz;
|
||||
std::size_t nx, ny, nz;
|
||||
ComputeVoxelIndices( copyNo, nx, ny, nz );
|
||||
|
||||
G4ThreeVector trans( (2*nx+1)*fVoxelHalfX - fContainerWallX,
|
||||
@@ -92,7 +92,7 @@ ComputeMaterial( const G4int copyNo, G4VPhysicalVolume*, const G4VTouchable* )
|
||||
|
||||
//------------------------------------------------------------------
|
||||
size_t G4PartialPhantomParameterisation::
|
||||
GetMaterialIndex( size_t copyNo ) const
|
||||
GetMaterialIndex( std::size_t copyNo ) const
|
||||
{
|
||||
CheckCopyNo( copyNo );
|
||||
|
||||
@@ -104,16 +104,16 @@ GetMaterialIndex( size_t copyNo ) const
|
||||
|
||||
//------------------------------------------------------------------
|
||||
size_t G4PartialPhantomParameterisation::
|
||||
GetMaterialIndex( size_t nx, size_t ny, size_t nz ) const
|
||||
GetMaterialIndex( std::size_t nx, std::size_t ny, std::size_t nz ) const
|
||||
{
|
||||
size_t copyNo = nx + fNoVoxelsX*ny + fNoVoxelsXY*nz;
|
||||
std::size_t copyNo = nx + fNoVoxelsX*ny + fNoVoxelsXY*nz;
|
||||
return GetMaterialIndex( copyNo );
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
G4Material* G4PartialPhantomParameterisation::
|
||||
GetMaterial( size_t nx, size_t ny, size_t nz) const
|
||||
GetMaterial( std::size_t nx, std::size_t ny, std::size_t nz) const
|
||||
{
|
||||
return fMaterials[GetMaterialIndex(nx,ny,nz)];
|
||||
}
|
||||
@@ -121,7 +121,7 @@ GetMaterial( size_t nx, size_t ny, size_t nz) const
|
||||
|
||||
//------------------------------------------------------------------
|
||||
G4Material* G4PartialPhantomParameterisation::
|
||||
GetMaterial( size_t copyNo ) const
|
||||
GetMaterial( std::size_t copyNo ) const
|
||||
{
|
||||
return fMaterials[GetMaterialIndex(copyNo)];
|
||||
}
|
||||
@@ -129,15 +129,15 @@ GetMaterial( size_t copyNo ) const
|
||||
|
||||
//------------------------------------------------------------------
|
||||
void G4PartialPhantomParameterisation::
|
||||
ComputeVoxelIndices(const G4int copyNo, size_t& nx,
|
||||
size_t& ny, size_t& nz ) const
|
||||
ComputeVoxelIndices(const G4int copyNo, std::size_t& nx,
|
||||
std::size_t& ny, std::size_t& nz ) const
|
||||
{
|
||||
CheckCopyNo( copyNo );
|
||||
|
||||
auto ite = fFilledIDs.lower_bound(size_t(copyNo));
|
||||
G4int dist = std::distance( fFilledIDs.cbegin(), ite );
|
||||
nz = size_t( dist/fNoVoxelsY );
|
||||
ny = size_t( dist%fNoVoxelsY );
|
||||
auto ite = fFilledIDs.lower_bound(copyNo);
|
||||
G4long dist = std::distance( fFilledIDs.cbegin(), ite );
|
||||
nz = std::size_t( dist/fNoVoxelsY );
|
||||
ny = std::size_t( dist%fNoVoxelsY );
|
||||
|
||||
G4int ifmin = (*ite).second;
|
||||
G4int nvoxXprev;
|
||||
@@ -249,7 +249,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
}
|
||||
else if( nx >= G4int(fNoVoxelsX) )
|
||||
{
|
||||
nx = fNoVoxelsX-1;
|
||||
nx = G4int(fNoVoxelsX)-1;
|
||||
isOK = false;
|
||||
}
|
||||
if( ny < 0 )
|
||||
@@ -259,7 +259,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
}
|
||||
else if( ny >= G4int(fNoVoxelsY) )
|
||||
{
|
||||
ny = fNoVoxelsY-1;
|
||||
ny = G4int(fNoVoxelsY)-1;
|
||||
isOK = false;
|
||||
}
|
||||
if( nz < 0 )
|
||||
@@ -269,7 +269,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
}
|
||||
else if( nz >= G4int(fNoVoxelsZ) )
|
||||
{
|
||||
nz = fNoVoxelsZ-1;
|
||||
nz = G4int(fNoVoxelsZ)-1;
|
||||
isOK = false;
|
||||
}
|
||||
if( !isOK )
|
||||
@@ -289,7 +289,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
"GeomNav1002", JustWarning, message);
|
||||
}
|
||||
|
||||
G4int nyz = nz*fNoVoxelsY+ny;
|
||||
G4int nyz = G4int(nz*fNoVoxelsY+ny);
|
||||
auto ite = fFilledIDs.cbegin();
|
||||
/*
|
||||
for( ite = fFilledIDs.cbegin(); ite != fFilledIDs.cend(); ++ite )
|
||||
@@ -316,7 +316,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
void G4PartialPhantomParameterisation::CheckCopyNo( const G4int copyNo ) const
|
||||
void G4PartialPhantomParameterisation::CheckCopyNo( const G4long copyNo ) const
|
||||
{
|
||||
if( copyNo < 0 || copyNo >= G4int(fNoVoxels) )
|
||||
{
|
||||
|
||||
@@ -364,7 +364,7 @@ G4PathFinder::PrepareNewTrack( const G4ThreeVector& position,
|
||||
//
|
||||
std::vector<G4Navigator*>::iterator pNavigatorIter;
|
||||
|
||||
fNoActiveNavigators = fpTransportManager-> GetNoActiveNavigators();
|
||||
fNoActiveNavigators = (G4int)fpTransportManager-> GetNoActiveNavigators();
|
||||
if( fNoActiveNavigators > fMaxNav )
|
||||
{
|
||||
std::ostringstream message;
|
||||
@@ -1110,7 +1110,7 @@ void G4PathFinder::PrintLimited()
|
||||
{
|
||||
stepLen = fTrueMinStep; // did not limit (went as far as asked)
|
||||
}
|
||||
G4int oldPrec = G4cout.precision(9);
|
||||
G4long oldPrec = G4cout.precision(9);
|
||||
|
||||
G4cout << std::setw(5) << fCurrentStepNo << " "
|
||||
<< std::setw(5) << num << " "
|
||||
|
||||
@@ -94,9 +94,9 @@ GetTranslation(const G4int copyNo ) const
|
||||
{
|
||||
CheckCopyNo( copyNo );
|
||||
|
||||
size_t nx;
|
||||
size_t ny;
|
||||
size_t nz;
|
||||
std::size_t nx;
|
||||
std::size_t ny;
|
||||
std::size_t nz;
|
||||
|
||||
ComputeVoxelIndices( copyNo, nx, ny, nz );
|
||||
|
||||
@@ -120,15 +120,15 @@ G4Material* G4PhantomParameterisation::
|
||||
ComputeMaterial(const G4int copyNo, G4VPhysicalVolume *, const G4VTouchable *)
|
||||
{
|
||||
CheckCopyNo( copyNo );
|
||||
size_t matIndex = GetMaterialIndex(copyNo);
|
||||
std::size_t matIndex = GetMaterialIndex(copyNo);
|
||||
|
||||
return fMaterials[ matIndex ];
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
size_t G4PhantomParameterisation::
|
||||
GetMaterialIndex( size_t copyNo ) const
|
||||
std::size_t G4PhantomParameterisation::
|
||||
GetMaterialIndex( std::size_t copyNo ) const
|
||||
{
|
||||
CheckCopyNo( copyNo );
|
||||
|
||||
@@ -138,36 +138,38 @@ GetMaterialIndex( size_t copyNo ) const
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
size_t G4PhantomParameterisation::
|
||||
GetMaterialIndex( size_t nx, size_t ny, size_t nz ) const
|
||||
std::size_t G4PhantomParameterisation::
|
||||
GetMaterialIndex( std::size_t nx, std::size_t ny, std::size_t nz ) const
|
||||
{
|
||||
size_t copyNo = nx + fNoVoxelsX*ny + fNoVoxelsXY*nz;
|
||||
std::size_t copyNo = nx + fNoVoxelsX*ny + fNoVoxelsXY*nz;
|
||||
return GetMaterialIndex( copyNo );
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
G4Material*
|
||||
G4PhantomParameterisation::GetMaterial( size_t nx, size_t ny, size_t nz) const
|
||||
G4PhantomParameterisation::GetMaterial( std::size_t nx, std::size_t ny, std::size_t nz) const
|
||||
{
|
||||
return fMaterials[GetMaterialIndex(nx,ny,nz)];
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
G4Material* G4PhantomParameterisation::GetMaterial( size_t copyNo ) const
|
||||
G4Material* G4PhantomParameterisation::GetMaterial( std::size_t copyNo ) const
|
||||
{
|
||||
return fMaterials[GetMaterialIndex(copyNo)];
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
void G4PhantomParameterisation::
|
||||
ComputeVoxelIndices(const G4int copyNo, size_t& nx,
|
||||
size_t& ny, size_t& nz ) const
|
||||
ComputeVoxelIndices(const G4int copyNo, std::size_t& nx,
|
||||
std::size_t& ny, std::size_t& nz ) const
|
||||
{
|
||||
CheckCopyNo( copyNo );
|
||||
nx = size_t(copyNo%fNoVoxelsX);
|
||||
ny = size_t( (copyNo/fNoVoxelsX)%fNoVoxelsY );
|
||||
nz = size_t(copyNo/fNoVoxelsXY);
|
||||
nx = std::size_t(copyNo%fNoVoxelsX);
|
||||
ny = std::size_t( (copyNo/fNoVoxelsX)%fNoVoxelsY );
|
||||
nz = std::size_t(copyNo/fNoVoxelsXY);
|
||||
}
|
||||
|
||||
|
||||
@@ -325,7 +327,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
}
|
||||
}
|
||||
|
||||
G4int copyNo = nx + fNoVoxelsX*ny + fNoVoxelsXY*nz;
|
||||
G4int copyNo = G4int(nx + fNoVoxelsX*ny + fNoVoxelsXY*nz);
|
||||
|
||||
// Check if there are still errors
|
||||
//
|
||||
@@ -337,7 +339,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
}
|
||||
else if( nx >= G4int(fNoVoxelsX) )
|
||||
{
|
||||
nx = fNoVoxelsX-1;
|
||||
nx = G4int(fNoVoxelsX)-1;
|
||||
isOK = false;
|
||||
}
|
||||
if( ny < 0 )
|
||||
@@ -347,7 +349,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
}
|
||||
else if( ny >= G4int(fNoVoxelsY) )
|
||||
{
|
||||
ny = fNoVoxelsY-1;
|
||||
ny = G4int(fNoVoxelsY)-1;
|
||||
isOK = false;
|
||||
}
|
||||
if( nz < 0 )
|
||||
@@ -357,7 +359,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
}
|
||||
else if( nz >= G4int(fNoVoxelsZ) )
|
||||
{
|
||||
nz = fNoVoxelsZ-1;
|
||||
nz = G4int(fNoVoxelsZ)-1;
|
||||
isOK = false;
|
||||
}
|
||||
if( !isOK )
|
||||
@@ -379,7 +381,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
"GeomNav1002", JustWarning, message);
|
||||
}
|
||||
|
||||
copyNo = nx + fNoVoxelsX*ny + fNoVoxelsXY*nz;
|
||||
copyNo = G4int(nx + fNoVoxelsX*ny + fNoVoxelsXY*nz);
|
||||
}
|
||||
|
||||
return copyNo;
|
||||
@@ -387,7 +389,7 @@ GetReplicaNo( const G4ThreeVector& localPoint, const G4ThreeVector& localDir )
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
void G4PhantomParameterisation::CheckCopyNo( const G4int copyNo ) const
|
||||
void G4PhantomParameterisation::CheckCopyNo( const G4long copyNo ) const
|
||||
{
|
||||
if( copyNo < 0 || copyNo >= G4int(fNoVoxels) )
|
||||
{
|
||||
|
||||
@@ -536,7 +536,7 @@ G4PropagatorInField::printStatus( const G4FieldTrack& StartFT,
|
||||
|
||||
G4double step_len = CurrentFT.GetCurveLength() - StartFT.GetCurveLength();
|
||||
|
||||
G4int oldprec; // cout/cerr precision settings
|
||||
G4long oldprec; // cout/cerr precision settings
|
||||
|
||||
if( ((stepNo == 0) && (verboseLevel <3)) || (verboseLevel >= 3) )
|
||||
{
|
||||
@@ -617,7 +617,7 @@ G4PropagatorInField::PrintStepLengthDiagnostic(
|
||||
G4double stepTrial,
|
||||
const G4FieldTrack& )
|
||||
{
|
||||
G4int iprec= G4cout.precision(8);
|
||||
G4long iprec= G4cout.precision(8);
|
||||
G4cout << " " << std::setw(12) << " PiF: NoZeroStep "
|
||||
<< " " << std::setw(20) << " CurrentProposed len "
|
||||
<< " " << std::setw(18) << " Full_curvelen_last"
|
||||
|
||||
@@ -156,7 +156,7 @@ G4double G4RegularNavigation::ComputeStepSkippingEqualMaterials(
|
||||
// To get replica No: transform local point to the reference system of the
|
||||
// param container volume
|
||||
//
|
||||
G4int ide = history.GetDepth();
|
||||
G4int ide = (G4int)history.GetDepth();
|
||||
G4ThreeVector containerPoint = history.GetTransform(ide)
|
||||
.InverseTransformPoint(localPoint);
|
||||
|
||||
|
||||
@@ -770,7 +770,7 @@ G4ReplicaNavigation::ComputeStep(const G4ThreeVector& globalPoint,
|
||||
G4double ourStep=currentProposedStepLength;
|
||||
G4double ourSafety=kInfinity;
|
||||
G4double sampleStep, sampleSafety, motherStep, motherSafety;
|
||||
G4int localNoDaughters, sampleNo;
|
||||
G4long localNoDaughters, sampleNo;
|
||||
G4int depth;
|
||||
G4ExitNormal exitNormalStc;
|
||||
// G4int depthDeterminingStep= -1; // Useful only for debugging - for now
|
||||
@@ -803,7 +803,7 @@ G4ReplicaNavigation::ComputeStep(const G4ThreeVector& globalPoint,
|
||||
history.GetTopReplicaNo(),
|
||||
localPoint);
|
||||
G4ExitNormal normalOutStc;
|
||||
const G4int topDepth= history.GetDepth();
|
||||
const G4int topDepth= (G4int)history.GetDepth();
|
||||
|
||||
ourSafety = std::min( ourSafety, sampleSafety);
|
||||
|
||||
@@ -1034,7 +1034,7 @@ G4ReplicaNavigation::ComputeStep(const G4ThreeVector& globalPoint,
|
||||
localNoDaughters = repLogical->GetNoDaughters();
|
||||
for ( sampleNo=localNoDaughters-1; sampleNo>=0; sampleNo-- )
|
||||
{
|
||||
samplePhysical = repLogical->GetDaughter(sampleNo);
|
||||
samplePhysical = repLogical->GetDaughter((G4int)sampleNo);
|
||||
if ( samplePhysical!=blockedExitedVol )
|
||||
{
|
||||
G4ThreeVector localExitNorm;
|
||||
@@ -1066,7 +1066,7 @@ G4ReplicaNavigation::ComputeStep(const G4ThreeVector& globalPoint,
|
||||
entering = true;
|
||||
exiting = false;
|
||||
*pBlockedPhysical = samplePhysical;
|
||||
blockedReplicaNo = sampleNo;
|
||||
blockedReplicaNo = (G4int)sampleNo;
|
||||
|
||||
#ifdef DAUGHTER_NORMAL_ALSO
|
||||
// This norm can be calculated later, if needed daughter is available
|
||||
@@ -1086,7 +1086,7 @@ G4ReplicaNavigation::ComputeStep(const G4ThreeVector& globalPoint,
|
||||
EInside insideIntPt = sampleSolid->Inside(intersectionPoint);
|
||||
if ( insideIntPt != kSurface )
|
||||
{
|
||||
G4int oldcoutPrec = G4cout.precision(16);
|
||||
G4long oldcoutPrec = G4cout.precision(16);
|
||||
std::ostringstream message;
|
||||
message << "Navigator gets conflicting response from Solid."
|
||||
<< G4endl
|
||||
@@ -1161,7 +1161,7 @@ G4ReplicaNavigation::ComputeSafety(const G4ThreeVector& globalPoint,
|
||||
G4ThreeVector repPoint;
|
||||
G4double ourSafety = kInfinity;
|
||||
G4double sampleSafety;
|
||||
G4int localNoDaughters, sampleNo;
|
||||
G4long localNoDaughters, sampleNo;
|
||||
G4int depth;
|
||||
|
||||
repPhysical = history.GetTopVolume();
|
||||
@@ -1179,7 +1179,7 @@ G4ReplicaNavigation::ComputeSafety(const G4ThreeVector& globalPoint,
|
||||
ourSafety = sampleSafety;
|
||||
}
|
||||
|
||||
depth = history.GetDepth()-1;
|
||||
depth = (G4int)history.GetDepth()-1;
|
||||
|
||||
// Loop checking, 07.10.2016, JA -- need to add: assert(depth>0)
|
||||
while ( history.GetVolumeType(depth)==kReplica )
|
||||
@@ -1212,7 +1212,7 @@ G4ReplicaNavigation::ComputeSafety(const G4ThreeVector& globalPoint,
|
||||
localNoDaughters = repLogical->GetNoDaughters();
|
||||
for ( sampleNo=localNoDaughters-1; sampleNo>=0; sampleNo-- )
|
||||
{
|
||||
samplePhysical = repLogical->GetDaughter(sampleNo);
|
||||
samplePhysical = repLogical->GetDaughter((G4int)sampleNo);
|
||||
if ( samplePhysical!=blockedExitedVol )
|
||||
{
|
||||
G4AffineTransform sampleTf(samplePhysical->GetRotation(),
|
||||
@@ -1250,7 +1250,7 @@ G4ReplicaNavigation::BackLocate(G4NavigationHistory& history,
|
||||
G4int mdepth, depth, cdepth;
|
||||
EInside insideCode;
|
||||
|
||||
cdepth = history.GetDepth();
|
||||
cdepth = (G4int)history.GetDepth();
|
||||
|
||||
// Find non replicated mother
|
||||
//
|
||||
|
||||
@@ -103,7 +103,7 @@ G4VIntersectionLocator::printStatus( const G4FieldTrack& StartFT,
|
||||
const G4ThreeVector CurrentUnitVelocity = CurrentFT.GetMomentumDir();
|
||||
|
||||
G4double step_len = CurrentFT.GetCurveLength() - StartFT.GetCurveLength();
|
||||
G4int oldprc; // cout/cerr precision settings
|
||||
G4long oldprc; // cout/cerr precision settings
|
||||
|
||||
if( ((stepNo == 0) && (verboseLevel <3)) || (verboseLevel >= 3) )
|
||||
{
|
||||
@@ -789,7 +789,7 @@ ReportReversedPoints( std::ostringstream& msg,
|
||||
<< " Point B' (end) is " << B_PtVel << G4endl;
|
||||
msg << " fEpsStep= " << epsStep << G4endl << G4endl;
|
||||
|
||||
G4int oldprc = msg.precision(20);
|
||||
G4long oldprc = msg.precision(20);
|
||||
msg << " In full precision, the position, momentum, E_kin, length, rest mass "
|
||||
<< " ... are: " << G4endl;
|
||||
msg << " Point A[0] (Curve start) is " << StartPointVel << G4endl
|
||||
|
||||
@@ -107,7 +107,7 @@ G4VoxelNavigation::ComputeStep( const G4ThreeVector& localPoint,
|
||||
|
||||
G4bool initialNode, noStep;
|
||||
G4SmartVoxelNode *curVoxelNode;
|
||||
G4int curNoVolumes, contentNo;
|
||||
G4long curNoVolumes, contentNo;
|
||||
G4double voxelSafety;
|
||||
|
||||
motherPhysical = history.GetTopVolume();
|
||||
@@ -164,7 +164,7 @@ G4VoxelNavigation::ComputeStep( const G4ThreeVector& localPoint,
|
||||
}
|
||||
#endif
|
||||
|
||||
localNoDaughters = motherLogical->GetNoDaughters();
|
||||
localNoDaughters = (G4int)motherLogical->GetNoDaughters();
|
||||
|
||||
fBList.Enlarge(localNoDaughters);
|
||||
fBList.Reset();
|
||||
@@ -178,7 +178,7 @@ G4VoxelNavigation::ComputeStep( const G4ThreeVector& localPoint,
|
||||
curNoVolumes = curVoxelNode->GetNoContained();
|
||||
for (contentNo=curNoVolumes-1; contentNo>=0; contentNo--)
|
||||
{
|
||||
sampleNo = curVoxelNode->GetVolume(contentNo);
|
||||
sampleNo = curVoxelNode->GetVolume((G4int)contentNo);
|
||||
if ( !fBList.IsBlocked(sampleNo) )
|
||||
{
|
||||
fBList.BlockVolume(sampleNo);
|
||||
@@ -601,7 +601,7 @@ G4VoxelNavigation::LocateNextVoxel(const G4ThreeVector& localPoint,
|
||||
++fVoxelDepth;
|
||||
newHeader = newProxy->GetHeader();
|
||||
newHeaderAxis = newHeader->GetAxis();
|
||||
newHeaderNoSlices = newHeader->GetNoSlices();
|
||||
newHeaderNoSlices = (G4int)newHeader->GetNoSlices();
|
||||
newHeaderMin = newHeader->GetMinExtent();
|
||||
newHeaderNodeWidth = (newHeader->GetMaxExtent()-newHeaderMin)
|
||||
/ newHeaderNoSlices;
|
||||
@@ -651,7 +651,7 @@ G4VoxelNavigation::ComputeSafety(const G4ThreeVector& localPoint,
|
||||
G4double motherSafety, ourSafety;
|
||||
G4int sampleNo;
|
||||
G4SmartVoxelNode *curVoxelNode;
|
||||
G4int curNoVolumes, contentNo;
|
||||
G4long curNoVolumes, contentNo;
|
||||
G4double voxelSafety;
|
||||
|
||||
motherPhysical = history.GetTopVolume();
|
||||
@@ -731,7 +731,7 @@ G4VoxelNavigation::ComputeSafety(const G4ThreeVector& localPoint,
|
||||
|
||||
for ( contentNo=curNoVolumes-1; contentNo>=0; contentNo-- )
|
||||
{
|
||||
sampleNo = curVoxelNode->GetVolume(contentNo);
|
||||
sampleNo = curVoxelNode->GetVolume((G4int)contentNo);
|
||||
samplePhysical = motherLogical->GetDaughter(sampleNo);
|
||||
|
||||
G4AffineTransform sampleTf(samplePhysical->GetRotation(),
|
||||
|
||||
@@ -135,7 +135,7 @@ G4VoxelSafety::ComputeSafety(const G4ThreeVector& localPoint,
|
||||
<< ", to be considered as 'mother safety'." << G4endl;
|
||||
}
|
||||
#endif
|
||||
localNoDaughters = motherLogical->GetNoDaughters();
|
||||
localNoDaughters = (G4int)motherLogical->GetNoDaughters();
|
||||
|
||||
fBlockList.Enlarge(localNoDaughters);
|
||||
fBlockList.Reset();
|
||||
@@ -160,7 +160,8 @@ G4VoxelSafety::SafetyForVoxelNode( const G4SmartVoxelNode* curVoxelNode,
|
||||
{
|
||||
G4double ourSafety = DBL_MAX;
|
||||
|
||||
G4int curNoVolumes, contentNo, sampleNo;
|
||||
G4long curNoVolumes, contentNo;
|
||||
G4int sampleNo;
|
||||
G4VPhysicalVolume* samplePhysical;
|
||||
|
||||
G4double sampleSafety = 0.0;
|
||||
@@ -171,7 +172,7 @@ G4VoxelSafety::SafetyForVoxelNode( const G4SmartVoxelNode* curVoxelNode,
|
||||
|
||||
for ( contentNo=curNoVolumes-1; contentNo>=0; contentNo-- )
|
||||
{
|
||||
sampleNo = curVoxelNode->GetVolume(contentNo);
|
||||
sampleNo = curVoxelNode->GetVolume((G4int)contentNo);
|
||||
if ( !fBlockList.IsBlocked(sampleNo) )
|
||||
{
|
||||
fBlockList.BlockVolume(sampleNo);
|
||||
@@ -235,7 +236,7 @@ G4VoxelSafety::SafetyForVoxelHeader( const G4SmartVoxelHeader* pHeader,
|
||||
// fVoxelDepth set by ComputeSafety or previous level call
|
||||
|
||||
targetHeaderAxis = targetVoxelHeader->GetAxis();
|
||||
targetHeaderNoSlices = targetVoxelHeader->GetNoSlices();
|
||||
targetHeaderNoSlices = (G4int)targetVoxelHeader->GetNoSlices();
|
||||
targetHeaderMin = targetVoxelHeader->GetMinExtent();
|
||||
targetHeaderMax = targetVoxelHeader->GetMaxExtent();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user