Import Geant4 10.3.1 source tree

This commit is contained in:
Gabriele Cosmo
2017-02-28 16:16:20 +01:00
parent a3452e42ac
commit 4597adb7c4
267 changed files with 14761 additions and 24650 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4IT.cc 94218 2015-11-09 08:24:48Z gcosmo $
// $Id: G4IT.cc 102637 2017-02-10 11:08:17Z gcosmo $
//
// Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
//
@@ -56,20 +56,25 @@ G4IT* GetIT(const G4Track& track)
return (dynamic_cast<G4IT*>(track.GetUserInformation()));
}
template<>
G4KDNode<G4IT>::~G4KDNode(){
fPoint->SetNode(nullptr);
}
//------------------------------------------------------------------------------
//
// Constructors / Destructors
//
G4IT::G4IT() :
G4VUserTrackInformation("G4IT"),
fpTrack(0),
fpPreviousIT(0),
fpNextIT(0),
fpTrack(nullptr),
fpPreviousIT(nullptr),
fpNextIT(nullptr),
fpTrackingInformation(new G4TrackingInformation())
{
fpITBox = 0;
fpKDNode = 0;
fpTrackNode = 0;
fpITBox = nullptr;
fpKDNode = nullptr;
fpTrackNode = nullptr;
fParentID_A = 0;
fParentID_B = 0;
}
@@ -77,14 +82,14 @@ G4IT::G4IT() :
// Use only by inheriting classes
G4IT::G4IT(const G4IT& /*right*/) :
G4VUserTrackInformation("G4IT"),
fpTrack(0),
fpPreviousIT(0),
fpNextIT(0),
fpTrack(nullptr),
fpPreviousIT(nullptr),
fpNextIT(nullptr),
fpTrackingInformation(new G4TrackingInformation())
{
fpITBox = 0;
fpKDNode = 0;
fpTrackNode = 0;
fpITBox = nullptr;
fpKDNode = nullptr;
fpTrackNode = nullptr;
fParentID_A = 0;
fParentID_B = 0;
}
@@ -104,15 +109,15 @@ G4IT& G4IT::operator=(const G4IT& right)
if (this == &right) return *this;
fpTrack = 0;
fpITBox = 0;
fpPreviousIT = 0;
fpNextIT = 0;
fpKDNode = 0;
fpTrack = nullptr;
fpITBox = nullptr;
fpPreviousIT = nullptr;
fpNextIT = nullptr;
fpKDNode = nullptr;
fParentID_A = 0;
fParentID_B = 0;
fpTrackingInformation = 0;
fpTrackNode = 0;
fpTrackingInformation = nullptr;
fpTrackNode = nullptr;
return *this;
}
@@ -125,8 +130,8 @@ G4IT::G4IT(G4Track * aTrack) :
{
fpITBox = 0;
fpTrack = aTrack;
fpKDNode = 0;
fpTrackNode = 0;
fpKDNode = nullptr;
fpTrackNode = nullptr;
fParentID_A = 0;
fParentID_B = 0;
RecordCurrentPositionNTime();
@@ -137,18 +142,19 @@ void G4IT::TakeOutBox()
if(fpITBox)
{
fpITBox->Extract(this);
fpITBox = nullptr;
}
if(fpTrackNode)
{
delete fpTrackNode;
fpTrackNode = 0;
fpTrackNode = nullptr;
}
if(fpKDNode)
{
InactiveNode(fpKDNode);
fpKDNode = 0;
fpKDNode = nullptr;
}
}
@@ -159,7 +165,7 @@ G4IT::~G4IT()
if(fpTrackingInformation)
{
delete fpTrackingInformation;
fpTrackingInformation = 0;
fpTrackingInformation = nullptr;
}
// Note :
@@ -199,8 +205,6 @@ G4bool G4IT::operator!=(const G4IT& right) const
return !(this->operator==(right));
}
double G4IT::operator[](int i) const
{
return fpTrack->GetPosition()[i];
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ITTrackingManager.cc 91584 2015-07-27 13:01:48Z gcosmo $
// $Id: G4ITTrackingManager.cc 102637 2017-02-10 11:08:17Z gcosmo $
//
// Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
//
@@ -96,7 +96,7 @@ void G4ITTrackingManager::EndTracking(G4Track* track)
fpTrackingInteractivity->GetSteppingVerbose()->TrackingEnded(track);
#endif
}
G4TrackList::Pop(track);
G4ITTrackHolder::Instance()->PushToKill(track);
}
@@ -53,10 +53,10 @@ int __1DSortOut::GetDimension()
return fSortOutNDim.fDimension;
}
G4KDNode_Base* __1DSortOut::GetMidle(int& main_middle)
G4KDNode_Base* __1DSortOut::GetMidle(size_t& main_middle)
{
int contSize = fContainer.size();
main_middle = (int) ceil(contSize / 2.); // ceil = round up
size_t contSize = fContainer.size();
main_middle = (size_t) ceil(contSize / 2.); // ceil = round up
return fContainer[main_middle];
}
@@ -67,7 +67,7 @@ _deq_iterator __1DSortOut::Insert(G4KDNode_Base* pos)
G4KDNode_Base* __1DSortOut::PopOutMiddle()
{
int middle;
size_t middle;
G4KDNode_Base* pos = GetMidle(middle);
_deq_iterator deq_pos = fContainer.begin() + middle;
@@ -57,15 +57,15 @@
void InactiveNode(G4KDNode_Base* node)
{
if(!node) return ;
node->InactiveNode() ;
if(node == nullptr) return;
// if(node->IsValid())
node->InactiveNode();
}
void Free(G4KDNode_Base*& node)
{
if(node)
delete node ;
node = 0;
if(node) delete node;
node = nullptr;
}
//______________________________________________________________________
@@ -74,8 +74,8 @@ G4KDNode_Base::G4KDNode_Base(G4KDTree* tree,
fTree(tree),
fLeft(0), fRight(0), fParent(parent)
{
fSide = 0;
fAxis = fParent == 0? 0 : fParent->fAxis +1 < fTree->fDim? fParent->fAxis+1:0;
fSide = 0;
fAxis = fParent == 0? 0 : fParent->fAxis +1 < fTree->fDim? fParent->fAxis+1:0;
}
// Copy constructor should not be used
@@ -83,8 +83,8 @@ G4KDNode_Base::G4KDNode_Base(const G4KDNode_Base& ):
fTree(0),
fLeft(0), fRight(0), fParent(0)
{
fSide = 0;
fAxis = 0;
fSide = 0;
fAxis = 0;
}
// Assignement should not be used