forked from bendavid/WRemnants
-
Notifications
You must be signed in to change notification settings - Fork 21
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 #377 from davidwalter2/240110_AppendHistmakerSupport
Add support for appending histmaker analysis output to existing file
- Loading branch information
Showing
14 changed files
with
96 additions
and
23 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
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
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
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
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
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
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
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,45 @@ | ||
# Due to memory constraints run the histmaker multiple times and append the output file gradually | ||
# run e.g. source scripts/utilities/run_histmakers.sh wmass /scratch/$USER/results_histmaker/ nominal --unfolding --genVars ptGen absEtaGen --genBins 32 24 --pt 32 25 57 --noAuxiliaryHistograms | ||
|
||
if [[ $# -lt 3 ]]; then | ||
echo "Requires at least three arguments: run_histmakers.sh <MODE> <OUTPUT_DIR> <POSTFIX> (<OPTIONAL OPTS>)" | ||
exit 1 | ||
fi | ||
|
||
MODE=$1 | ||
OUTPUT_DIR=$2 | ||
POSTFIX=$3 | ||
shift | ||
shift | ||
shift | ||
|
||
if [ "$MODE" == "wmass" ]; then | ||
HISTMAKER="mw_with_mu_eta_pt" | ||
separateProcs=("WminusmunuPostVFP" "WplusmunuPostVFP" "WminustaunuPostVFP" "WplustaunuPostVFP") | ||
elif [ "$MODE" == "wlike" ]; then | ||
HISTMAKER="mz_wlike_with_mu_eta_pt" | ||
separateProcs=("ZmumuPostVFP" "ZtautauPostVFP") | ||
elif [ "$MODE" == "dilepton" ]; then | ||
HISTMAKER="mz_dilepton" | ||
separateProcs=("ZmumuPostVFP" "ZtautauPostVFP") | ||
fi | ||
|
||
OUTPUT_FILE=$OUTPUT_DIR/${HISTMAKER}_${POSTFIX}.hdf5 | ||
|
||
OPTS="--forceDefaultName --postfix $POSTFIX $@" | ||
|
||
CMD="python ./scripts/histmakers/${HISTMAKER}.py \ | ||
-o $OUTPUT_DIR $OPTS --excludeProcs ${separateProcs[@]}" | ||
# echo $CMD | ||
eval $CMD | ||
|
||
# Processes that should be processed individually | ||
for proc in "${separateProcs[@]}"; do | ||
CMD="python ./scripts/histmakers/${HISTMAKER}.py \ | ||
--appendOutputFile $OUTPUT_FILE $OPTS --filterProcs $proc" | ||
# echo $CMD | ||
eval $CMD | ||
done | ||
|
||
|
||
|
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
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
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
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
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
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