Project

General

Profile

Setting up the environment

This section is based on the official Offline Computing and Software Manual

Only important steps are reproduced here.

First of all you need to login to the Fermilab virtual machine (gm2gpvm01-06). Once you have logged in, you need to choose a release for the Muon g-2 softwares (libraries, executables) every time you login or you can put it in your .profile on gm2gpvm.

source /grid/fermiapp/gm2/setup

Alternatively if you want to develop/run codes on your laptop, you need to source cvmfs as mentioned in the documentation.

source /cvmfs/gm2.opensciencegrid.org/prod7/g-2/setup

If successful, you will get

Using g-2 release repository at /cvmfs/gm2.opensciencegrid.org
g-2 software

--> To list gm2 releases, type
ups list -aK+ gm2

--> To use the latest release, do
setup gm2 v7_03_01 -q prof

For more information, see https://cdcvs.fnal.gov/redmine/projects/g-2/wiki/ReleaseInformation 

Then follow the instruction and use the latest release of gm2 (v7_03_01 at the moment of writing this tutorial)

setup gm2 v7_03_01 -q prof

Soon after setting up, you can actually run the gm2 simulation by using

gm2 -c mdc0.fcl

and you will get a log file and a root file storing all the truth information of 100 muon decays.

gm2ringsim_mdc0.log   gm2ringsim_mdc0.root

The gm2 library and mdc0.fcl file are actually available through the cvmfs so even if you don't have them locally, you can still run the simulation! Of course you want to do more than that.

Next to do is to go to a folder of your choice (usually ~/work) and then create a new development place.

cd ~/work
mkdir myDevV7

Now go into the newly created folder myDevV7 and initialize it as a development area

cd myDevV7/
mrb newDev

Follow the instruction to source the localproducts settings

source localProducts_gm2_v7_03_01_prof/setup

Now we are ready to install all the packages for development purposes.