Skip to content

Commit

Permalink
fixed numerous bugs surrounding automated functions involving AMO run…
Browse files Browse the repository at this point in the history
…s of specific run numbers and runs without beam_on_current. A thanks to Peter Pauli for finding a typo when using the BGRATE override
  • Loading branch information
T-Britton committed Dec 7, 2017
1 parent 145c793 commit 8557247
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
11 changes: 7 additions & 4 deletions MCwrapper/MakeMC.csh
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ endif
set BGRATE_toUse=$BGRATE

if ( "$BGRATE" != "rcdb" || "$VERSION" != "mc" ) then
set BGRATE_toUse=$BGGATE
set BGRATE_toUse=$BGRATE
else
if ( $BGTAGONLY_OPTION == "1" || $BKGFOLDSTR == "BeamPhotons" ) then
echo "Calculating BGRate. This process takes a minute..."
Expand Down Expand Up @@ -466,7 +466,7 @@ if ( "$GENR" != "0" ) then
cp $CONFIG_FILE ./$STANDARD_NAME.conf
else if ( "$GENERATOR" == "gen_pi0" ) then
echo "configuring gen_pi0"
set STANDARD_NAME="genr_pi0_"$STANDARD_NAME
set STANDARD_NAME="gen_pi0_"$STANDARD_NAME
cp $CONFIG_FILE ./$STANDARD_NAME.conf
else if ( "$GENERATOR" == "gen_2k" ) then
echo "configuring gen_2k"
Expand Down Expand Up @@ -775,8 +775,11 @@ if ( "$GENR" != "0" ) then
hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' -PPLUGINS=$PluginStr -PNTHREADS=$NUMTHREADS

endif


set hd_root_return_code=$?
if ( hd_root_return_code != 0 ) then
echo "Something went wrong with hd_root"
exit hd_root_return_code
endif
if ( -f dana_rest.hddm ) then
mv dana_rest.hddm dana_rest_$STANDARD_NAME.hddm
endif
Expand Down
10 changes: 7 additions & 3 deletions MCwrapper/MakeMC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ shift
export ENVIRONMENT=$1
shift
if [[ "$BATCHRUN" != "0" ]]; then
source $ENVIRONMENT
source $ENVIRONMENT
fi
export CONFIG_FILE=$1
shift
Expand Down Expand Up @@ -242,7 +242,7 @@ fi
BGRATE_toUse=$BGRATE

if [[ "$BGRATE" != "rcdb" || "$VERSION" != "mc" ]]; then
BGRATE_toUse=$BGGATE
BGRATE_toUse=$BGRATE
else
if [[ $BGTAGONLY_OPTION == "1" || $BKGFOLDSTR=="BeamPhotons" ]]; then
echo "Calculating BGRate. This process takes a minute..."
Expand Down Expand Up @@ -469,7 +469,7 @@ if [[ "$GENR" != "0" ]]; then
cp $CONFIG_FILE ./$STANDARD_NAME.conf
elif [[ "$GENERATOR" == "gen_pi0" ]]; then
echo "configuring gen_pi0"
STANDARD_NAME="genr_pi0_"$STANDARD_NAME
STANDARD_NAME="gen_pi0_"$STANDARD_NAME
cp $CONFIG_FILE ./$STANDARD_NAME.conf
elif [[ "$GENERATOR" == "gen_2k" ]]; then
echo "configuring gen_2k"
Expand Down Expand Up @@ -775,6 +775,10 @@ if [[ "$GENR" != "0" ]]; then
echo "hd_root ""$STANDARD_NAME"'_geant'"$GEANTVER"'_smeared.hddm'" -PPLUGINS=""$PluginStr ""-PNTHREADS=""$NUMTHREADS"
hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' -PPLUGINS=$PluginStr -PNTHREADS=$NUMTHREADS
fi
if [[ hd_root_return_code != 0 ]]; then
echo "Something went wrong with hd_root"
exit hd_root_return_code
fi

if [[ -f dana_rest.hddm ]]; then
mv dana_rest.hddm dana_rest_$STANDARD_NAME.hddm
Expand Down
2 changes: 1 addition & 1 deletion MCwrapper/gluex_MC.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def main(argv):

print "*********************************"
print "Welcome to v1.11 of the MCwrapper"
print "Thomas Britton 12/5/17"
print "Thomas Britton 12/7/17"
print "*********************************"

#load all argument passed in and set default options
Expand Down

0 comments on commit 8557247

Please sign in to comment.