TWiki
>
TOTEM Web
>
CompOfflineGettingStarted
(2009-08-07,
ZhengkuiZhang
)
(raw view)
E
dit
A
ttach
P
DF
---+ Offline Simulation Software CMSSW_1_7_7 - getting started This document will explain how to use TOTEM offline software. ---++ Documentation * [[CMS.WorkBook][The CMS Offline WorkBook]], especially: * [[CMS.WorkBookSetComputerNode][Setting up your Computing Environment]] ---++ STEP 0. Let us login via ssh to some remote machine. It might be =lxplus=, but we will use our own PC =pctotem31.cern.ch= (4 processors, most of the time stands free). <verbatim> ssh -X grzanka@pctotem31.cern.ch </verbatim> 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. <verbatim> kinit lgrzanka </verbatim> ---++ STEP 1. Let us create some temporary directory <verbatim> mkdir -p tmp/offlineSWTest cd tmp/offlineSWTest </verbatim> We have to source default set of environment variables which are necessary for work with CMSSW. For bash shell it will be: <verbatim> export VO_CMS_SW_DIR=/afs/cern.ch/exp/totem/scratch/Release/cmssw/ source $VO_CMS_SW_DIR/cmsset_default.sh </verbatim> Now we have access to =scram= command. We can check that by typing: <verbatim> scram help </verbatim> ---++ 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: <verbatim> scram project CMSSW CMSSW_1_7_7 </verbatim> We can see that after that command following directory structure emerged: <verbatim> [pctotem31] /home/grzanka/tmp/offlineSWTest > ls CMSSW_1_7_7/ bin config doc include lib logs module python share src test </verbatim> Our sources shall go to =CMSSW_1_7_7/src= subdirectory, so let us copy them there: <verbatim> [pctotem31] /home/grzanka/tmp/offlineSWTest > cp -r /afs/cern.ch/exp/totem/soft/cmssw/src/* 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 </verbatim> 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). <verbatim> cd CMSSW_1_7_7/ scram b -j 8 </verbatim> Now we need to setup runtime environment. Before executing following command be sure to be in some subdirectory of CMSSW_1_7_7 : <verbatim> eval `scram runtime -sh` </verbatim> This will enable us to use =cmsRun= command. <verbatim> cmsRun --help </verbatim> Now we can go back to =~/tmp/offlineSWTest= directory <verbatim> cd ~/tmp/offlineSWTest </verbatim> ---++ STEP 2b. Let us go to directory with compiled CMSSW modules: <verbatim> cd /afs/cern.ch/exp/totem/soft/cmssw/compiled/CMSSW_1_7_7 </verbatim> Now we need to setup runtime environment: <verbatim> eval `scram runtime -sh` </verbatim> This will enable us to use =cmsRun= command. <verbatim> cmsRun --help </verbatim> Now we can go back to =~/tmp/offlineSWTest= directory <verbatim> cd ~/tmp/offlineSWTest </verbatim> ---++ STEP 3. Let us take example configuration file: <verbatim> cp /afs/cern.ch/exp/totem/soft/cmssw/examples/Global/pythia.cfg . </verbatim> Check number of events to generate: <verbatim> untracked PSet maxEvents = {untracked int32 input = 10} </verbatim> Check output file: <verbatim> module o1 = PoolOutputModule { untracked string fileName = "pythia.root" } </verbatim> Check sequence of modules to execute: <verbatim> path p1 = { EnergySmeared, EnergyVertexSmeared, g4SimHits ,mix, T1Digis,T2Digis, t1cluster,T2MCl, t1rechit, T2Hits, T2RoadColl,T2TrackColl, t1roads,t1tracks, RPSiDetDigitizer, RPClustProd, RPHecoHitProd, RPSinglTrackCandFind, RPSingleTrackCandCollFit } </verbatim> Now we can run that file: <verbatim> cmsRun pythia.cfg </verbatim> If everything went OK, then we can find output file: <verbatim> [pctotem31] /home/grzanka/tmp/offlineSWTest > ls -l *root -rw-rw-r-- 1 grzanka grzanka 1259467 Aug 12 15:12 pythia.root </verbatim> All messages generated by CMSSW are stored in txt files: <verbatim> [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 </verbatim> ---++ STEP 4. Now we can generate some plots. To do that we will use different configuration file: <verbatim> cp /afs/cern.ch/exp/totem/soft/cmssw/examples/Global/pythia.cfg . </verbatim> Let us run that file: <verbatim> cmsRun pythia.cfg </verbatim> Output files are here: <verbatim> [pctotem31] /home/grzanka/tmp/offlineSWTest > ls val*root valpythiaSD.root valRPHits.root valRPPlots.root valT1Plots.root valT2PlotsDigi.root valT2PlotsReco.root </verbatim> We can start root session, to see plots: <verbatim> [pctotem31] /home/grzanka/tmp/offlineSWTest > root -l root [0] TBrowser t </verbatim> -- Main.LeszekGrzanka - 07 Aug 2009
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r4 - 2009-08-07
-
ZhengkuiZhang
Log In
TOTEM
TOTEM
TOTEM home
TOTEM TWiki
TOTEM TWiki
DETECTOR
SOFTWARE
Offline Software
Monitor
TotemDQM
Trigger/DAQ
DCS
ANALYSIS
PHYSICS
DOCUMENTATION
Service links
Changes
Index
Search
About
Rules and conventions
Playground
TWiki help
TWiki formatting rules
Create personal sidebar
Cern Search
TWiki Search
Google Search
TOTEM
All webs
Copyright &© 2008-2022 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