Common framework for all cp3-llbb analyses
Please note:
- The instructions are for the UCLouvain ingrid SLC6 cluster (to access SAMADhi)
- You need the proper username and password to access SAMADhi :) If you don't know what this is about, ask around
- The current state of the art mini-AOD documentation can be found here
- You will probably want to install as well GridIn to run jobs on the grid, and one of the existing analyses (TTAnalysis, HHAnalysis, ZAAnalysis)
source /nfs/soft/grid/ui_sl6/setup/grid-env.sh
source /cvmfs/cms.cern.ch/cmsset_default.sh
export SCRAM_ARCH=slc6_amd64_gcc491
cmsrel CMSSW_7_4_10
cd CMSSW_7_4_10/src
cmsenv
git cms-init
cd ${CMSSW_BASE}/src
# Electron ID as from [EGamma twiki (as on September 1st 2015)](https://twiki.cern.ch/twiki/bin/view/CMS/MultivariateElectronIdentificationRun2)
git cms-merge-topic ikrav:egm_id_747_v2
# Jet tool box
git clone https://github.com/cms-jet/JetToolbox JMEAnalysis/JetToolbox
# Backport of new pileup jet id. Not needed for CMSSW 7.4.12+
git cms-merge-topic 11007
# MET stuff
git cms-merge-topic -u cms-met:METCorUnc74X
# CP3-llbb framework itself
git clone -o upstream [email protected]:blinkseb/TreeWrapper.git cp3_llbb/TreeWrapper
git clone -o upstream [email protected]:cp3-llbb/Framework.git cp3_llbb/Framework
cd ${CMSSW_BASE}/src
scram b -j 4
cd ${CMSSW_BASE}/src/cp3_llbb/Framework
source setup.sh
cd ${CMSSW_BASE}/src
If you are using ingrid, here's a useful alias to put in your bashrc
file:
alias cms_env="module purge; module load grid/grid_environment_sl6; module load crab/crab3; module load cms/cmssw;"
Then, just do cms_env
to load all the CMSSW environment.
cd ${CMSSW_BASE}/src/cp3_llbb/Framework/test
cmsRun TestConfigurationMC.py
- Remember to branch before committing anything:
git checkout -b my-new-branch
- The
setup.sh
script took care of addingorigin
as your own repo, so to push just do the usualgit push origin my-new-branch
When opening a new Pull Request, an automated tool, Jenkins, takes care of launching a full build. It allows to see directly if your code can be merged without breaking everything. We have a dedicated Jenkins instance running at CERN, accessible via https://jenkins.cern.ch/cp3-llbb/ ; Only members of the cp3-llbb
CERN e-group can access this page.
Jenkins runs every 5 minutes to check if there's something new. If a new Pull Request is detected, or if an already opened Pull Request is updated, an automatic build is launched. Only one build can be executed at the same time: every other builds are queued. A build typically takes about 1 hour.
Once a build is started, the Pull Request status on GitHub is updated. Once done, the status will either be green (the code compiles) or red (something is wrong). You can click on the Details
link to access the Jenkins job report and the compilation log. For more information, see https://github.com/blog/1935-see-results-from-all-pull-request-status-checks
The Pull Request won't be mergeable until the Pull Request status is green.
This part is very important
Since the build is automatized, Jenkins needs to know how-to setup the CMSSW env by itself. To do that, two files are necessary:
CMSSW.release
: This file must contains only a string representing the CMSSW version to use to setup the framework. Be careful not to add a line break at the end of the line.bootstrap_jenkins.sh
: This file is a bash script executed by Jenkins just before building the framework, but after the CMSSW env is setup. You must use this file to install all the dependencies of the framework.
Do not forget to update these files when changes are done to the release or the dependencies, otherwise the build will fails.
- Jenkins instance: https://jenkins.cern.ch/info/cp3-llbb
- Jenkins instance informations: https://jenkins.cern.ch/info/cp3-llbb
- CERN forge: https://cernforge.cern.ch/jenkins/details/cp3-llbb (only accessible by the Administrator, Sébastien B.)
The builds are done on a custom VM hosted on CERN OpenStack servers, because Jenkins instance does not have access to either AFS or CVMFS. The VM instance is accessible only from CERN network:
- Hostname: cp3-llbb-buildbot
- SSH access only via key pair. Only accessible by the Administrator, Sébastien B.
A github bot also exists: https://github.com/cp3-llbb-bot ; it's a generic github user, member of the cp3-llbb organization. It needs push authorization to a repository to properly update the PR status. Password for this user can be found on the protected CP3 wiki