Skip to content
greyson-newton edited this page Nov 23, 2020 · 7 revisions

Welcome to the Alignment wiki!

Muon Alignment Commands Cheat Sheet

Muon Alignment Key Paths and Directories

JSON file location:

/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions18/13TeV/PromptReco/Cert_314472-316271_13TeV_PromptReco_Collisions18_JSON.txt

https://cms-service-dqm.web.cern.ch/cms-service-dqm/CAF/certification/

DB location:

/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONALIGN/www/muonGeometries/

Validation Browser Directory:

/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONALIGN/www/browser_plots/validation

Validation Browser URL:

cms-mual

Comparison Plots

After running ~/PlottingTools/RunPlotting.sh, the comparison plots get uploaded here:

http://cms-mual.web.cern.ch/cms-mual/tmp/<xml_name>

Condor Commands

  • condor_q -hold -af HoldReason : check the reason for held jobs
  • condor_q -hold -better-analyze [ID] : deeper analysis for held jobs
  • condor_ssh_to_job [jobID]
  • condor_submit : Submit the  job to HTCondor pool
  • condor_rm : Remove the job from the pool. Use option -all to remove all
  • condor_q : List the jobs which are remained at current
  • condor_qedit : Edit the parameter of Job ClassAds
  • condor_status : List the machines which are connected
  • condor_hold : Change the status of job to “Hold”
  • condor_release : Release “hold” state for specific job
  • condor_tail : Show the running job’s stdout or stderr

Making a Filelist

Example: eos find /store/data/Run2018A/SingleMuon/ALCARECO/MuAlCalIsolatedMu-PromptReco-v1/ | grep root > SingleMuon_2018ABC-master-filelist.list

After doing this, you should remove all the prefix "/eos/cms" inside the .list in VIM like so:

:%s/\/eos\/cms//g

Then use Create_InputList.py (along with a JSON file if you are making a list from data) to turn the .list into a python filelist;

python Create_InputList.py

BrilCalc

 brilcalc lumi -i  Cert_314472-316271_13TeV_PromptReco_Collisions18_JSON_v2.txt -u /fb

Install brilcalc on lxplus:

export PATH=$HOME/.local/bin:/afs/cern.ch/cms/lumi/brilconda-X.Y.Z/bin:$PATH
pip uninstall -y brilws
pip install --install-option="--prefix=$HOME/.local" brilws
pip show brilws

Brilcalc Quick Start guide

DASGOCLIENT

be sure to voms-proxy-init -voms cms !!!

Query for a dataset:

dasgoclient -query="dataset=/SingleMuon/Run2018A-ZMu-17Sep2018-v2/RAW-RECO"

Query for runs from that dataset:

dasgoclient -query="run dataset=/SingleMuon/Run2018A-ZMu-17Sep2018-v2/RAW-RECO"

Calculate file percentage at T2_CH_CERN:

#number 1:
 dasgoclient -query="file site=T2_CH_CERN dataset=/SingleMuon/Run2018A-MuAlCalIsolatedMu-PromptReco-v1/ALCARECO" | wc  

#number 2:
2. dasgoclient -query="file dataset=/SingleMuon/Run2018A-MuAlCalIsolatedMu-PromptReco-v1/ALCARECO" | wc 

divide 1 by 2

Condition Uploading and AlCa/DB Contact Information:

Tutorial for AlCaDB contacts (Indico - all talks) https://indico.cern.ch/event/828624/

Basic Example of Condition Upload

Get the latest uploader script (although this should be included in CMSSW somewhere, which is preferable over the TWiki source...)

wget https://twiki.cern.ch/twiki/pub/CMS/ConditionUploader/uploadConditions.py.txt

Then do mv uploadConditions.py.txt upload conditions.py && chmod +x uploadConditions.py to make the script usable. Point it at a .db which has an accompanying .txt file with the config; e.g., uploadConditions.py file.db after making file.txt:

in file.txt

{
   "destinationDatabase": "oracle://cms_orcon_prod/CMS_CONDITIONS",
   "destinationTags": {
       "DTAlignment_v14_offline": {}
   },
   "inputTag": "DTAlignmentRcd",
   "since": 313041,
   "userText": "First out of three payloads for Muon Alignment ReReco, derived on ~5.27/fb"
}

XRDCP redirectors:

FNAL: root://cmsxrootd.fnal.gov//store/foo/bar

Global: root://cmsxrootd.fnal.gov//

Group Fuse Mount Path:

/eos/cms/store/group/alca_muonalign

Get a new Grid Cert:

https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookStartingGrid#BasicGrid

2019 AlCaDB tutorial

https://indico.cern.ch/event/828624/

Tracker Run2 UL

https://twiki.cern.ch/twiki/bin/view/CMSPublic/TrackerPerformanceRun2Legacy

CommandLine Cheat Sheet

Command Operation Example
cmsenv Initialize CMSSW environment
voms-proxy-init -voms cms Get GRID cert
source /cvmfs/cms.cern.ch/crab3/crab.sh Source CRAB binaries
crab submit -c <crab_config.py> Submit CRAB job
crab status -d <crab_project_folder> Check the status of a CRAB job
crab kill -d <crab_project_folder> Kill a CRAB job
git cms-addpkg Download a local fork of a CMSSW file or folder
cmsglimpse CMSSW code search cmsglimpse “performT0Corr” | grep ".py"
scram b -j<#cores> Compile code in CMS environment scram b -j8 (8 cores)
bjobs List running / pending jobs and their status
bkill -u [username] 0 Kill all CAF jobs
edmDumpEventContent Show the structure of an EDM format ROOT file
conddb --db sqlitefile.db listTags List the names of tags and records in an sqlite file conddb --db inertGlobalPositionRcd.StdTags.1000p3.db listTags
conddb --db sqlitefile.db list List specific tag information
brilcalc lumi -b "STABLE BEAMS" -i <JSON_file> -u /fb Check luminosity information
export PATH=$HOME/.local/bin:/afs/cern.ch/cms/lumi/brilconda-X.Y.Z/bin:$PATH source brilcalc
eos quota | grep "alca_muonalign" -A 5 Check eos quota for alca muonalignment space
conddb copy inputtag.db [nameyou want/not same as tag] --destdb <arb_name>.db --from 304911 --to 304912 copy db from conddb conddb copy tag CSCAlignmentErrorExtended_2017B --destdb CSCAlignmentErrorExtended_2017B_validation_21July2017.db

Fireworks w/ GEM :

cmsrel CMSSW_11_2_X_2020-11-18-1600
cd CMSSW_11_2_X_2020-11-18-1600/src/
cmsenv
cp /afs/cern.ch/user/g/grnewton/public/FireworksDebug/CMSSW_11_2_X_2020-11-11-1100/src/cmsSimGeom-2021.root .
cp /afs/cern.ch/user/g/grnewton/public/FireworksDebug/CMSSW_11_2_X_2020-11-11-1100/src/mc_sample.root .
cmsShow --sim-geom-file cmsSimGeom-2021.root mc_sample.root

If CMSSW_11_2_X_2020-11-18-1600 not working, use any 11_2_x release. If a new geometry file is needed, it can be produced with this line: simulated or reco pp

cmsRun Fireworks/Geometry/python/dumpSimGeometry_cfg.py tag=“2021"
cmsRun Fireworks/Geometry/python/dumpRecoGeometry_cfg.py tag=“2021"

Also, use your own data, instead of mc_sample.root.

Validation Plots Twiki

https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideMuonAlignValidationPlots?redirectedfrom=CMS.SWGuideMuonAlignValidationPlots#How_to_draw_it