Difference between revisions of "GEMC at UNH"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
m
m
Line 11: Line 11:
  
 
ssh to Pumpkin, forwarding the X protocol:
 
ssh to Pumpkin, forwarding the X protocol:
 +
<pre>
 
ssh -X you@pumkpin.unh.edu
 
ssh -X you@pumkpin.unh.edu
 +
</pre>
  
 
Now you will want to set-up your environment.  We have an example skeleton script at  
 
Now you will want to set-up your environment.  We have an example skeleton script at  
 
/net/data/pumpkin2/CLAS12/RHEL5_x64/env.sh
 
/net/data/pumpkin2/CLAS12/RHEL5_x64/env.sh
 
As Maurik pointed out, it does not do a lot of things it should.  For example, it does not scrub your environment of things which could cause trouble, as the stock GEANT4 environment scrupulously does.  In fact, you probably should copy it to your home directory and customize it.  One thing you will almost certainly want to do is export a value for the GEMC environment variable before using it.  Let's imagine that you don't need to customize it for the moment:
 
As Maurik pointed out, it does not do a lot of things it should.  For example, it does not scrub your environment of things which could cause trouble, as the stock GEANT4 environment scrupulously does.  In fact, you probably should copy it to your home directory and customize it.  One thing you will almost certainly want to do is export a value for the GEMC environment variable before using it.  Let's imagine that you don't need to customize it for the moment:
 +
<pre>
 
export GEMC=/net/data/pumpkin2/CLAS12/RHEL5_x64/GEMC
 
export GEMC=/net/data/pumpkin2/CLAS12/RHEL5_x64/GEMC
 
source /net/data/pumpkin2/CLAS12/RHEL5_x64/env.sh
 
source /net/data/pumpkin2/CLAS12/RHEL5_x64/env.sh
 +
</pre>
  
 
Great!  Things should basically just work now, at least somewhat.
 
Great!  Things should basically just work now, at least somewhat.
 
Let's try running GEMC:
 
Let's try running GEMC:
 +
<pre>
 
gemc
 
gemc
 +
</pre>
  
 
Now click in the File menu of the resulting G4UI Session and choose Quitter.  This should bring up the main GUI of GEMC.  Using what settings?  Who knows!  In a minute we will try specifying a few.  First explore the interface.  Note that you have some geometry in a viewer, plus a window with controls.  Try zooming and panning around, blah blah blah.
 
Now click in the File menu of the resulting G4UI Session and choose Quitter.  This should bring up the main GUI of GEMC.  Using what settings?  Who knows!  In a minute we will try specifying a few.  First explore the interface.  Note that you have some geometry in a viewer, plus a window with controls.  Try zooming and panning around, blah blah blah.
  
 
Now the useful stuff.  Try this:
 
Now the useful stuff.  Try this:
 +
<pre>
 
$GEMC/gemc -USE_QT=0 -GT=BST -N=1000 -PRINT_EVENT=100 -OUTPUT="evio, 1000protons.ev" -BEAM_P="proton, 2.0*GeV, 0*deg, 0*deg" -SPREAD_P="1.8*GeV, 180*deg, 360*deg" -SPREAD_V="(0.1, 0.1, 2.5)cm" -LUMI_P="e-, 11*GeV, 0, 0" -LUMI_V="(0, 0, -5)cm" -LUMI_EVENT="100, 124*ns, 2*ns" -USE_PHYSICSL=QGSP -HALL_MATERIAL=Vacuum
 
$GEMC/gemc -USE_QT=0 -GT=BST -N=1000 -PRINT_EVENT=100 -OUTPUT="evio, 1000protons.ev" -BEAM_P="proton, 2.0*GeV, 0*deg, 0*deg" -SPREAD_P="1.8*GeV, 180*deg, 360*deg" -SPREAD_V="(0.1, 0.1, 2.5)cm" -LUMI_P="e-, 11*GeV, 0, 0" -LUMI_V="(0, 0, -5)cm" -LUMI_EVENT="100, 124*ns, 2*ns" -USE_PHYSICSL=QGSP -HALL_MATERIAL=Vacuum
 +
</pre>
  
 
This will run GEMC with no GUI (-USE_QT=0), using the geometry table BST (-GT=BST), simulating 1000 events (-N=1000), printing the progress every 100 events (-PRINT_EVENT=100), storing the output in EVIO format in the file 1000protons.ev (-OUTPUT="evio, 1000protons.ev"),  with a beam of protons of energy 2.0 GeV (-BEAM_P="proton, 2.0*GeV, 0*deg, 0*deg"), then there's something about the vertex I don't understand.  Also, some other crap.
 
This will run GEMC with no GUI (-USE_QT=0), using the geometry table BST (-GT=BST), simulating 1000 events (-N=1000), printing the progress every 100 events (-PRINT_EVENT=100), storing the output in EVIO format in the file 1000protons.ev (-OUTPUT="evio, 1000protons.ev"),  with a beam of protons of energy 2.0 GeV (-BEAM_P="proton, 2.0*GeV, 0*deg, 0*deg"), then there's something about the vertex I don't understand.  Also, some other crap.
Line 32: Line 40:
 
Right.  So we've got this file with data now.  What do we do with it?  Let's analyze it with ROOT!
 
Right.  So we've got this file with data now.  What do we do with it?  Let's analyze it with ROOT!
 
But first we need to convert it from the EVIO format to that used by ROOT:
 
But first we need to convert it from the EVIO format to that used by ROOT:
 +
<pre>
 
$CLAS12ROOT/EVIO2ROOT/evio2root  
 
$CLAS12ROOT/EVIO2ROOT/evio2root  
 +
</pre>
  
 
Assuming you're still on pumpkin, and have your environment set-up reasonably, you should be able to just run ROOT by typing:
 
Assuming you're still on pumpkin, and have your environment set-up reasonably, you should be able to just run ROOT by typing:
 +
<pre>
 
root
 
root
 +
</pre>
  
 
This should start ROOT's interactive interpreter.  Start by running
 
This should start ROOT's interactive interpreter.  Start by running
 +
<pre>
 
TBrowser B;
 
TBrowser B;
 +
</pre>
 +
 
Now navigate the directory structure to find your ROOT file, and open it.
 
Now navigate the directory structure to find your ROOT file, and open it.
 +
 +
Skipping to ROOT examples:

Revision as of 18:43, 10 July 2008

This page is going to start out nearly useless, but if I don't start it it will never be started, will it?

Now then.

We have set-up a suite of software which will be necessary/useful. Generally it exists in /net/data/pumpkin2/CLAS12 Under this we have directories with binaries for a handful of platforms. The one of most interest currently is RHEL5_x64, which contains binaries compiled for Red Hat Enterprise Linux 5, AMD64. It is the most interesting because it is the most complete, and it is suitable for use whilst SSHed to Pumpkin, the NPG's hardcore Opteron monster.

Speaking of which, do the following:

ssh to Pumpkin, forwarding the X protocol:

ssh -X you@pumkpin.unh.edu

Now you will want to set-up your environment. We have an example skeleton script at /net/data/pumpkin2/CLAS12/RHEL5_x64/env.sh As Maurik pointed out, it does not do a lot of things it should. For example, it does not scrub your environment of things which could cause trouble, as the stock GEANT4 environment scrupulously does. In fact, you probably should copy it to your home directory and customize it. One thing you will almost certainly want to do is export a value for the GEMC environment variable before using it. Let's imagine that you don't need to customize it for the moment:

export GEMC=/net/data/pumpkin2/CLAS12/RHEL5_x64/GEMC
source /net/data/pumpkin2/CLAS12/RHEL5_x64/env.sh

Great! Things should basically just work now, at least somewhat. Let's try running GEMC:

gemc

Now click in the File menu of the resulting G4UI Session and choose Quitter. This should bring up the main GUI of GEMC. Using what settings? Who knows! In a minute we will try specifying a few. First explore the interface. Note that you have some geometry in a viewer, plus a window with controls. Try zooming and panning around, blah blah blah.

Now the useful stuff. Try this:

$GEMC/gemc -USE_QT=0 -GT=BST -N=1000 -PRINT_EVENT=100 -OUTPUT="evio, 1000protons.ev" -BEAM_P="proton, 2.0*GeV, 0*deg, 0*deg" -SPREAD_P="1.8*GeV, 180*deg, 360*deg" -SPREAD_V="(0.1, 0.1, 2.5)cm" -LUMI_P="e-, 11*GeV, 0, 0" -LUMI_V="(0, 0, -5)cm" -LUMI_EVENT="100, 124*ns, 2*ns" -USE_PHYSICSL=QGSP -HALL_MATERIAL=Vacuum

This will run GEMC with no GUI (-USE_QT=0), using the geometry table BST (-GT=BST), simulating 1000 events (-N=1000), printing the progress every 100 events (-PRINT_EVENT=100), storing the output in EVIO format in the file 1000protons.ev (-OUTPUT="evio, 1000protons.ev"), with a beam of protons of energy 2.0 GeV (-BEAM_P="proton, 2.0*GeV, 0*deg, 0*deg"), then there's something about the vertex I don't understand. Also, some other crap.

Right. So we've got this file with data now. What do we do with it? Let's analyze it with ROOT! But first we need to convert it from the EVIO format to that used by ROOT:

$CLAS12ROOT/EVIO2ROOT/evio2root 

Assuming you're still on pumpkin, and have your environment set-up reasonably, you should be able to just run ROOT by typing:

root

This should start ROOT's interactive interpreter. Start by running

TBrowser B;

Now navigate the directory structure to find your ROOT file, and open it.

Skipping to ROOT examples: