Getting started with the CMS software

From T2B Wiki
Jump to navigation Jump to search

Login to a machine and define the CMS environment variables

  • login to the lxpub2 or lxpub3 machine
 e.g: ssh -X username@lxpub2.iihe.ac.be
  • source the CMS environment
 setenv VO_CMS_SW_DIR /msa3/cmssoft
 source $VO_CMS_SW_DIR/cmsset_default.csh ## initialize the cms env
  • define the code cvs repository
 alias cmscvsroot 'source $CMS_PATH/utils/cmscvsroot.csh'
 cmscvsroot CMSSW






Prepare the CMSSW working area

Follow these steps:

  • make yourself a directory on /beo5
 mkdir /beo5/whoami
  • go to that directory
 cd /beo5/whoami
  • install a CMSSW working area and go to the src subdirectory
 scramv1 p CMSSW CMSSW_1_0_1; cd CMSSW_1_0_1/src






Get the necessary code and compile it

  • log onto the cvs code server; type 98passwd as password
 cvs login
 CVS password: 
  • checkout the source code of the libraries that you want to use or modify. Here we will use the interface to the Pythia event generator
 cvs co -r CMSSW_1_0_1 IOMC/GeneratorInterface/test; cd IOMC/GeneratorInterface/test
  • compile the code
 eval scramv1 runtime -csh
 scramv1 b






Run CMSSW interactively and produce a few events

The parameters for CMSSW are specified in a text file called the config file. This file can include other config files using the #include directive. Let's run the standard example which produces Higgs events decaying into 4 muons in the final state, and plots a few distributions:

 cmsRun pythiaHZZ4mu+analysis.cfg

You should see two root files appear: one with the generated events stored in HepMC format, and one with the distribution histograms. Did it work ? In case of problems, do not hesitate to contact Jan Heyninck or Pascal Vanlaer.

At this stage you should learn more about CMSSW by studying the CMSSW Workbook, chapters 2 to 4.








Template:TracNotice