Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -982,6 +982,7 @@ G4double G4ITNavigator2::ComputeStep( const G4ThreeVector &pGlobalpoint,
|
||||
case kNormal:
|
||||
if ( motherLogical->GetVoxelHeader() )
|
||||
{
|
||||
LocateGlobalPointWithinVolume(pGlobalpoint);
|
||||
Step = fvoxelNav.ComputeStep(fLastLocatedPointLocal,
|
||||
localDirection,
|
||||
pCurrentProposedStepLength,
|
||||
@@ -1980,6 +1981,7 @@ G4double G4ITNavigator2::ComputeSafety( const G4ThreeVector &pGlobalpoint,
|
||||
newSafety= safetyTwo; // Faster and best available
|
||||
#else
|
||||
G4double safetyOldVoxel;
|
||||
LocateGlobalPointWithinVolume(pGlobalpoint);
|
||||
safetyOldVoxel =
|
||||
fvoxelNav.ComputeSafety(localPoint,fHistory,pMaxLength);
|
||||
newSafety= safetyOldVoxel;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4KDTreeResult.cc 91584 2015-07-27 13:01:48Z gcosmo $
|
||||
// $Id: G4KDTreeResult.cc 101354 2016-11-15 08:27:51Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
|
||||
//
|
||||
@@ -37,85 +37,98 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
G4ThreadLocal G4Allocator<G4KDTreeResult> *aKDTreeAllocator= 0;
|
||||
|
||||
struct ResNode
|
||||
{
|
||||
public:
|
||||
ResNode():fNode(0),fDistanceSqr(0){;}
|
||||
ResNode(double distsqr, G4KDNode_Base* node):fNode(node),fDistanceSqr(distsqr){;}
|
||||
ResNode(const ResNode& right)
|
||||
{
|
||||
fNode = right.fNode;
|
||||
fDistanceSqr= right.fDistanceSqr;
|
||||
}
|
||||
~ResNode(){;}
|
||||
|
||||
bool operator<(const ResNode& right) const
|
||||
{
|
||||
return (fDistanceSqr < right.fDistanceSqr);
|
||||
}
|
||||
|
||||
G4KDNode_Base* GetNode() { return fNode;}
|
||||
double GetDistanceSqr() { return fDistanceSqr;}
|
||||
|
||||
ResNode():fNode(0),fDistanceSqr(0){;}
|
||||
ResNode(double distsqr, G4KDNode_Base* node):
|
||||
fNode(node),fDistanceSqr(distsqr)
|
||||
{;}
|
||||
|
||||
ResNode(const ResNode& right)
|
||||
{
|
||||
fNode = right.fNode;
|
||||
fDistanceSqr= right.fDistanceSqr;
|
||||
}
|
||||
ResNode& operator=(const ResNode& rhs)
|
||||
{
|
||||
if(this == &rhs) return *this;
|
||||
fNode = rhs.fNode;
|
||||
fDistanceSqr= rhs.fDistanceSqr;
|
||||
return *this;
|
||||
}
|
||||
~ResNode(){;}
|
||||
|
||||
bool operator<(const ResNode& right) const
|
||||
{
|
||||
return (fDistanceSqr < right.fDistanceSqr);
|
||||
}
|
||||
|
||||
G4KDNode_Base* GetNode() { return fNode;}
|
||||
double GetDistanceSqr() { return fDistanceSqr;}
|
||||
|
||||
protected:
|
||||
G4KDNode_Base* fNode;
|
||||
double fDistanceSqr;
|
||||
|
||||
private:
|
||||
ResNode& operator=(const ResNode& rhs)
|
||||
{
|
||||
if(this == &rhs) return *this;
|
||||
fNode = rhs.fNode;
|
||||
fDistanceSqr= rhs.fDistanceSqr;
|
||||
return *this;
|
||||
}
|
||||
G4KDNode_Base* fNode;
|
||||
double fDistanceSqr;
|
||||
};
|
||||
|
||||
// comparison
|
||||
bool CompareResNode(const ResNode& left, const ResNode& right)
|
||||
bool CompareResNode(const ResNode& left,
|
||||
const ResNode& right)
|
||||
{
|
||||
return left < right;
|
||||
}
|
||||
|
||||
G4KDTreeResult::G4KDTreeResult(G4KDTree* tree) : std::list<ResNode>()
|
||||
G4KDTreeResult::G4KDTreeResult(G4KDTree* tree) :
|
||||
//std::list<ResNode>()
|
||||
KDTR_parent()
|
||||
{
|
||||
fTree = tree;
|
||||
}
|
||||
|
||||
G4KDTreeResult::~G4KDTreeResult()
|
||||
{
|
||||
std::list<ResNode>::erase(begin(),end());
|
||||
KDTR_parent::erase(begin(),end());
|
||||
//std::list<ResNode>::erase(begin(),end());
|
||||
}
|
||||
|
||||
void G4KDTreeResult::Insert(double dis_sq, G4KDNode_Base* node)
|
||||
{
|
||||
std::list<ResNode>::push_back(ResNode(dis_sq,node));
|
||||
//std::list<ResNode>::push_back(ResNode(dis_sq,node));
|
||||
KDTR_parent::push_back(ResNode(dis_sq,node));
|
||||
}
|
||||
|
||||
void G4KDTreeResult::Clear()
|
||||
{
|
||||
std::list<ResNode>::erase(begin(),end());
|
||||
fIterator = std::list<ResNode>::begin();
|
||||
// std::list<ResNode>::erase(begin(),end());
|
||||
// fIterator = std::list<ResNode>::begin();
|
||||
KDTR_parent::erase(begin(),end());
|
||||
fIterator = KDTR_parent::begin();
|
||||
}
|
||||
|
||||
void G4KDTreeResult::Sort()
|
||||
{
|
||||
std::list<ResNode>::sort(CompareResNode);
|
||||
//std::list<ResNode>::sort(CompareResNode);
|
||||
std::sort(begin(), end(), CompareResNode);
|
||||
}
|
||||
|
||||
size_t G4KDTreeResult::GetSize() const
|
||||
{
|
||||
return std::list<ResNode>::size();
|
||||
//return std::list<ResNode>::size();
|
||||
return KDTR_parent::size();
|
||||
}
|
||||
|
||||
size_t G4KDTreeResult::size() const
|
||||
{
|
||||
return std::list<ResNode>::size();
|
||||
return KDTR_parent::size();
|
||||
//return std::list<ResNode>::size();
|
||||
}
|
||||
|
||||
void G4KDTreeResult::Rewind()
|
||||
{
|
||||
fIterator = begin();
|
||||
fIterator = begin();
|
||||
}
|
||||
|
||||
bool G4KDTreeResult::End()
|
||||
@@ -125,7 +138,7 @@ bool G4KDTreeResult::End()
|
||||
|
||||
void G4KDTreeResult::Next()
|
||||
{
|
||||
fIterator++;
|
||||
++fIterator;
|
||||
}
|
||||
|
||||
double G4KDTreeResult::GetDistanceSqr() const
|
||||
|
||||
@@ -409,6 +409,8 @@ void G4Scheduler::Process()
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4bool trackFound = false;
|
||||
G4IosFlagsSaver iosfs(G4cout);
|
||||
G4cout.precision(5);
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
@@ -647,7 +649,6 @@ void G4Scheduler::DoProcess()
|
||||
|
||||
void G4Scheduler::Stepping()
|
||||
{
|
||||
G4IosFlagsSaver iosfs(G4cout);
|
||||
fTimeStep = fMaxTimeStep;
|
||||
|
||||
fTSTimeStep = DBL_MAX;
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
|
||||
int G4VTrackStateID::fgLastID = 0;
|
||||
|
||||
/*
|
||||
G4TrackStateDependent::G4TrackStateDependent() : G4VTrackStateDependent()
|
||||
{
|
||||
;
|
||||
// static function
|
||||
int G4VTrackStateID::Create() {
|
||||
return fgLastID++; // keep it on the right
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4UserTimeStepAction.cc 94289 2015-11-11 08:33:40Z gcosmo $
|
||||
// $Id: G4UserTimeStepAction.cc 100802 2016-11-02 14:55:27Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros (kara@cenbg.in2p3.fr)
|
||||
// Author: Mathieu Karamitros
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
|
||||
Reference in New Issue
Block a user