-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44578 from AdrianoDee/mc_22_23_script_ul
Scripts to Test MC 22-23 Production (UL-like) in IBs
- Loading branch information
Showing
5 changed files
with
245 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
Configuration/PyReleaseValidation/test/test_mc_setup/test_MC_setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#!/bin/bash | ||
|
||
# This script mimics a MC chain with HLT run | ||
# a in a different release from the current one | ||
|
||
echo '#### MC Setup' | ||
|
||
workdir=$PWD | ||
scriptdir=$CMSSW_BASE/src/Configuration/PyReleaseValidation/test/test_mc_setup/ | ||
|
||
# inputs | ||
conditions=$1 | ||
era=$2 | ||
hlt=$3 | ||
release_hlt=$4 | ||
gt_hlt=$5 | ||
beamspot=$6 | ||
|
||
base_dir=$PWD | ||
base_cms=$CMSSW_BASE | ||
base_arch=$SCRAM_ARCH | ||
|
||
# to take into account changes in gcc | ||
base_arch_no_gcc=$(echo $SCRAM_ARCH | cut -d "_" -f -2) | ||
if [[ ! ("$CMSSW_VERSION" == $release_hlt) ]]; then | ||
hlt_cmssw_path=$(scram list -c $release_hlt | grep -w $release_hlt | sed 's|.* ||') | ||
echo $hlt_cmssw_path | ||
fi | ||
|
||
echo '> GT : ' $conditions | ||
echo '> Era : ' $era | ||
echo '> BS : ' $beamspot | ||
echo '> HLT : ' $hlt | ||
echo '> HLT release : ' $release_hlt | ||
if [[ ! ("$CMSSW_VERSION" == $release_hlt) ]]; then | ||
echo " - at ${hlt_cmssw_path}" | ||
fi | ||
echo '> HLT GT : ' $gt_hlt | ||
if [[ -z "${CMSSW_MC_SETUP_TEST_CATCH_HLT}" ]]; then | ||
echo ' - !! No error catch at HLT - If you want to catch them set !!' | ||
echo ' - !! the environment variable CMSSW_MC_SETUP_TEST_CATCH_HLT !!' | ||
fi | ||
echo '> Working dir : ' $workdir | ||
echo '' | ||
############################################################################################################ | ||
# GEN SIM | ||
|
||
${scriptdir}/test_MC_setup_gen_sim.sh $CMSSW_VERSION $conditions $era $beamspot | ||
|
||
if [ $? -ne 0 ]; then | ||
exit 1; | ||
fi | ||
|
||
############################################################################################################ | ||
# HLT | ||
if [[ ! ("$CMSSW_VERSION" == $release_hlt) ]]; then | ||
cd $hlt_cmssw_path | ||
eval `scram runtime -sh` | ||
cd $workdir | ||
fi | ||
|
||
${scriptdir}/test_MC_setup_hlt.sh $gt_hlt $era $hlt | ||
hlt_result=$? | ||
|
||
if [ $hlt_result -ne 0 ] && [[ ! -z "${CMSSW_MC_SETUP_TEST_CATCH_HLT}" ]]; then | ||
exit 1; | ||
elif [ $hlt_result -ne 0 ]; then | ||
echo "!!! HLT failed but ignoring !!!" | ||
exit 0 | ||
fi | ||
|
||
############################################################################################################ | ||
# RECO + PAT | ||
if [[ ! ("$CMSSW_BASE" == $base_cms) ]]; then | ||
cd $base_cms | ||
eval `scram runtime -sh` | ||
cd $workdir | ||
fi | ||
echo $SCRAM_ARCH | ||
${scriptdir}/test_MC_setup_reco.sh $release_hlt $conditions $era $hlt | ||
|
||
if [ $? -ne 0 ]; then | ||
exit 1; | ||
fi | ||
|
||
############################################################################################################ | ||
|
||
echo '>>>> Done! <<<<' |
47 changes: 47 additions & 0 deletions
47
Configuration/PyReleaseValidation/test/test_mc_setup/test_MC_setup_gen_sim.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
############################################################################################################ | ||
### GEN-SIM-RAW-DIGI | ||
|
||
release=$1 | ||
conditions=$2 | ||
era=$3 | ||
beamspot=$4 | ||
|
||
echo '> Running GEN,SIM + DIGI,L1,DIGI2RAW steps in ' $release | ||
|
||
cmsDriver.py TTbar_14TeV_TuneCP5_cfi --python_filename gen_sim.py \ | ||
--eventcontent RAWSIM --customise Configuration/DataProcessing/Utils.addMonitoring \ | ||
--datatier GEN-SIM --fileout file:step1.root --conditions $conditions --beamspot $beamspot \ | ||
--step GEN,SIM --geometry DB:Extended --era $era --mc -n 10 --no_exec | ||
|
||
if [ $? -ne 0 ]; then | ||
echo " !!!! Error in building the config for GEN-SIM with cmsDriver !!!!! " | ||
exit 1; | ||
fi | ||
|
||
cmsRun gen_sim.py | ||
|
||
if [ $? -ne 0 ]; then | ||
echo " !!!! Error in running the config for GEN-SIM !!!!! " | ||
exit 1; | ||
fi | ||
|
||
cmsDriver.py --python_filename raw_digi.py --eventcontent RAWSIM \ | ||
--customise Configuration/DataProcessing/Utils.addMonitoring \ | ||
--datatier GEN-SIM-RAW --filein file:step1.root \ | ||
--fileout file:step2.root --conditions $conditions --step DIGI,L1,DIGI2RAW \ | ||
--geometry DB:Extended --era $era --mc -n -1 --no_exec | ||
|
||
if [ $? -ne 0 ]; then | ||
echo " !!!! Error in building the config for RAW-DIGI with cmsDriver !!!!! " | ||
exit 1; | ||
fi | ||
|
||
cmsRun raw_digi.py | ||
|
||
if [ $? -ne 0 ]; then | ||
echo " !!!! Error in running the config for RAW-DIGI !!!!! " | ||
exit 1; | ||
fi | ||
############################################################################################################ |
30 changes: 30 additions & 0 deletions
30
Configuration/PyReleaseValidation/test/test_mc_setup/test_MC_setup_hlt.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
############################################################################################################ | ||
### HLT STEP in a different release | ||
|
||
conditions=$1 | ||
era=$2 | ||
hlt=$3 | ||
|
||
echo ">>> Running HLT:${hlt} step in " $CMSSW_BASE | ||
|
||
config_name=hlt_"$(echo "$hlt" | tr ':' _ | tr '@' _ )".py | ||
cmsDriver.py --python_filename $config_name --eventcontent RAWSIM \ | ||
--customise Configuration/DataProcessing/Utils.addMonitoring \ | ||
--datatier GEN-SIM-RAW --fileout file:step3.root \ | ||
--conditions $conditions \ | ||
--customise_commands 'process.source.bypassVersionCheck = cms.untracked.bool(True)' \ | ||
--step 'HLT:'$hlt --geometry DB:Extended --filein file:step2.root --era $era --mc -n -1 --no_exec | ||
|
||
if [ $? -ne 0 ]; then | ||
exit 1; | ||
fi | ||
|
||
cmsRun $config_name | ||
|
||
if [ $? -ne 0 ]; then | ||
exit 1; | ||
fi | ||
|
||
############################################################################################################ |
54 changes: 54 additions & 0 deletions
54
Configuration/PyReleaseValidation/test/test_mc_setup/test_MC_setup_reco.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
############################################################################################################ | ||
### RECO + PAT | ||
|
||
release=$1 | ||
conditions=$2 | ||
era=$3 | ||
|
||
#export SCRAM_ARCH=$scram_arch | ||
|
||
echo '> Running RAW2DIGI,L1Reco,RECO,RECOSIM + PAT steps in ' $release | ||
|
||
cmsDriver.py --python_filename reco.py --eventcontent AODSIM \ | ||
--customise Configuration/DataProcessing/Utils.addMonitoring \ | ||
--datatier AODSIM --fileout file:step4.root \ | ||
--conditions $conditions --step RAW2DIGI,L1Reco,RECO,RECOSIM \ | ||
--geometry DB:Extended --filein file:step3.root --era $era \ | ||
--mc -n -1 --no_exec | ||
|
||
if [ $? -ne 0 ]; then | ||
echo " !!!! Error in building the config for RECO with cmsDriver !!!!! " | ||
exit 1; | ||
fi | ||
|
||
cmsRun reco.py | ||
|
||
if [ $? -ne 0 ]; then | ||
echo " !!!! Error in running the config for RECO !!!!! " | ||
exit 1; | ||
fi | ||
|
||
|
||
cmsDriver.py --python_filename pat.py --eventcontent MINIAODSIM \ | ||
--customise Configuration/DataProcessing/Utils.addMonitoring \ | ||
--datatier MINIAODSIM --fileout file:step5.root \ | ||
--conditions $conditions --step PAT \ | ||
--geometry DB:Extended --filein file:step4.root --era $era \ | ||
--mc -n -1 --no_exec | ||
|
||
if [ $? -ne 0 ]; then | ||
echo " !!!! Error in building the config for PAT with cmsDriver !!!!! " | ||
exit 1; | ||
fi | ||
|
||
cmsRun pat.py | ||
|
||
if [ $? -ne 0 ]; then | ||
echo " !!!! Error in running the config for PAT !!!!! " | ||
exit 1; | ||
fi | ||
|
||
|
||
############################################################################################################ |