Last updated: 3 December 2025
- Overview of Config Files
- 1A) Setup for Low-PU pp
- 1B) Setup for PbPb
- 2) Processing Forests
- 3) Quick Reference
- CMSSW
- CRAB
- Updating "forest_CMSSW_15_X_X"
- Updating ZDC emap
- VOMS Certificate Setup
- CMSSW
forest_CMSSWConfig_Run3_150X_2025LowPUpp_DATA.py
- CRAB
forest_CRABConfig_150X_2025LowPUpp_DATA_SpecialHLTPhysics.pyforest_CRABConfig_150X_2025LowPUpp_DATA_SpecialZeroBias.py
- CMSSW
forest_CMSSWConfig_Run3_151X_2025PbPb_DATA.py: Intended for general PbPb data (i.e. not UPC).forest_CMSSWConfig_Run3_151X_2025PbPb_DATA_CaloTower.py: Same as general PbPb data config but addsL1CaloTowerTree. Should only be used with private reco miniAOD that includes L1CaloTower info.forest_CMSSWConfig_Run3_151X_2025PbPb_DATA_UPC.py: Specifically for PbPb UPC data. Uses Dfinder (see Setup for PbPb). Also includes ZDC and FSC trees.
- CRAB
forest_CRABConfig_151X_2025PbPb_DATA_ZeroBias.py: CRAB template for general PbPb data. Preset for ZeroBias PDs, modify for other PbPb data.forest_CRABConfig_151X_2025PbPb_DATA_UPC_HIForward.py: CRAB template for UPC data from HIForward PDs. Modify for other UPC data.
Tip
To test CMSSW configs, modify INPUT_TEST_FILE in the config and run with:
cmsRun <forest_CMSSWConfig_XXX.py>To use CRAB for foresting, you will need to work from lxplus.
ssh <your_cern_id>@lxplus.cern.chWarning
Low-PU pp uses CMSSW_15_0_X, not CMSSW_15_1_X as in PbPb!
cmsrel CMSSW_15_0_15_patch4
cd CMSSW_15_0_15_patch4/src
cmsenvgit cms-merge-topic CmsHI:forest_CMSSW_15_0_X
scram build -j4On github.com, 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 git@github.com:<your_git_username>/HIForestSetupPbPbRun2025.git
cd HIForestSetupPbPbRun2025/Finally, add the original repo as an "upstream" repo:
git remote add upstream git@github.com:jdlang/HIForestSetupPbPbRun2025.git
git fetch upstream
git pull upstream maincmsrel CMSSW_15_1_0_patch4
cd CMSSW_15_1_0_patch4/src
cmsenvgit cms-merge-topic CmsHI:forest_CMSSW_15_1_X
scram build -j4Important
To use Dfinder, add the repo below and recompile:
git clone -b Dfinder_14XX_miniAOD git@github.com:boundino/Bfinder.git --depth 1
sed -i "s|forest_miniAOD_run3_UPC_23rereco_DATA|forest_miniAOD_run3_UPC_23rereco_DATA_wDfinder|" Bfinder/test/DnBfinder_to_Forest.sh
source Bfinder/test/DnBfinder_to_Forest.shx
scram build -j4Tip
You can add CMSHI as a remote git reference in case of updates:
git remote add cmshi git@github.com:CmsHI/cmssw.gitOn github.com, 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 git@github.com:<your_git_username>/HIForestSetupPbPbRun2025.git
cd HIForestSetupPbPbRun2025/Finally, add the original repo as an "upstream" repo:
git remote add upstream git@github.com:jdlang/HiForestSetupPbPbRun2025.git
git fetch upstream
git pull upstream mainConfirm that your CMSSWConfig Era and Global Tag match the reco settings. These are the lines shown below (for example):
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Era_Run3_pp_on_PbPb_2025_cff import Run3_pp_on_PbPb_2025
process = cms.Process('HiForest', Run3_pp_on_PbPb_2025)
HIFOREST_VERSION = "151X"
GLOBAL_TAG = "151X_dataRun3_Prompt_v1"Tip
If you are foresting from PromptReco and have a CMS DAS path, click the "Configs" link below the dataset entry on DAS (example), and then click "show" to see the era and global tag used for reco.
Make a copy of the CRABConfig file with an appropriate name:
cp forest_CRABConfig_Run3_PbPb_DATA_TEMPLATE.py forest_CRABConfig_Run3_PbPb_DATA_<your_label>.pyIf you want to process over a local file or a list of files, use
forest_CRABConfig_Run3_PbPb_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
pd = '0'
jobTag = 'LowPUpp_SpecialZeroBias' + pd
cmsswConfig = 'forest_CMSSWConfig_Run3_150X_2025LowPUpp_DATA.py'
isOnDAS = False
# If isOnDAS == True, use these inputs:
input = '/SpecialZeroBias' + pd + '/ppRun2025-PromptReco-v1/MINIAOD'
inputDatabase = 'global'
# Otherwise, use a filelist as input:
inputFilelist = 'filelist_SpecialZeroBias' + pd + '.txt'
output = '/store/group/phys_heavyions/' + username + '/Run3_2025ExpressForests/'
outputServer = 'T2_CH_CERN'Explanation of variables:
pdis the PD number of the dataset being forested.jobTagis a personal label for differentiating samples.cmsswConfigis the CMSSW config file these CRAB jobs should use.isOnDASis a toggle to use either a DAS path or a list of file paths.- Input on DAS:
inputis the miniAOD path on CMS DAS.inputDatabaseis the DAS "dbs instance" that contains the files (typically'global'or'phys03').
- Input from file list:
inputFilelistlist of local file paths on/eos.
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 3000 (MB) for the initial submission, and must not exceed 5000 (MB) for resubmissions!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/>This process should work for any branch of the cmshi/cmssw.git repo.
The example below uses forest_CMSSW_15_1_0:
cd CMSSW_15_1_0/src/HeavyIonsAnalysis/
git config pull.rebase true
git remote add git@github.com:cmshi/cmssw.git
git fetch cmshi forest_CMSSW_15_1_X
git pull cmshi forest_CMSSW_15_1_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