Table of Contents
FairShip is the software framework for the SHiP experiment which is based on FairRoot. The dependencies of FairShip are tracked and installed using alibuild.
master- Main development branch.
All python code is required to be python 3. Python 2 is no longer supported.
Requires aliBuild default
release. SHiP-2018- Frozen branch for the CDS, kept for backward compatibility.
Python 2 only.
Requires aliBuild default
fairship-2018. muflux- Branch for the muon flux analysis.
Python 2 only.
Requires aliBuild default
fairship-2018.
All packages are managed in Git and GitHub. Please read the Git tutorial for SHiP first, even if you already know Git, as it explains how development is done on GitHub.
-
Download the FairShip software
git clone https://github.com/ShipSoft/FairShip.git
-
Make sure you can access the SHiP CVMFS Repository
ls /cvmfs/ship.cern.ch
-
Source the setUp script
source /cvmfs/ship.cern.ch/SHiP-2022/May/setUp.sh -
Build the software using aliBuild
aliBuild build FairShip --always-prefer-system --config-dir $SHIPDISTIf you are not building
master, you will need to select the appropriate default (see Branches).
If you exit your shell session and you want to go back working on it, make sure to re-execute the third step.
To load the FairShip environment, after you build the software you can simply use:
- Load the environment
alienv enter FairShip/latest
However, this won't work if you are using HTCondor. In such case you can do:
eval alienv load FairShip/latestCommands are similar to the previous case, but without access to CVMFS you need to build the required packages.
- Download the FairShip software
git clone https://github.com/ShipSoft/FairShip.git
- Build the software using aliBuild
FairShip/aliBuild.sh
- Load the environment
alibuild/alienv enter FairShip/latest
Set up the bulk of the environment from CVMFS.
source /cvmfs/ship.cern.ch/SHiP-2022/May/setUp.shLoad your local FairShip environment.
alibuild/alienv enter (--shellrc) FairShip/latestNow you can for example simulate some events, run reconstruction and analysis:
python $FAIRSHIP/macro/run_simScript.py
>> Macro finished succesfully.
>> Output file is ship.conical.Pythia8-TGeant4.root
python $FAIRSHIP/macro/ShipReco.py -f ship.conical.Pythia8-TGeant4.root -g geofile_full.conical.Pythia8-TGeant4.root
>> finishing pyExit
python -i $FAIRSHIP/macro/ShipAna.py -f ship.conical.Pythia8-TGeant4_rec.root -g geofile_full.conical.Pythia8-TGeant4.root
>> finished making plotsRun the event display:
python -i $FAIRSHIP/macro/eventDisplay.py -f ship.conical.Pythia8-TGeant4_rec.root -g geofile_full.conical.Pythia8-TGeant4.root
// use SHiP Event Display GUI
Use quit() or Ctrl-D (i.e. EOF) to exitDocker is not the recommended way to run FairShip locally. It is ideal
for reproducing reproducible, stateless environments for debugging, HTCondor
and cluster use, or when a strict separation between FairShip and the host is
desirable.
- Build an docker image from the provided
Dockerfile:git clone https://github.com/ShipSoft/FairShip.git cd FairShip docker build -t fairship .
- Run the
FairShipdocker image:docker run -i -t --rm fairship /bin/bash
- Advanced docker run options:
The option
docker run -i -t --rm \ -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \ -v /local_workdir:/image_workdir \ fairship /bin/bash-e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unixforwards graphics from the docker to your local system (similar tossh -X). The option-v /local_workdir:/image_workdirmounts/local_workdiron the local system as/image_workdirwithin docker.
- Any and all contributions are welcome!
- Contributions via pull requests are preferred, but if you require help with git, don't hesitate to write reach out to us.
- Please split your work into small commits with self-contained changes to make them easy to review and check.