From a460710631cfa6fc583fb6fc7e7e016b8e1c68cf Mon Sep 17 00:00:00 2001 From: Gustavo Date: Sun, 5 Nov 2023 17:04:59 +0100 Subject: [PATCH] correcting command to proper remove LHE header when merging LHE files in FPMC and SCv4. Closes #91 --- PrivGen/Phase2/FPMC/common/merge.sh | 2 +- PrivGen/Phase2/SCv4/common/merge.sh | 2 +- PrivGen/Run3/FPMC/GamGamWW-01/merge.sh | 2 +- PrivGen/Run3/FPMC/GamGamWW-02/merge.sh | 2 +- PrivGen/Run3/FPMC/GamGamWW-20/merge.sh | 2 +- PrivGen/Run3/FPMC/GamGamWW-50/merge.sh | 2 +- PrivGen/Run3/FPMC/GamGamWW-SM/merge.sh | 2 +- PrivGen/Run3/SCv4/Dijets-bbbar_sfact0/merge.sh | 2 +- PrivGen/Run3/SCv4/Dijets-bbbar_sfact4/merge.sh | 2 +- PrivGen/Run3/SCv4/Dijets-ccbar_sfact0/merge.sh | 2 +- PrivGen/Run3/SCv4/Dijets-ccbar_sfact4/merge.sh | 2 +- PrivGen/Run3/SCv4/Dijets-gg_sfact0/merge.sh | 2 +- PrivGen/Run3/SCv4/Dijets-gg_sfact4/merge.sh | 2 +- PrivGen/Run3/SCv4/Dijets-qqbar_sfact0/merge.sh | 2 +- PrivGen/Run3/SCv4/Dijets-qqbar_sfact4/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamEE-dd/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamEE-el/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamEE-sd/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamMuMu-dd/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamMuMu-el/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamMuMu-sd/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamTauTau-dd/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamTauTau-el/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamTauTau-sd/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamWW-el/merge.sh | 2 +- PrivGen/Run3/SCv4/GamGamWW-sd/merge.sh | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/PrivGen/Phase2/FPMC/common/merge.sh b/PrivGen/Phase2/FPMC/common/merge.sh index 149fb8c..ce09afc 100755 --- a/PrivGen/Phase2/FPMC/common/merge.sh +++ b/PrivGen/Phase2/FPMC/common/merge.sh @@ -14,7 +14,7 @@ done # remove header: for ((j=1; j<=${split}-1; j++)); do - tail -n +86 ${proc}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${proc}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${proc}_${j}.lhe done # remove last line: diff --git a/PrivGen/Phase2/SCv4/common/merge.sh b/PrivGen/Phase2/SCv4/common/merge.sh index 149fb8c..ce09afc 100755 --- a/PrivGen/Phase2/SCv4/common/merge.sh +++ b/PrivGen/Phase2/SCv4/common/merge.sh @@ -14,7 +14,7 @@ done # remove header: for ((j=1; j<=${split}-1; j++)); do - tail -n +86 ${proc}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${proc}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${proc}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/FPMC/GamGamWW-01/merge.sh b/PrivGen/Run3/FPMC/GamGamWW-01/merge.sh index c4db3e3..423dc0f 100755 --- a/PrivGen/Run3/FPMC/GamGamWW-01/merge.sh +++ b/PrivGen/Run3/FPMC/GamGamWW-01/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/FPMC/GamGamWW-02/merge.sh b/PrivGen/Run3/FPMC/GamGamWW-02/merge.sh index c4db3e3..423dc0f 100755 --- a/PrivGen/Run3/FPMC/GamGamWW-02/merge.sh +++ b/PrivGen/Run3/FPMC/GamGamWW-02/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/FPMC/GamGamWW-20/merge.sh b/PrivGen/Run3/FPMC/GamGamWW-20/merge.sh index c4db3e3..423dc0f 100755 --- a/PrivGen/Run3/FPMC/GamGamWW-20/merge.sh +++ b/PrivGen/Run3/FPMC/GamGamWW-20/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/FPMC/GamGamWW-50/merge.sh b/PrivGen/Run3/FPMC/GamGamWW-50/merge.sh index c4db3e3..423dc0f 100755 --- a/PrivGen/Run3/FPMC/GamGamWW-50/merge.sh +++ b/PrivGen/Run3/FPMC/GamGamWW-50/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/FPMC/GamGamWW-SM/merge.sh b/PrivGen/Run3/FPMC/GamGamWW-SM/merge.sh index c4db3e3..423dc0f 100755 --- a/PrivGen/Run3/FPMC/GamGamWW-SM/merge.sh +++ b/PrivGen/Run3/FPMC/GamGamWW-SM/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/Dijets-bbbar_sfact0/merge.sh b/PrivGen/Run3/SCv4/Dijets-bbbar_sfact0/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/Dijets-bbbar_sfact0/merge.sh +++ b/PrivGen/Run3/SCv4/Dijets-bbbar_sfact0/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/Dijets-bbbar_sfact4/merge.sh b/PrivGen/Run3/SCv4/Dijets-bbbar_sfact4/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/Dijets-bbbar_sfact4/merge.sh +++ b/PrivGen/Run3/SCv4/Dijets-bbbar_sfact4/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/Dijets-ccbar_sfact0/merge.sh b/PrivGen/Run3/SCv4/Dijets-ccbar_sfact0/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/Dijets-ccbar_sfact0/merge.sh +++ b/PrivGen/Run3/SCv4/Dijets-ccbar_sfact0/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/Dijets-ccbar_sfact4/merge.sh b/PrivGen/Run3/SCv4/Dijets-ccbar_sfact4/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/Dijets-ccbar_sfact4/merge.sh +++ b/PrivGen/Run3/SCv4/Dijets-ccbar_sfact4/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/Dijets-gg_sfact0/merge.sh b/PrivGen/Run3/SCv4/Dijets-gg_sfact0/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/Dijets-gg_sfact0/merge.sh +++ b/PrivGen/Run3/SCv4/Dijets-gg_sfact0/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/Dijets-gg_sfact4/merge.sh b/PrivGen/Run3/SCv4/Dijets-gg_sfact4/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/Dijets-gg_sfact4/merge.sh +++ b/PrivGen/Run3/SCv4/Dijets-gg_sfact4/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/Dijets-qqbar_sfact0/merge.sh b/PrivGen/Run3/SCv4/Dijets-qqbar_sfact0/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/Dijets-qqbar_sfact0/merge.sh +++ b/PrivGen/Run3/SCv4/Dijets-qqbar_sfact0/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/Dijets-qqbar_sfact4/merge.sh b/PrivGen/Run3/SCv4/Dijets-qqbar_sfact4/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/Dijets-qqbar_sfact4/merge.sh +++ b/PrivGen/Run3/SCv4/Dijets-qqbar_sfact4/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamEE-dd/merge.sh b/PrivGen/Run3/SCv4/GamGamEE-dd/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/GamGamEE-dd/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamEE-dd/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamEE-el/merge.sh b/PrivGen/Run3/SCv4/GamGamEE-el/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/GamGamEE-el/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamEE-el/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamEE-sd/merge.sh b/PrivGen/Run3/SCv4/GamGamEE-sd/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/GamGamEE-sd/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamEE-sd/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamMuMu-dd/merge.sh b/PrivGen/Run3/SCv4/GamGamMuMu-dd/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/GamGamMuMu-dd/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamMuMu-dd/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamMuMu-el/merge.sh b/PrivGen/Run3/SCv4/GamGamMuMu-el/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/GamGamMuMu-el/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamMuMu-el/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamMuMu-sd/merge.sh b/PrivGen/Run3/SCv4/GamGamMuMu-sd/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/GamGamMuMu-sd/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamMuMu-sd/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamTauTau-dd/merge.sh b/PrivGen/Run3/SCv4/GamGamTauTau-dd/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/GamGamTauTau-dd/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamTauTau-dd/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamTauTau-el/merge.sh b/PrivGen/Run3/SCv4/GamGamTauTau-el/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/GamGamTauTau-el/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamTauTau-el/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamTauTau-sd/merge.sh b/PrivGen/Run3/SCv4/GamGamTauTau-sd/merge.sh index d8989de..7550f58 100755 --- a/PrivGen/Run3/SCv4/GamGamTauTau-sd/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamTauTau-sd/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamWW-el/merge.sh b/PrivGen/Run3/SCv4/GamGamWW-el/merge.sh index e218caf..38be74f 100755 --- a/PrivGen/Run3/SCv4/GamGamWW-el/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamWW-el/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + sed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: diff --git a/PrivGen/Run3/SCv4/GamGamWW-sd/merge.sh b/PrivGen/Run3/SCv4/GamGamWW-sd/merge.sh index b5c0fdc..0d93daa 100755 --- a/PrivGen/Run3/SCv4/GamGamWW-sd/merge.sh +++ b/PrivGen/Run3/SCv4/GamGamWW-sd/merge.sh @@ -8,7 +8,7 @@ done # remove header: for ((j=1; j<=${1}-1; j++)); do - tail -n +86 ${4}_${j}.lhe > tmp_${j}.dat + ed -n '//,$p' ${4}_${j}.lhe > tmp_${j}.dat mv tmp_${j}.dat ${4}_${j}.lhe done # remove last line: