Import Geant4 11.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2024-12-06 11:11:40 +01:00
parent e58e650b32
commit 32390e802b
1984 changed files with 98713 additions and 83996 deletions
@@ -333,7 +333,7 @@ protected:
reactionPerTrack = it->second;
}
reactionPerTrack->AddReaction(reaction);
reactionPerTrack->AddReaction(std::move(reaction));
}
G4ITReactionPerTrackMap fReactionPerTrack;
G4ITReactionPerTime fReactionPerTime;
@@ -77,7 +77,7 @@ template<typename PointT>
G4KDNode_Base* G4KDTree::Insert(PointT* pos)
{
G4KDNode_Base* node = nullptr;
if (!fRoot)
if ((fRoot == nullptr) || !(fRoot->IsValid()))
{
fRoot = new G4KDNode<PointT>(this, pos, nullptr);
node = fRoot;
@@ -57,7 +57,7 @@ OCTREE::G4Octree(Iterator begin, Iterator end)
template <OCTREE_TEMPLATE>
OCTREE::G4Octree(Iterator begin, Iterator end, Extractor f)
: functor_(f),head_(nullptr),size_(0)
: functor_(std::move(f)),head_(nullptr),size_(0)
{
std::vector<std::pair<Iterator,Point>> v;
for(auto it=begin;it!=end;++it)
@@ -178,7 +178,7 @@ void G4OctreeFinder<T,CONTAINER>::FindNearestInRange(const G4Track& track,
std::sort(tempResult.begin(),tempResult.end(),fExtractor.compareInterval);
}
result = tempResult;
result = std::move(tempResult);
}
template<class T,typename CONTAINER>
@@ -210,7 +210,7 @@ void G4OctreeFinder<T,CONTAINER>::FindNearest(const G4Track& track,
std::sort(tempResult.begin(),tempResult.end(),fExtractor.compareInterval);
}
result = tempResult;
result = std::move(tempResult);
}
@@ -147,7 +147,7 @@ public:
void SetTrackState(void* adress, G4VTrackStateHandle state)
{
fMultipleTrackStates[adress] = state;
fMultipleTrackStates[adress] = std::move(state);
}
G4VTrackStateHandle GetTrackState(void* adress) const
@@ -243,7 +243,7 @@ public:
virtual void SetTrackState(G4shared_ptr<StateType> state)
{
fpTrackState = state;
fpTrackState = std::move(state);
}
G4VTrackStateHandle PopTrackState() override
@@ -228,8 +228,7 @@ inline
void G4TrackingInformation::RecordProcessState(G4shared_ptr<G4ProcessState_Lock> state,
size_t index)
{
// G4cout << "G4TrackingInformation::RecordProcessState" << G4endl;
fProcessState[index] = state;
fProcessState[index] = std::move(state);
}
inline G4double G4TrackingInformation::GetPreStepGlobalTime() const