Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
#!/bin/bash

############################################################################################################
### RECO + PAT

release=$1 
conditions=$2
era=$3

#export SCRAM_ARCH=$scram_arch

echo '> Running RAW2DIGI,L1Reco,RECO,RECOSIM + PAT steps reading input generated in ' $release

# Check if release matches the pattern "CMSSW_12_4_*_HLT"
if [[ $release == CMSSW_12_4_*_HLT ]]; then
    echo "Release matches CMSSW_12_4_*_HLT, adding customisation for fixReading_12_4_X_Files"
    customise_flag="IOPool/Input/fixReading_12_4_X_Files.fixReading_12_4_X_Files, Configuration/DataProcessing/Utils.addMonitoring"
else
    customise_flag="Configuration/DataProcessing/Utils.addMonitoring"
fi

cmsDriver.py  --python_filename reco.py --eventcontent AODSIM \
--customise $customise_flag \
--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


############################################################################################################