Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile 74059 2013-09-20 10:01:33Z gcosmo $
|
||||
# $Id: GNUmakefile 109040 2018-03-22 11:23:25Z gcosmo $
|
||||
|
||||
name := G4RayTracer
|
||||
|
||||
@@ -36,6 +36,7 @@ CPPFLAGS += -I$(G4BASE)/global/HEPRandom/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/navigation/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/volumes/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/magneticfield/include
|
||||
CPPFLAGS += -I$(G4BASE)/digits_hits/detector/include
|
||||
CPPFLAGS += -I$(G4BASE)/digits_hits/digits/include
|
||||
CPPFLAGS += -I$(G4BASE)/intercoms/include
|
||||
@@ -48,6 +49,7 @@ CPPFLAGS += -I$(G4BASE)/particles/bosons/include
|
||||
CPPFLAGS += -I$(G4BASE)/particles/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/processes/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/processes/cuts/include
|
||||
CPPFLAGS += -I$(G4BASE)/processes/scoring/include
|
||||
CPPFLAGS += -I$(G4BASE)/materials/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 104015 2017-05-08 07:28:08Z gcosmo $
|
||||
$Id: History 110261 2018-05-17 14:24:23Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -24,6 +24,17 @@ committal in the CVS repository !
|
||||
History file for Ray Tracer category
|
||||
---------------------------------------
|
||||
|
||||
17th May 2018 Jonathan Madsen (raytracer-V10-04-01)
|
||||
- updated "thread-local-static-var" model to
|
||||
"function-returning-thread-local-static-reference" model
|
||||
which fixes Windows DLL + MT
|
||||
|
||||
20th March 2018 Makoto Asai (raytracer-V10-04-00)
|
||||
- G4RayTrajectory.cc
|
||||
o Use HyperStep of G4ParallelWorldProcess to draw volumes
|
||||
defined in a parallel world.
|
||||
o sources.cmake and GNUmakefile are modified accordingly.
|
||||
|
||||
7th May 2017 John Allison (raytracer-V10-03-04)
|
||||
- G4RayTracerViewer.cc:
|
||||
o Expanded filename numbering to 4 digits, zero filled, e.g.,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectory.hh 71495 2013-06-17 09:13:30Z gcosmo $
|
||||
// $Id: G4RayTrajectory.hh 110261 2018-05-17 14:24:23Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,21 +96,21 @@ class G4RayTrajectory : public G4VTrajectory
|
||||
};
|
||||
|
||||
#if defined G4VIS_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4ThreadLocal G4Allocator<G4RayTrajectory>* rayTrajectoryAllocator;
|
||||
extern G4DLLEXPORT G4Allocator<G4RayTrajectory>*& rayTrajectoryAllocator();
|
||||
#else
|
||||
extern G4DLLIMPORT G4ThreadLocal G4Allocator<G4RayTrajectory>* rayTrajectoryAllocator;
|
||||
extern G4DLLIMPORT G4Allocator<G4RayTrajectory>*& rayTrajectoryAllocator();
|
||||
#endif
|
||||
|
||||
inline void* G4RayTrajectory::operator new(size_t)
|
||||
{
|
||||
if(!rayTrajectoryAllocator)
|
||||
{ rayTrajectoryAllocator = new G4Allocator<G4RayTrajectory>; }
|
||||
return (void*)rayTrajectoryAllocator->MallocSingle();
|
||||
if(!rayTrajectoryAllocator())
|
||||
{ rayTrajectoryAllocator() = new G4Allocator<G4RayTrajectory>; }
|
||||
return (void*)rayTrajectoryAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4RayTrajectory::operator delete(void* aTrajectory)
|
||||
{
|
||||
rayTrajectoryAllocator->FreeSingle((G4RayTrajectory*)aTrajectory);
|
||||
rayTrajectoryAllocator()->FreeSingle((G4RayTrajectory*)aTrajectory);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectoryPoint.hh 77479 2013-11-25 10:01:22Z gcosmo $
|
||||
// $Id: G4RayTrajectoryPoint.hh 110261 2018-05-17 14:24:23Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -80,21 +80,21 @@ class G4RayTrajectoryPoint :public G4VTrajectoryPoint
|
||||
};
|
||||
|
||||
#if defined G4VIS_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4ThreadLocal G4Allocator<G4RayTrajectoryPoint>* rayTrajectoryPointAllocator;
|
||||
extern G4DLLEXPORT G4Allocator<G4RayTrajectoryPoint>*& rayTrajectoryPointAllocator();
|
||||
#else
|
||||
extern G4DLLIMPORT G4ThreadLocal G4Allocator<G4RayTrajectoryPoint>* rayTrajectoryPointAllocator;
|
||||
extern G4DLLIMPORT G4Allocator<G4RayTrajectoryPoint>*& rayTrajectoryPointAllocator();
|
||||
#endif
|
||||
|
||||
inline void* G4RayTrajectoryPoint::operator new(size_t)
|
||||
{
|
||||
if(!rayTrajectoryPointAllocator)
|
||||
{ rayTrajectoryPointAllocator = new G4Allocator<G4RayTrajectoryPoint>; }
|
||||
return (void *) rayTrajectoryPointAllocator->MallocSingle();
|
||||
if(!rayTrajectoryPointAllocator())
|
||||
{ rayTrajectoryPointAllocator() = new G4Allocator<G4RayTrajectoryPoint>; }
|
||||
return (void *) rayTrajectoryPointAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4RayTrajectoryPoint::operator delete(void *aTrajectoryPoint)
|
||||
{
|
||||
rayTrajectoryPointAllocator->FreeSingle((G4RayTrajectoryPoint *) aTrajectoryPoint);
|
||||
rayTrajectoryPointAllocator()->FreeSingle((G4RayTrajectoryPoint *) aTrajectoryPoint);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake 88190 2015-02-02 17:24:54Z gcosmo $
|
||||
# $Id: sources.cmake 109040 2018-03-22 11:23:25Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -27,6 +27,7 @@ include_directories(${CMAKE_SOURCE_DIR}/source/event/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/magneticfield/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
@@ -37,6 +38,7 @@ include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/scoring/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/run/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectory.cc 104015 2017-05-08 07:28:08Z gcosmo $
|
||||
// $Id: G4RayTrajectory.cc 110261 2018-05-17 14:24:23Z gcosmo $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -43,8 +43,13 @@
|
||||
#include "G4Colour.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ParallelWorldProcess.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<G4RayTrajectory>* rayTrajectoryAllocator = 0;
|
||||
G4Allocator<G4RayTrajectory>*& rayTrajectoryAllocator()
|
||||
{
|
||||
G4ThreadLocalStatic G4Allocator<G4RayTrajectory>* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
G4RayTrajectory :: G4RayTrajectory()
|
||||
{
|
||||
@@ -72,14 +77,28 @@ G4RayTrajectory :: ~G4RayTrajectory()
|
||||
delete positionRecord;
|
||||
}
|
||||
|
||||
void G4RayTrajectory::AppendStep(const G4Step* aStep)
|
||||
void G4RayTrajectory::AppendStep(const G4Step* theStep)
|
||||
{
|
||||
G4RayTrajectoryPoint* trajectoryPoint = new G4RayTrajectoryPoint();
|
||||
|
||||
trajectoryPoint->SetStepLength(aStep->GetStepLength());
|
||||
|
||||
const G4Step* aStep = theStep;
|
||||
G4Navigator* theNavigator
|
||||
= G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking();
|
||||
|
||||
// Take care of parallel world(s)
|
||||
if(G4ParallelWorldProcess::GetHyperStep())
|
||||
{
|
||||
aStep = G4ParallelWorldProcess::GetHyperStep();
|
||||
G4int navID = G4ParallelWorldProcess::GetHypNavigatorID();
|
||||
std::vector<G4Navigator*>::iterator iNav =
|
||||
G4TransportationManager::GetTransportationManager()->
|
||||
GetActiveNavigatorsIterator();
|
||||
theNavigator = iNav[navID];
|
||||
}
|
||||
|
||||
trajectoryPoint->SetStepLength(aStep->GetStepLength());
|
||||
|
||||
// Surface normal
|
||||
G4bool valid;
|
||||
G4ThreeVector theLocalNormal = theNavigator->GetLocalExitNormal(&valid);
|
||||
if(valid) { theLocalNormal = -theLocalNormal; }
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayTrajectoryPoint.cc 71495 2013-06-17 09:13:30Z gcosmo $
|
||||
// $Id: G4RayTrajectoryPoint.cc 110261 2018-05-17 14:24:23Z gcosmo $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -35,7 +35,11 @@
|
||||
|
||||
#include"G4RayTrajectoryPoint.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<G4RayTrajectoryPoint>* rayTrajectoryPointAllocator = 0;
|
||||
G4Allocator<G4RayTrajectoryPoint>*& rayTrajectoryPointAllocator()
|
||||
{
|
||||
G4ThreadLocalStatic G4Allocator<G4RayTrajectoryPoint>* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
G4RayTrajectoryPoint :: G4RayTrajectoryPoint()
|
||||
:preStepAtt(0)
|
||||
|
||||
Reference in New Issue
Block a user