Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ShipSoft/FairShip/llms.txt

Use this file to discover all available pages before exploring further.

FairShip is the software framework powering the SHiP (Search for Hidden Particles) experiment at CERN. It provides a complete physics simulation pipeline — from proton–target interactions through detector simulation, digitisation, track reconstruction, and analysis — all built on top of FairRoot, ROOT, and Geant4.

Introduction

Learn what FairShip is and how it fits into the SHiP experiment software stack.

Installation

Set up FairShip using pixi, CVMFS, or Docker in minutes.

Quickstart

Run your first simulation, reconstruction, and analysis chain end-to-end.

Simulation

Configure event generators, geometry, and run full Geant4 detector simulations.

Reconstruction

Digitise hits, run pattern recognition, and fit tracks with GenFit or ACTS.

Python Reference

API reference for all public Python modules shipped with FairShip.

The Simulation Pipeline

FairShip models the full SHiP experimental chain in three stages:
1

Simulate

Generate events with Pythia6/8, EvtGen, GENIE, or a particle gun, then propagate particles through the full SHiP detector geometry using Geant4.
python macro/run_simScript.py --tag my-run
2

Reconstruct

Digitise raw MC hits and run track pattern recognition and vertex fitting to produce reconstructed physics objects.
python macro/ShipReco.py -f sim_my-run.root -g geo_my-run.root
3

Analyse

Produce analysis histograms, apply signal selections, and visualise events using the analysis toolkit and event display.
python macro/ShipAna.py -f sim_my-run.root -r sim_my-run_rec.root -g geo_my-run.root

Key Features

Multiple Event Generators

Pythia6, Pythia8, EvtGen, EventCalc, GENIE, and a configurable particle gun — all selectable at run time.

Full Geant4 Integration

Complete detector geometry including the muon shield, straw tube spectrometer, SND target, and veto systems.

HNL & Dark Photon Models

Built-in production and decay modelling for Heavy Neutral Leptons and dark photons with configurable mass and couplings.

Track Reconstruction

Pattern recognition with a Hough-transform algorithm and track fitting via GenFit, plus experimental ACTS support.

Reproducible Builds

Pixi manages the full dependency stack — ROOT, Geant4, FairRoot, GenFit — with a single pixi run build.

Analysis Toolkit

Python-based signal selection, overlap checking, histogram comparison, and an interactive event display.
FairShip is developed and maintained by the SHiP Collaboration at CERN. All Python code requires Python 3 (Python 2 is no longer supported). The master branch is the main development branch.

Build docs developers (and LLMs) love