Skip to content

Commit

Permalink
Inject ticl into the RECO fragment. (cms-sw#70)
Browse files Browse the repository at this point in the history
* Inject ticl into the RECO fragment as option.
* Complain when ticl injection failed.
* Add note on ticl in RECO fragment to README.
  • Loading branch information
riga authored and clelange committed Aug 2, 2019
1 parent 394909e commit 8ed0d17
Showing 5 changed files with 239 additions and 104 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -33,6 +33,12 @@ For details on the pileup scenario, please see [Configuration/StandardSequences/

Whenever you would like to change configuration, change to the `reco_prodtools/templates/python` directory and execute the corresponding script. Then make sure to run `scram b`.

The processing of TICL iterations is added into the RECO fragment by default. To disable that, add `no-ticl` to the skeleton creation script, e.g.:

```shell
./produceSkeletons_D41_NoSmear_noPU.sh no-ticl
```

## Details

To produce `NEVENTS` GEN-SIM-DIGI events with `NPART` sets of particles (per event) of type `PART_PDGID` and in the p_T range from `PTMIN` to `PTMAX`, one should run:
30 changes: 30 additions & 0 deletions templates/python/inject_ticl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# This script injects the lines required to run ticl into a
# reconstruction fragment obtained through (e.g.) runTheMatrix.py.
#
# A function is used to be able to use local variables.
#
# Arguments:
# 1. fragment_file: The file to update inline.

action() {
# get and check arguments
local fragment_file="$1"
if [ -z "$fragment_file" ]; then
2>&1 echo "please pass a fragment file as argument 1"
return "1"
fi
if [ ! -f "$fragment_file" ]; then
2>&1 echo "the fragment file '$fragment_file' does not exist"
return "2"
fi

# define what to inject where
local hook="# customisation of the process."
local content="# run TICL\nfrom RecoHGCal.TICL.ticl_iterations import TICL_iterations_withReco\nprocess = TICL_iterations_withReco(process)"

# do the injection
sed "/$hook/a $content" -i "$fragment_file"
}
action "$@"
105 changes: 69 additions & 36 deletions templates/python/produceSkeletons_D41_NoSmear_PU_AVE_200_BX_25ns.sh
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@
#
# 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
#
@@ -30,43 +32,74 @@
#
# Those commands should be regularly checked and, in case of changes, propagated into this script!

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 \
--geometry Extended2026D41 \
--pileup AVE_200_BX_25ns \
--pileup_input das:/RelValMinBias_14TeV/CMSSW_10_6_0_patch2-106X_upgrade2023_realistic_v3_2023D41noPU-v1/GEN-SIM \
--no_exec \
--python_filename=GSD_fragment.py
action() {
# default arguments
local inject_ticl="1"

# parse arguments
for arg in "$@"; do
if [ "$arg" = "ticl" ]; then
inject_ticl="1"
elif [ "$arg" = "no-ticl" ]; then
inject_ticl="0"
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 \
--geometry Extended2026D41 \
--pileup AVE_200_BX_25ns \
--pileup_input das:/RelValMinBias_14TeV/CMSSW_10_6_0_patch2-106X_upgrade2023_realistic_v3_2023D41noPU-v1/GEN-SIM \
--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 Extended2026D41 \
--no_exec \
--python_filename=RECO_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 Extended2026D41 \
--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 Extended2026D41 \
--no_exec \
--processName=NTUP \
--python_filename=NTUP_fragment.py
cmsDriver.py step3 \
--conditions auto:phase2_realistic \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT \
--runUnscheduled \
-s RAW2DIGI,L1Reco,RECO,RECOSIM \
--datatier GEN-SIM-RECO \
--geometry Extended2026D41 \
--no_exec \
--processName=NTUP \
--python_filename=NTUP_fragment.py
}
action "$@"
101 changes: 67 additions & 34 deletions templates/python/produceSkeletons_D41_NoSmear_noPU.sh
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@
#
# runTheMatrix.py -w upgrade -l 20488.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
#
@@ -28,41 +30,72 @@
#
# Those commands should be regularly checked and, in case of changes, propagated into this script!

cmsDriver.py SinglePiPt25Eta1p7_2p7_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 \
--geometry Extended2026D41 \
--no_exec \
--python_filename=GSD_fragment.py
action() {
# default arguments
local inject_ticl="1"

# parse arguments
for arg in "$@"; do
if [ "$arg" = "ticl" ]; then
inject_ticl="1"
elif [ "$arg" = "no-ticl" ]; then
inject_ticl="0"
else
2>&1 echo "unknown argument: $arg"
return "1"
fi
done


cmsDriver.py SinglePiPt25Eta1p7_2p7_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 \
--geometry Extended2026D41 \
--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 Extended2026D41 \
--no_exec \
--python_filename=RECO_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 Extended2026D41 \
--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 Extended2026D41 \
--no_exec \
--processName=NTUP \
--python_filename=NTUP_fragment.py
cmsDriver.py step3 \
--conditions auto:phase2_realistic \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT \
--runUnscheduled \
-s RAW2DIGI,L1Reco,RECO,RECOSIM \
--datatier GEN-SIM-RECO \
--geometry Extended2026D41 \
--no_exec \
--processName=NTUP \
--python_filename=NTUP_fragment.py
}
action "$@"
101 changes: 67 additions & 34 deletions templates/python/produceSkeletons_D41_VtxSmearedHLLHC_noPU.sh
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@
#
# 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
#
@@ -29,41 +31,72 @@
#
# Those commands should be regularly checked and, in case of changes, propagated into this script!

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 HLLHC14TeV \
--geometry Extended2026D41 \
--no_exec \
--python_filename=GSD_fragment.py
action() {
# default arguments
local inject_ticl="1"

# parse arguments
for arg in "$@"; do
if [ "$arg" = "ticl" ]; then
inject_ticl="1"
elif [ "$arg" = "no-ticl" ]; then
inject_ticl="0"
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 HLLHC14TeV \
--geometry Extended2026D41 \
--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 Extended2026D41 \
--no_exec \
--python_filename=RECO_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 Extended2026D41 \
--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 Extended2026D41 \
--no_exec \
--processName=NTUP \
--python_filename=NTUP_fragment.py
cmsDriver.py step3 \
--conditions auto:phase2_realistic \
-n 10 \
--era Phase2C8 \
--eventcontent FEVTDEBUGHLT \
--runUnscheduled \
-s RAW2DIGI,L1Reco,RECO,RECOSIM \
--datatier GEN-SIM-RECO \
--geometry Extended2026D41 \
--no_exec \
--processName=NTUP \
--python_filename=NTUP_fragment.py
}
action "$@"

0 comments on commit 8ed0d17

Please sign in to comment.