Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -23,6 +23,12 @@ committal in the CVS repository !
|
||||
History file for Ray Tracer category
|
||||
---------------------------------------
|
||||
|
||||
15th November 2019, Gabriele Cosmo (raytracer-V10-05-01)
|
||||
- Fixed cases of implicit type conversions from size_t to G4int.
|
||||
|
||||
25th October 2019 Ben Morgan (raytracer-V10-05-00)
|
||||
- Link to X11 imported targets when building X11 driver
|
||||
|
||||
9th November 2018 Gabriele Cosmo (raytracer-V10-04-04)
|
||||
- G4RTMessenger: fixed printout typos.
|
||||
|
||||
|
||||
@@ -114,17 +114,13 @@ if(GEANT4_USE_RAYTRACER_X11)
|
||||
#
|
||||
# Add source properties and additional LINK_LIBRARIES here
|
||||
#
|
||||
# Need X11 includes!
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
|
||||
# Must use G4VIS_BUILD_RAYTRACERX_DRIVER define
|
||||
GEANT4_ADD_COMPILE_DEFINITIONS(SOURCES ${G4VIS_RAYTRACER_MODULE_SOURCES}
|
||||
COMPILE_DEFINITIONS G4VIS_BUILD_RAYTRACERX_DRIVER)
|
||||
|
||||
# The X11 Libraries
|
||||
list(APPEND G4VIS_RAYTRACER_MODULE_LINK_LIBRARIES ${X11_LIBRARIES})
|
||||
list(APPEND G4VIS_RAYTRACER_MODULE_LINK_LIBRARIES X11::SM X11::ICE X11::X11 X11::Xext X11::Xmu)
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
G4TheMTRayTracer* G4TheMTRayTracer::theInstance = 0;
|
||||
G4TheMTRayTracer* G4TheMTRayTracer::theInstance = nullptr;
|
||||
|
||||
G4TheMTRayTracer::G4TheMTRayTracer(G4VFigureFileMaker* figMaker,
|
||||
G4VRTScanner* scanner)
|
||||
@@ -103,10 +103,10 @@ void G4TheMTRayTracer::Trace(const G4String& fileName)
|
||||
colorR = new unsigned char[nPixel];
|
||||
colorG = new unsigned char[nPixel];
|
||||
colorB = new unsigned char[nPixel];
|
||||
unsigned char defR = (unsigned char)(int(255*backgroundColour.GetRed()));
|
||||
unsigned char defG = (unsigned char)(int(255*backgroundColour.GetGreen()));
|
||||
unsigned char defB = (unsigned char)(int(255*backgroundColour.GetBlue()));
|
||||
for(G4int ii=0;ii<nPixel;ii++)
|
||||
unsigned char defR = (unsigned char)(G4int(255*backgroundColour.GetRed()));
|
||||
unsigned char defG = (unsigned char)(G4int(255*backgroundColour.GetGreen()));
|
||||
unsigned char defB = (unsigned char)(G4int(255*backgroundColour.GetBlue()));
|
||||
for(G4int ii=0;ii<nPixel;++ii)
|
||||
{
|
||||
colorR[ii] = defR;
|
||||
colorG[ii] = defG;
|
||||
@@ -169,14 +169,14 @@ G4bool G4TheMTRayTracer::CreateBitMap()
|
||||
if(!theRun) return false;
|
||||
|
||||
G4THitsMap<G4Colour>* colMap = theRun->GetMap();
|
||||
std::map<G4int,G4Colour*>::iterator itr = colMap->GetMap()->begin();
|
||||
for(;itr!=colMap->GetMap()->end();itr++)
|
||||
auto itr = colMap->GetMap()->cbegin();
|
||||
for(;itr!=colMap->GetMap()->cend();++itr)
|
||||
{
|
||||
G4int key = itr->first;
|
||||
G4Colour* col = itr->second;
|
||||
colorR[key] = (unsigned char)(int(255*col->GetRed()));
|
||||
colorG[key] = (unsigned char)(int(255*col->GetGreen()));
|
||||
colorB[key] = (unsigned char)(int(255*col->GetBlue()));
|
||||
colorR[key] = (unsigned char)(G4int(255*col->GetRed()));
|
||||
colorG[key] = (unsigned char)(G4int(255*col->GetGreen()));
|
||||
colorB[key] = (unsigned char)(G4int(255*col->GetBlue()));
|
||||
}
|
||||
|
||||
theScanner->Initialize(nRow,nColumn);
|
||||
|
||||
@@ -206,7 +206,7 @@ G4bool G4TheRayTracer::CreateBitMap()
|
||||
G4ProductionCutsTable::GetProductionCutsTable()->UpdateCoupleTable(pWorld);
|
||||
G4ProcessVector* pVector
|
||||
= G4Geantino::GeantinoDefinition()->GetProcessManager()->GetProcessList();
|
||||
for (G4int j=0; j < pVector->size(); ++j) {
|
||||
for (std::size_t j=0; j < pVector->size(); ++j) {
|
||||
(*pVector)[j]->BuildPhysicsTable(*(G4Geantino::GeantinoDefinition()));
|
||||
}
|
||||
|
||||
@@ -274,14 +274,14 @@ G4bool G4TheRayTracer::CreateBitMap()
|
||||
theRayShooter->Shoot(anEvent,rayPosition,rayDirection.unit());
|
||||
theEventManager->ProcessOneEvent(anEvent);
|
||||
succeeded = GenerateColour(anEvent);
|
||||
colorR[iCoord] = (unsigned char)(int(255*rayColour.GetRed()));
|
||||
colorG[iCoord] = (unsigned char)(int(255*rayColour.GetGreen()));
|
||||
colorB[iCoord] = (unsigned char)(int(255*rayColour.GetBlue()));
|
||||
colorR[iCoord] = (unsigned char)(G4int(255*rayColour.GetRed()));
|
||||
colorG[iCoord] = (unsigned char)(G4int(255*rayColour.GetGreen()));
|
||||
colorB[iCoord] = (unsigned char)(G4int(255*rayColour.GetBlue()));
|
||||
} else { // Ray does not intercept world at all.
|
||||
// Store background colour...
|
||||
colorR[iCoord] = (unsigned char)(int(255*backgroundColour.GetRed()));
|
||||
colorG[iCoord] = (unsigned char)(int(255*backgroundColour.GetGreen()));
|
||||
colorB[iCoord] = (unsigned char)(int(255*backgroundColour.GetBlue()));
|
||||
colorR[iCoord] = (unsigned char)(G4int(255*backgroundColour.GetRed()));
|
||||
colorG[iCoord] = (unsigned char)(G4int(255*backgroundColour.GetGreen()));
|
||||
colorB[iCoord] = (unsigned char)(G4int(255*backgroundColour.GetBlue()));
|
||||
succeeded = true;
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ G4bool G4TheRayTracer::GenerateColour(G4Event* anEvent)
|
||||
{ initialColour = GetSurfaceColour(trajectory->GetPointC(nPoint-1)); }
|
||||
rayColour = Attenuate(trajectory->GetPointC(nPoint-1),initialColour);
|
||||
|
||||
for(int i=nPoint-2;i>=0;i--)
|
||||
for(G4int i=nPoint-2;i>=0;--i)
|
||||
{
|
||||
G4Colour surfaceColour = GetSurfaceColour(trajectory->GetPointC(i));
|
||||
G4double weight = 1.0 - surfaceColour.GetAlpha();
|
||||
|
||||
Reference in New Issue
Block a user