Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
+166 -132
View File
@@ -16,6 +16,40 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
November 22nd, 2019 J. Madsen (run-V10-05-11)
- Updated sources.cmake to use ${timemory_LIBRARIES} instead of
difficult to type ${TiMemory_LIBRARIES}
- Removed InitializeTiMemory() from G4RunManager
November 21th, 2019 V.Ivanchenko (run-V10-05-10)
- G4PhysicsListHelper.cc : make it true thread local singleton
- G4RunManager - does not call G4ProcessTable, because it is true
thread local singleton now
November 19th, 2019 D.Sorokin (run-V10-05-09)
- G4PhysicsListHelper.cc : Fix typo.
November 15th, 2019 G.Cosmo (run-V10-05-08)
- Fixed cases of implicit type conversions from size_t to G4int.
October 7th, 2019 M.Asai (run-V10-05-07)
- G4RunMessenger.cc : accept "/run/storeRndmStatToEvent 3".
Addressing problem report #2198.
October 3rd, 2019 G.Cosmo (run-V10-05-06)
- Properly initialise luxury level for Ranlux* engines in MT mode.
Addressing problem report #2184.
September 19th, 2019 M.Asai (run-V10-05-05)
- Introducing G4ScoringRealWorld that allows to define command-based
scorers to a logical volume in the mass world.
- Co-working with detutils-V10-05-01.
July 19th, 2019, M. Asai (run-V10-05-04)
- G4RunManager, G4RunManagerKernel: addressing to the cases GDML perser
directly replaces the world volume without changing the user detector
construction.
March 13th, 2019, M. Asai (run-V10-05-03)
- G4UserPhysicsListMessenger.cc: Defining unit categories for UI commands
that take units. Co-working with intercoms-V10-05-02.
@@ -43,7 +77,7 @@ November 7th, 2018, I. Hrivnacova (run-V10-04-20)
October 30th, 2018, I. Hrivnacova (run-V10-04-17,18,19)
- Removed the dependence on analysis:
using the G4VScoreNtupleWriter interface class instead
using the G4VScoreNtupleWriter interface class instead
of the concrete class
October 27th, 2018, I. Hrivnacova (run-V10-04-16)
@@ -58,9 +92,9 @@ October 25th, 2018, J.Madsen (run-V10-04-14)
each instance to hold it's own timer.
October 25th, 2018, I. Hrivnacova (run-V10-04-13)
- Adding calls to new G4ScoreNtupleWriter, if activated.
This utility class implements automated storing of hits collections
of G4THitsMap<G4double> type (used by primitive scorers) vith Geant4
- Adding calls to new G4ScoreNtupleWriter, if activated.
This utility class implements automated storing of hits collections
of G4THitsMap<G4double> type (used by primitive scorers) vith Geant4
analysis tools.
October 10th, 2018, G.Cosmo (run-V10-04-12)
@@ -88,7 +122,7 @@ May 17th, 2018, J. Madsen (run-V10-04-07)
which fixes Windows DLL + MT
April 3, 2018, M. Asai (run-V10-04-06)
- G4ExceptionHandler: Add track/step/volume information when
- G4ExceptionHandler: Add track/step/volume information when
exception happens while event is in process.
February 27, 2018, G. Cosmo (run-V10-04-05)
@@ -100,7 +134,7 @@ February 26, 2018, M. Asai (run-V10-04-04)
February 21 2018 Jonathan Madsen (run-V10-04-03)
- Replace pthread-style <void*(void*)> function signatures with
<void(G4WorkerThread*)> as it is now unnecessary
February 12 2018 Jonathan Madsen (run-V10-04-02)
- Removed WIN32 conditional for G4THREADCREATE in
G4UnserWorkerThreadInitialization (no longer needed)
@@ -114,7 +148,7 @@ February 9, 2018, M. Asai (run-V10-04-01)
- Co-working with global-V10-04-01.
December 26, 2017, M. Asai (run-V10-04-00)
- G4UserPhysicsListMessenger :
- G4UserPhysicsListMessenger :
UI command returns an error message if a command is refused due
to incorrect parameter(s).
- This tag requires intercoms-V10-04-01 tag.
@@ -139,15 +173,15 @@ May 3, 2017, A. Dotti (run-V10-03-10)
April 26, 2017, A. Dotti (run-V10-03-08, -09)
- New design of physics lists for cleanup of memory in MT
- Introduced new class G4PhysicsBuilderInterface from which
- Introduced new class G4PhysicsBuilderInterface from which
all physics_lists/builders inherit
Worker threads now call G4VUserPhysicsList::TerminateWorker
to clean up physics list thread-specific objects
- G4VPhysicsConstructor holds list of TLS builders
- Coworking tag phys-builders-V10-03-03
April 21, 2017, M. Asai (run-V10-03-07)
- G4MTRunManager.cc, G4WorkerRunManager.cc : protect against null
- G4MTRunManager.cc, G4WorkerRunManager.cc : protect against null
pointer for SetUserAction() method.
March 24, 2017, M. Asai (run-V10-03-06)
@@ -173,23 +207,23 @@ December 22, 2016, L. Desorgher (run-V10-03-00)
- Modifications to solve bug with reverse track splitting.
Works with tag tracking-V10-03-00.
- Add G4AdjointSimManager::ResetDidOneAdjPartReachExtSourceDuringEvent()
- Use G4AdjointSimManager::ResetDidOneAdjPartReachExtSourceDuringEvent() in
G4AdjointPrimaryGeneratorAction.
- Use G4AdjointSimManager::ResetDidOneAdjPartReachExtSourceDuringEvent() in
G4AdjointPrimaryGeneratorAction.
November 15, 2016 A. Dotti (run-V10-02-38,-39)
- Fix bug #1908: create unique names with logVol pointer value
for G4MultiSD and avoid to register target SD implictly
November 7, 2016, G.Folger (run-V10-02-37)
- remove #define for aParticleIterator from G4VPhysicsConstructor.hh
- remove #define for aParticleIterator from G4VPhysicsConstructor.hh
Move the #define for theParticleIterator to G4VUserPhysicsList.cc
October 21, 2016, A.Dotti (run-V10-02-36)
- Partially revert back previous tag to solve deadlocks.
G4MTRunManager::GetNumberOfActiveThreads() returns size of the
threads pool. This number may be different from
G4Threading::GetNumberOfWorkerThreads() that instead returns the
number of threads currently in running state (during start
G4Threading::GetNumberOfWorkerThreads() that instead returns the
number of threads currently in running state (during start
of threads)
October 21, 2016 G.Cosmo (run-V10-02-35)
@@ -215,7 +249,7 @@ October 13, 2016, G.Cosmo (run-V10-02-31)
October 12, 2016, G.Folger (run-V10-02-30)
- Add method GetParticleIterator in G4VUserPhysicsList
and make these methods const and protected in both classes
and make these methods const and protected in both classes
... fix for compilation/linking errors on clang-3.9 and XCode-8 on MacOS.
October 11, 2016, G.Folger (run-V10-02-29)
@@ -250,7 +284,7 @@ September 7, 2016, G.Cosmo (run-V10-02-23)
- Fixed GNUmakefile for missing dependency on global/HEPNumerics, now required.
September 2, 2016 M.Asai (run-V10-02-22)
- sources.cmake : add global/HEPNumerics
- sources.cmake : add global/HEPNumerics
August 4, 2016 M.Asai (run-V10-02-21)
- G4WorkerRunManager.cc : minor printout improvement.
@@ -265,10 +299,10 @@ July 22, 2016 M.Asai (run-V10-02-16, -17 and -18)
July 21, 2016 L.Desorgher (run-V10-02-15)
- Remove compilation warnings in G4AdjointPrimaryGeneratorAction.
July 21, 2016 L.Desorgher (run-V10-02-14)
- Modification of G4AdjointSimManager, G4AdjointPrimaryGeneratorAction
and G4AdjointSimMessenger for the implementation of the
and G4AdjointSimMessenger for the implementation of the
splitting of the reverse MC tracking.
July 7, 2016 G.Cosmo (run-V10-02-13)
@@ -280,9 +314,9 @@ June 1, 2016 M.Asai (run-V10-02-12)
for G4UnknownDecay that should not have AtRest.
June 1, 2016 L.Desorgher (run-V10-02-11)
- G4AdjointSimManager correction in the use of run actions to avoid
- G4AdjointSimManager correction in the use of run actions to avoid
infinite loop during an adjoint simulation.
- G4AdjointPrimaryGenerationAction. Remove 3 times spliting of
- G4AdjointPrimaryGenerationAction. Remove 3 times spliting of
primary adjoint gamma.
Apr 15rd, 2016 V.Ivanchenko(run-V10-02-10)
@@ -309,27 +343,27 @@ Feb 9th, 2016 A.Dotti (run-V10-02-05)
- use scoped enum for G4MTRunManager:: WorkerAcitonRequest and
add PROCESSUI action
- add G4MTRunManager::GetNumberActiveThreads() method
- Introduced skeleton for new functionality to force workers to
- Introduced skeleton for new functionality to force workers to
execute UI commands w/o beamOn (not functioning yet)
Feb 5th, 2016 P.Gumplinger (run-V10-02-04)
- fix val-grind memory leakage check tool error in G4RunMessenger
Feb 1st, 2016 A.Dotti (run-V10-02-03)
- removing automatic handling of multi-user actions
- removing automatic handling of multi-user actions
in G4RunManager::SetUserAction(XYZ) (tag run-V10-02-01) since
reverse MC needs ability to replace user-actions.
reverse MC needs ability to replace user-actions.
if needed, multiple user-actions must be instantiated and handled by
user code
user code
Jan 29th, 2016 A.Dotti (run-V10-02-02)
- Renaming all MT related exception to have code matching pattern:
Run01[0-9]{2} current maximum number Run0127
Run01[0-9]{2} current maximum number Run0127
(JIRA TASK: DEV-74)
Jan 19th, 2016 A.Dotti (run-V10-02-01)
- Adding G4MultiRunAction to allow multiple run actions in a single
job.
job.
- Adding G4MultiPrimaryAction to allow multiple user-primary generation
actions in a single job
- Adding hangling of multiple actions. Requires event-V10-02-01 and
@@ -339,7 +373,7 @@ Jan 27th, 2016 M.Asai (run-V10-02-00)
- G4PhysicsListHelper: add entry for G4ParallelWorldProcess
- G4RunManager, G4WorkerRunManager: change process order index of
G4ParallelWorldProcess to 9900 to make sure it is registered
prior to G4OpBoundaryProcess.
prior to G4OpBoundaryProcess.
Nov 14th, 2015 M.Asai (run-V10-01-16)
- Co-working with particles-V10-01-17. Destructor of G4WorkerRunManagerKernel
@@ -356,8 +390,8 @@ Nov 9th, 2015 G.Cosmo (run-V10-01-14)
- Requires installation of CLHEP version 2.3.1.0.
Nov 6th, 2015 A.Dotti (run-V10-01-13)
- Bug fixing for RNG strong-reproducibility
in MT mode
- Bug fixing for RNG strong-reproducibility
in MT mode
Oct 23rd, 2015 A.Dotti (run-V10-01-12)
- Fixing typo in exception warning output
@@ -374,7 +408,7 @@ May 16th, 2015 J.Allison (run-V10-01-09)
May 7th, 2015 A.Dotti (run-V10-01-06)
- G4MTRunManager: Remove explicit initialization of Bertini cascade
(done in Bertini module), requires hadr-casc-V10-01-04
(done in Bertini module), requires hadr-casc-V10-01-04
March 27th, 2015 G. Cosmo (run-V10-01-05)
- G4VUserPhysicsList: lookup for default-world-region in G4RegionStore
@@ -388,11 +422,11 @@ February 10th, 2015 A.Dotti (run-V10-01-02)
- Removing sporious MKL engine reference
February 6th, 2015 A.Dotti (run-V10-01-01)
- Move setting of pin affinity from G4MTRunManagerKernel::StartThread
- Move setting of pin affinity from G4MTRunManagerKernel::StartThread
to G4WorkerThread
- New method G4WorkerRunManager::DoWork(), called by
- New method G4WorkerRunManager::DoWork(), called by
G4MTRunManagerKernel::StartThread to process requests of new runs
from kernel
from kernel
December 5th, 2014 M.Asai (run-V10-01-00)
- Print deleting message of G4NavigationHistoryPool only if the
@@ -411,17 +445,17 @@ November 14th, 2014 M.Asai (run-V10-00-41)
November 8th, 2014 M.Asai (run-V10-00-39 -40)
- Further fix of logic at G4RunManager::RunTermination() for keeping
events
events
November 7th, 2014 A.Dotti (run-V10-00-38)
- Fix logic at G4RunManager::RunTermination() for keeping events
- Fix logic at G4RunManager::RunTermination() for keeping events
November 6th, 2014 M.Asai (run-V10-00-37)
- Fix unnecessary print-out incorrectly added with run-V10-00-31.
November 6th, 2014 M.Asai (run-V10-00-36)
- In MT mode, a new option of setting random number seeds only once
per run per worker thread is introduced.
per run per worker thread is introduced.
October 27th, 2014 M.Asai (run-V10-00-35)
- Introduced /run/useMaximumLogicalCores UI command.
@@ -441,10 +475,10 @@ October 17th, 2014 A.Dotti (run-V10-00-31)
- G4RunManagerKernel::RunTermination() workers do not
call G4ProductionCutsTable::PhysicsTableUpdated()
- G4WorkerRunManager::TermianteEventLoop() implemented
in workerd and avoid data-race on shared
in workerd and avoid data-race on shared
resource fGeometryHasBeenDestroyed
- G4WorkerThread::UpdateGeometryAndPhysicsVectorFromMaster
remove mechanism of copying pointer of region that is
remove mechanism of copying pointer of region that is
not needed
October 14th, 2014 M.Asai (run-V10-00-30)
@@ -458,7 +492,7 @@ October 1st, 2015 M.Asai (run-V10-00-29)
August 26th, 2014 M.Asai (run-V10-00-28)
- All the G4ParallelWorldProcess objects of all threads update their
corresponding world volumes when the entire geometry has been
destroyed and rebuilt from scratch. Addressing further to bug
destroyed and rebuilt from scratch. Addressing further to bug
report #1665. Co-working with procscore-V10-00-00.
August 25th, 2014 M.Asai (run-V10-00-27)
@@ -492,7 +526,7 @@ August 18th, 2014 M.Asai (run-V10-00-21)
July 19th, 2014 A.Dotti (run-V10-00-20)
- Revert back at run-V10-00-17, need more time to udnerstand
logic. Previous two tags are *probably* not correct.
logic. Previous two tags are *probably* not correct.
July 19th, 2014 A.Dotti (run-V10-00-19)
- Pre-prepares nucleide-table to be empty (fix previous crash)
@@ -515,7 +549,7 @@ July 11th, 2014 A.Dotti (run-V10-00-15)
- Fixing race condition in G4VUPLSplitter class
July 5th, 2014 A. Dotti (run-V10-00-14)
- Fixing data-race condition in G4RunManagerKernel
- Fixing data-race condition in G4RunManagerKernel
when FPE is active
July 5th, 2014 A. Dotti (run-V10-00-13)
@@ -526,7 +560,7 @@ July 5th, 2014 A. Dotti (run-V10-00-13)
July 1th, 2014, V. Ivanchenko (run-V10-00-12)
- G4PhysicsListHelper - minor fix in the default list of processeses:
positron annihilation in muons and hadrons cannot be AtRest -
these are rare high energy discrete processes. Equivalent fix was
these are rare high energy discrete processes. Equivalent fix was
for OrderingParameterTable (problem report #1598)
June 4th, 2014, L. Desorgher (run-V10-00-11)
@@ -548,7 +582,7 @@ May 6th, 2014, G. Cosmo (run-V10-00-07)
Apr 11th, 2014, A. Dotti (run-V10-00-06)
- Use G4Threading::SetMultithreadedApplication(true) if a G4MTRunManagerKernel
is instantiated. Requires global-V10-00-16 or more recent
is instantiated. Requires global-V10-00-16 or more recent
Apr 8th, 2014, A. Dotti (run-V10-00-04,run-V10-00-05)
- Protect against compilation error in WIN32 for pin-affinity
@@ -582,7 +616,7 @@ Nov 29th, 2013, M. Asai (run-V09-06-138, run-V09-06-139)
run after vis manager is instantiated.
Nov 27th, 2013, G. Folger (run-V09-06-137)
- G4MTRunManager.cc: Correctly delete randDbl using delete []
- G4MTRunManager.cc: Correctly delete randDbl using delete []
Nov 27th, 2013, G. Folger (run-V09-06-136)
- Correct deletion of memory: using free() for memory obtained with malloc()
@@ -640,13 +674,13 @@ Nov 12th, 2013, M. Asai (run-V09-06-123)
- Add missing G4endl.
Nov 8th, 2013, L. Desorgher (run-V09-06-122)
- Remove non used field 'last_generated_part_was_adjoint' in
- Remove non used field 'last_generated_part_was_adjoint' in
G4AdjointPrimaryGeneratorAction.hh to avoid compilation warning.
Nov 7th, 2013, L. Desorgher (run-V09-06-121)
- Modification of adjoint classes to migrate to the new RMC schema where reverse
and forward trackings of equivalent adjoint and forward primaries are processed
in the same events. This in preparation for the migration to the G4MT mode.
in the same events. This in preparation for the migration to the G4MT mode.
Nov 7th, 2013, A.Dotti (run-V09-06-120)
- Fix correct use of G4VUserWorkerInitialization::InitializeSteppingVerbose()
@@ -676,7 +710,7 @@ Nov 5th, 2013, A.Dotti (run-V09-06-115)
- Added G4MTRunManager::CreateAndStartWorkers virtual protected method
- All barriers are now virtual methods. Derived classes can re-implement
synchronization of threads.
- Added G4WorkerRunManager::MergePartialResults() re-factor
- Added G4WorkerRunManager::MergePartialResults() re-factor
reduction of local results into global. Derived class cen re-implement
reduction
@@ -688,7 +722,7 @@ Oct 31th, 2013, A.Dotti (run-V09-06-113)
- Retagging, previous tag was rejected by mistake.
Oct 30th, 2013, A.Dotti (run-V09-06-112)
- Bug fixing: reintroduce delete of worker run manager at end of
- Bug fixing: reintroduce delete of worker run manager at end of
G4MTRunManagerKernel::StartThread function.
Oct 21st, 2013, M.Asai (run-V09-06-111)
@@ -713,7 +747,7 @@ Oct 10th, 2013, M.Asai (run-V09-06-106)
- Added Mutex lock for G4MTRunManagerKernel::ReinitializeGeometry().
Oct 2nd, 2013, H.Kurashige (run-V09-06-105)
- Modified G4PhysicsListHelper::AddTransportation()
- Modified G4PhysicsListHelper::AddTransportation()
that would prevent to add the G4Transportation to 'Molecues'
Oct 1st, 2013, A.Dotti (run-V09-06-104)
@@ -746,14 +780,14 @@ Sep 16th, 2013, M.Asai (run-V09-06-99)
- Split part of G4UserWorkerInitialization to G4UserWorkerThreadInitialization.
Sep 12th, 2013, M.Asai (run-V09-06-98)
- Add #ifdef G4MULTITHREADED prtection for the modification introduced
- Add #ifdef G4MULTITHREADED prtection for the modification introduced
in the previous tag.
Sep 12th, 2013, M.Asai (run-V09-06-97)
- G4WorkerRunManager now invokes G4VVisManager::SetUpForAThread() method
so that G4VisManager will get noticed at the end of event of each
worker thread.
Sep 11th, 2013, M.Asai (run-V09-06-96)
- Fix ConstructSD() to be invoked for masther thread as well.
@@ -792,7 +826,7 @@ Sep 1st, 2013, M.Asai (run-V09-06-88)
seeds.
Aug 30th, 2013, M.Asai (run-V09-06-87)
- In addition to G4IonTable::InitializeLightIons(),
- In addition to G4IonTable::InitializeLightIons(),
G4IonConstructor::ConstructParticle() is invoked to ensure all
light ions are properly constructed when GenericIon is constructed.
@@ -813,12 +847,12 @@ Aug 26th, 2013, A.Dotti (run-V09-06-83)
- Use new interface for G4Threading namespace
Aug 16th, 2013, A.Dotti (run-V09-06-82)
- Enable locking of mutex in master loop on condition variable:
- Enable locking of mutex in master loop on condition variable:
fix deadlock observed in Mac OS X 10.8 after report from valgrind drd tool
- Correct MT defects reported by DRD tool
Aug 15th, 2013, M.Asai (run-V09-06-81)
- Re-tag
- Re-tag
Aug 14th, 2013, M.Asai (run-V09-06-80)
- G4VUserPhysicsList takes care of setting the process manager pointer
@@ -827,7 +861,7 @@ Aug 14th, 2013, M.Asai (run-V09-06-80)
Aug 7th, 2013, M.Asai (run-V09-06-79)
- G4WorkerRunManager no longer has a for-loop for the event loop, but it
asks G4MTRunManager to process another event. With this modification,
number of events processed on each thread varies based on the
number of events processed on each thread varies based on the
availability of each thread.
- Based on this modification, the array of random number seeds and event
ID are centrary managed by G4MTRunManager.
@@ -836,7 +870,7 @@ Aug 6th, 2013, A.Dotti (run-V09-06-78)
- Protecting agains compilation warning in case G4VERBOSE is not defined
July 29th, 2013, A.Dotti (run-V09-06-77)
- Activating new interfaces for worker thread G4VProcess initialization
- Activating new interfaces for worker thread G4VProcess initialization
(requires procman-V09-06-02) in G4VUserPhysicsList for
{Prepare,Build}PhysicsTable. Co-working with tag emutils-V09-06-52.
@@ -863,7 +897,7 @@ July 5th, 2013, A.Dotti (run-V09-06-72)
July 5th, 2013, A.Dotti (run-V09-06-71)
- Protect G4UserWorkerInitialization::JoinWorker for sequential build warning
- Add virtual G4WorkerRunManager* G4UserWorkerInitialization::CreateWorkerRunManager method
to simplify instantiation of user-defined run manager (no more need to change StartThread
to simplify instantiation of user-defined run manager (no more need to change StartThread
function)
July 3rd, 2013, M.Asai (run-V09-06-70)
@@ -871,14 +905,14 @@ July 3rd, 2013, M.Asai (run-V09-06-70)
G4WorkerRunManager.
July 3rd, 2013, M.Asai (run-V09-06-69)
- Introducing G4MTRunManagerKernel class for better symmetry of run manager and
- Introducing G4MTRunManagerKernel class for better symmetry of run manager and
run manager kernel.
- First cleaning up of kernel classes.
July 3rd, 2013, A.Dotti (run-V09-06-68)
- Add call to G4SetThreadId global function in G4UserWorkerInitialization::StartThread function
- Remove unused list of G4WorkerRunManager from G4MTRunManager
- Moving joining of threads in G4UserWorkerInitialization class from G4MTRunManager,
- Moving joining of threads in G4UserWorkerInitialization class from G4MTRunManager,
now G4MTRunManager does not cantain anymore thread model specific code and delegates
all model to G4UserWorkerInitialization
- Bug fix for G4cout use in G4RunManagerKernel::~G4RunManagerKernel for worker threads
@@ -898,10 +932,10 @@ July 1st, 2013, M.Asai (run-V09-06-65)
June 25th, 2013, A. Dotti (run-V09-06-64)
- Bug fix for compilation with C++11 standard in G4MTRunManager.hh in
use of std::make_pair
use of std::make_pair
June 22nd, 2013, A. Dotti (run-V09-06-63)
- Copy SensitiveDetector and FieldManagers pointers between
- Copy SensitiveDetector and FieldManagers pointers between
runs. Bug fix to solve issue introduced with tag -59
(G4UserWorkerInitialization::StartThread)
@@ -918,14 +952,14 @@ June 20th, 2013, M. Asai (run-V09-06-60)
- Moving G4ProductionCutsTable::GetProductionCutsTable()->PhysicsTableUpdated() call
from G4RunManagerKernel::BuildPhysicsTables() to
G4RunManager::TerminateEventLoop(): in combination with previous TEMPORARY
modification allows changing material between runs
modification allows changing material between runs
June 20th, 2013, A. Dotti (run-V09-06-59)
- Fix coverity warnings in G4VUPLSplitter and G4VUserPhysicsList
- Adding TEMPORARY re-initialization of geometry in G4UserWorkerInitialization
to allow threads to re-copy shared geometry data in case gemotry has changed
This is only temporary and needs revision after 10.0-beta, but this hack is
currently the only solution that does not require API changes
currently the only solution that does not require API changes
June 19th, 2013, G. Cosmo (run-V09-06-58)
- Restored deletion of allocators as in "run-V09-06-56".
@@ -952,7 +986,7 @@ June 14th, 2013, A. Dotti (run-V09-06-53)
June 12th, 2013, A. Dotti (run-V09-06-52)
- Typo correction in exception from G4UserWorkerInitialization::StartThread
- Re-enabling joining of threads: run-V09-06-50 fixed deadlocks responsible
for problems at exit
for problems at exit
June 11th, 2013, M. Asai (run-V09-06-51)
- Change ions and isomers to be created after BuildPhysics.
@@ -964,12 +998,12 @@ June 10th, 2013, A. Dotti (run-V09-06-50)
June 9th, 2013, A. Dotti (run-V09-06-49)
- In G4MTRunManager rewritten logic of "nextIteration" to solve deadlocks.
Now logic is very similar to the other barriers
Now logic is very similar to the other barriers
June 6th, 2013, G. Folger (run-V09-06-48)
- In G4MTRunManager::WaitForEndEventLoopWorkers protect numberOfReadyWorkers
by its Mutex.
June 5th, 2013, G. Cosmo (run-V09-06-47, run-V09-06-46, run-V09-06-45)
- Use wrappers for calls to pthreads to allow for porting on Windows.
Updated files: G4VUserPhysicsList.cc and G4MTRunManager.cc.
@@ -985,7 +1019,7 @@ May 29th, 2013, A. Dotti (run-V09-06-42)
before event-loop (will be removed when a general way to initialize
processes for MT will be implemented). Needs hadr-casc-V09-06-29
- Prepare for TPmalloc (currently comment out relevant code)
- Initialize ions and isomers for MT (in MTRunManager) before event-loop.
- Initialize ions and isomers for MT (in MTRunManager) before event-loop.
- Initialize light-ions in MT in kernel. Needs particles-V09-06-28
May 24th, 2013, M. Asai (run-V09-06-41)
@@ -997,14 +1031,14 @@ May 24th, 2013, M. Asai (run-V09-06-40)
May 23rd, 2013, M. Asai (run-V09-06-39)
- Move thread-local cout/cerr handling to intercoms category.
- UI commands in /run/cout/ directory are moved to /control/cout/.
May 21th, 2013, A. Dotti (run-V09-06-38)
- New UI command /random/saveEachEventFlag if true save random
seed for each event in a file with unique name: runXXXevtYYY.rndm
- Workers write out random files in files with G4WorkerXX postfix
- Moving "end-of-event-loop" barrier to RunTermination to guarantee
end of run user action in master thread is executed after corresponding
one is executed by workers
one is executed by workers
May 16th, 2013, A. Dotti (run-V09-06-37)
- Threads now use new cout streaming, controllable by UI commands in /run/cout
@@ -1019,7 +1053,7 @@ May 16th, 2013, A. Dotti (run-V09-06-35)
- Fixing compilation error on WIN
- Commenting out joining of threads at exit (some instabilities have
been observed at exit time, this tag is trying to fix this)
NEED TO FIX THIS
NEED TO FIX THIS
May 15th, 2013, M. Asai (run-V09-06-34)
- Enabling more than one runs.
@@ -1047,7 +1081,7 @@ May 5th, 2013, A.Dotti, M.Asai (run-V09-06-29)
- Adding two possibly temporary hacks for hadroncis physics instabilities
1. All ions are created in MT by master thread (workers copy ions table)
2. G4VModularPhysicsList::ConstructProcess has a global mutex lock, in this
way all worker threads call this method one at a time. This limitation is
way all worker threads call this method one at a time. This limitation is
needed since with many threads we have seen instabilities due to one or more
hadronics model corrupting common shared part of physics (most likely particles
table). Not yet found the correct solution for this problem.
@@ -1056,7 +1090,7 @@ May 5th, 2013, A.Dotti, M.Asai (run-V09-06-29)
May 5th, 2013, H.Kurashige (run-V09-06-28)
- 'run/particle/AddProcManager' can be used in Pre_Init state
(requested by particles-V09-06-24 tag)
Apr. 25th, 2013, M.Asai (run-V09-06-27)
- Remove unnecessary G4Exception warning message for not having
G4VUserDetectorConstruction::ConstructSDandField() implemented.
@@ -1090,7 +1124,7 @@ Apr. 16th, 2013, A.Dotti (run-V09-06-21)
Apr. 11th, 2013, I.Hrivnacova (run-V09-06-20)
- Added G4VUserApplication and G4WorkerInitialization classes
and userApplication data member and SetUserApplication() method
in G4(MT)RunManager which allow to simplify user main()
in G4(MT)RunManager which allow to simplify user main()
program wirking in both sequential and MT modes
Apr. 10th, 2013, A.Dotti (run-V09-06-19)
@@ -1107,7 +1141,7 @@ Apr. 9th, 2013, A.Dotti (run-V09-06-17)
Apr. 7th, 2013, A.Dotti (run-V09-06-16)
- Adding barrier mechanism: worerk threads and master are synchronized
at beginning and end of for-loop event loop
at beginning and end of for-loop event loop
(cfr G4WorkerRunManager::DoEventLoop and
G4MTRunManager::InitializeEventLoop)
- Bug fixing for RNG seeds lenght. Now vector of event seeds correctly
@@ -1117,7 +1151,7 @@ Apr. 5th, 2013, M.Asai (run-V09-06-15)
- Fix G4VUserDetectorConstruction::SetSentitiveDetector() method.
Apr. 5th, 2013, M.Asai (run-V09-06-14)
- Adding isMaster boolean flag to G4UserRunAction. It is set to true
- Adding isMaster boolean flag to G4UserRunAction. It is set to true
for the user action object assigned to G4MTRunManager.
Apr. 5th, 2013, A.Dotti (run-V09-06-13)
@@ -1141,13 +1175,13 @@ Apr. 3rd, 2013, A.Dotti (run-V09-06-09)
- RNG Engine is "cloned" in worker threads from master thread one.
This functionality is at the moment implemented in RunManager classes,
but we may want to remove it from there and put it somewhere else
- Fix compilation warnings in gcc
- Fix compilation warnings in gcc
Apr. 2nd, 2013, A.Dotti (run-V09-06-08)
- Further round of refinements for sharing of phusocs lists.
(co-working tag with: hadr-cross-V09-06-16, particles-V09-06-13,
run-V09-06-08, intercoms-V09-06-04, error-propagation-V09-06-04,
physics_lists-V09-06-01,
physics_lists-V09-06-01,
rdecay02-V09-06-01, gtherapy-V09-06-02, electronScattering-V09-06-04,
exampleSE2-V09-06-01, fano-V09-06-03, fano2-V09-06-02, exampleRE01-V09-06-04,
exampleRE02-V09-06-02, exPolarisation-V09-05-03, exOptical-V09-06-01,
@@ -1186,7 +1220,7 @@ Dec. 3rd, 2012, M.Asai (run-V09-06-00)
Oct. 15th, 2012, M.Asai (run-V09-05-09)
- Offering more granular public methods of G4RunManager, which enable
external framework with its own event loop to execute each individual
external framework with its own event loop to execute each individual
event without copying context of base class methods of G4RunManager.
Oct. 1st, 2012, G.Cosmo (run-V09-05-08, run-V09-05-07)
@@ -1194,7 +1228,7 @@ Oct. 1st, 2012, G.Cosmo (run-V09-05-08, run-V09-05-07)
Sep. 14th, 2012, H.Kurashige (run-V09-05-06)
- Fix ordering parameter for DNA processs (62,63,64)
- Fix Coverity defects in G4UserPhysicsListMessenger
- Fix Coverity defects in G4UserPhysicsListMessenger
Aug. 10th, 2012, H.Kurashige (run-V09-05-05)
- Added new subType process numbers for DNA processs (62,63,64)
@@ -1226,7 +1260,7 @@ Nov. 9th, 2011, H.Kurashige (run-V09-04-25)
- Fix Coverity defects in PhysicsList classes
Nov. 8th, 2011, H.Kurashige (run-V09-04-24)
- Update PhysicsListHelper for new DNA processes (Mathieu)
- Update PhysicsListHelper for new DNA processes (Mathieu)
Oct. 20th, 2011, M.Asai (run-V09-04-23)
- Improve G4Exception error messages
@@ -1236,7 +1270,7 @@ Oct. 20th, 2011, M.Asai (run-V09-04-22)
- Re-number G4Exception error numbers.
Sep. 23rd, 2011, H.Kurashige (run-V09-04-21)
- Change G4VModularPhysicsList to issue messages
- Change G4VModularPhysicsList to issue messages
always if physics is added and/or removed.
Cleared compilation warning on gcc-4.6.
@@ -1292,18 +1326,18 @@ June 11th, 2011, H.Kurashige (run-V09-04-07)
- Removed obsolete method of SetCutValueForOthers
May 31st, 2011, J.Apostolakis
- Ensure that a ScoreSplittingProcess is added only once in
- Ensure that a ScoreSplittingProcess is added only once in
G4RunManagerKernel::SetScoreSplitter.
Fixes PR 1218
May 20th, 2011, B.Morgan (run-V09-04-06)
- CMakeLists.txt : Added G4RUN_ALLOC_EXPORT compiler definition via
- CMakeLists.txt : Added G4RUN_ALLOC_EXPORT compiler definition via
add_definitions so it's applied to all sources in this module.
- sources.cmake : Fixed typo in source files listing.
May 10th, 2011, H.Kurashige (run-V09-04-05)
- Fix bug in G4VUserPhysicsList::CheckParticleList()
(fDisableCheckParticleList was ignored in previous tag)
(fDisableCheckParticleList was ignored in previous tag)
May 4th, 2011, H.Kurashige (run-V09-04-04)
- Add NULL check for theTable in G4PhysicsListHelper
@@ -1357,7 +1391,7 @@ September 3rd, 2010 G.Cosmo (run-V09-03-03)
July 21st, 2010 G.Cosmo (run-V09-03-02)
- Added dummy initialisation of data members in constructors for classes:
G4AdjointPrimaryGeneratorAction,
G4AdjointPrimaryGeneratorAction,
- Use canonical form for exceptions in G4RunManager and added dummy return
statements; same in G4VUserPhysicsList.
@@ -1394,7 +1428,7 @@ Oct 19, 2009, Hisaya Kurashige (run-V09-02-06)
Makoto Asai (run-V09-02-05)
Sep 20, 2009, Makoto Asai (run-V09-02-05)
- G4RunManagerKernel checks G4VUserPhysicsList to confirm no particle
is registered when G4RunManagerKernel is instantiated.
is registered when G4RunManagerKernel is instantiated.
Aug 10, 2009, Makoto Asai (run-V09-02-04)
- G4RunManagerKernel now invokes G4VUserPhysicsList::CheckParticleList
@@ -1403,17 +1437,17 @@ Aug 10, 2009, Makoto Asai (run-V09-02-04)
Aug 05, 2009, Hisaya Kurashige (run-V09-02-03)
- Add G4VUserPhysicsList::DisableCheckParticleList method
- Modify G4VUserPhysicsList::CheckParticleList to check existence
of any EM processes
of any EM processes
Aug 03, 2009, Hisaya Kurashige (run-V09-02-02)
- Modify G4VUserPhysicsList to fit with proton cuts
- Modify G4VUserPhysicsList to fit with proton cuts
- Modify G4VUserPhysicsList::BuildPhysicsTable
to avoid problem when ions are created in Pre-Init state
to avoid problem when ions are created in Pre-Init state
May 22nd, 2009, Hisaya Kurashige (run-V09-02-01)
- Add G4VUserPhysicsList::CheckParticleList() to check consistencies of
- Add G4VUserPhysicsList::CheckParticleList() to check consistencies of
list of particles before constructing processes
- Change severity of G4Exception in G4VUserPhysicsList
- Change severity of G4Exception in G4VUserPhysicsList
'FatalException' is assigned if core dump is foreseen
May 21st, 2009, Hisaya Kurashige (run-V09-02-00)
@@ -1483,7 +1517,7 @@ May 9th, 2007, Makoto Asai (run-V08-03-02)
to make sure all region information are updated.
May 7th, 2007, Makoto Asai (run-V08-03-01)
- Add UseG4Transportation8() method to G4VUserPhysicsList and /run/useOldTransportation
- Add UseG4Transportation8() method to G4VUserPhysicsList and /run/useOldTransportation
command to G4UserPhysicsListMessenger. This option works only prior to /run/initialize
and also wothout a parallel world.
@@ -1493,10 +1527,10 @@ May 4th, 2007, Makoto Asai (run-V08-03-00)
May 3rd, 2007, Makoto Asai (run-V08-02-03)
- Fix memory leak in G4VUserPhysicsList.
- G4VUserDetectorConstruction class now has access methods to the parallel worlds.
March 8th, 2007, Makoto Asai (run-V08-02-02)
- Consolidation of previous tag with a new G4RunManager flag and corresponding UI command.
March 5th, 2007, Makoto Asai (run-V08-02-01)
- Prevent from unnecessary creation of G4String objects in G4Event, which were
default for random number status.
@@ -1541,7 +1575,7 @@ November 14th, 2006, Gabriele Cosmo (run-V08-01-01)
the user can have an access to the valid G4Run pointer during the
Idle state after the run.
- Events can be kept un-deleted, stored in G4Run, and persist until
the deletion of G4Run objects.
the deletion of G4Run objects.
June 9th, 2006, Makoto Asai (run-V08-01-00)
- Introducing G4VUserParallelWorld class and related changes in G4RunManager
@@ -1594,7 +1628,7 @@ October 20, 2005, Joseph Perl (run-V07-01-02)
- Tag to co-work with vis-V07-01-05.
October 17th, 2005 Jane Tinslay
- Modify GNUmakefile to follow intercoms->graphics_reps migration for
- Modify GNUmakefile to follow intercoms->graphics_reps migration for
G4VGraphicsScene and G4VVisManager
September 26th, 2005 G.Cosmo (run-V07-01-01)
@@ -1641,7 +1675,7 @@ November 1st, 2004 H.Kurashige (run-V06-02-05)
- Add PreparePhysicsTable for nucleus process initialization
October 25, 2004 H.Kurashige (run-V06-02-04)
- Modify BuildPhysicsTable for new scheme of Store/RetrievePhysicsTable
- Modify BuildPhysicsTable for new scheme of Store/RetrievePhysicsTable
September 24, 2004 M.Asai (run-V06-02-03)
- Temporarily allow the use of G4ParticleTable before the construction of physics table.
@@ -1692,7 +1726,7 @@ December 09, 2003, G.Cosmo (run-V05-02-10)
- Changed date for release 6.0.
November 12, 2003, M.Asai (run-V05-02-09)
- Remove dedicated treatment of anti-proton, neutron and anti-neutron
- Remove dedicated treatment of anti-proton, neutron and anti-neutron
from BuildPhysicsTable of UserPhysicsList.
November 04, 2003, M.Asai (run-V05-02-08)
@@ -1835,7 +1869,7 @@ Aug 20, 2002 R. Chytracek (run-V04-01-03)
- Introducing ResetNavigator() method needed in cases where a geometry
has been modified between runs in order to properly re-initialize navigator's
state
Aug 19, 2002 M.Asai (run-V04-01-02)
- Introducing a new G4Exception scheme
Added : G4ExceptionHandler.hh G4ExceptionHandler.cc
@@ -1847,8 +1881,8 @@ Aug 13, 2002 M.Asai (run-V04-01-01)
Aug 13, 2002 M.Dressel
- removed the files I have placed in run:
include/G4MapPtkStandardCellScorer.hh
include/G4ParallelSamplerMessenger.hh
include/G4MapPtkStandardCellScorer.hh
include/G4ParallelSamplerMessenger.hh
include/G4StandardCellScoreValues.hh
include/G4StandardCellScorer.hh
include/G4StandardScoreTable.hh
@@ -1868,16 +1902,16 @@ Aug 8, 2002 M.Asai (run-V04-01-00)
internal-1-run-V04-01-01 is NOT included in this tag
July 18, 2002 M.Dressel
- change G4StandardScorerTable to the new G4IStore
- change G4StandardScorerTable to the new G4IStore
July 12, 2002 M.Dressel
July 12, 2002 M.Dressel
- added comments to include/G4ParallelSamplerMessenger.hh
and src/G4ParallelSamplerMessenger.cc
July 11, 2002 M.Dressel (internal-1-run-V04-01-01)
- add:
include/G4MapPtkStandardCellScorer.hh
include/G4ParallelSamplerMessenger.hh
include/G4MapPtkStandardCellScorer.hh
include/G4ParallelSamplerMessenger.hh
include/G4StandardCellScoreValues.hh
include/G4StandardCellScorer.hh
include/G4StandardScoreTable.hh
@@ -1890,8 +1924,8 @@ July 11, 2002 M.Dressel (internal-1-run-V04-01-01)
src/G4StandardScorer.cc
- the G4StandardScorer.cc needs the G4EventManager
G4ParallelSamplerMessenger.hh needs G4StandardScorer.
The other classes are needed in turn.
- coworks with internal-2-transport-V04-01-01
The other classes are needed in turn.
- coworks with internal-2-transport-V04-01-01
internal-2-geombias-V04-01-01
Jun 25, 2002 G.Cosmo (run-V04-00-04)
@@ -1899,7 +1933,7 @@ Jun 25, 2002 G.Cosmo (run-V04-00-04)
May 29, 2002 H.Kurashige (run-V04-00-03)
- Add G4VModularPhysicsList.cc
- Use "virtual" inheritance for G4VVModularPhysicsList
- Use "virtual" inheritance for G4VVModularPhysicsList
Apr 26, 2002 M.Asai (run-V04-00-02)
- G4RunManager re-opens geometry when G4 state becomes QUIT.
@@ -1915,7 +1949,7 @@ Dec 07, 2001 G.Cosmo (run-V03-02-11)
Nov 27, 2001 M.Asai (run-V03-02-10)
- Change implementation in rndmSaveThisRun() and rndmSaveThisEvent().
Nov 23, 2001 M.Maire
- Add rndmSaveThisRun() and rndmSaveThisEvent() methods to G4RunManager.
- Add /random/ commands to G4RunMessenger
@@ -1936,7 +1970,7 @@ Oct 24, 2001 G.Cosmo (run-V03-02-07)
Oct 23, 2001 G.Cosmo (run-V03-02-06)
- Merged changes in "run-V03-02-04a" and "run-V03-02-05" for removal of
STLinterface module.
Oct 11, 2001 G.Cosmo (run-V03-02-05)
- Replaced inclusion of ctoken.h with G4Tokenizer.hh in
G4UserPhysicsListMessenger.cc.
@@ -1958,10 +1992,10 @@ Oct 10, 2001 M.Asai (run-V03-02-04)
Oct 10, 2001 H.Kurashige
- Modify G4VUserPhysicsList::SetCutsForOthers to fix problems of
no invocation of RetreivePhysicsTable() for muons
no invocation of RetreivePhysicsTable() for muons
Sep 19, 2001 H.Kurashige (run-V03-02-03)
- Modify G4VUserPhysicsList for STL migration of materials (Hisaya)
- Modify G4VUserPhysicsList for STL migration of materials (Hisaya)
Aug 02, 2001, G.Cosmo (run-V03-02-02)
- Add Set/GetApplyCuts methods in G4VUserPhysicsList (Hisaya)
@@ -1972,11 +2006,11 @@ Jul 18, 2001, M.Asai (run-V03-02-01)
- Add a new feature for the user to increase the number of waiting stacks
- Co-working with event-V03-02-02
Jul 15, 2001
Jul 15, 2001
- Fixed bugs in G4VUserPhysicsList (Hisaya)
--- Modify Store/RetreivePhysicsTable for new G4VProcess
--- Fixed bugs in StoreMaterialInfor and StoreCutValues in binary mode
--- Fixed bugs in StoreMaterialInfor and StoreCutValues in binary mode
Jul 13, 2001, G.Cosmo (run-V03-02-00)
- Cleanup of pedantic warnings in Linux-g++ ANSI setup.
- Corrected "NULL" to "0".
@@ -1989,7 +2023,7 @@ Jun 22, 2001, M.Asai (run-V03-01-00)
Mar. 12 2001, H.Kurashige
- add binary mode for G4VUserPhysicsList::Retrieve/StorePhysicsTable
- add G4VUserPhysicsList::RetrieveCutValues and related
- add G4VUserPhysicsList::Set/ResetStoredInAscii()
- add G4VUserPhysicsList::Set/ResetStoredInAscii()
to switch on ascii mode for Retrieve/StorePhysicsTable
- add setStoredInAscii command in G4UserPhysicsList
@@ -2012,17 +2046,17 @@ Nov 16 2000, M.Asai (run-V02-00-04)
- Fixes a bug in G4VUserPhysicsList (H.K)
Nov 16 2000, M.Asai (run-V02-00-03)
- Add G4VModularPhysicsList and G4VPhysicsConstructor
- Add G4VModularPhysicsList and G4VPhysicsConstructor
to modularize UserPhysicsList (H.K)
Nov 13 2000, M.Asai (run-V02-00-02)
- Introducing a capability of storing random number status file to other directory
Nov 9 2000, M.Asai (run-V02-00-01)
- add Retrieve/StorePhysicsTable and related methods
- add Retrieve/StorePhysicsTable and related methods
in G4VUserPhysicsList and modify BuildPhysicsTable method (H.K.)
- add store/retreivePhysicsTable command in G4UserPhysicsListMessenger (H.K.)
- add store/retreivePhysicsTable command in G4UserPhysicsListMessenger (H.K.)
Jul 22 2000, M.Asai (run-V02-00-00)
- Modify G4RunManager and G4RunMessenger because of elimination of
G4StateManager::Pause() and introducing new G4UImanager as state
@@ -2071,7 +2105,7 @@ Apr 09, 99 M.Asai (tag run-01-00-01)
- Argument of G4UserRunAction methods bcomes to const.
Feb. 9 99 H.Kurashige
- G4VUserPhysicsList::RemoveProcessManager is added
- G4VUserPhysicsList::RemoveProcessManager is added
Dec. 9 98 H.Kurashige (tag run-00-04-01)
- G4VUserPhysicsList is updated to use G4GenericIon (Hisaya)
@@ -2134,7 +2168,7 @@ June 30, 98 M.Asai (tag run-00-07-01)
June 30, 98 H.Kurashige
- Modified G4VUserPhysicsList.cc and MyPhysicsList.cc in example4
for shortlived particles
for shortlived particles
June 26, 98 G.Cosmo (run-00-06-06)
- Modified GNUmakefiles for new electromagnetics structure.
@@ -2149,8 +2183,8 @@ June 25, 98 M.Asai (run-00-06-04)
- Bug fixes for example4 (J.Allison)
- Update ".out" for EmPhys2 (M.Maire)
June 22, 98 G.Cosmo (run-00-06-03 - re-tagged)
- Added missing include paths to digits+hits/* (fix which was already
June 22, 98 G.Cosmo (run-00-06-03 - re-tagged)
- Added missing include paths to digits+hits/* (fix which was already
in place in run-00-06-02 ...) to almost all GNUmakefiles.
- Removed inclusion/usage of MyTrackerHit.hh (!?) in example4.cc and
example_demo.cc.
@@ -2171,7 +2205,7 @@ June 12, 98 G.Cosmo
June 9, 98 M.Asai
- Some changes affected by new aspects of Particles.
- Tagged as run-00-06-01.
- Tagged as run-00-06-01.
June 6, 98 M.Asai
- Modify G4Run and G4RunManager for the new "digits+hits" scheme
@@ -2229,7 +2263,7 @@ March 24, 98 G.Barrand
5th March 1998 H.Kurashige (run-00-04-01)
- Remove old sceme for initialization (G4UserProcessList,
G4UserProcessList, G4UserParticleListMessenger)
G4UserProcessList, G4UserParticleListMessenger)
- Fixed bugs in MyPhysicsList.cc
27th February 1998 H.Kurashige
+5 -1
View File
@@ -44,15 +44,19 @@
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4PhysicsListOrderingParameter.hh"
#include "G4ThreadLocalSingleton.hh"
class G4VProcess;
class G4PhysicsListHelper
{
friend class G4ThreadLocalSingleton<G4PhysicsListHelper>;
private:
// Hide constructor and destructor
G4PhysicsListHelper();
virtual ~G4PhysicsListHelper();
~G4PhysicsListHelper();
public: // with description
// This method gives the ponter to the physics list helper
+4
View File
@@ -594,6 +594,10 @@ public: // with description
//that are event specific. Not implemented for sequential since run seed
//defines event seeds
virtual void RestoreRndmEachEvent(G4bool) { /*No effect in SEQ */ }
protected:
G4bool geometryDirectlyUpdated;
public:
void GeometryDirectlyUpdated(G4bool val=true) { geometryDirectlyUpdated = val; }
};
#endif
+1
View File
@@ -99,6 +99,7 @@ protected:
G4bool runIsSeeded;
G4int nevModulo;
G4int currEvID;
G4int luxury;
G4SeedsQueue seedsQueue;
G4bool readStatusFromFile;
+1 -2
View File
@@ -16,7 +16,6 @@
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
include_directories(${TiMemory_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/detector/include)
@@ -178,7 +177,7 @@ GEANT4_DEFINE_MODULE(NAME G4run
G4track
G4tracking
LINK_LIBRARIES
${TiMemory_LIBRARIES}
${timemory_LIBRARIES}
)
# List any source specific properties here
+1 -1
View File
@@ -120,7 +120,7 @@ G4MTRunManager::G4MTRunManager() : G4RunManager(masterRM),
numberOfEventToBeProcessed = 0;
randDbl = new double[nSeedsPerEvent*nSeedsMax];
char* env = getenv("G4FORCENUMBEROFTHREADS");
char* env = std::getenv("G4FORCENUMBEROFTHREADS");
if(env)
{
G4String envS = env;
+30 -28
View File
@@ -45,14 +45,14 @@
#include <fstream>
////////////////////////////////////////////////////////
G4ThreadLocal G4PhysicsListHelper* G4PhysicsListHelper::pPLHelper = 0;
G4ThreadLocal G4PhysicsListHelper* G4PhysicsListHelper::pPLHelper = nullptr;
////////////////////////////////////////////////////////
G4PhysicsListHelper::G4PhysicsListHelper()
: useCoupledTransportation(false),
theTransportationProcess(0),
theTransportationProcess(nullptr),
verboseLevel(1),
theTable(0),
theTable(nullptr),
sizeOfTable(0),
ordParamFileName("")
{
@@ -78,10 +78,12 @@ G4PhysicsListHelper::~G4PhysicsListHelper()
theTable=0;
sizeOfTable=0;
}
/*
if (theTransportationProcess!=0) {
delete theTransportationProcess;
theTransportationProcess=0;
}
*/
}
////////////////////////////////////////////////////////
@@ -89,7 +91,8 @@ G4PhysicsListHelper* G4PhysicsListHelper::GetPhysicsListHelper()
{
if (!pPLHelper)
{
pPLHelper = new G4PhysicsListHelper;
static G4ThreadLocalSingleton<G4PhysicsListHelper> inst;
pPLHelper = inst.Instance();
}
return pPLHelper;
}
@@ -97,14 +100,14 @@ G4PhysicsListHelper* G4PhysicsListHelper::GetPhysicsListHelper()
////////////////////////////////////////////////////////
void G4PhysicsListHelper::CheckParticleList() const
{
bool isElectron = false;
bool isPositron = false;
bool isGamma = false;
bool isProton = false;
bool isGenericIon = false;
bool isAnyIon = false;
bool isAnyChargedBaryon = false;
bool isEmProc = false;
G4bool isElectron = false;
G4bool isPositron = false;
G4bool isGamma = false;
G4bool isProton = false;
G4bool isGenericIon = false;
G4bool isAnyIon = false;
G4bool isAnyChargedBaryon = false;
G4bool isEmProc = false;
// loop over all particles in G4ParticleTable
aParticleIterator->reset();
@@ -114,7 +117,7 @@ void G4PhysicsListHelper::CheckParticleList() const
// check if any EM process exists
if (!isEmProc) {
G4ProcessVector* list = particle->GetProcessManager()->GetProcessList();
for (int idx=0; idx<list->size(); idx++){
for (std::size_t idx=0; idx<list->size(); ++idx){
isEmProc = ((*list)[idx])->GetProcessType() == fElectromagnetic;
if (isEmProc) break;
}
@@ -136,8 +139,8 @@ void G4PhysicsListHelper::CheckParticleList() const
// RULE 1
// e+, e- and gamma should exist
// if one of them exist
bool isEmBasic = isElectron || isPositron || isGamma;
bool isMissingEmBasic = !isElectron || !isPositron || !isGamma;
G4bool isEmBasic = isElectron || isPositron || isGamma;
G4bool isMissingEmBasic = !isElectron || !isPositron || !isGamma;
if (isEmBasic && isMissingEmBasic) {
G4String missingName="";
if (!isElectron) missingName += "e- ";
@@ -273,8 +276,8 @@ void G4PhysicsListHelper::ReadOrdingParameterTable()
G4bool readInFile = false;
std::ifstream fIn;
if( getenv("G4ORDPARAMTABLE") ){
ordParamFileName = getenv("G4ORDPARAMTABLE");
if( std::getenv("G4ORDPARAMTABLE") ){
ordParamFileName = std::getenv("G4ORDPARAMTABLE");
#ifdef G4VERBOSE
if (verboseLevel >1){
G4cout << "G4PhysicsListHelper::ReadOrdingParameterTable :"
@@ -339,7 +342,6 @@ void G4PhysicsListHelper::ReadOrdingParameterTable()
"The ordering parameter table is empty ");
delete theTable;
theTable=0;
sizeOfTable=0;
}
return;
}
@@ -347,7 +349,7 @@ void G4PhysicsListHelper::ReadOrdingParameterTable()
////////////////////////////////////////////////////////
void G4PhysicsListHelper::DumpOrdingParameterTable(G4int subType) const
{
if (theTable==0) {
if (theTable==0) {
#ifdef G4VERBOSE
if (verboseLevel >0) {
G4cout << "G4PhysicsListHelper::DumpOrdingParameterTable "
@@ -363,7 +365,7 @@ void G4PhysicsListHelper::DumpOrdingParameterTable(G4int subType) const
<< " ProcessType" << " SubType"
<< " AtRest" << " AlongStep" << " PostStep"
<< " Duplicable" << G4endl;
for (int i=0; i<sizeOfTable ; i++){
for (G4int i=0; i<sizeOfTable ; ++i){
G4PhysicsListOrderingParameter* tmp=&(theTable->at(i));
if ((subType>=0) && (subType!=tmp->processSubType)) continue;
G4cout << std::setw(18) << tmp->processTypeName
@@ -397,7 +399,7 @@ G4PhysicsListOrderingParameter G4PhysicsListHelper::GetOrdingParameter(G4int sub
return value;
}
for (int i=0; i<sizeOfTable ; i++){
for (G4int i=0; i<sizeOfTable ; ++i){
G4PhysicsListOrderingParameter* tmp=&(theTable->at(i));
if (subType == tmp->processSubType){
value.processTypeName = tmp->processTypeName;
@@ -424,7 +426,7 @@ G4bool G4PhysicsListHelper::RegisterProcess(G4VProcess* process,
<< G4endl;
}
#endif
G4Exception("G4PhysicsListHelper::RegisterPorcess",
G4Exception("G4PhysicsListHelper::RegisterProcess",
"Run0107", FatalException,
"No Ordering Parameter Table");
return false;
@@ -454,7 +456,7 @@ G4bool G4PhysicsListHelper::RegisterProcess(G4VProcess* process,
<< " SubType = "<< pSubType << G4endl;
}
#endif
G4Exception("G4PhysicsListHelper::RegisterPorcess",
G4Exception("G4PhysicsListHelper::RegisterProcess",
"Run0108", FatalException,
"No Matching process Type/SubType");
return false;
@@ -463,7 +465,7 @@ G4bool G4PhysicsListHelper::RegisterProcess(G4VProcess* process,
G4bool isFound = false;
G4int ord[3];
G4bool duplicable = false;
for (int i=0; i<sizeOfTable ; i++){
for (G4int i=0; i<sizeOfTable ; ++i){
G4PhysicsListOrderingParameter* tmp=&(theTable->at(i));
if ((tmp->processType==pType)&&(tmp->processSubType==pSubType)){
ord[0] = tmp->ordering[0];
@@ -485,7 +487,7 @@ G4bool G4PhysicsListHelper::RegisterProcess(G4VProcess* process,
<< G4endl;
}
#endif
G4Exception("G4PhysicsListHelper::RegisterPorcess",
G4Exception("G4PhysicsListHelper::RegisterProcess",
"Run0109", FatalException,
"No Matching process Type/SubType");
return false;
@@ -512,7 +514,7 @@ G4bool G4PhysicsListHelper::RegisterProcess(G4VProcess* process,
if (!duplicable){
G4bool duplicated = false;
G4ProcessVector* pList = pManager->GetProcessList();
for (G4int idx=0; idx<pList->size(); idx++) {
for (std::size_t idx=0; idx<pList->size(); ++idx) {
const G4VProcess* p = (*pList)[idx];
if ((p->GetProcessType()== pType) &&
(p->GetProcessSubType()== pSubType)){
@@ -530,7 +532,7 @@ G4bool G4PhysicsListHelper::RegisterProcess(G4VProcess* process,
G4cout << "It will not be added !!" << G4endl;
}
#endif
G4Exception("G4PhysicsListHelper::RegisterPorcess",
G4Exception("G4PhysicsListHelper::RegisterProcess",
"Run0111", JustWarning,
"Duplication of processes");
}
@@ -543,7 +545,7 @@ G4bool G4PhysicsListHelper::RegisterProcess(G4VProcess* process,
if (code <0) return false;
// Set Ordering Parameter
for(G4int idx=0; idx<3; idx++){
for(G4int idx=0; idx<3; ++idx){
G4ProcessVectorDoItIndex idxOrd = static_cast<G4ProcessVectorDoItIndex>(idx);
if (ord[idx]<0) {
// Do Nothing because NO DOIT
+50 -42
View File
@@ -95,7 +95,7 @@ G4RunManager::G4RunManager()
storeRandomNumberStatusToG4Event(0),rngStatusEventsFlag(false),
currentWorld(0),nParallelWorlds(0),msgText(" "),n_select_msg(-1),
numberOfEventProcessed(0),selectMacro(""),fakeRun(false),
isScoreNtupleWriter(false)
isScoreNtupleWriter(false),geometryDirectlyUpdated(false)
{
if(fRunManager)
{
@@ -111,14 +111,13 @@ G4RunManager::G4RunManager()
runMessenger = new G4RunMessenger(this);
previousEvents = new std::list<G4Event*>;
G4ParticleTable::GetParticleTable()->CreateMessenger();
G4ProcessTable::GetProcessTable()->CreateMessenger();
G4ProcessTable::GetProcessTable();
randomNumberStatusDir = "./";
std::ostringstream oss;
G4Random::saveFullState(oss);
randomNumberStatusForThisRun = oss.str();
randomNumberStatusForThisEvent = oss.str();
runManagerType = sequentialRM;
InitializeTiMemory();
}
G4RunManager::G4RunManager( RMType rmType )
@@ -136,7 +135,7 @@ G4RunManager::G4RunManager( RMType rmType )
storeRandomNumberStatusToG4Event(0),rngStatusEventsFlag(false),
currentWorld(0),nParallelWorlds(0),msgText(" "),n_select_msg(-1),
numberOfEventProcessed(0),selectMacro(""),fakeRun(false),
isScoreNtupleWriter(false)
isScoreNtupleWriter(false),geometryDirectlyUpdated(false)
{
//This version of the constructor should never be called in sequential mode!
#ifndef G4MULTITHREADED
@@ -176,13 +175,12 @@ G4RunManager::G4RunManager( RMType rmType )
runMessenger = new G4RunMessenger(this);
previousEvents = new std::list<G4Event*>;
G4ParticleTable::GetParticleTable()->CreateMessenger();
G4ProcessTable::GetProcessTable()->CreateMessenger();
G4ProcessTable::GetProcessTable();
randomNumberStatusDir = "./";
std::ostringstream oss;
G4Random::saveFullState(oss);
randomNumberStatusForThisRun = oss.str();
randomNumberStatusForThisEvent = oss.str();
InitializeTiMemory();
}
G4RunManager::~G4RunManager()
@@ -200,7 +198,6 @@ G4RunManager::~G4RunManager()
delete timer;
delete runMessenger;
G4ParticleTable::GetParticleTable()->DeleteMessenger();
G4ProcessTable::GetProcessTable()->DeleteMessenger();
delete previousEvents;
//The following will work for all RunManager types
@@ -609,11 +606,22 @@ void G4RunManager::InitializeGeometry()
G4ApplicationState currentState = stateManager->GetCurrentState();
if(currentState==G4State_PreInit || currentState==G4State_Idle)
{ stateManager->SetNewState(G4State_Init); }
kernel->DefineWorldVolume(userDetector->Construct(),false);
userDetector->ConstructSDandField();
nParallelWorlds = userDetector->ConstructParallelGeometries();
userDetector->ConstructParallelSD();
kernel->SetNumberOfParallelWorld(nParallelWorlds);
if(!geometryDirectlyUpdated)
{
kernel->DefineWorldVolume(userDetector->Construct(),false);
userDetector->ConstructSDandField();
nParallelWorlds = userDetector->ConstructParallelGeometries();
userDetector->ConstructParallelSD();
kernel->SetNumberOfParallelWorld(nParallelWorlds);
}
// Notify the VisManager as well
if(G4Threading::IsMasterThread())
{
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager) pVVisManager->GeometryHasChanged();
}
geometryDirectlyUpdated = false;
geometryInitialized = true;
stateManager->SetNewState(currentState);
}
@@ -762,6 +770,8 @@ void G4RunManager::DumpRegion(G4Region* region) const
void G4RunManager::ConstructScoringWorlds()
{
using MeshShape = G4VScoringMesh::MeshShape;
G4ScoringManager* ScM = G4ScoringManager::GetScoringManagerIfExist();
if(!ScM) return;
@@ -774,43 +784,41 @@ void G4RunManager::ConstructScoringWorlds()
for(G4int iw=0;iw<nPar;iw++)
{
G4VScoringMesh* mesh = ScM->GetMesh(iw);
if(fGeometryHasBeenDestroyed) mesh->GeometryHasBeenDestroyed();
G4VPhysicalVolume* pWorld
= G4TransportationManager::GetTransportationManager()
->IsWorldExisting(ScM->GetWorldName(iw));
if(!pWorld)
if(fGeometryHasBeenDestroyed) mesh->GeometryHasBeenDestroyed();
G4VPhysicalVolume* pWorld = nullptr;
if(mesh->GetShape()!=MeshShape::realWorldLogVol)
{
pWorld = G4TransportationManager::GetTransportationManager()
->GetParallelWorld(ScM->GetWorldName(iw));
pWorld->SetName(ScM->GetWorldName(iw));
G4ParallelWorldProcess* theParallelWorldProcess
= mesh->GetParallelWorldProcess();
if(theParallelWorldProcess)
{ theParallelWorldProcess->SetParallelWorld(ScM->GetWorldName(iw)); }
else
pWorld = G4TransportationManager::GetTransportationManager()->IsWorldExisting(ScM->GetWorldName(iw));
if(!pWorld)
{
theParallelWorldProcess = new G4ParallelWorldProcess(ScM->GetWorldName(iw));
mesh->SetParallelWorldProcess(theParallelWorldProcess);
theParallelWorldProcess->SetParallelWorld(ScM->GetWorldName(iw));
pWorld = G4TransportationManager::GetTransportationManager()->GetParallelWorld(ScM->GetWorldName(iw));
pWorld->SetName(ScM->GetWorldName(iw));
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if(pmanager)
{
pmanager->AddProcess(theParallelWorldProcess);
if(theParallelWorldProcess->IsAtRestRequired(particle))
{ pmanager->SetProcessOrdering(theParallelWorldProcess, idxAtRest, 9900); }
pmanager->SetProcessOrderingToSecond(theParallelWorldProcess, idxAlongStep);
pmanager->SetProcessOrdering(theParallelWorldProcess, idxPostStep, 9900);
G4ParallelWorldProcess* theParallelWorldProcess = mesh->GetParallelWorldProcess();
if(theParallelWorldProcess)
{ theParallelWorldProcess->SetParallelWorld(ScM->GetWorldName(iw)); }
else
{
theParallelWorldProcess = new G4ParallelWorldProcess(ScM->GetWorldName(iw));
mesh->SetParallelWorldProcess(theParallelWorldProcess);
theParallelWorldProcess->SetParallelWorld(ScM->GetWorldName(iw));
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if(pmanager)
{
pmanager->AddProcess(theParallelWorldProcess);
if(theParallelWorldProcess->IsAtRestRequired(particle))
{ pmanager->SetProcessOrdering(theParallelWorldProcess, idxAtRest, 9900); }
pmanager->SetProcessOrderingToSecond(theParallelWorldProcess, idxAlongStep);
pmanager->SetProcessOrdering(theParallelWorldProcess, idxPostStep, 9900);
}
}
}
}
}
mesh->Construct(pWorld);
}
+2 -1
View File
@@ -441,6 +441,7 @@ void G4RunManagerKernel::DefineWorldVolume(G4VPhysicalVolume* worldVol,
{
G4StateManager* stateManager = G4StateManager::GetStateManager();
G4ApplicationState currentState = stateManager->GetCurrentState();
if(currentState!=G4State_Init)
{
if(!(currentState==G4State_Idle||currentState==G4State_PreInit))
@@ -1038,7 +1039,7 @@ void G4RunManagerKernel::SetupShadowProcess() const
if(pm)
{
G4ProcessVector& procs = *(pm->GetProcessList());
for ( G4int idx = 0 ; idx<procs.size() ; ++idx)
for ( std::size_t idx = 0 ; idx<procs.size() ; ++idx)
{
const G4VProcess* masterP = procs[idx]->GetMasterProcess();
if ( ! masterP )
+1 -1
View File
@@ -320,7 +320,7 @@ G4RunMessenger::G4RunMessenger(G4RunManager * runMgr)
randEvtCmd->SetGuidance("for the case of simplest geometry and small number of tracks per event.");
randEvtCmd->SetParameterName("flag",true);
randEvtCmd->SetDefaultValue(0);
randEvtCmd->SetRange("flag>=0 && flag<3");
randEvtCmd->SetRange("flag>=0 && flag<=3");
randEvtCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
procUICmds = new G4UIcmdWithoutParameter("/run/workersProcessCmds",this);
@@ -98,7 +98,8 @@ void G4UserWorkerThreadInitialization::SetupRNGEngine(const CLHEP::HepRandomEngi
retRNG= new CLHEP::RanecuEngine;
}
if ( dynamic_cast<const CLHEP::Ranlux64Engine*>(aNewRNG) ) {
retRNG= new CLHEP::Ranlux64Engine;
const CLHEP::Ranlux64Engine* theRNG = dynamic_cast<const CLHEP::Ranlux64Engine*>(aNewRNG);
retRNG= new CLHEP::Ranlux64Engine(123,theRNG->getLuxury());
}
if ( dynamic_cast<const CLHEP::MTwistEngine*>(aNewRNG) ) {
retRNG= new CLHEP::MTwistEngine;
@@ -107,7 +108,8 @@ void G4UserWorkerThreadInitialization::SetupRNGEngine(const CLHEP::HepRandomEngi
retRNG= new CLHEP::DualRand;
}
if ( dynamic_cast<const CLHEP::RanluxEngine*>(aNewRNG) ) {
retRNG= new CLHEP::RanluxEngine;
const CLHEP::RanluxEngine* theRNG = dynamic_cast<const CLHEP::RanluxEngine*>(aNewRNG);
retRNG= new CLHEP::RanluxEngine(123,theRNG->getLuxury());
}
if ( dynamic_cast<const CLHEP::RanshiEngine*>(aNewRNG) ) {
retRNG= new CLHEP::RanshiEngine;
@@ -115,11 +117,14 @@ void G4UserWorkerThreadInitialization::SetupRNGEngine(const CLHEP::HepRandomEngi
if( retRNG != 0 ) {
G4Random::setTheEngine( retRNG );
}else{
}
else
{
// Does a new method, such as aNewRng->newEngine() exist to clone it ?
G4ExceptionDescription msg;
msg<< " Unknown type of RNG Engine - " << G4endl
<< " Can cope only with HepJamesRandom, MixMaxRng, Ranecu, Ranlux64, MTwistEngine, DualRand, Ranlux or Ranshi."
<< " Can cope only with HepJamesRandom, MixMaxRng, Ranecu, Ranlux64,"
<< " MTwistEngine, DualRand, Ranlux or Ranshi."
<< G4endl
<< " Cannot clone this type of RNG engine, as required for this thread" << G4endl
<< " Aborting " << G4endl;
+7 -9
View File
@@ -672,16 +672,16 @@ void G4VUserPhysicsList::BuildPhysicsTable(G4ParticleDefinition* particle)
if (verboseLevel>2){
G4cout << "G4VUserPhysicsList::BuildPhysicsTable %%%%%% " << particle->GetParticleName() << G4endl;
G4cout << " ProcessManager : " << pManager << " ProcessManagerShadow : " << pManagerShadow << G4endl;
for(G4int iv1=0;iv1<pVector->size();iv1++)
for(std::size_t iv1=0;iv1<pVector->size();++iv1)
{ G4cout << " " << iv1 << " - " << (*pVector)[iv1]->GetProcessName() << G4endl; }
G4cout << "--------------------------------------------------------------" << G4endl;
G4ProcessVector* pVectorShadow = pManagerShadow->GetProcessList();
for(G4int iv2=0;iv2<pVectorShadow->size();iv2++)
for(std::size_t iv2=0;iv2<pVectorShadow->size();++iv2)
{ G4cout << " " << iv2 << " - " << (*pVectorShadow)[iv2]->GetProcessName() << G4endl; }
}
#endif
for (G4int j=0; j < pVector->size(); ++j) {
for (std::size_t j=0; j < pVector->size(); ++j) {
//Andrea July 16th 2013 : migration to new interface...
//Infer if we are in a worker thread or master thread
//Master thread is the one in which the process manager
@@ -746,7 +746,7 @@ void G4VUserPhysicsList::PreparePhysicsTable(G4ParticleDefinition* particle)
"No process Vector");
return;
}
for (G4int j=0; j < pVector->size(); ++j) {
for (std::size_t j=0; j < pVector->size(); ++j) {
//Andrea July 16th 2013 : migration to new interface...
//Infer if we are in a worker thread or master thread
@@ -857,8 +857,7 @@ G4bool G4VUserPhysicsList::StorePhysicsTable(const G4String& directory)
G4ParticleDefinition* particle = theParticleIterator->value();
// Store physics tables for every process for this particle type
G4ProcessVector* pVector = (particle->GetProcessManager())->GetProcessList();
G4int j;
for ( j=0; j < pVector->size(); ++j) {
for (std::size_t j=0; j < pVector->size(); ++j) {
if (!(*pVector)[j]->StorePhysicsTable(particle,dir,ascii)){
G4String comment = "Fail to store physics table for ";
comment += (*pVector)[j]->GetProcessName();
@@ -893,11 +892,10 @@ void G4VUserPhysicsList::RetrievePhysicsTable(G4ParticleDefinition* particle,
const G4String& directory,
G4bool ascii)
{
G4int j;
G4bool success[100];
// Retrieve physics tables for every process for this particle type
G4ProcessVector* pVector = (particle->GetProcessManager())->GetProcessList();
for ( j=0; j < pVector->size(); ++j) {
for (std::size_t j=0; j < pVector->size(); ++j) {
success[j] =
(*pVector)[j]->RetrievePhysicsTable(particle,directory,ascii);
@@ -914,7 +912,7 @@ void G4VUserPhysicsList::RetrievePhysicsTable(G4ParticleDefinition* particle,
(*pVector)[j]->BuildPhysicsTable(*particle);
}
}
for ( j=0; j < pVector->size(); ++j) {
for (std::size_t j=0; j < pVector->size(); ++j) {
// temporary addition to make the integral schema
if (!success[j]) BuildIntegralPhysicsTable((*pVector)[j], particle);
}
+58 -32
View File
@@ -57,8 +57,10 @@ G4WorkerRunManager* G4WorkerRunManager::GetWorkerRunManager()
G4WorkerRunManagerKernel* G4WorkerRunManager::GetWorkerRunManagerKernel()
{ return static_cast<G4WorkerRunManagerKernel*>(GetWorkerRunManager()->kernel); }
G4WorkerRunManager::G4WorkerRunManager() : G4RunManager(workerRM) {
//This constructor should never be called in non-multithreaded mode
G4WorkerRunManager::G4WorkerRunManager() : G4RunManager(workerRM)
{
// This constructor should never be called in non-multithreaded mode
#ifndef G4MULTITHREADED
G4ExceptionDescription msg;
msg<<"Geant4 code is compiled without multi-threading support (-DG4MULTITHREADED is set to off).";
@@ -76,6 +78,23 @@ G4WorkerRunManager::G4WorkerRunManager() : G4RunManager(workerRM) {
workerContext = 0;
readStatusFromFile = false;
// Properly initialise luxury level for Ranlux* engines...
//
if ( dynamic_cast<const CLHEP::Ranlux64Engine*>(G4Random::getTheEngine()) )
{
const CLHEP::Ranlux64Engine* theEngine = dynamic_cast<const CLHEP::Ranlux64Engine*>(G4Random::getTheEngine());
luxury = theEngine->getLuxury();
}
else if ( dynamic_cast<const CLHEP::RanluxEngine*>(G4Random::getTheEngine()) )
{
const CLHEP::RanluxEngine* theEngine = dynamic_cast<const CLHEP::RanluxEngine*>(G4Random::getTheEngine());
luxury = theEngine->getLuxury();
}
else
{
luxury = -1;
}
G4UImanager::GetUIpointer()->SetIgnoreCmdNotFound(true);
#ifdef G4MULTITHREADED
@@ -92,7 +111,8 @@ G4WorkerRunManager::G4WorkerRunManager() : G4RunManager(workerRM) {
#include "G4MTRunManager.hh"
G4WorkerRunManager::~G4WorkerRunManager() {
G4WorkerRunManager::~G4WorkerRunManager()
{
// Delete thread-local data process manager objects
physicsList->TerminateWorker();
// physicsList->RemoveProcessManager();
@@ -338,7 +358,7 @@ G4Event* G4WorkerRunManager::GenerateEvent(G4int i_event)
if(eventHasToBeSeeded)
{
long seeds[3] = { s1, s2, 0 };
G4Random::setTheSeeds(seeds,-1);
G4Random::setTheSeeds(seeds,luxury);
runIsSeeded = true;
////G4cout<<"Event "<<currEvID<<" is seeded with { "<<s1<<", "<<s2<<" }"<<G4endl;
}
@@ -460,6 +480,8 @@ void G4WorkerRunManager::BeamOn(G4int n_event,const char* macroFile,G4int n_sele
namespace { G4Mutex ConstructScoringWorldsMutex = G4MUTEX_INITIALIZER; }
void G4WorkerRunManager::ConstructScoringWorlds()
{
using MeshShape = G4VScoringMesh::MeshShape;
// Return if unnecessary
G4ScoringManager* ScM = G4ScoringManager::GetScoringManagerIfExist();
if(!ScM) return;
@@ -479,15 +501,16 @@ void G4WorkerRunManager::ConstructScoringWorlds()
{
G4VScoringMesh* mesh = ScM->GetMesh(iw);
if(fGeometryHasBeenDestroyed) mesh->GeometryHasBeenDestroyed();
G4VPhysicalVolume* pWorld
= G4TransportationManager::GetTransportationManager()
->IsWorldExisting(ScM->GetWorldName(iw));
if(!pWorld)
G4VPhysicalVolume* pWorld = nullptr;
if(mesh->GetShape()!=MeshShape::realWorldLogVol)
{
G4ExceptionDescription ed;
ed<<"Mesh name <"<<ScM->GetWorldName(iw)<<"> is not found in the master thread.";
G4Exception("G4WorkerRunManager::ConstructScoringWorlds()","RUN79001",
FatalException,ed);
pWorld = G4TransportationManager::GetTransportationManager()->IsWorldExisting(ScM->GetWorldName(iw));
if(!pWorld)
{
G4ExceptionDescription ed;
ed<<"Mesh name <"<<ScM->GetWorldName(iw)<<"> is not found in the master thread.";
G4Exception("G4WorkerRunManager::ConstructScoringWorlds()","RUN79001",FatalException,ed);
}
}
if(!(mesh->GetMeshElementLogical()))
{
@@ -496,28 +519,31 @@ void G4WorkerRunManager::ConstructScoringWorlds()
mesh->SetMeshElementLogical(masterMesh->GetMeshElementLogical());
l.unlock();
G4ParallelWorldProcess* theParallelWorldProcess = mesh->GetParallelWorldProcess();
if(theParallelWorldProcess)
{ theParallelWorldProcess->SetParallelWorld(ScM->GetWorldName(iw)); }
else
if(mesh->GetShape()!=MeshShape::realWorldLogVol)
{
theParallelWorldProcess = new G4ParallelWorldProcess(ScM->GetWorldName(iw));
mesh->SetParallelWorldProcess(theParallelWorldProcess);
theParallelWorldProcess->SetParallelWorld(ScM->GetWorldName(iw));
G4ParallelWorldProcess* theParallelWorldProcess = mesh->GetParallelWorldProcess();
if(theParallelWorldProcess)
{ theParallelWorldProcess->SetParallelWorld(ScM->GetWorldName(iw)); }
else
{
theParallelWorldProcess = new G4ParallelWorldProcess(ScM->GetWorldName(iw));
mesh->SetParallelWorldProcess(theParallelWorldProcess);
theParallelWorldProcess->SetParallelWorld(ScM->GetWorldName(iw));
particleIterator->reset();
while( (*particleIterator)() ){
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if(pmanager)
{
pmanager->AddProcess(theParallelWorldProcess);
if(theParallelWorldProcess->IsAtRestRequired(particle))
{ pmanager->SetProcessOrdering(theParallelWorldProcess, idxAtRest, 9900); }
pmanager->SetProcessOrderingToSecond(theParallelWorldProcess, idxAlongStep);
pmanager->SetProcessOrdering(theParallelWorldProcess, idxPostStep, 9900);
} //if(pmanager)
}//while
particleIterator->reset();
while( (*particleIterator)() ){
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if(pmanager)
{
pmanager->AddProcess(theParallelWorldProcess);
if(theParallelWorldProcess->IsAtRestRequired(particle))
{ pmanager->SetProcessOrdering(theParallelWorldProcess, idxAtRest, 9900); }
pmanager->SetProcessOrderingToSecond(theParallelWorldProcess, idxAlongStep);
pmanager->SetProcessOrdering(theParallelWorldProcess, idxPostStep, 9900);
} //if(pmanager)
}//while
}
}
}
mesh->WorkerConstruct(pWorld);
+3 -3
View File
@@ -74,10 +74,10 @@ void G4WorkerRunManagerKernel::SetupShadowProcess() const
G4cout << "G4WorkerRunManagerKernel::SetupShadowProcess() for particle <"
<< pd->GetParticleName() << ">" << G4endl;
G4cout << " ProcessManager : " << pm << " ProcessManagerShadow : " << pmM << G4endl;
for(G4int iv1=0;iv1<procs.size();iv1++)
for(std::size_t iv1=0;iv1<procs.size();++iv1)
{ G4cout << " " << iv1 << " - " << procs[iv1]->GetProcessName() << G4endl; }
G4cout << "--------------------------------------------------------------" << G4endl;
for(G4int iv2=0;iv2<procsM.size();iv2++)
for(std::size_t iv2=0;iv2<procsM.size();++iv2)
{ G4cout << " " << iv2 << " - " << procsM[iv2]->GetProcessName() << G4endl; }
G4cout << "--------------------------------------------------------------" << G4endl;
G4ExceptionDescription msg;
@@ -91,7 +91,7 @@ void G4WorkerRunManagerKernel::SetupShadowProcess() const
//process from master. Note that we rely on
//processes being in the correct order!
// We could use some checking using process name or type
for ( G4int idx = 0 ; idx < procs.size() ; ++idx )
for ( std::size_t idx = 0 ; idx < procs.size() ; ++idx )
{
procs[idx]->SetMasterProcess(procsM[idx]);
}