Difference between revisions of "Sim12 Batch Guide"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
 
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Sim 12 Batch Mode Command Guide=
+
This is a lightweight repository of common commands. For something a little more in depth, see: http://clasweb.jlab.org/wiki/index.php/Running_Sim12
  
This is a repository of common commands.
+
For the full Sim12 internal manual, see http://clasweb.jlab.org/wiki/index.php/Sim12_Manual. This is pretty ugly to use, needs cleaning up.
  
==Setting the stage:==
+
=Quick Overview=
  
Open new view (of [x] size)
+
Common Commands:
<pre>/vis/open OGLIX x</pre>
+
<pre>
 +
#Set up environment
  
Draw xml file loaded by Sim12
+
/control/verbose x #x = 0,1,2
<pre>/vis/view/drawVolume</pre>
 
  
===Manipulate the display of some material:===
+
***recommended***
 +
/run/verbose 2
 +
/event/verbose 0
 +
/tracking/verbose 1
 +
#These will display info regarding the beam, track of each particle, and interactions in the terminal.
  
Select a material to work with. (Without the back ticks)
+
/control/saveHistory #save command history in G4History.macro
<pre>/hdds/vis/matName 'material you want'</pre>
+
/vis/open OGLIX x #x = window size, 400 is good
 +
/vis/drawVolume #draw xml document loaded by sim12
 +
/vis/scene/add/hits #show where particles hit
 +
/vis/scene/add/trajectories #show where particles go
 +
/vis/scene/endOfEventAction accumulate #save event data to display for the user
  
Set it's color and transparency. (r(ed) g(reen) b(lue) a(lpha), values between 0 and 1.)
+
#Manipulate materials
<pre>/hdds/vis/setColor r g b a</pre>
 
  
Set the display type of an object. (0 -invisible 1 -wireframe 2 -surface)
+
/hdds/vis/matName x #ready material x display settings to be manipulated
<pre>/hdds/vis/setStyle x</pre>
+
/hdds/vis/setColor r g b a #percent r(ed) g(reen) b(lue) a(lpha), values between 0 and 1.
 +
/hdds/vis/setStyle x #0 -invisible 1 -wireframe 2 -surface
 +
/hdds/vis/updateVis #update changes to material to viewer
 +
/vis/viewer/flush #refreshes viewer, closing open variables. ie, ends working with material x.
 +
/vis/scene/notifyHandlers #update, flush, refresh, prepare to gather data
  
Update the viewer with your changes.
+
#Manipulate viewpoint
<pre>/hdds/vis/updateVis</pre>
 
  
 +
/vis/viewer/zoom x #by a factor of x
 +
/vis/viewer/set/viewpointThetaPhi x y #rotate TO theta x and phi y
 +
/vis/viewer/pan x y #pan by
 +
/vis/viewer/panTo x y #pan to
 +
/vis/viewer/reset #reset to x=0 y=0 theta=0 phi=0
  
==View Manipulation:==
+
#Manipulate beam
  
Zoom (by a factor [x])
+
/gun/particle x #set the beam to fire particle name x, see list below
/vis/viewer/zoom x
+
/gun/direction x y z # x, y, z != 0, set momentum direction
 +
/gun/energy x y #set kinetic energy x y, where y is the units (eV keV MeV GeV TeV PeV J)
 +
/run/beamOn x #simulate x events
  
Rotate (In theta [x] and phi [y])
+
</pre>
/vis/viewer/set/viewpointThetaPhi x y
 
  
Relative Pan (Pan by [x] and [y])
+
Particle List:
/vis/viewer/pan x y
+
<pre>
 +
proton
 +
anti_proton
 +
neutron
 +
anti_neutron
 +
e-
 +
e+
 +
nu_e
 +
anti_nu_e
 +
nu_mu
 +
anti_nu_mu
 +
mu+
 +
mu-
 +
pi+
 +
pi-
 +
pi0
 +
gamma
 +
opticalphoton
 +
eta
 +
eta_prime
 +
geantino
 +
chargedgeantino
 +
kaon+
 +
kaon-
 +
kaon0
 +
anti_kaon0
 +
kaon0L
 +
kaon0S
 +
</pre>
  
Absolute Pan (Pan to [x] and [y])
+
Other possibly useful things:
/vis/viewer/panTo x y
 
  
Refresh View
+
<pre>
/vis/viewer/refresh
+
#GUI Commands:
  
Reset View
+
/gui/addMenu
/vis/viewer/reset
+
    somemenu SomeMenu      #Add menu "somemenu", labeled "SomeMenu" in the GUI
 +
/gui/addButton
 +
    somemenu menuitem /somecommand  #Add a button labeled "menuitem to menu "somemenu" which does "somecommand"

Latest revision as of 21:57, 24 October 2007

This is a lightweight repository of common commands. For something a little more in depth, see: http://clasweb.jlab.org/wiki/index.php/Running_Sim12

For the full Sim12 internal manual, see http://clasweb.jlab.org/wiki/index.php/Sim12_Manual. This is pretty ugly to use, needs cleaning up.

Quick Overview

Common Commands:

#Set up environment

/control/verbose x #x = 0,1,2

***recommended***
/run/verbose 2
/event/verbose 0
/tracking/verbose 1
#These will display info regarding the beam, track of each particle, and interactions in the terminal.

/control/saveHistory #save command history in G4History.macro
/vis/open OGLIX x #x = window size, 400 is good
/vis/drawVolume #draw xml document loaded by sim12
/vis/scene/add/hits #show where particles hit
/vis/scene/add/trajectories #show where particles go
/vis/scene/endOfEventAction accumulate #save event data to display for the user

#Manipulate materials

/hdds/vis/matName x #ready material x display settings to be manipulated
/hdds/vis/setColor r g b a #percent r(ed) g(reen) b(lue) a(lpha), values between 0 and 1.
/hdds/vis/setStyle x #0 -invisible 1 -wireframe 2 -surface
/hdds/vis/updateVis #update changes to material to viewer
/vis/viewer/flush #refreshes viewer, closing open variables. ie, ends working with material x.
/vis/scene/notifyHandlers #update, flush, refresh, prepare to gather data

#Manipulate viewpoint

/vis/viewer/zoom x #by a factor of x
/vis/viewer/set/viewpointThetaPhi x y #rotate TO theta x and phi y
/vis/viewer/pan x y #pan by
/vis/viewer/panTo x y #pan to
/vis/viewer/reset #reset to x=0 y=0 theta=0 phi=0

#Manipulate beam

/gun/particle x #set the beam to fire particle name x, see list below
/gun/direction x y z # x, y, z != 0, set momentum direction
/gun/energy x y #set kinetic energy x y, where y is the units (eV keV MeV GeV TeV PeV J)
/run/beamOn x #simulate x events

Particle List:

proton
anti_proton
neutron
anti_neutron
e-
e+
nu_e
anti_nu_e
nu_mu
anti_nu_mu
mu+
mu-
pi+
pi-
pi0
gamma
opticalphoton
eta
eta_prime
geantino
chargedgeantino
kaon+
kaon-
kaon0
anti_kaon0
kaon0L
kaon0S

Other possibly useful things:

#GUI Commands:

/gui/addMenu
     somemenu SomeMenu       #Add menu "somemenu", labeled "SomeMenu" in the GUI
/gui/addButton 
     somemenu menuitem /somecommand   #Add a button labeled "menuitem to menu "somemenu" which does "somecommand"