diff --git a/MCwrapper/MakeMC.csh b/MCwrapper/MakeMC.csh index f6b47c07..7b1cf4a5 100755 --- a/MCwrapper/MakeMC.csh +++ b/MCwrapper/MakeMC.csh @@ -229,15 +229,17 @@ set BGRATE_toUse=$BGRATE if ( "$BGRATE" != "rcdb" || "$VERSION" != "mc" ) then set BGRATE_toUse=$BGGATE else - echo "Calculating BGRate. This process takes a minute..." - set BGRATE_toUse=`BGRate_calc --runNo $RUN_NUMBER --coherent_peak $COHERENT_PEAK --beam_on_current $beam_on_current --beam_energy $eBEAM_ENERGY --collimator_diameter 0.00$colsize --radiator_thickness $radthick --endpoint_energy_low $GEN_MIN_ENERGY --endpoint_energy_high $GEN_MAX_ENERGY` + if ( $BGTAGONLY_OPTION == "1" || $BKGFOLDSTR == "BeamPhotons" ) then + echo "Calculating BGRate. This process takes a minute..." + set BGRATE_toUse=`BGRate_calc --runNo $RUN_NUMBER --coherent_peak $COHERENT_PEAK --beam_on_current $beam_on_current --beam_energy $eBEAM_ENERGY --collimator_diameter 0.00$colsize --radiator_thickness $radthick --endpoint_energy_low $GEN_MIN_ENERGY --endpoint_energy_high $GEN_MAX_ENERGY` - if ( "$BGRATE_toUse" == "" ) then - echo "BGrate_calc is not built or inaccessible. Please check your build and/or specify a BGRate to be used." - exit 12 - else - set BGRATE_list=($BGRATE_toUse:as/ / /) - set BGRATE_toUse=$BGRATE_list[$#BGRATE_list] + if ( "$BGRATE_toUse" == "" ) then + echo "BGrate_calc is not built or inaccessible. Please check your build and/or specify a BGRate to be used." + exit 12 + else + set BGRATE_list=($BGRATE_toUse:as/ / /) + set BGRATE_toUse=$BGRATE_list[$#BGRATE_list] + endif endif endif diff --git a/MCwrapper/MakeMC.sh b/MCwrapper/MakeMC.sh index a9139af0..3fa370cd 100755 --- a/MCwrapper/MakeMC.sh +++ b/MCwrapper/MakeMC.sh @@ -227,17 +227,18 @@ BGRATE_toUse=$BGRATE if [[ "$BGRATE" != "rcdb" || "$VERSION" != "mc" ]]; then BGRATE_toUse=$BGGATE else - echo "Calculating BGRate. This process takes a minute..." - BGRATE_toUse=`BGRate_calc --runNo $RUN_NUMBER --coherent_peak $COHERENT_PEAK --beam_on_current $beam_on_current --beam_energy $eBEAM_ENERGY --collimator_diameter 0.00$colsize --radiator_thickness $radthick --endpoint_energy_low $GEN_MIN_ENERGY --endpoint_energy_high $GEN_MAX_ENERGY` - echo BGRATE Is: $BGRATE_toUse - if [[ $BGRATE_toUse == "" ]]; then - echo "BGrate_calc is not built or inaccessible. Please check your build and/or specify a BGRate to be used." - exit 12 - else - - BGRATE_list=(`echo ${BGRATE_toUse}`) - BGRATE_list_length=${#BGRATE_list[@]} - BGRATE_toUse=`echo ${BGRATE_list[$(($BGRATE_list_length-1))]}` + if [[ $BGTAGONLY_OPTION == "1" || $BKGFOLDSTR=="BeamPhotons" ]]; then + echo "Calculating BGRate. This process takes a minute..." + BGRATE_toUse=`BGRate_calc --runNo $RUN_NUMBER --coherent_peak $COHERENT_PEAK --beam_on_current $beam_on_current --beam_energy $eBEAM_ENERGY --collimator_diameter 0.00$colsize --radiator_thickness $radthick --endpoint_energy_low $GEN_MIN_ENERGY --endpoint_energy_high $GEN_MAX_ENERGY` + echo BGRATE Is: $BGRATE_toUse + if [[ $BGRATE_toUse == "" ]]; then + echo "BGrate_calc is not built or inaccessible. Please check your build and/or specify a BGRate to be used." + exit 12 + else + BGRATE_list=(`echo ${BGRATE_toUse}`) + BGRATE_list_length=${#BGRATE_list[@]} + BGRATE_toUse=`echo ${BGRATE_list[$(($BGRATE_list_length-1))]}` + fi fi fi diff --git a/MCwrapper/examples/MC.config b/MCwrapper/examples/MC.config index 4a8968a2..974dda12 100755 --- a/MCwrapper/examples/MC.config +++ b/MCwrapper/examples/MC.config @@ -7,8 +7,8 @@ #RUNNING_DIRECTORY=/run/in/this/directory #where the code should run. This is defaulted to ./ -#ccdbSQLITEPATH=/your/sqlite/path #if you use SQLITE and it is not part of the environment file that gets sourced -#rcdbSQLITEPATH=/your/sqlite/path #if you use SQLITE and it is not part of the environment file that gets sourced +#ccdbSQLITEPATH=/your/sqlite/path/ccdb.sqlite #if you use SQLITE and it is not part of the environment file that gets sourced +#rcdbSQLITEPATH=/your/sqlite/path/rcdb.sqlite #if you use SQLITE and it is not part of the environment file that gets sourced #TAG=my-custom-prefix-tag @@ -17,7 +17,7 @@ DATA_OUTPUT_BASE_DIR=OUTPUT-LOCATION#your desired output location NCORES=4 # Number of CPU threads to use or nodes:node-id:ppn or nodes:ppn depending on your system -GENERATOR=generator-to-use #or you may specifile file:/.../file-to-use +GENERATOR=generator-to-use #or you may specifile file:/.../file-to-use.hddm GENERATOR_CONFIG=config file for generator #common parameters for generators diff --git a/MCwrapper/gluex_MC.py b/MCwrapper/gluex_MC.py index 5d848ceb..ea7fcc0e 100755 --- a/MCwrapper/gluex_MC.py +++ b/MCwrapper/gluex_MC.py @@ -196,7 +196,7 @@ def main(argv): print "*********************************" print "Welcome to v1.10 of the MCwrapper" - print "Thomas Britton 11/21/17" + print "Thomas Britton 11/22/17" print "*********************************" #load all argument passed in and set default options