Skip to content

Commit

Permalink
Aged skeleton producer (cms-sw#83)
Browse files Browse the repository at this point in the history
* adding a customized pileup,geometry,and other options skeleton producer

* adding an explanation to README

* adding check for string start
  • Loading branch information
pfs authored and riga committed Oct 9, 2019
1 parent 4ba2d33 commit d5d45fa
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ The processing of TICL iterations is added into the RECO fragment by default. To
./produceSkeletons_D41_NoSmear_noPU.sh no-ticl
```

Other options like changing the pileup source, calling --customise on cmsDriver or changing geometry can be passed with the following script

```shell
./produceSkeletons_D41_NoSmear_PU_AVE_200_BX_25ns_aged.sh \
pileup_input=/eos/cms//store/group/dpg_hgcal/comm_hgcal/deguio/pu_library/V11/GEN-SIM \
custom="--customise SLHCUpgradeSimulations/Configuration/aging.agedHGCal" \
geometry=Extended2026D46
```

## Available guns and processes

The production tools allow you to generate a plethora of processes (links lead to implementation in CMSSW):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
#!/bin/sh

# This is the shell script that will generate all the skeletons using cmsDriver commands.
# The commands included have been taken from runTheMatrix with the following command:
#
# runTheMatrix.py -w upgrade -l 20634.0 --command="--no_exec" --dryRun
#
# The reconstruction as part of the ticl framework is injected into the RECO_fragment.
#
# For all commands remove --filein and --fileout options.
# Add python_filename option
#
# The first command combines step1 and step2 (GSD):
# - mix in pileup
# - run up to DIGI...HLT:@fake2
# The following changes are implemented on top:
# --beamspot HLLHC14TeV ➜ --beamspot NoSmear
# --eventcontent FEVTDEBUG ➜ --eventcontent FEVTDEBUGHLT
# Removed --relval option.
#
# The second command is step3 removing overlap with step2 (RECO):
# - remove pileup part
# - remove MINIAODSIM from event content and data tier
# - remove PAT from steps (-s)
# - remove @miniAODValidation from VALIDATION step
# - remove @miniAODDQM from DQM step
#
# The third command is a copy of the second only re-running RECO (for NTUP):
# - remove DQM from event content
# - remove DQMIO from data tier
# - add --processName=NTUP option
#
# Those commands should be regularly checked and, in case of changes, propagated into this script!

action() {
# default arguments
local inject_ticl="1"
local geometry="Extended2026D41"
local pileup_input="das:/RelValMinBias_14TeV/CMSSW_10_6_0_patch2-106X_upgrade2023_realistic_v3_2023D41noPU-v1/GEN-SIM"
local custom=""

# parse arguments
for arg in "$@"; do
if [ "$arg" = ^"ticl" ]; then
inject_ticl="1"
elif [ "$arg" = ^"no-ticl" ]; then
inject_ticl="0"
elif [[ $arg =~ ^"geometry" ]]; then
geometry=${arg/geometry=/}
echo "Geometry will be modified to $geometry"
elif [[ $arg =~ ^"custom" ]]; then
custom=${arg/custom=/}
echo "Custom options $custom"
elif [[ $arg =~ ^"pileup_input" ]]; then
pileup_input=${arg/pileup_input=/}
#if das is not given try to build the list of files by listing the local directory given
if [[ ${pileup_input} != *"das:"* ]]; then
pileup_input=`find ${pileup_input} -iname "*.root" -printf "file:%h/%f,"`
pileup_input=${pileup_input::-1}
fi
echo "Pileup input modified to ${pileup_input}"
else
2>&1 echo "unknown argument: $arg"
return "1"
fi
done

cmsDriver.py TTbar_14TeV_TuneCUETP8M1_cfi \
--conditions auto:phase2_realistic \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT \
-s GEN,SIM,DIGI:pdigi_valid,L1,L1TrackTrigger,DIGI2RAW,HLT:@fake2 \
--datatier GEN-SIM \
--beamspot NoSmear \
${custom} \
--geometry ${geometry} \
--pileup AVE_200_BX_25ns \
--pileup_input ${pileup_input} \
--no_exec \
--python_filename=GSD_fragment.py


cmsDriver.py step3 \
--conditions auto:phase2_realistic \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT,DQM \
--runUnscheduled \
-s RAW2DIGI,L1Reco,RECO,RECOSIM,VALIDATION:@phase2Validation,DQM:@phase2 \
--datatier GEN-SIM-RECO,DQMIO \
--geometry ${geometry} \
--no_exec \
--python_filename=RECO_fragment.py


if [ "$inject_ticl" = "1" ]; then
echo -e "\ninject ticl into RECO_fragment.py"
./inject_ticl.sh RECO_fragment.py
if [ "$?" = "0" ]; then
echo
else
2>&1 echo "ticl injection failed"
return "2"
fi
fi


cmsDriver.py step3 \
--conditions auto:phase2_realistic \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT \
--runUnscheduled \
-s RAW2DIGI,L1Reco,RECO,RECOSIM \
--datatier GEN-SIM-RECO \
--geometry ${geometry} \
--no_exec \
--processName=NTUP \
--python_filename=NTUP_fragment.py
}
action "$@"

0 comments on commit d5d45fa

Please sign in to comment.