Import Geant4 10.3.1 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 100666 2016-10-31 10:27:00Z gcosmo $
|
||||
$Id: History 102545 2017-02-08 14:20:36Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,10 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
---------------------------------------------------------
|
||||
|
||||
27 Jan 2017: L. Desorgher (emadjoint-V10-02-04)
|
||||
-Correction of occurence of FPE in G4AdjointForcedInteractionForGamma.
|
||||
|
||||
27 Octb 2016: L. Desorgher (emadjoint-V10-02-03)
|
||||
-Correction in G4AdjointForcedInteractionForGamma to avoid high weight of forced gamma
|
||||
when only the brem is used.
|
||||
|
||||
@@ -172,7 +172,7 @@ G4VParticleChange* G4AdjointForcedInteractionForGamma::AlongStepDoIt(const G4Tra
|
||||
|
||||
if (is_free_flight_gamma) { //for free_flight survival probability stays 1
|
||||
//Accumulate the number of interaction lengths during free flight of gamma
|
||||
total_acc_nb_fwd_interaction_length+=nb_fwd_interaction_length_over_step;
|
||||
total_acc_nb_fwd_interaction_length+=nb_fwd_interaction_length_over_step;
|
||||
total_acc_nb_adj_interaction_length+=nb_adj_interaction_length_over_step;
|
||||
acc_track_length+=stepLength;
|
||||
}
|
||||
@@ -182,8 +182,14 @@ G4VParticleChange* G4AdjointForcedInteractionForGamma::AlongStepDoIt(const G4Tra
|
||||
acc_nb_adj_interaction_length+=nb_adj_interaction_length_over_step;
|
||||
theNumberOfInteractionLengthLeft-=nb_adj_interaction_length_over_step;
|
||||
|
||||
mc_induced_survival_probability= std::exp(-acc_nb_adj_interaction_length)-std::exp(-total_acc_nb_adj_interaction_length);
|
||||
mc_induced_survival_probability=mc_induced_survival_probability/(std::exp(-previous_acc_nb_adj_interaction_length)-std::exp(-total_acc_nb_adj_interaction_length));
|
||||
//Following condition to remove very rare FPE issue
|
||||
if (total_acc_nb_adj_interaction_length <= 1.e-50 && theNumberOfInteractionLengthLeft<=1.e-50) { //condition added to avoid FPE issue
|
||||
mc_induced_survival_probability = 1.e50;
|
||||
}
|
||||
else {
|
||||
mc_induced_survival_probability= std::exp(-acc_nb_adj_interaction_length)-std::exp(-total_acc_nb_adj_interaction_length);
|
||||
mc_induced_survival_probability=mc_induced_survival_probability/(std::exp(-previous_acc_nb_adj_interaction_length)-std::exp(-total_acc_nb_adj_interaction_length));
|
||||
}
|
||||
}
|
||||
G4double weight_correction = fwd_survival_probability/mc_induced_survival_probability;
|
||||
//weight_correction = 1.;
|
||||
|
||||
@@ -14,6 +14,18 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------*
|
||||
|
||||
09-02-2017, MK, tag emdna-V10-02-38
|
||||
- G4KDNode.hh: remove unused G4ThreeVector header
|
||||
- G4KDMap.hh: int->size_t + indentation
|
||||
- G4KDMap.cc: int->size_t
|
||||
- G4IT & G4Molecule: template specialization
|
||||
template<> G4KDNode<G4IT / G4Molecule>::~G4KDNode()
|
||||
|
||||
14-01-2017, MK, tag emdna-V10-02-37
|
||||
- Prevent a crash when calling G4ITTrackingManager::EndTracking from
|
||||
the UserTimeStepAction::PostTimeStepAction
|
||||
- Add missing: G4ITTrackingManager* G4Scheduler::GetTrackingManager()
|
||||
|
||||
27-11-2016, MK, tag emdna-V10-02-36
|
||||
- G4Electron_aq: correct charge
|
||||
- G4DNADamages -> G4DNADamage
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4IT.hh 100802 2016-11-02 14:55:27Z gcosmo $
|
||||
// $Id: G4IT.hh 102637 2017-02-10 11:08:17Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "G4ITType.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VUserTrackInformation.hh"
|
||||
#include "G4KDNode.hh"
|
||||
|
||||
///
|
||||
// To implement your own IT class, you should use
|
||||
@@ -60,6 +61,9 @@
|
||||
///
|
||||
|
||||
class G4IT;
|
||||
template<>
|
||||
G4KDNode<G4IT>::~G4KDNode();
|
||||
|
||||
class G4TrackingInformation;
|
||||
//template<typename PointT> class G4KDNode;
|
||||
class G4KDNode_Base;
|
||||
|
||||
@@ -163,7 +163,12 @@ public:
|
||||
|
||||
inline void PushToKill(G4Track* track)
|
||||
{
|
||||
G4TrackList::Pop(track);
|
||||
fToBeKilledList.push_back(track);
|
||||
|
||||
if(track->GetTrackStatus() != fKillTrackAndSecondaries){
|
||||
track->SetTrackStatus(fStopAndKill);
|
||||
}
|
||||
}
|
||||
|
||||
bool MergeNextTimeToMainList(double& time);
|
||||
|
||||
@@ -57,67 +57,67 @@ class G4KDNode_Base;
|
||||
class __1DSortOut
|
||||
{
|
||||
public :
|
||||
__1DSortOut(size_t dimension);
|
||||
__1DSortOut(const __1DSortOut& right);
|
||||
int GetDimension();
|
||||
G4KDNode_Base* GetMidle(int& /*G4KDNode_deque*/);
|
||||
__1DSortOut(size_t dimension);
|
||||
__1DSortOut(const __1DSortOut& right);
|
||||
int GetDimension();
|
||||
G4KDNode_Base* GetMidle(size_t& /*G4KDNode_deque*/);
|
||||
|
||||
std::deque<G4KDNode_Base*>::iterator Insert(G4KDNode_Base*);
|
||||
G4KDNode_Base* PopOutMiddle();
|
||||
void Sort();
|
||||
void Erase(std::deque<G4KDNode_Base*>::iterator &);
|
||||
size_t Size()
|
||||
{
|
||||
return fContainer.size();
|
||||
}
|
||||
std::deque<G4KDNode_Base*>::iterator Insert(G4KDNode_Base*);
|
||||
G4KDNode_Base* PopOutMiddle();
|
||||
void Sort();
|
||||
void Erase(std::deque<G4KDNode_Base*>::iterator &);
|
||||
size_t Size()
|
||||
{
|
||||
return fContainer.size();
|
||||
}
|
||||
|
||||
protected :
|
||||
struct sortOutNDim
|
||||
{
|
||||
sortOutNDim( size_t dimension)
|
||||
{
|
||||
fDimension = dimension;
|
||||
}
|
||||
bool operator() (G4KDNode_Base* const& lhs, G4KDNode_Base* const& rhs);
|
||||
size_t fDimension;
|
||||
};
|
||||
struct sortOutNDim
|
||||
{
|
||||
sortOutNDim( size_t dimension)
|
||||
{
|
||||
fDimension = dimension;
|
||||
}
|
||||
bool operator() (G4KDNode_Base* const& lhs, G4KDNode_Base* const& rhs);
|
||||
size_t fDimension;
|
||||
};
|
||||
|
||||
std::deque<G4KDNode_Base*> fContainer;
|
||||
sortOutNDim fSortOutNDim;
|
||||
std::deque<G4KDNode_Base*> fContainer;
|
||||
sortOutNDim fSortOutNDim;
|
||||
};
|
||||
|
||||
class G4KDMap
|
||||
{
|
||||
public:
|
||||
G4KDMap(size_t dimensions) : fSortOut(dimensions, __1DSortOut(dimensions))
|
||||
{
|
||||
G4KDMap(size_t dimensions): fSortOut(dimensions, __1DSortOut(dimensions))
|
||||
{
|
||||
fIsSorted = false;
|
||||
// for(size_t i = 0 ; i < dimensions ; i++)
|
||||
// {
|
||||
// fSortOut[i] = new __1DSortOut(i);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
void Insert(G4KDNode_Base* pos);
|
||||
void Sort();
|
||||
void Insert(G4KDNode_Base* pos);
|
||||
void Sort();
|
||||
|
||||
G4KDNode_Base* PopOutMiddle(size_t dimension);
|
||||
size_t GetDimension()
|
||||
{
|
||||
return fSortOut.size();
|
||||
}
|
||||
G4KDNode_Base* PopOutMiddle(size_t dimension);
|
||||
size_t GetDimension()
|
||||
{
|
||||
return fSortOut.size();
|
||||
}
|
||||
|
||||
size_t GetSize()
|
||||
{
|
||||
return fMap.size();
|
||||
}
|
||||
size_t GetSize()
|
||||
{
|
||||
return fMap.size();
|
||||
}
|
||||
|
||||
private:
|
||||
bool fIsSorted;
|
||||
std::vector<__1DSortOut> fSortOut;
|
||||
std::map<G4KDNode_Base*, std::vector<std::deque<G4KDNode_Base*>::iterator > > fMap;
|
||||
bool fIsSorted;
|
||||
std::vector<__1DSortOut> fSortOut;
|
||||
std::map<G4KDNode_Base*, std::vector<std::deque<G4KDNode_Base*>::iterator>> fMap;
|
||||
|
||||
// A mettre directement dans G4KDNode
|
||||
// A mettre directement dans G4KDNode
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4KDNode.hh 100802 2016-11-02 14:55:27Z gcosmo $
|
||||
// $Id: G4KDNode.hh 102637 2017-02-10 11:08:17Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros
|
||||
|
||||
@@ -51,7 +51,9 @@
|
||||
//#include <map>
|
||||
#include <vector>
|
||||
#include <deque>
|
||||
#include <G4ThreeVector.hh>
|
||||
#include <ostream>
|
||||
|
||||
// geant4
|
||||
#include <G4Allocator.hh>
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -63,7 +65,7 @@ class G4KDMap;
|
||||
class G4KDNode_Base
|
||||
{
|
||||
public:
|
||||
//________________________
|
||||
//----------------------------
|
||||
// For root node :
|
||||
// parent = 0, axis = 0, side = 0
|
||||
G4KDNode_Base(G4KDTree*, G4KDNode_Base* /*parent*/);
|
||||
@@ -72,25 +74,25 @@ public:
|
||||
virtual void InactiveNode();
|
||||
virtual bool IsValid() const{ return true; }
|
||||
|
||||
//________________________
|
||||
//----------------------------
|
||||
inline G4KDTree* GetTree() const {return fTree;}
|
||||
inline void SetTree(G4KDTree* tree) {fTree = tree;}
|
||||
|
||||
//________________________
|
||||
//----------------------------
|
||||
int GetDim() const;
|
||||
inline int GetAxis() const{return fAxis;}
|
||||
inline G4KDNode_Base* GetParent(){return fParent;}
|
||||
inline G4KDNode_Base* GetLeft(){return fLeft;}
|
||||
inline G4KDNode_Base* GetRight(){return fRight;}
|
||||
|
||||
//________________________
|
||||
//----------------------------
|
||||
template<typename Position>
|
||||
G4KDNode_Base* FindParent(const Position& x0);
|
||||
|
||||
template<typename PointT>
|
||||
G4KDNode_Base* Insert(PointT* point);
|
||||
template<typename PointT>
|
||||
G4KDNode_Base* Insert(const PointT& point);
|
||||
G4KDNode_Base* Insert(const PointT& point);
|
||||
int Insert(G4KDNode_Base* newNode);
|
||||
|
||||
void PullSubTree();
|
||||
@@ -98,8 +100,10 @@ public:
|
||||
|
||||
void Print(std::ostream& out, int level = 0) const;
|
||||
|
||||
// std::vector<std::deque<G4KDNode_Base* >::iterator >* GetIteratorsForSortingAlgo(G4KDMap*);
|
||||
// std::map<G4KDMap*, std::vector<std::deque<G4KDNode_Base* >::iterator > >* fpIteratorInSortingAlgo;
|
||||
// std::vector<std::deque<G4KDNode_Base*>::iterator>*
|
||||
// GetIteratorsForSortingAlgo(G4KDMap*);
|
||||
// std::map<G4KDMap*, std::vector<std::deque<G4KDNode_Base*>::iterator>>*
|
||||
// fpIteratorInSortingAlgo;
|
||||
|
||||
protected:
|
||||
//°°°°°°°°°°°
|
||||
@@ -132,7 +136,7 @@ template<typename PointT>
|
||||
class G4KDNode : public G4KDNode_Base
|
||||
{
|
||||
public:
|
||||
//________________________
|
||||
//----------------------------
|
||||
// For root node :
|
||||
// parent = 0, axis = 0, side = 0
|
||||
G4KDNode(G4KDTree*, PointT* /*point*/, G4KDNode_Base* /*parent*/);
|
||||
@@ -165,18 +169,18 @@ template<typename PointT>
|
||||
|
||||
protected:
|
||||
PointT* fPoint;
|
||||
G4bool fValid;
|
||||
bool fValid;
|
||||
|
||||
private:
|
||||
G4KDNode(const G4KDNode<PointT>& right);
|
||||
G4KDNode& operator=(const G4KDNode<PointT>& right);
|
||||
|
||||
static G4ThreadLocal G4Allocator<G4KDNode<PointT> >* fgAllocator;
|
||||
static G4ThreadLocal G4Allocator<G4KDNode<PointT>>* fgAllocator;
|
||||
};
|
||||
|
||||
template<typename PointT>
|
||||
G4ThreadLocal G4Allocator<G4KDNode<PointT> >* G4KDNode<PointT>::fgAllocator =
|
||||
0;
|
||||
G4ThreadLocal G4Allocator<G4KDNode<PointT>>*
|
||||
G4KDNode<PointT>::fgAllocator = 0;
|
||||
|
||||
template<typename PointT>
|
||||
void* G4KDNode<PointT>::operator new(size_t)
|
||||
@@ -191,17 +195,16 @@ template<typename PointT>
|
||||
fgAllocator->FreeSingle((G4KDNode<PointT> *) aNode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* G4KDNode stores one entity in G4KDTree
|
||||
* This class is for internal use only
|
||||
*/
|
||||
|
||||
template<typename PointCopyT>
|
||||
class G4KDNodeCopy : public G4KDNode_Base
|
||||
class G4KDNodeCopy: public G4KDNode_Base
|
||||
{
|
||||
public:
|
||||
//________________________
|
||||
//----------------------------
|
||||
// For root node :
|
||||
// parent = 0, axis = 0, side = 0
|
||||
G4KDNodeCopy(G4KDTree* tree,
|
||||
@@ -254,9 +257,9 @@ template<typename PointCopyT>
|
||||
private:
|
||||
G4KDNodeCopy(const G4KDNodeCopy<PointCopyT>& right) :
|
||||
G4KDNode_Base(right), fPoint(0)
|
||||
{
|
||||
fValid = false;
|
||||
}
|
||||
{
|
||||
fValid = false;
|
||||
}
|
||||
|
||||
G4KDNodeCopy<PointCopyT>&
|
||||
operator=(const G4KDNodeCopy<PointCopyT>& right)
|
||||
@@ -276,8 +279,8 @@ template<typename PointCopyT>
|
||||
};
|
||||
|
||||
template<typename PointT>
|
||||
G4ThreadLocal G4Allocator<G4KDNodeCopy<PointT>>* G4KDNodeCopy<PointT>::fgAllocator =
|
||||
0;
|
||||
G4ThreadLocal G4Allocator<G4KDNodeCopy<PointT>>*
|
||||
G4KDNodeCopy<PointT>::fgAllocator = 0;
|
||||
|
||||
#include "G4KDNode.icc"
|
||||
|
||||
|
||||
@@ -190,6 +190,11 @@ public:
|
||||
{
|
||||
return fMaxTimeStep;
|
||||
}
|
||||
|
||||
inline G4ITTrackingManager* GetTrackingManager() const
|
||||
{
|
||||
return fpTrackingManager;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAOneStepThermalizationModel.cc 101807 2016-11-30 13:42:28Z gunter $
|
||||
// $Id: G4DNAOneStepThermalizationModel.cc 102637 2017-02-10 11:08:17Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros
|
||||
//
|
||||
@@ -141,7 +141,7 @@ namespace DNA{ namespace Penetration{
|
||||
size_t lowBin, upBin;
|
||||
|
||||
if(k_eV >= 1.){
|
||||
lowBin=std::floor(k_eV)+1;
|
||||
lowBin=floor(k_eV)+1;
|
||||
upBin=std::min(lowBin+1, size_t(10));
|
||||
}
|
||||
else{
|
||||
@@ -183,7 +183,7 @@ namespace DNA{ namespace Penetration{
|
||||
static constexpr double factor = 2.20496999539;
|
||||
// 1./(3. - 8./CLHEP::pi);
|
||||
|
||||
double sigma1D = std::sqrt(std::pow(sigma3D, 2.)*factor);
|
||||
double sigma1D = sqrt(pow(sigma3D, 2.)*factor);
|
||||
|
||||
// G4cout << "sigma1D = " << sigma1D/CLHEP::nanometer << G4endl;
|
||||
|
||||
|
||||
@@ -75,6 +75,10 @@
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4MoleculeDefinition.hh"
|
||||
|
||||
class G4Molecule;
|
||||
template<>
|
||||
G4KDNode<G4Molecule>::~G4KDNode();
|
||||
|
||||
class G4Molecule;
|
||||
class G4MolecularConfiguration;
|
||||
class G4MoleculeDefinition;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Molecule.cc 100802 2016-11-02 14:55:27Z gcosmo $
|
||||
// $Id: G4Molecule.cc 102637 2017-02-10 11:08:17Z gcosmo $
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
@@ -66,6 +66,13 @@ G4ThreadLocal G4Allocator<G4Molecule> *aMoleculeAllocator = 0;
|
||||
|
||||
//______________________________________________________________________________
|
||||
|
||||
template<>
|
||||
G4KDNode<G4Molecule>::~G4KDNode(){
|
||||
fPoint->SetNode(nullptr);
|
||||
}
|
||||
|
||||
//______________________________________________________________________________
|
||||
|
||||
G4Molecule* GetMolecule(const G4Track& track)
|
||||
{
|
||||
return (G4Molecule*) (GetIT(track));
|
||||
@@ -152,7 +159,7 @@ G4Molecule::G4Molecule() :
|
||||
|
||||
G4Molecule::~G4Molecule()
|
||||
{
|
||||
if (fpTrack != NULL)
|
||||
if (fpTrack != nullptr)
|
||||
{
|
||||
if (G4VMoleculeCounter::Instance()->InUse())
|
||||
{
|
||||
@@ -161,9 +168,9 @@ G4Molecule::~G4Molecule()
|
||||
fpTrack->GetGlobalTime(),
|
||||
&(fpTrack->GetPosition()));
|
||||
}
|
||||
fpTrack = 0;
|
||||
fpTrack = nullptr;
|
||||
}
|
||||
fpMolecularConfiguration = 0;
|
||||
fpMolecularConfiguration = nullptr;
|
||||
}
|
||||
|
||||
//______________________________________________________________________________
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 101681 2016-11-21 09:33:05Z gcosmo $
|
||||
$Id: History 102548 2017-02-08 14:33:25Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,9 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
14 December 16: V.Ivant (emutils-V10-02-39)
|
||||
- G4EmParametersMessenger - fixed typo (#1929)
|
||||
|
||||
19 November 16: V.Ivant (emutils-V10-02-38)
|
||||
- G4EmParametersMessenger - fixed typo
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ G4EmParametersMessenger::G4EmParametersMessenger(G4EmParameters* ptr)
|
||||
fr1Cmd = new G4UIcmdWithADouble("/process/msc/RangeFactorMuHad",this);
|
||||
fr1Cmd->SetGuidance("Set RangeFactor for msc processes of muons/hadrons");
|
||||
fr1Cmd->SetParameterName("Fr1",true);
|
||||
fr1Cmd->SetRange("Fr>0");
|
||||
fr1Cmd->SetRange("Fr1>0");
|
||||
fr1Cmd->SetDefaultValue(0.2);
|
||||
fr1Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user