Das Analysis System
Das Analysis System is a general project involving modular tools for physics analysis with high-level objects such as jets, leptons, and photons. The principle is to perform physics directly from the shell in atomic steps, applying one correction at a time and treating all systematic uncertainties simultaneously.
The GitLab group is divided in several repositories:
- The
Installer
repo contains the necessary scripts to install the suite. - The
Core
repo corresponds to a CMSSW module and is where most of the code for the analysis of CMS data is to be found. - The
Tables
repo contains the calibration of the high-level objects. - The
Darwin
repo is a mirror of a general toolkit for physics analysis. -
PlottingHelper
is a useful library originally made by Radek Zlebcík (Charles University) to help make plots with ROOT.
The Campaigns
subgroup contains actual repos corresponding to different analyses with configs, plotting macros, and possibly CRAB outputs, or anything relevant to the reproducibility of an analysis. A template repo is provided with suggestions and guidelines.
Installation
In the following, we provide two alternative methods to install the framework.
Method #1: From scratch with the default installer
In general, it is recommended that you install the software on a fast disk to ensure fast compilation (e.g. AFS), but that you process the heavy n-tuples on a dedicated area (e.g. NFS at DESY, EOS at CERN). Keeping the software neat and clean is important for reproducibility.
- Clone the
Installer
in a directory (we proposeDasAnalysisSystem
). Then source the minimal environment for CMSSW, CRAB, and RUCIO from that directory:
git clone https://gitlab.cern.ch/cms-analysis/general/DasAnalysisSystem/gitlab-profile.git DasAnalysisSystem
cd DasAnalysisSystem
source ./setup
It is currently working at CERN (CH), at DESY (DE), at IIHE (BE), and for GitLab CI. Feel free to make a merge request to include your favourite facility. 2. Run the installation:
./install.sh
Remark: if a CMSSW release has already been sourced, it will use that one instead of installing a new one. 3. Then change to the directory of the CMSSW release (by default, it is created in the local directory) and compile as follows:
cmsenv
scram b -j$(nproc)
- After a few minutes, you get back to the prompt. You have to rerun
cmsenv
to actually see the commands in the shell. Then you're all set.
Method #2: By hand, step by step
In the following, we explain the installation of the framework step by step. A few packages external to CMSSW are necessary (e.g. TUnfold), which you will need to tell CMSSW how to find them with scram setup
.
First source your CMSSW release and close to a directory where you want to install the external packages.
- Install TUnfold:
wget https://www.desy.de/~sschmitt/TUnfold/TUnfold_V17.9.tgz
mkdir -p TUnfold TUnfold/lib
mv TUnfold_V17.9.tgz TUnfold
cd TUnfold
tar xvzf TUnfold_V17.9.tgz
make lib TUNFOLDVERSION='V17' -j
mv -f libunfold.so lib/libtunfold.so
mv -f TUnfoldV17Dict_rdict.pcm lib/
(cd $CMSSW_BASE && scram setup $OLDPWD/../tunfold.xml)
- Tell CMSSW where to find libgit2:
(cd $CMSSW_BASE && scram setup $OLDPWD/libgit2.xml)
- Install Darwin:
git clone https://gitlab.cern.ch/Proto/Darwin.git
cmake3 -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/build/install
cmake3 --build build -j`nproc`
cmake3 --build build --target install
(cd $CMSSW_BASE && scram setup $OLDPWD/../darwin.xml)
- If you want to rerun jet clustering (e.g. to have AK8 jets at a low transverse momentum), you need to clone the branch
jetToolbox_120X
from the JetToolbox, and apply a minor patch with the following commands:
cd $CMSSW_BASE/src/JMEAnalysis/JetToolbox
patch -p1 $OLDPWD/jetToolbox_120X.patch
- Clone the
Tables
wherever you like and theCore
in CMSSW, and compile as usual withscram b -j
.
Setting up the environment
First source the minimal environment for CMSSW with source ./setup
, then just source the CMSSW release as usual with cmsenv
.
To run CRAB jobs, you will also need to set up a valid grid certificate. If you already have done so, this will enable it:
voms-proxy-init --rfc --voms cms -valid 192:00
To make RUCIO requests, the setup
file tried to guess your RUCIO username from your local username (unless was already set up). This is not guaranteed to work and you may have to define your RUCIO username ahead for sourcing the DAS environment.
Good practices
Fight against the increase of entropy by
- pulling regularly,
- committing regularly,
- document your code,
- making frequent merge requests.
Happy analysis!