Offline Simulation Software CMSSW_1_7_7 - getting started

This document will explain how to use TOTEM offline software.



Let us login via ssh to some remote machine. It might be lxplus, but we will use our own PC (4 processors, most of the time stands free).

ssh -X

Mine account on pctotem31 (grzanka) differs from my normal CERN account (lgrzanka), so I will request kerberos ticket, in order to have access to distributed AFS disk space.

kinit lgrzanka


Let us create some temporary directory

mkdir -p tmp/offlineSWTest
cd tmp/offlineSWTest

We have to source default set of environment variables which are necessary for work with CMSSW. For bash shell it will be:

export VO_CMS_SW_DIR=/afs/
source $VO_CMS_SW_DIR/

Now we have access to scram command. We can check that by typing:

scram help

STEP 2a.

In this step we will compile our software from sources. In order to omit that step, and used compiled version, you can go to step 2b.

First we initialize CMSSW project area:

scram project CMSSW CMSSW_1_7_7

We can see that after that command following directory structure emerged:

[pctotem31] /home/grzanka/tmp/offlineSWTest > ls CMSSW_1_7_7/
bin  config  doc  include  lib  logs  module  python  share  src  test

Our sources shall go to CMSSW_1_7_7/src subdirectory, so let us copy them there:

[pctotem31] /home/grzanka/tmp/offlineSWTest > cp -r /afs/* CMSSW_1_7_7/src/
[pctotem31] /home/grzanka/tmp/offlineSWTest > ls CMSSW_1_7_7/src/
Configuration  Documentation  Geometry  IORawData    RecoTotemT1T2  SimG4Core  TotemRPValidation
DataFormats    EventFilter    IOMC      RecoTotemRP  SimG4CMS       SimTotem   TotemT1T2Validation

Now let us start compilation. Our machine has 4 processors, so we can run compilation in 8 threads to speedup this process. Still this will take some time (10-15 minutes).

cd CMSSW_1_7_7/
scram b -j 8

Now we need to setup runtime environment. Before executing following command be sure to be in some subdirectory of CMSSW_1_7_7 :

eval `scram runtime -sh`

This will enable us to use cmsRun command.

cmsRun --help

Now we can go back to ~/tmp/offlineSWTest directory

cd ~/tmp/offlineSWTest

STEP 2b.

Let us go to directory with compiled CMSSW modules:

cd /afs/

Now we need to setup runtime environment:

eval `scram runtime -sh`

This will enable us to use cmsRun command.

cmsRun --help

Now we can go back to ~/tmp/offlineSWTest directory

cd ~/tmp/offlineSWTest


Let us take example configuration file:

cp /afs/ .

Check number of events to generate:

untracked PSet maxEvents = {untracked int32 input = 10}

Check output file:

module o1 = PoolOutputModule { untracked string fileName = "pythia.root" }

Check sequence of modules to execute:

path p1 = { EnergySmeared, EnergyVertexSmeared, g4SimHits ,mix,  
   T1Digis,T2Digis, t1cluster,T2MCl, t1rechit, T2Hits, T2RoadColl,T2TrackColl, 
   t1roads,t1tracks, RPSiDetDigitizer, RPClustProd, RPHecoHitProd, 
   RPSinglTrackCandFind, RPSingleTrackCandCollFit }

Now we can run that file:

cmsRun pythia.cfg

If everything went OK, then we can find output file:

[pctotem31] /home/grzanka/tmp/offlineSWTest > ls -l *root
-rw-rw-r--  1 grzanka grzanka 1259467 Aug 12 15:12 pythia.root

All messages generated by CMSSW are stored in txt files:

[pctotem31] /home/grzanka/tmp/offlineSWTest > ls -l *txt
-rw-rw-r--  1 grzanka grzanka 11469275 Aug 12 15:12 debugmessages.txt
-rw-rw-r--  1 grzanka grzanka    12528 Aug 12 15:07 error.txt
-rw-rw-r--  1 grzanka grzanka    58725 Aug 12 15:12 info.txt
-rw-rw-r--  1 grzanka grzanka    14190 Aug 12 15:07 warning.txt


Now we can generate some plots. To do that we will use different configuration file:

cp /afs/ .

Let us run that file:

cmsRun pythia.cfg

Output files are here:

[pctotem31] /home/grzanka/tmp/offlineSWTest > ls val*root
valpythiaSD.root  valRPHits.root  valRPPlots.root  valT1Plots.root  valT2PlotsDigi.root  valT2PlotsReco.root

We can start root session, to see plots:

[pctotem31] /home/grzanka/tmp/offlineSWTest > root -l
root [0] TBrowser t

-- LeszekGrzanka - 07 Aug 2009

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2009-08-07 - ZhengkuiZhang
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    TOTEM All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback