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
Alternatively if you want to develop/run codes on your laptop, you need to source cvmfs as mentioned in the documentation.
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.
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
Now we are ready to install all the packages for development purposes.