Project

General

Profile

Wiki » History » Version 43

« Previous - Version 43/75 (diff) - Next » - Current version
Seongtae Park, 10/21/2013 11:21 AM


LBNE Beam Simulation Group Wiki

To be added to this project you need a Fermilab Services account. If you have never had a Services Account or just simply do not remember your password, follow this link, Services Account .

LBNE Beam Simulation Group Mailing List

The name of the Beam Simulation Group mailing list is lbne-bm-sim (address ). To subscribe to the list (or manage your subscription) follow the directions Fermilab listserv Instructions for Users

Fermilab Computing Access

First time users need a Services and a Kerberos Account and you might as well get a Crypto Card while your at it.

Accessing G4LBNE

G4LBNE is kept in a CVS Repository.

As of April 2013, if you are running studies using g4lbne, we ask that you do not check out the HEAD version of the repository, and that you instead check out a specific version (using the -r flag) as the following examples will show:

  • For Read Only access to G4LBNE, to check out version vXrY, you can execute:

cvs -d :pserver::/cvs/projects/lbne-beamsim checkout -r vXrY lbne-beamsim/g4lbne

  • For Read/Write access to G4LBNE follow these steps.
    p(.
    1. Get a Fermilab Services Account
    2. Log into Redmine using the "Log in" link at the upper right corner of the wiki.
    3. Email Laura Fields () or Kevin Yarritu() to request read/write access to the repository. Await a response.
    4. Once you have confirmation that you have been given read/write access, you can execute the following to grab vXrY of g4lbne:

cvs -d :ext::/cvs/projects/lbne-beamsim checkout -r vXrY lbne-beamsim/g4lbne

Now you have a directory called lbne-beamsim and inside there is a directory called g4lbne (and a CVS directory). If you want to check out the version into a separate directory (say you want to look at different versions), you can use the cvs checkout -d dirname flag, i.e.

cvs -d :ext::/cvs/projects/lbne-beamsim checkout -d v2r4p1 -r v2r4p1 lbne-beamsim/g4lbne

would check out version v2r4p1 and put it into a directory named v2r4p1 as well. Regardless, inside the directory there is a README.txt file.....READ IT.

Installing/Compiling G4LBNE

G4LBNE requires the installation of GEANT4, CLHEP (normally comes for the ride with GEANT4) and ROOT. We ALWAYS want to use the same versions of each of these products when runnning G4LBNE. Ultimately we would like to have a single script or set of scripts which installs THE SAME VERSIONS of g4lbne, geant4, clhep and root, at every location. For the time being we have the following...

  • On Fermilab machines lbnegpvm01 and lbnegpvm01 (this is the easiest option for new users):

Once you have g4lbne from CVS, you have a directory called lbne-beamsim and inside there is a directory called g4lbne (and a CVS directory). Inside the g4lbne directory there is a README.txt file.....READ IT. It provides all one needs to know for compiling and running g4lbne on Fermilab, aka. lbnegpvm machines.

  • At Brookhaven National Laboratory.

It has been installed via grinst

  • Other institutions

G4LBNE can be checked out, compiled and run elsewhere, but GEANT4, CLHEP and ROOT must also be installed. Please use the same versions used by the Fermilab setup (currently ROOT v5.30.06, GEANT4 v4.9.4.p03 and G4PHOTON v 2.1)

Running G4LBNE

  • Once you have g4lbne from CVS, you have a directory called lbne-beamsim and inside there is a directory called g4lbne (and a CVS directory). Inside the g4lbne directory there is a README.txt file.....READ IT. It provides all one needs to know for running g4lbne.

Simulation Run Catalog

A record of the simulation runs that are being performed with G4LBNE.

Versions of G4LBNE to use

Look here for information about which version to download and use

Visuallizing geometries in g4lbne v3

There are many choices with visualization drivers. Detailed tutorials are found here.
HepRApp: http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html
DAWN: http://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.html
OPENGL: http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html
In each link, you can find more information about visualization in Geant4.

Here I explain a simple example of visualization in g4lbne v3 using HepRApp.
First, run the g4lbne by typing ‘g4lbne’ in your command terminal.

$g4lbne

Here ‘$’ is your linux prompt.
Then, type these two commands in turn.

$/LBNE/det/construct
$/run/initialize

Then you will get Geant4 command prompt ‘Idle>’.
Now, you are ready to input visualization commands.
Input these lines in turn.

/vis/open HepRepFile
/vis/drawVolume
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate
/LBNE/run/NEvents 2
/gun/particle proton
/gun/energy 120 GeV
/run/beamOn

Or, you can make a macro file which contains above command lines including ‘/LBNE/det/construct’ and ‘/run/initialize’.
In order to use the macro file instead of typing command lines one by one, type ‘g4lbne vis.mac’. The ‘vis.mac’ is your macro file name.
This will create a HepRApp file(G4Data0.heprep) which you can view using HepRep viewer.
To view the heprep file download the HepRApp viewer from here:
http://www.slac.stanford.edu/~perl/HepRApp/HepRApp.jar
Put the downloaded java package in your working directory and type ‘java –jar HepRApp.jar’ in your command terminal both on MS windows and Linux system.
Then the HepRep viewer will start, now browse your heprep file to open and view it.
For more details about the HepRep viewer usage, again refer to the link shown above.

If you are familiar with 3d modeling tools like ‘Blender(free)’ or ‘3DSMAX(commercial)’, you can use another visualization driver ‘VRML2FILE’.
This will create ‘.wrl’ file which you can import in Blender or 3DSMAX.
In the programs you will get more powerful control and visualization with photorealistic images or movies.

Other Information