DAS

Find out #events in a dataset:

dasgoclient --query "dataset=/SingleMuon/Run2017B-31Mar2018-v1/MINIAOD" -json

The json file has an entry called "nevents".

Global xrootd URL:

 root://cms-xrd-global.cern.ch/ 

Parse a list of files and check their #events:

cat list.txt | awk '{print "dasgoclient --query \042file="$1" | grep file.nevents\042"}' > docheck.sh
chmod u+x docheck.sh

# launch check
./docheck.sh

# add up numbers of events directly
./docheck.sh | awk '{s+=$1}END{print s}'

GRID

CRAB

Issue starting from 10_1_X

Use the following fix starting from 10_1_0:

config.section_("General")
config.General.instance = 'preprod'

Originally reported here and circulated by Sam on cms-hlt.

Condor

To solve errors of the type "ERROR: failed to read any data from /usr/bin/batch_krb5_credential!" :

export X509_USER_PROXY=/afs/cern.ch/work/${USER:0:1}/$USER/x509up_u$UID
voms-proxy-init -voms cms -valid 168:00

CMSSW

Analyzers

Generate an EDAnalyzer skeleton:

 mkedanlzr DemoAnalyzer 

Config files

Event selection

To add an event selection from a text file (1 line per event, using the format Run:LS:Event on each line):

f = open('list.txt')
process.source.eventsToProcess = cms.untracked.VEventRange( f )

CMSSW integration build

scram list CMSSW_9_3_X

L1

Pre-firing

https://twiki.cern.ch/twiki/bin/viewauth/CMS/L1ECALPrefiringWeightRecipe

HLT

Get menu run on MC

https://hypernews.cern.ch/HyperNews/CMS/get/hlt/3653/2.html

edmProvDump root://eoscms//eos/cms/store/relval/CMSSW_10_1_0_pre3/RelValTenTau_15_500/DQMIO/101X_upgrade2018_realistic_v3-v1/10000/C6BC450D-C228-E811-BC81-0CC47A4D75EE.root | sed -n '/^Processing History/,/^----/p'

Dump HLT menu from /cdaq

In hltGetConfiguration: add prefix "orcoff:" to the menu confdb path, e.g. : "hltGetConfiguration orcoff:/cdaq/..."

In hltConfigFromDB: add option "--adg"

Data

Lumi per LS

export PATH=$HOME/.local/bin:/afs/cern.ch/cms/lumi/brilconda-1.1.7/bin:$PATH

brilcalc lumi --byls -u 1e33/cm2s -b "STABLE BEAMS" -i /afs/cern.ch/work/t/tosi/public/STEAM/json/2e34_v1p0p2_cleaned_PU44to47.json

brilcalc lumi --byls -u 1e33/cm2s -b "STABLE BEAMS" -i "{301567:20,266}"

Run-2 Analysis summary table

From PdmV : PdmVAnalysisSummaryTable

Reconstruction

Particle Flow

PF Study Group twiki: https://twiki.cern.ch/twiki/bin/view/CMS/PFStudyGroup

Developing tools

Emacs

Ctrl+Space shortcut issue on Mac OS : see this page. Basically disable the Mac OS keyboard shortcut that is "Ctrl+Space" by default : "System Preferences > Keyboard > Shortcuts > Input Sources > Select the previous input source and uncheck"

-- NadirDaci - 2018-04-25


This topic: Main > WebPreferences > RandomTricksAndTips
Topic revision: r13 - 2019-08-23 - NadirDaci
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback