Previous page

Overview

This page contain few instructions of how to use the data from the grid

On this page:

Download a single file

Before submitting to the grid, it is useful to test your scripts locally. To do it, one should locate and download a single test file. Here are the instructions on how to do it:

With xrdcp command:

xrdcp root://cms-xrd-global.cern.ch//store/path/to/file /some/local/path

from US, use root://cmsxrootd.fnal.gov//store/path/to/file. If global redirector is not working try xrootd-cms.infn.it

Another ways of getting a file

download from specific site

Locate the file in DAS by searching for file dataset=DATASET

file dataset=/SingleMuon/Run2017H-17Nov2017-v2/MINIAOD

Choose one site (in this example T2_US_MIT), and get file PFN by executing the following commands (replace the site and file name by one you need):

site=T2_US_MIT
lfn=/store/data/Run2017H/SingleMuon/MINIAOD/17Nov2017-v2/90000/FA9FA831-8B34-E811-BA1D-008CFAC93CFC.root
pfl=`curl -ks "https://cmsweb.cern.ch/phedex/datasvc/perl/prod/lfn2pfn?node=${site}&lfn=${lfn}&protocol=srmv2" | grep PFN | cut -d "'" -f4`

then I create a user proxy:

voms-proxy-init -voms cms

Set your UID from created proxy in /tmp/x509up_u{UID}., and then set the correct X509_USER_PROXY and copy the file:

UID=58751
env -i X509_USER_PROXY=/tmp/x509up_u$UID gfal-copy -n 1 $pfl "file:///`pwd`/miniAOD.root"

Localing a PFN (physical file name)

OR you can locate it physical file name

edmFileUtil -d /store/relval/CMSSW_10_6_4/RelValZMM_13/MINIAODSIM/PUpmx25ns_106X_upgrade2018_realistic_v9-v1/10000/DBE18AD9-E36D-B449-B659-A71362DAC57A.root

Submit jobs using crab

Debug failed jobs

In case you inspect failed jobs, one can submit the job locally using the following syntax:

cd JOBNAME/inputs
cmsRun PSet.py

Obtaining Luminosity per dataset

From crab report, the location of JSON-formatted report file is listed. Copy this file to lxplus:

#setup BRIL
export PATH=$HOME/.local/bin:/cvmfs/cms-bril.cern.ch/brilconda/bin:$PATH
pip install --install-option="--prefix=$HOME/.local" brilws
# get lumi from the crab submission:
cp processedLumis.json $HOME/.local/bin/
./brilcalc lumi -b "STABLE BEAMS" --normtag /afs/cern.ch/user/l/lumipro/public/Normtags/normtag_DATACERT.json -i processedLumis.json -c /cvmfs/cms.cern.ch/SITECONF/T0_CH_CERN/JobConfig/site-local-config.xml -u /fb

-- MichaelPitt - 2019-12-08

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r8 - 2020-01-20 - MichaelPitt
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

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