My most used commands and some notes.

Normal use (latest PU, startup conditions, no validation)

Old syntax:
cmsDriver.py TTbar_Tauola_8TeV_cfi.py -s GEN,FASTSIM,HLT:GRun --pileup=2012_Summer_inTimeOnly --geometry DB --conditions=auto:startup_GRun --beamspot Realistic8TeVCollision --eventcontent=FEVTDEBUGHLT --datatier GEN-SIM-DIGI-RECO -n 10 --no_exec

New syntax:
cmsDriver.py TTbar_Tauola_8TeV_cfi.py -s GEN,SIM,RECO,HLT:GRun --fast --pileup=2012_Summer_inTimeOnly --geometry DB --conditions=auto:startup_GRun --beamspot Realistic8TeVCollision --eventcontent=FEVTDEBUGHLT --datatier GEN-SIM-DIGI-RECO -n 10 --no_exec

GIT stuff

To propose modifications:

git cms-addpkg [dir]/[package]
git checkout -b [my-new-branch-name]
...modify...
git add [new files]
git commit -m "message" [modified files]
git push my-cmssw [my-new-branch-name]
Then do pull requests and sign them through the Topic Collector.

My script for quickly checking the FastSim differences between two releases:

wget http://agiamman.web.cern.ch/agiamman/fastsim/produceReleaseNotes.sh

Useful general commands:

Validation

link

Comparison tools:

Testing with runTheMatrix (link)

Note: to checkout a tagset, do

cmstc tagset -a 121587 121610
checkdeps -a -j 50

Customization

--customise_commands="..."

To add time and memory (RSS) profiling:

--customise=Validation/Performance/TimeMemoryInfo.py

Pileup files

Script to produce new minimum-bias files for pileup.
These files must be copied into directory /afs/cern.ch/cms/data/CMSSW/FastSimulation/PileUpProducer/data/
Then remember to update the list in data-FastSimulation-PileUpProducer.spec (*) and to inform the release managers to rebuild data-FastSimulation-PileUpProducer external via a pull request.

(*) fork CMSDIST repository. Clone it locally (see example below), modify the file, push it your forked repository, and make a pull request.

cmsrel CMSSW_7_0_0_preX
cd CMSSW_7_0_0_preX/src
git clone git@github.com:giamman/cmsdist.git cmsdist-giamman
cd cmsdist-giamman
git checkout IB/CMSSW_7_0_X/stable
vim data-FastSimulation-PileUpProducer.spec
git commit -a -s 
# Remember to provide meaningful message.
# Example:
# Removal of X and addition of Y (subject line)
# (empty line)
# X was removed due to ... Y was added instead...  (detailed description of you changes, paragraph). 
# -s option of commit adds your signature to the commit
git push origin HEAD:13Tev-update-data-FastSimulation-PileUpProducer
# Now on GitHub you can make a pull request to official CMSDIST repository

Submission on lxbatch

Script for single-job submission on lxbatch (bsub -q 8nh submit_job.sh)
Remember to make it executable: chmod +x submit_job.sh

If multi-job submission is needed:

Debugging

Alternatively, to get also the line number:

For the FastSim paper draft

To check out the draft in a fresh directory:

svn co -N svn+ssh://svn.cern.ch/reps/tdr2 myDir # where myDir is a placeholder for a name of your choice
cd myDir
svn update utils
svn update -N papers
svn update papers/GEN-11-001

Then to use the tdr script to build:

eval `./papers/tdr runtime -csh` # for tcsh. use -sh for bash.
cd papers/GEN-11-001/trunk # (edit the template, then to build the document)
tdr --style=paper b GEN-11-001

(or just use ./MAKENOTE)

Add new files with

svn add your_new_file

Update the directory with
svn update

Commit your changes with
svn commit -m "commit message"

Useful material:

To create a branch

cvs rtag -r CMSSW_X_Y_Z -b FAMOS_X_Y_Z Subsystem/Package
cvs co -r FAMOS_X_Y_Z Subsystem/Package
edit file and commit; or import changes with cvs update -j tag1 -j tag2 Subsystem/Package/src/file.cc
cd Subsystem/Package
cvs tag Vxx-yy-zz

Performance plots

Event content dumping

At runtime: add

process.dumpContent = cms.EDAnalyzer('EventContentAnalyzer')
and insert it in some path to see what products are in the event at that point in the process.

Useful links


HCAL noise tuning with neutrino gun

Moved here

HCAL signal tuning with pion gun

Moved here

Correction factors from 500pre6/500pre3 ratio:

###### Ratio vs ieta:
ieta=-40 - ratio = 0.836547
ieta=-39 - ratio = 0.915296
ieta=-38 - ratio = 0.931713
ieta=-37 - ratio = 0.927074
ieta=-36 - ratio = 0.94417
ieta=-35 - ratio = 0.955124
ieta=-34 - ratio = 0.959822
ieta=-33 - ratio = 0.952961
ieta=-32 - ratio = 0.967343
ieta=-31 - ratio = 0.975566
ieta=-30 - ratio = 0.973605
ieta=30 - ratio = 0.979185
ieta=31 - ratio = 0.985501
ieta=32 - ratio = 0.985795
ieta=33 - ratio = 0.993118
ieta=34 - ratio = 0.988925
ieta=35 - ratio = 0.945334
ieta=36 - ratio = 0.963244
ieta=37 - ratio = 0.953914
ieta=38 - ratio = 0.959041
ieta=39 - ratio = 0.916422
ieta=40 - ratio = 0.880503