Kalanand's June 2008 Log

   May 2008   
June 2008
   July 2008   

June 1st

To login to cmsroc computers:

Username: cmsroc
Password: < fnal_kerberos_passwd>
principal: kalanand

June 9th

How to skip events in cmsRun ?

The following snippet shows how to skip the first 100 events.
source = PoolSource {
 untracked vstring fileNames = {'file:whatever.root'}
 untracked uint32 skipEvents = 100
Currently, the explicit specification of "firstRun" or "firstEvent" causes skipEvents to be ignored (with a warning). To be improved in near future, so it first uses firstRun/firstEvent, and then skip events from there.

How to set the first event number to start with ?

Add "firstRun" (you have to know the existing run number in the file) and "firstEvent" to PoolSource:
source = PoolSource {
 untracked vstring fileNames = {'file:whatever.root'}
 untracked uint32 maxEvents  = -1
 untracked uint32 firstRun   = 5006
 untracked uint32 firstEvent = 96

June 12th

Pythia tunes

See Rick Field's note for details. In PYTHIA6 the following parameters can be tuned that allow one to adjust the energy dependence of multiple parton interactions.
Parameter	Value	      Description

MSTP(81)	 0	      Multiple-Parton Scattering off
                 1            Multiple-Parton Scattering on

MSTP(82)	 1	      Multiple interactions assuming the same probability, with an abrupt cut-off PTmin=PARP(81)

MSTP(82)	 3	      Multiple interactions assuming a varying impact parameter and a hadronic matter overlap consistent with a single Gaussian matter distribution, with a smooth turn-off PT0=PARP(82)

MSTP(82)	 4            Multiple interactions assuming a varying impact parameter and a hadronic matter overlap consistent with a double Gaussian matter distribution 
(governed by PARP(83) and PARP(84)), with a smooth turn-off PT0=PARP(82)

June 17th

To change a word in every file using wildcard

sed -i 's/old_word/new_word/g' filename_*.*
"-i" option is to overwrite the existing file. If you want to save the changes to a new file, you need to give an extra field (i.e., the new file name) after the filename.
An alternative option in place of "s" can be "word".

To change file names recursively using wildcard

rename  string1  string2  filename
Example: Suppose we have two files: file1.txt, file2.txt
If we run the rename command
rename "file"  "newfile" file*.txt
we will get the following two renamed files: newfile1.txt, newfile2.txt.

June 23rd

To open a data ROOT file located at FNAL dCache in a ROOT session

f = TFile::Open("dcap://cmsdca1.fnal.gov:241401/pnfs.fnal.gov/usr/cms/WAX/11/store/..");
My "resilient" area at FNAL dCache: /pnfs/cms/WAX/resilient/kalanand
**** ALWAYS remember that in order for a subdirectory in "resilient" to be writable by batch job, it must have group-write permission ( chmod 775 < my subdirectory> ).

To copy a dCache to local area

dccp /pnfs/cms/WAX/resilient/kalanand/< myfile>  .

To copy a local file to dCache

First, set up grid permission:
voms-proxy-init -voms cms
Then, use srmcp command:
srmcp file:///< myfile>  srm://cmssrm.fnal.gov:8443/resilient/kalanand/< myfile>

June 30th

edm event size

To get the edm event size
edmEventSize -o a.txt -vaF -t 20 -s a.root dcap://cmsdca1.fnal.gov:24140/pnfs/fnal.gov/usr/cms/WAX/11/store/mc/Summer08/ZeeJet_Pt80to120/GEN-SIM-RECO/IDEAL_V11_redigi_v1/0218/FCF4A4A8-D5E8-DD11-B9B8-0019B9E4ACF0.root
Also see
edmEventSize --help

Go to May's log

Last modified: Mon Jun 30 10:22:43 CST 2008