-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4532936
Showing
38 changed files
with
148,282 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
0.0 | ||
19.000000 | ||
71.000000 | ||
1 | ||
0.0 | ||
0.0 | ||
0.0 | ||
0.900000 | ||
1 | ||
0.001000 | ||
0 | ||
1 | ||
1 | ||
1 | ||
0.5 | ||
0.5 | ||
0.5 | ||
19.000000 | ||
71.000000 | ||
0.1 | ||
0.1 | ||
0.1 | ||
3 | ||
70.000000 | ||
0.1 | ||
0 | ||
1 | ||
1 | ||
display | ||
0 | ||
0 | ||
1 | ||
n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
1.85005e+07 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
1 | ||
1 | ||
0.001 | ||
0 | ||
1 | ||
1 | ||
1 | ||
0.5 | ||
0.5 | ||
0.5 | ||
19 | ||
71 | ||
0.1 | ||
0.1 | ||
0.1 | ||
3 | ||
70 | ||
0.1 | ||
0 | ||
1 | ||
1 | ||
gv | ||
1 | ||
0 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
201322461 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# - CMakeLists.txt for Geant4 MT Example ParN02 | ||
# | ||
#----------------------------------------------------------------------- | ||
# Setup the project | ||
set(name ParFullCMS) | ||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR) | ||
project(${name}) | ||
|
||
#----------------------------------------------------------------------- | ||
# Find Geant4MT package, using the 'mt' component to enforce this. | ||
# As with other examples, we activate all available UI and Vis drivers by | ||
# default. | ||
# You can set WITH_GEANT4_UIVIS to OFF via the command line or | ||
# ccmake/cmake-gui to build a batch mode only executable | ||
# | ||
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON) | ||
if(WITH_GEANT4_UIVIS) | ||
find_package(Geant4 REQUIRED gdml ui_all vis_all) | ||
else() | ||
find_package(Geant4 REQUIRED gdml) | ||
endif() | ||
|
||
#----------------------------------------------------------------------- | ||
# Setup Geant4 include directories and compile definitions | ||
# Setup include directory for this project | ||
# | ||
include(${Geant4_USE_FILE}) | ||
include_directories(${PROJECT_SOURCE_DIR}/include) | ||
|
||
#----------------------------------------------------------------------- | ||
# Locate sources and headers for this project | ||
# NB: headers are included so that they will show up in IDEs | ||
# | ||
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc) | ||
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh) | ||
|
||
#----------------------------------------------------------------------- | ||
# Add the executable, and link it to the Geant4 libraries | ||
# | ||
add_executable(${name} ParmainApplication.cc ${sources} ${headers}) | ||
target_link_libraries(${name} ${Geant4_LIBRARIES}) | ||
|
||
#----------------------------------------------------------------------- | ||
# Copy all scripts to the build directory, i.e. the directory in which we | ||
# build ${name}. This is so that we can run the executable directly | ||
# because it relies on these scripts being in the current working | ||
# directory. | ||
# | ||
set(PARFULLCMS_SCRIPTS | ||
start.rndm | ||
vis.mac | ||
cms.gdml | ||
bench0.g4 | ||
bench1.g4 | ||
mt.g4 | ||
README | ||
) | ||
|
||
foreach(_script ${PARFULLCMS_SCRIPTS}) | ||
configure_file( | ||
${PROJECT_SOURCE_DIR}/${_script} | ||
${PROJECT_BINARY_DIR}/${_script} | ||
COPYONLY | ||
) | ||
endforeach() | ||
|
||
#----------------------------------------------------------------------- | ||
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX | ||
# | ||
install(TARGETS ${name} DESTINATION bin) | ||
install(FILES ${PARFULLCMS_SCRIPTS} DESTINATION share/ParFullCMS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name := ParmainApplication | ||
G4TARGET := $(name) | ||
G4EXLIB := true | ||
|
||
ifdef LHEP | ||
CPPFLAGS += -DflagLHEP | ||
endif | ||
|
||
ifdef QGSP | ||
CPPFLAGS += -DflagQGSP | ||
endif | ||
|
||
ifdef QGSP_EMV | ||
CPPFLAGS += -DflagQGSP_EMV | ||
endif | ||
|
||
ifdef QGSC | ||
CPPFLAGS += -DflagQGSC | ||
endif | ||
|
||
ifdef FTFP | ||
CPPFLAGS += -DflagFTFP | ||
endif | ||
|
||
ifdef QGSP_BIC | ||
CPPFLAGS += -DflagQGSP_BIC | ||
endif | ||
|
||
ifdef QGSP_BERT | ||
CPPFLAGS += -DflagQGSP_BERT | ||
endif | ||
|
||
include $(G4INSTALL)/config/architecture.gmk | ||
|
||
.PHONY: all | ||
|
||
all: lib bin | ||
|
||
include $(G4INSTALL)/config/binmake.gmk | ||
|
||
ifndef XERCESCROOT | ||
@echo XERCESCROOT not defined! | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
========================================================= | ||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP | ||
========================================================= | ||
|
||
FullCMS benchmark History file | ||
------------------------------ | ||
This file should be used by the G4 example coordinator to briefly | ||
summarize all major modifications introduced in the code and keep | ||
track of all tags. | ||
|
||
---------------------------------------------------------- | ||
* Reverse chronological order (last date on top), please * | ||
---------------------------------------------------------- | ||
|
||
|
||
|
||
|
||
23-Apr-2008 - A.Ribon (cms-V09-01-00) | ||
--------------------- | ||
- Added total energy deposit in the whole experimental hall. | ||
|
||
|
||
24-Oct-2007 - A.Ribon (cms-V09-00-00) | ||
--------------------- | ||
- Created. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
#include "G4RunManager.hh" | ||
#include "G4MTRunManager.hh" | ||
#include "G4UImanager.hh" | ||
#include "G4UIsession.hh" | ||
#include "G4UIterminal.hh" | ||
#include "G4UItcsh.hh" | ||
#include "G4UIExecutive.hh" | ||
#ifdef G4VIS_USE | ||
#include "G4VisExecutive.hh" | ||
#endif | ||
|
||
#include "CLHEP/Random/MTwistEngine.h" | ||
#include "CLHEP/Random/RanluxEngine.h" | ||
#include "MyDetectorConstruction.hh" | ||
#include "MyPrimaryGeneratorAction.hh" | ||
#include "MyEventAction.hh" | ||
#include "MyUserActionInitialization.hh" | ||
// --- Physics Lists --- | ||
#include "G4PhysListFactory.hh" | ||
// --- | ||
|
||
//01.25.2009 Xin Dong: This example came from the original sequential | ||
//program FullCMS. The original program is changed here to support parallel | ||
//computing with multiple threads. All events are assigned to each worker | ||
//thread in a round robin fashion. All threads share most detector data | ||
//including physics table and physics vector for some physics processes. | ||
//The master process initializes the data in a regular way. However, worker | ||
//threads initialize thread private data only. | ||
//#include "G4MTParTopC.icc" | ||
|
||
//01.25.2009 Xin Dong: Threads share this object. | ||
//MyDetectorConstruction *detector = 0; | ||
|
||
int main(int argc,char** argv) { | ||
//CLHEP::RanluxEngine defaultEngine( 1234567, 4 ); | ||
CLHEP::MTwistEngine defaultEngine(1234567); | ||
G4Random::setTheEngine( &defaultEngine ); | ||
G4long seed = time( NULL ); | ||
G4Random::setTheSeed( seed ); | ||
|
||
G4cout << G4endl | ||
<< " ===================================================== " << G4endl | ||
<< " Initial seed = " << seed << G4endl | ||
<< " ===================================================== " << G4endl | ||
<< G4endl; | ||
#ifdef G4MULTITHREADED | ||
G4MTRunManager* runManager = new G4MTRunManager; // = new G4RunManager; | ||
//G4int nt = 2; | ||
//if ( argc > 1 ) nt = atoi( argv[1] ); | ||
runManager->SetNumberOfThreads( 2 ); | ||
#else | ||
G4RunManager* runManager = new G4RunManager; | ||
#endif | ||
//01.25.2009 Xin Dong: The master thread and worker threads have different behavior | ||
//in the phase of initialization. | ||
//if (threadRank == 0) | ||
// runManager = new G4RunManager; | ||
//else | ||
// runManager = new G4RunManager(1); | ||
|
||
//01.25.2009 Xin Dong: The master thread and worker threads have different behavior. | ||
//in the phase of initialization. | ||
//if (threadRank == 0) | ||
MyDetectorConstruction* detector = new MyDetectorConstruction; | ||
//else | ||
//detector->SlaveMyDetectorConstruction(); | ||
|
||
runManager->SetUserInitialization(detector); | ||
|
||
// --- Physics Lists --- | ||
G4PhysListFactory factory; | ||
runManager->SetUserInitialization( factory.ReferencePhysList() ); | ||
|
||
//thePL->SetDefaultCutValue( 0.020 *mm ); // 20 microns | ||
|
||
runManager->SetUserInitialization( new MyUserActionInitialization ); | ||
|
||
|
||
#ifdef G4VIS_USE | ||
// Visualization manager | ||
// | ||
G4VisManager* visManager = new G4VisExecutive; | ||
visManager->Initialize(); | ||
#endif | ||
|
||
runManager->Initialize(); | ||
|
||
// get the pointer to the UI manager and set verbosities | ||
G4UImanager* UI = G4UImanager::GetUIpointer(); | ||
|
||
if ( argc==1 ) { // Define UI session for interactive mode. | ||
G4UIExecutive* ui = new G4UIExecutive(argc,argv); | ||
//G4UIsession * session = new G4UIterminal(new G4UItcsh); | ||
UI->ApplyCommand("/control/execute vis.mac"); | ||
G4cout << "Now, please, apply beamOn command..." << G4endl; | ||
ui->SessionStart(); | ||
//session->SessionStart(); | ||
delete ui; | ||
} else { // Batch mode | ||
G4String command = "/control/execute "; | ||
G4String fileName = argv[1]; | ||
UI->ApplyCommand(command+fileName); | ||
} | ||
|
||
G4cout << G4endl | ||
<< " ===================================================== " << G4endl | ||
<< " Final random number = " | ||
<< CLHEP::HepRandom::getTheEngine()->flat() << G4endl | ||
<< " ===================================================== " << G4endl | ||
<< G4endl; | ||
|
||
#ifdef G4VIS_USE | ||
delete visManager; | ||
#endif | ||
|
||
//01.25.2009 Xin Dong: The master thread and worker threads have different behavior | ||
//in the phase of exit. | ||
//if (threadRank != 0) detector->SlaveDestroy(); | ||
|
||
//01.25.2009 Xin Dong: The master thread and worker threads have different behavior | ||
//in the phase of exit. It is better that all threads destroy this object. However, | ||
//it results in panics by destroying shared data many times. | ||
//if (threadRank == 0) | ||
// delete runManager; | ||
return 0; | ||
} |
Oops, something went wrong.