Running an example

From UCL HEP PBT Wiki

Jump to: navigation, search
m
m
 
Line 9: Line 9:
by typing the command
by typing the command
-
 
+
<pre style="color: #800000; background-color: #dcdcdc">
cd /home/your_name/Desktop/B1-build
cd /home/your_name/Desktop/B1-build
 +
</pre>
4. To build your project type the following command into the terminal
4. To build your project type the following command into the terminal
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
cmake -DGeant4_DIR=/home/your_name/Desktop/Geant4-install/lib64/Geant4-10.0.0 SPACE
 +
/home/your_name/Desktop/Geant4-install/share/Geant4.10.0.1/examples/basic/B1
 +
</pre>
-
cmake -DGeant4_DIR=/home/your_name/Desktop/Geant4-install/lib64/Geant4-10.0.0 SPACE /home/your_name/Desktop/Geant4-install/share/Geant4.10.0.1/examples/basic/B1
+
SPACE should obviously be replaced with a space bar (do not type the word SPACE).
-
SPACE should obviously be replaced with a space bar (do not type the word SPACE)
+
5. Now type the command
-
5. Now type the command
+
<pre style="color: #800000; background-color: #dcdcdc">
-
+
make
make
 +
</pre>
-
Into the command terminal
+
into the command terminal.
-
6. to run your example, type the following command into the terminal
+
<span style="color:#ff0000"> IF RUNNING GEANT4 ON YOUR OWN MACHINE </span>
 +
6. to run your example, type the following command into the terminal
 +
<pre style="color: #800000; background-color: #dcdcdc">
source /home/your_name/Desktop/geant4-install/bin/geant4.sh
source /home/your_name/Desktop/geant4-install/bin/geant4.sh
-
 
+
</pre>
This command tells the terminal where all the data files that are required to running and building your simulation are.
This command tells the terminal where all the data files that are required to running and building your simulation are.
 +
 +
<span style="color:#ff0000"> IF RUNNING GEANT4 ON PLUS1 SERVER TYPE THE FOLLOWING INSTEAD </span>
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
source /unix/pbt/software/dev/bin/pbt-dev.sh
 +
</pre>
 +
 +
PS: If you are running Geant4 on your own machine you are likely to have the latest versions of CMAKE and GCC installed. If running Geant4 on PLUS1 you will need to enter the give source command to access the latest versions. The latest version is required to run certain processes faster.
7. Finally, to open your simulation type the command
7. Finally, to open your simulation type the command
 +
<pre style="color: #800000; background-color: #dcdcdc">
./exampleB1  
./exampleB1  
 +
</pre>
-
Into the terminal
+
into the terminal. To run the simulation type the following commands into the terminal:
-
 
+
-
To run the simulation type the following commands into the terminal:
+
 +
<pre style="color: #800000; background-color: #dcdcdc">
Idle> /control/verbose 2
Idle> /control/verbose 2
Idle> /tracking/verbose 1
Idle> /tracking/verbose 1
Idle> /run/beamOn 10  
Idle> /run/beamOn 10  
 +
</pre>
-
 
+
In order to understand what these commands mean, and how to run simulations in general using Geant4, please use the official Geant4 manual from CERN @:[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch01.html UserGuideForApplicationDeveloper]
-
In order to understand what these commands mean, and how to run simulations in general using Geant4, please use the official Geant4 manual from CERN @:
+

Latest revision as of 15:45, 21 July 2014

Personal tools