Skip to content
Snippets Groups Projects
Commit 7c27b0e6 authored by Benjamin Morgan's avatar Benjamin Morgan
Browse files

Apply atlas patches to Geant4 10.3.3

- Add G4AtlasRK4
- Update version numbers to geant4.10.3.patch03.atlas01
parent f77be32f
No related tags found
No related merge requests found
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4AtlasRK4.hh,v 1.10 2006/06/29 18:21:55 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// class G4AtlasRK4
//
// Class description:
//
// Integrate the equations of the motion of a particle in a magnetic field
// using 4th Runge-Kutta-Nystrem method with errors estimation
// (ATL-SOFT-PUB-2009-01)
// History:
// - Created: I.Gavrilenko 15.05.2009
// -------------------------------------------------------------------
#ifndef G4ATLASRK4_HH
#define G4ATLASRK4_HH
#include "G4MagIntegratorStepper.hh"
#include "G4Mag_EqRhs.hh"
class G4AtlasRK4 : public G4MagIntegratorStepper
{
public:
////////////////////////////////////////////////////////////////
// Public methods:
////////////////////////////////////////////////////////////////
G4AtlasRK4(G4EquationOfMotion *EquationMotion, G4int numberOfVariables = 6);
~G4AtlasRK4() ;
void Stepper(const G4double P [],
const G4double dPdS[],
G4double step ,
G4double Po [],
G4double Err []);
G4int IntegratorOrder() const {return 4;}
G4double DistChord() const;
inline void RightHandSide(const double P[],double dPdS[]);
private:
////////////////////////////////////////////////////////////////
// Prvate methods
////////////////////////////////////////////////////////////////
void getField (const G4double P[]);
////////////////////////////////////////////////////////////////
// Prvate data
////////////////////////////////////////////////////////////////
G4Mag_EqRhs* m_fEq ;
mutable G4double m_field [3];
mutable G4double m_cof ;
mutable G4double m_mom ;
mutable G4double m_imom ;
mutable G4double m_iPoint [3];
mutable G4double m_mPoint [3];
mutable G4double m_fPoint [3];
};
////////////////////////////////////////////////////////////////
// Inline methods
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// Get new magnetic field with testing distance from previouse call
////////////////////////////////////////////////////////////////
inline void G4AtlasRK4::getField (const G4double P[])
{
m_fEq->GetFieldValue(P,m_field);
}
////////////////////////////////////////////////////////////////
// Derivatives calculation
////////////////////////////////////////////////////////////////
inline void
G4AtlasRK4::RightHandSide(const G4double P[],G4double dPdS[])
{
getField(P);
m_mom = sqrt(P[3]*P[3]+P[4]*P[4]+P[5]*P[5]) ;
m_imom = 1./m_mom ;
m_cof = m_fEq->FCof()*m_imom ;
dPdS[0] = P[3]*m_imom ; // dx /ds
dPdS[1] = P[4]*m_imom ; // dy /ds
dPdS[2] = P[5]*m_imom ; // dz /ds
dPdS[3] = m_cof*(P[4]*m_field[2]-P[5]*m_field[1]) ; // dPx/ds
dPdS[4] = m_cof*(P[5]*m_field[0]-P[3]*m_field[2]) ; // dPy/ds
dPdS[5] = m_cof*(P[3]*m_field[1]-P[4]*m_field[0]) ; // dPz/ds
}
#endif // G4ATLASRK4_HH
......@@ -31,6 +31,7 @@ GEANT4_DEFINE_MODULE(NAME G4magneticfield
HEADERS
G4BogackiShampine23.hh
G4BogackiShampine45.hh
G4AtlasRK4.hh
G4CachedMagneticField.hh
G4CashKarpRKF45.hh
G4ChargeState.hh
......@@ -104,6 +105,7 @@ GEANT4_DEFINE_MODULE(NAME G4magneticfield
SOURCES
G4BogackiShampine23.cc
G4BogackiShampine45.cc
G4AtlasRK4.cc
G4CachedMagneticField.cc
G4CashKarpRKF45.cc
G4ChargeState.cc
......
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4AtlasRK4.cc,v 1.12 2006/06/29 18:23:37 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
#include "G4AtlasRK4.hh"
#include <iostream>
////////////////////////////////////////////////////////////////
// Constructor sets the number of variables (default = 6)
////////////////////////////////////////////////////////////////
G4AtlasRK4::G4AtlasRK4(G4EquationOfMotion* EqRhs, G4int numberOfVariables)
: G4MagIntegratorStepper(EqRhs, numberOfVariables)
{
m_fEq = dynamic_cast<G4Mag_EqRhs*>(GetEquationOfMotion());
}
////////////////////////////////////////////////////////////////
// Destructor
////////////////////////////////////////////////////////////////
G4AtlasRK4::~G4AtlasRK4()
{
}
////////////////////////////////////////////////////////////////
// Integration in one step
////////////////////////////////////////////////////////////////
void
G4AtlasRK4::Stepper
(const G4double P[],const G4double dPdS[],G4double Step,G4double Po[],G4double Err[])
{
G4double R[3] = { P[0], P[1] , P[2]};
G4double A[3] = {dPdS[0], dPdS[1], dPdS[2]};
m_iPoint[0]=P[0]; m_iPoint[1]=P[1]; m_iPoint[2]=P[2];
G4double S = Step ;
G4double S5 = .5*Step ;
G4double S4 = .25*Step ;
G4double S6 = Step/6.;
// John A added, in order to emulate effect of call to changed/derived RHS
//
m_mom = sqrt(P[3]*P[3]+P[4]*P[4]+P[5]*P[5]);
m_imom = 1./m_mom;
m_cof = m_fEq->FCof()*m_imom;
// Point 1
//
G4double K1[3] = {m_imom*dPdS[3],m_imom*dPdS[4],m_imom*dPdS[5]};
// Point2
//
G4double p[4] = {R[0]+S5*(A[0]+S4*K1[0]),
R[1]+S5*(A[1]+S4*K1[1]),
R[2]+S5*(A[2]+S4*K1[2]),
P[7] }; getField(p);
G4double A2[3] = {A[0]+S5*K1[0],A[1]+S5*K1[1],A[2]+S5*K1[2]};
G4double K2[3] = {(A2[1]*m_field[2]-A2[2]*m_field[1])*m_cof,
(A2[2]*m_field[0]-A2[0]*m_field[2])*m_cof,
(A2[0]*m_field[1]-A2[1]*m_field[0])*m_cof};
m_mPoint[0]=p[0]; m_mPoint[1]=p[1]; m_mPoint[2]=p[2];
// Point 3 with the same magnetic field
//
G4double A3[3] = {A[0]+S5*K2[0],A[1]+S5*K2[1],A[2]+S5*K2[2]};
G4double K3[3] = {(A3[1]*m_field[2]-A3[2]*m_field[1])*m_cof,
(A3[2]*m_field[0]-A3[0]*m_field[2])*m_cof,
(A3[0]*m_field[1]-A3[1]*m_field[0])*m_cof};
// Point 4
//
p[0] = R[0]+S*(A[0]+S5*K3[0]);
p[1] = R[1]+S*(A[1]+S5*K3[1]);
p[2] = R[2]+S*(A[2]+S5*K3[2]); getField(p);
G4double A4[3] = {A[0]+S*K3[0],A[1]+S*K3[1],A[2]+S*K3[2]};
G4double K4[3] = {(A4[1]*m_field[2]-A4[2]*m_field[1])*m_cof,
(A4[2]*m_field[0]-A4[0]*m_field[2])*m_cof,
(A4[0]*m_field[1]-A4[1]*m_field[0])*m_cof};
// New position
//
Po[0] = R[0]+S*(A[0]+S6*(K1[0]+K2[0]+K3[0]));
Po[1] = R[1]+S*(A[1]+S6*(K1[1]+K2[1]+K3[1]));
Po[2] = R[2]+S*(A[2]+S6*(K1[2]+K2[2]+K3[2]));
m_fPoint[0]=Po[0]; m_fPoint[1]=Po[1]; m_fPoint[2]=Po[2];
// New direction
//
Po[3] = A[0]+S6*(K1[0]+K4[0]+2.*(K2[0]+K3[0]));
Po[4] = A[1]+S6*(K1[1]+K4[1]+2.*(K2[1]+K3[1]));
Po[5] = A[2]+S6*(K1[2]+K4[2]+2.*(K2[2]+K3[2]));
// Errors
//
Err[3] = S*fabs(K1[0]-K2[0]-K3[0]+K4[0]);
Err[4] = S*fabs(K1[1]-K2[1]-K3[1]+K4[1]);
Err[5] = S*fabs(K1[2]-K2[2]-K3[2]+K4[2]);
Err[0] = S*Err[3] ;
Err[1] = S*Err[4] ;
Err[2] = S*Err[5] ;
Err[3]*= m_mom ;
Err[4]*= m_mom ;
Err[5]*= m_mom ;
// Normalize momentum
//
G4double N = m_mom/sqrt(Po[3]*Po[3]+Po[4]*Po[4]+Po[5]*Po[5]);
Po[3]*=N ;
Po[4]*=N ;
Po[5]*=N ;
Po[7] =P[7];
}
////////////////////////////////////////////////////////////////
// Estimate the maximum distance from the curve to the chord
////////////////////////////////////////////////////////////////
G4double
G4AtlasRK4::DistChord() const
{
G4double ax = m_fPoint[0]-m_iPoint[0];
G4double ay = m_fPoint[1]-m_iPoint[1];
G4double az = m_fPoint[2]-m_iPoint[2];
G4double dx = m_mPoint[0]-m_iPoint[0];
G4double dy = m_mPoint[1]-m_iPoint[1];
G4double dz = m_mPoint[2]-m_iPoint[2];
G4double d2 = (ax*ax+ay*ay+az*az) ;
if(d2!=0.) {
G4double s = (ax*dx+ay*dy+az*dz)/d2;
dx -= (s*ax) ;
dy -= (s*ay) ;
dz -= (s*az) ;
}
return sqrt(dx*dx+dy*dy+dz*dz);
}
......@@ -41,7 +41,7 @@
// - The meaning of each digit is as follows;
//
// 711
// |--> major version number
// |--> major version number
// |--> minor version number
// |--> patch number
......@@ -50,7 +50,7 @@
#endif
#ifndef G4VERSION_TAG
#define G4VERSION_TAG "$Name: geant4-10-03-patch-03 $"
#define G4VERSION_TAG "$Name: geant4.10.3.patch03.atlas01 $"
#endif
// as variables
......@@ -58,9 +58,9 @@
#include "G4String.hh"
#ifdef G4MULTITHREADED
static const G4String G4Version = "$Name: geant4-10-03-patch-03 [MT]$";
static const G4String G4Version = "$Name: geant4.10.3.patch03.atlas01 [MT]$";
#else
static const G4String G4Version = "$Name: geant4-10-03-patch-03 $";
static const G4String G4Version = "$Name: geant4.10.3.patch03.atlas01 $";
#endif
static const G4String G4Date = "(20-October-2017)";
......
......@@ -111,7 +111,7 @@ G4RunManagerKernel::G4RunManagerKernel()
G4Exception("G4RunManagerKernel::G4RunManagerKernel()","Run0002",
FatalException,ED);
}
// construction of Geant4 kernel classes
eventManager = new G4EventManager();
......@@ -139,6 +139,11 @@ G4RunManagerKernel::G4RunManagerKernel()
<< " Copyright : Geant4 Collaboration" << G4endl
<< " Reference : NIM A 506 (2003), 250-303" << G4endl
<< " WWW : http://cern.ch/geant4" << G4endl
<< "Internal ATLAS build geant4.10.3.patch03.atlas01" << G4endl
<< "Created on 25/05/18 14:36:00;" << G4endl
<< "Using CLHEP 2.3.4.3; XercesC 3.1.3; config x86_64-slc6-gcc62-opt" << G4endl << G4endl
<< "Differences w.r.t. the \"plain\" geant4-10-03-03 are:" << G4endl
<< " * G4AtlasRK4 stepper" << G4endl
<< "*************************************************************" << G4endl
<< G4endl;
}
......@@ -164,7 +169,7 @@ numberOfParallelWorld(0),geometryNeedsToBeClosed(true),
InvalidOperationDetection();
}
#endif
defaultExceptionHandler = new G4ExceptionHandler();
if(fRunManagerKernel)
{
......@@ -174,7 +179,7 @@ numberOfParallelWorld(0),geometryNeedsToBeClosed(true),
fRunManagerKernel = this;
// construction of Geant4 kernel classes
eventManager = new G4EventManager();
switch(rmkType)
{
case masterRMK:
......@@ -192,7 +197,7 @@ numberOfParallelWorld(0),geometryNeedsToBeClosed(true),
defaultRegionForParallelWorld
= G4RegionStore::GetInstance()->GetRegion("DefaultRegionForParallelWorld", true);
break;
default:
default:
defaultRegion = 0;
defaultRegionForParallelWorld = 0;
G4ExceptionDescription msgx;
......@@ -200,10 +205,10 @@ numberOfParallelWorld(0),geometryNeedsToBeClosed(true),
G4Exception("G4RunManagerKernel::G4RunManagerKernel(G4bool)","Run0106",FatalException,msgx);
}
runManagerKernelType = rmkType;
// set the initial application state
G4StateManager::GetStateManager()->SetNewState(G4State_PreInit);
// version banner
G4String vs = G4Version;
vs = vs.substr(1,vs.size()-2);
......@@ -221,6 +226,11 @@ numberOfParallelWorld(0),geometryNeedsToBeClosed(true),
<< " Copyright : Geant4 Collaboration" << G4endl
<< " Reference : NIM A 506 (2003), 250-303" << G4endl
<< " WWW : http://cern.ch/geant4" << G4endl
<< "Internal ATLAS build geant4.10.3.patch03.atlas01" << G4endl
<< "Created on 25/05/18 14:36:00;" << G4endl
<< "Using CLHEP 2.3.4.3; XercesC 3.1.3; config x86_64-slc6-gcc62-opt" << G4endl << G4endl
<< "Differences w.r.t. the \"plain\" geant4-10-03-03 are:" << G4endl
<< " * G4AtlasRK4 stepper" << G4endl
<< "*************************************************************" << G4endl
<< G4endl;
break;
......@@ -301,22 +311,22 @@ G4RunManagerKernel::~G4RunManagerKernel()
if(allocList)
{
allocList->Destroy(numberOfStaticAllocators,verboseLevel);
delete allocList;
delete allocList;
if(verboseLevel>1) G4cout << "G4Allocator objects are deleted." << G4endl;
}
G4UImanager* pUImanager = G4UImanager::GetUIpointer();
if((runManagerKernelType==workerRMK) && (verboseLevel>0))
{
G4cout << "Thread-local UImanager is to be deleted." << G4endl
G4cout << "Thread-local UImanager is to be deleted." << G4endl
<< "There should not be any thread-local G4cout/G4cerr hereafter."
<< G4endl;
verboseLevel = 0;
}
if(pUImanager) delete pUImanager;
if(verboseLevel>1) G4cout << "UImanager deleted." << G4endl;
delete pStateManager;
delete pStateManager;
if(verboseLevel>1) G4cout << "StateManager deleted." << G4endl;
delete defaultExceptionHandler;
if(verboseLevel>0) G4cout << "RunManagerKernel is deleted. Good bye :)" << G4endl;
......@@ -363,7 +373,7 @@ void G4RunManagerKernel::WorkerDefineWorldVolume(G4VPhysicalVolume* worldVol,
// "Geant4 kernel is not Init state : Assuming Init state.");
//G4cout<<"Warning : Geant4 kernel is not Init state : Assuming Init state."
// <<G4endl;
stateManager->SetNewState(G4State_Init);
stateManager->SetNewState(G4State_Init);
}
}
......@@ -391,7 +401,7 @@ void G4RunManagerKernel::WorkerDefineWorldVolume(G4VPhysicalVolume* worldVol,
if(topologyIsChanged) geometryNeedsToBeClosed = true;
// Notify the VisManager as well
// Notify the VisManager as well
if(G4Threading::IsMasterThread())
{
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
......@@ -399,7 +409,7 @@ void G4RunManagerKernel::WorkerDefineWorldVolume(G4VPhysicalVolume* worldVol,
}
geometryInitialized = true;
stateManager->SetNewState(currentState);
stateManager->SetNewState(currentState);
if(physicsInitialized && currentState!=G4State_Idle)
{ stateManager->SetNewState(G4State_Idle); }
}
......@@ -427,7 +437,7 @@ void G4RunManagerKernel::DefineWorldVolume(G4VPhysicalVolume* worldVol,
// "Geant4 kernel is not Init state : Assuming Init state.");
//G4cout<<"Warning : Geant4 kernel is not Init state : Assuming Init state."
// <<G4endl;
stateManager->SetNewState(G4State_Init);
stateManager->SetNewState(G4State_Init);
}
}
......@@ -448,9 +458,9 @@ void G4RunManagerKernel::DefineWorldVolume(G4VPhysicalVolume* worldVol,
}
SetupDefaultRegion();
// Accept the world volume
currentWorld = worldVol;
currentWorld = worldVol;
// Set the default region to the world
......@@ -464,7 +474,7 @@ void G4RunManagerKernel::DefineWorldVolume(G4VPhysicalVolume* worldVol,
G4TransportationManager::GetTransportationManager()
->SetWorldForTracking(currentWorld);
if(topologyIsChanged) geometryNeedsToBeClosed = true;
// Notify the VisManager as well
if(G4Threading::IsMasterThread())
{
......@@ -473,11 +483,11 @@ void G4RunManagerKernel::DefineWorldVolume(G4VPhysicalVolume* worldVol,
}
geometryInitialized = true;
stateManager->SetNewState(currentState);
stateManager->SetNewState(currentState);
if(physicsInitialized && currentState!=G4State_Idle)
{ stateManager->SetNewState(G4State_Idle); }
}
}
void G4RunManagerKernel::SetPhysics(G4VUserPhysicsList* uPhys)
{
physicsList = uPhys;
......@@ -567,7 +577,7 @@ void G4RunManagerKernel::InitializePhysics()
//"Geant4 kernel is not Init state : Assuming Init state.");
G4cout<<"Warning : Geant4 kernel is not Init state : Assuming Init state."
<<G4endl;
stateManager->SetNewState(G4State_Init);
stateManager->SetNewState(G4State_Init);
}
}
......@@ -582,7 +592,7 @@ void G4RunManagerKernel::InitializePhysics()
if(verboseLevel>1) G4cout << "physicsList->Construct() start." << G4endl;
if(numberOfParallelWorld>0) physicsList->UseCoupledTransportation();
physicsList->Construct();
if(verboseLevel>1) G4cout << "physicsList->CheckParticleList() start." << G4endl;
physicsList->CheckParticleList();
//Cannot assume that SetCuts and CheckRegions are thread safe. We need to mutex
......@@ -617,7 +627,7 @@ void G4RunManagerKernel::InitializePhysics()
#ifdef G4MULTITHREADED
G4UnitDefinition::GetUnitsTable().Synchronize();
#endif
stateManager->SetNewState(currentState);
stateManager->SetNewState(currentState);
if(geometryInitialized && currentState!=G4State_Idle)
{ stateManager->SetNewState(G4State_Idle); }
}
......@@ -627,17 +637,17 @@ G4bool G4RunManagerKernel::RunInitialization(G4bool fakeRun)
G4StateManager* stateManager = G4StateManager::GetStateManager();
G4ApplicationState currentState = stateManager->GetCurrentState();
if(!geometryInitialized)
{
if(!geometryInitialized)
{
G4Exception("G4RunManagerKernel::RunInitialization",
"Run0021",
JustWarning,
"Geometry has not yet initialized : method ignored.");
return false;
}
if(!physicsInitialized)
{
if(!physicsInitialized)
{
G4Exception("G4RunManagerKernel::RunInitialization",
"Run0022",
JustWarning,
......@@ -646,7 +656,7 @@ G4bool G4RunManagerKernel::RunInitialization(G4bool fakeRun)
}
if( currentState != G4State_Idle )
{
{
G4Exception("G4RunManagerKernel::RunInitialization",
"Run0023",
JustWarning,
......@@ -672,7 +682,7 @@ G4bool G4RunManagerKernel::RunInitialization(G4bool fakeRun)
if(pVVisManager) pVVisManager->GeometryHasChanged();
}
}
GetPrimaryTransformer()->CheckUnknown();
#ifdef G4MULTITHREADED
......@@ -703,7 +713,7 @@ void G4RunManagerKernel::RunTermination()
{
if ( runManagerKernelType != workerRMK )
G4ProductionCutsTable::GetProductionCutsTable()->PhysicsTableUpdated();
G4StateManager::GetStateManager()->SetNewState(G4State_Idle);
G4StateManager::GetStateManager()->SetNewState(G4State_Idle);
}
void G4RunManagerKernel::ResetNavigator()
......@@ -715,13 +725,13 @@ void G4RunManagerKernel::ResetNavigator()
// modified between runs. By the following calls we ensure that navigator's
// state is reset properly. It is required the geometry to be closed
// and previous optimisations to be cleared.
G4GeometryManager* geomManager = G4GeometryManager::GetInstance();
if(verboseLevel>1) G4cout << "Start closing geometry." << G4endl;
geomManager->OpenGeometry();
geomManager->CloseGeometry(geometryToBeOptimized, verboseLevel>1);
geometryNeedsToBeClosed = false;
}
......@@ -730,7 +740,7 @@ void G4RunManagerKernel::UpdateRegion()
G4StateManager* stateManager = G4StateManager::GetStateManager();
G4ApplicationState currentState = stateManager->GetCurrentState();
if( currentState != G4State_Idle )
{
{
G4Exception("G4RunManagerKernel::UpdateRegion",
"Run0024",
JustWarning,
......@@ -776,7 +786,7 @@ void G4RunManagerKernel::CheckRegions()
size_t nWorlds = transM->GetNoWorlds();
std::vector<G4VPhysicalVolume*>::iterator wItr;
for(size_t i=0;i<G4RegionStore::GetInstance()->size();i++)
{
{
G4Region* region = (*(G4RegionStore::GetInstance()))[i];
//Let each region have a pointer to the world volume where it belongs to.
......@@ -863,7 +873,7 @@ void G4RunManagerKernel::DumpRegion(G4Region* region) const
G4cout << "Region <" << region->GetName() << "> -- ";
if(region->GetWorldPhysical())
{
G4cout << " -- appears in <"
G4cout << " -- appears in <"
<< region->GetWorldPhysical()->GetName() << "> world volume";
}
else
......@@ -881,11 +891,11 @@ void G4RunManagerKernel::DumpRegion(G4Region* region) const
{ G4cout << (*lvItr)->GetName() << " "; lvItr++; }
G4cout << G4endl;
G4cout << " Pointers : G4VUserRegionInformation[" << region->GetUserInformation()
<< "], G4UserLimits[" << region->GetUserLimits()
G4cout << " Pointers : G4VUserRegionInformation[" << region->GetUserInformation()
<< "], G4UserLimits[" << region->GetUserLimits()
<< "], G4FastSimulationManager[" << region->GetFastSimulationManager()
<< "], G4UserSteppingAction[" << region->GetRegionalSteppingAction() << "]" << G4endl;
G4cout << " Materials : ";
std::vector<G4Material*>::const_iterator mItr = region->GetMaterialIterator();
size_t nMaterial = region->GetNumberOfMaterials();
......@@ -936,7 +946,7 @@ void G4RunManagerKernel::CheckRegularGeometry()
}
}
}
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
......@@ -969,12 +979,12 @@ void G4RunManagerKernel::SetScoreSplitter()
G4ParticleTable::G4PTblDicIterator* theParticleIterator = theParticleTable->GetIterator();
// Ensure that Process is added only once to the particles' process managers
static G4ThreadLocal bool InitSplitter=false;
static G4ThreadLocal bool InitSplitter=false;
if( ! InitSplitter ) {
InitSplitter = true;
theParticleIterator->reset();
while( (*theParticleIterator)() )
while( (*theParticleIterator)() )
{
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
......@@ -982,7 +992,7 @@ void G4RunManagerKernel::SetScoreSplitter()
{ pmanager->AddDiscreteProcess(pSplitter); }
}
if(verboseLevel>0)
if(verboseLevel>0)
{
G4cout << "G4RunManagerKernel -- G4ScoreSplittingProcess is appended to all particles." << G4endl;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment