Skip to content

Commit

Permalink
correcting command to proper remove LHE header when merging LHE files…
Browse files Browse the repository at this point in the history
… in FPMC and SCv4. Closes #91
  • Loading branch information
diemort committed Nov 5, 2023
1 parent d2e4a9e commit a460710
Show file tree
Hide file tree
Showing 26 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion PrivGen/Phase2/FPMC/common/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${proc}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${proc}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Phase2/SCv4/common/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${proc}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${proc}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/FPMC/GamGamWW-01/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/FPMC/GamGamWW-02/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/FPMC/GamGamWW-20/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/FPMC/GamGamWW-50/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/FPMC/GamGamWW-SM/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/Dijets-bbbar_sfact0/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/Dijets-bbbar_sfact4/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/Dijets-ccbar_sfact0/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/Dijets-ccbar_sfact4/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/Dijets-gg_sfact0/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/Dijets-gg_sfact4/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/Dijets-qqbar_sfact0/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/Dijets-qqbar_sfact4/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamEE-dd/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamEE-el/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamEE-sd/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamMuMu-dd/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamMuMu-el/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamMuMu-sd/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamTauTau-dd/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamTauTau-el/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamTauTau-sd/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamWW-el/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down
2 changes: 1 addition & 1 deletion PrivGen/Run3/SCv4/GamGamWW-sd/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<event>/,$p' ${4}_${j}.lhe > tmp_${j}.dat
mv tmp_${j}.dat ${4}_${j}.lhe
done
# remove last line:
Expand Down

0 comments on commit a460710

Please sign in to comment.