Skip to content

Commit 8557247

Browse files
committed
fixed numerous bugs surrounding automated functions involving AMO runs of specific run numbers and runs without beam_on_current. A thanks to Peter Pauli for finding a typo when using the BGRATE override
1 parent 145c793 commit 8557247

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

MCwrapper/MakeMC.csh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ endif
242242
set BGRATE_toUse=$BGRATE
243243

244244
if ( "$BGRATE" != "rcdb" || "$VERSION" != "mc" ) then
245-
set BGRATE_toUse=$BGGATE
245+
set BGRATE_toUse=$BGRATE
246246
else
247247
if ( $BGTAGONLY_OPTION == "1" || $BKGFOLDSTR == "BeamPhotons" ) then
248248
echo "Calculating BGRate. This process takes a minute..."
@@ -466,7 +466,7 @@ if ( "$GENR" != "0" ) then
466466
cp $CONFIG_FILE ./$STANDARD_NAME.conf
467467
else if ( "$GENERATOR" == "gen_pi0" ) then
468468
echo "configuring gen_pi0"
469-
set STANDARD_NAME="genr_pi0_"$STANDARD_NAME
469+
set STANDARD_NAME="gen_pi0_"$STANDARD_NAME
470470
cp $CONFIG_FILE ./$STANDARD_NAME.conf
471471
else if ( "$GENERATOR" == "gen_2k" ) then
472472
echo "configuring gen_2k"
@@ -775,8 +775,11 @@ if ( "$GENR" != "0" ) then
775775
hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' -PPLUGINS=$PluginStr -PNTHREADS=$NUMTHREADS
776776

777777
endif
778-
779-
778+
set hd_root_return_code=$?
779+
if ( hd_root_return_code != 0 ) then
780+
echo "Something went wrong with hd_root"
781+
exit hd_root_return_code
782+
endif
780783
if ( -f dana_rest.hddm ) then
781784
mv dana_rest.hddm dana_rest_$STANDARD_NAME.hddm
782785
endif

MCwrapper/MakeMC.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ shift
66
export ENVIRONMENT=$1
77
shift
88
if [[ "$BATCHRUN" != "0" ]]; then
9-
source $ENVIRONMENT
9+
source $ENVIRONMENT
1010
fi
1111
export CONFIG_FILE=$1
1212
shift
@@ -242,7 +242,7 @@ fi
242242
BGRATE_toUse=$BGRATE
243243

244244
if [[ "$BGRATE" != "rcdb" || "$VERSION" != "mc" ]]; then
245-
BGRATE_toUse=$BGGATE
245+
BGRATE_toUse=$BGRATE
246246
else
247247
if [[ $BGTAGONLY_OPTION == "1" || $BKGFOLDSTR=="BeamPhotons" ]]; then
248248
echo "Calculating BGRate. This process takes a minute..."
@@ -469,7 +469,7 @@ if [[ "$GENR" != "0" ]]; then
469469
cp $CONFIG_FILE ./$STANDARD_NAME.conf
470470
elif [[ "$GENERATOR" == "gen_pi0" ]]; then
471471
echo "configuring gen_pi0"
472-
STANDARD_NAME="genr_pi0_"$STANDARD_NAME
472+
STANDARD_NAME="gen_pi0_"$STANDARD_NAME
473473
cp $CONFIG_FILE ./$STANDARD_NAME.conf
474474
elif [[ "$GENERATOR" == "gen_2k" ]]; then
475475
echo "configuring gen_2k"
@@ -775,6 +775,10 @@ if [[ "$GENR" != "0" ]]; then
775775
echo "hd_root ""$STANDARD_NAME"'_geant'"$GEANTVER"'_smeared.hddm'" -PPLUGINS=""$PluginStr ""-PNTHREADS=""$NUMTHREADS"
776776
hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' -PPLUGINS=$PluginStr -PNTHREADS=$NUMTHREADS
777777
fi
778+
if [[ hd_root_return_code != 0 ]]; then
779+
echo "Something went wrong with hd_root"
780+
exit hd_root_return_code
781+
fi
778782

779783
if [[ -f dana_rest.hddm ]]; then
780784
mv dana_rest.hddm dana_rest_$STANDARD_NAME.hddm

MCwrapper/gluex_MC.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def main(argv):
196196

197197
print "*********************************"
198198
print "Welcome to v1.11 of the MCwrapper"
199-
print "Thomas Britton 12/5/17"
199+
print "Thomas Britton 12/7/17"
200200
print "*********************************"
201201

202202
#load all argument passed in and set default options

0 commit comments

Comments
 (0)