- Setup
- Processing Forests
- Quick Reference
- CMSSW
- CRAB
- Updating "forest_CMSSW_15_0_X"
- Updating ZDC emap
- VOMS Certificate Setup
Warning
To use CRAB for foresting, you will need to work from lxplus8.
ssh <your_cern_id>@lxplus8.cern.chcmsrel CMSSW_15_0_9_patch2
cd CMSSW_15_0_9_patch2/src
cmsenvgit cms-merge-topic CmsHI:forest_CMSSW_15_0_X
scram build -j4Tip
You can add CMSHI as a remote git reference in case of updates:
git remote add cmshi [email protected]:CmsHI/cmssw.gitOn github, fork this repository to make your own version. This will be used to document your forest configs.
Next, clone your forked version of this repo:
git clone [email protected]:<your_git_username>/HiForestSetupOORun2025.git
cd HiForestSetupOORun2025/Finally, add the original repo as "upstream":
git remote add upstream [email protected]:jdlang/HiForestSetupOORun2025.git
git fetch upstream
git pull upstream mainMake a copy of the CRABConfig file with an appropriate name:
cp forest_CRABConfig_Run3_OXY_DATA_TEMPLATE.py forest_CRABConfig_Run3_OXY_DATA_<your_label>.pyIf you want to process over a local file or a list of files, use
forest_CRABConfig_Run3_OO_DATA_filelist_TEMPLATE.py as your template
instead. Save your file(s) to a .txt file using a command like:
ls /path/to/files/*.root > filelist_<your_label>.txt
# If the miniaod files are on /eos, you MUST remove "/eos/cms" from
# the start of the paths:
sed -i "s|/eos/cms||" filelist_<your_label>.txtModify the input and output paths in the config (example shown below):
# INPUT/OUTPUT SETTINGS
jobTag = 'Run3_OO_IonPhysics_runXXXXXX'
input = '/DAS/Path/'
inputDatabase = 'phys03'
output = '/store/group/phys_heavyions/' + username + '/Run3_OO_2025Data_QuickForest/'
outputServer = 'T2_CH_CERN'Explanation of variables:
jobTagis a personal label for differentiating samples.inputis the miniAOD path on CMS DAS.inputDatabaseis the DAS "dbs instance" that contains the files (typically'global'or'phys03').outputis the path on the output server. Forested files are saved here.outputServeris the CMS T2 server where data will be stored.
voms-proxy-init -rfc -voms cmsTip
Add an alias for this to ~/.bash_profile to make VOMS easier:
alias proxy='voms-proxy-init -rfc -voms cms; cp/tmp/x509up_u'$(id -u)' ~/'This will let you initialize VOMS just by running the command: proxy
cd ..
# Copy CMSSW configs to "src"
cp HiForestSetupOORun2025/forest_CMSSWConfig* ..
# Run CRAB configs from "src"
crab submit -c HiForestSetupOORun2025/forest_CRABConfig_Run3_OO_DATA_<your_label>.pyYou can view the status of a job with:
crab status -d CrabWorkArea/crab_<your job tag>/Tip
Always check job status ~2-3 minutes after submitting to make sure the job
has been accepted! If you see the status SUBMITREFUSED you will need to fix
the config(s) and delete the job folder from CrabWorkArea/ before
submitting it again.
When you (inevitably) have failed jobs, you can resubmit them with:
crab resubmit -d CrabWorkArea/crab_<your job tag>/Optionally you can also change the requested memory or runtime for jobs when you resubmit:
crab resubmit --maxmemory 2500 --maxruntime 300 -d CrabWorkArea/crab_<your job tag>/Warning
Requesting more than the maximum allowed memory or runtime will result in your job being refused and you will be unable to resubmit any failed jobs for that CRAB submission!
maxmemorymust not exceed 5000 (MB)!maxruntimemust not exceed 900 (minutes)!
If you need to stop a job before it finishes, use:
crab kill -d CrabWorkArea/crab_<your job tag>/# Run CMSSWConfig LOCALLY:
cmsRun forest_CMSSWConfig_XXXX.py# Submit job:
crab submit -c <CRAB_config_file.py>
# Check job status:
crab status -d <path/to/crab_status_directory/>
# Kill a job (WARNING: this is irreversible!):
crab kill -d <path/to/crab_status_directory/>
# Resubmit failed jobs:
crab resubmit -d <path/to/crab_status_directory/>
# Resubmit with max memory and max runtime
crab resubmit --maxmemory 3000 --maxruntime 450 -d <path/to/crab_status_directory/>cd CMSSW_15_0_9_patch2/src/HeavyIonsAnalysis/
git config pull.rebase true
git remote add [email protected]:cmshi/cmssw.git
git fetch cmshi forest_CMSSW_15_0_X
git pull cmshi forest_CMSSW_15_0_X
# Return to src folder and recompile:
cd ..
cmsenv
scram b -j4https://ca.cern.ch/ca/user/Request.aspx?template=ee2user
Use the “New Grid User Certificate” tab to get a new CERN grid. You should set a password for this, and will need to remember it.
https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookStartingGrid#BasicGrid
To setup the certificate in your remote workspace, you should:
-
Export the certificate from your browser to a file in p12 format. You can give any name to your p12 file (in the example below the name is
mycert.p12). -
Place the p12 certificate file in the
.globusdirectory of your home area. If the.globusdirectory doesn't exist, create it.
cd ~
mkdir .globus
cd ~/.globus
mv /path/to/mycert.p12 .- Execute the following shell commands:
rm -f usercert.pem
rm -f userkey.pem
openssl pkcs12 -in mycert.p12 -clcerts -nokeys -out usercert.pem
openssl pkcs12 -in mycert.p12 -nocerts -out userkey.pem
chmod 400 userkey.pem
chmod 400 usercert.pemWarning
If you are new to VOMS, you will need to sign the Acceptable Usage Policy (AUP) before you are able to access files, tools, and servers secured by certificate access. Just follow instructions here to sign the CMS AUP: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideLcgAccess#AUP