Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -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