diff --git a/detectors/EICDetector/Fun4All_G4_EICDetector.C b/detectors/EICDetector/Fun4All_G4_EICDetector.C index 36820517..cb0588b9 100644 --- a/detectors/EICDetector/Fun4All_G4_EICDetector.C +++ b/detectors/EICDetector/Fun4All_G4_EICDetector.C @@ -30,7 +30,7 @@ int Fun4All_G4_EICDetector( const string &outputFile = "G4EICDetector.root", const string &embed_input_file = "https://www.phenix.bnl.gov/WWW/publish/phnxbld/sPHENIX/files/sPHENIX_G4Hits_sHijing_9-11fm_00000_00010.root", const int skip = 0, - const string &outdir = ".", const string particleType = "e-") + const string &outdir = ".") { //--------------- // Fun4All server @@ -141,7 +141,7 @@ int Fun4All_G4_EICDetector( // add the settings for other with [1], next with [2]... if (Input::SIMPLE) { - INPUTGENERATOR::SimpleEventGenerator[0]->add_particles(particleType, 5); + INPUTGENERATOR::SimpleEventGenerator[0]->add_particles("pi-", 5); if (Input::HEPMC || Input::EMBED) { INPUTGENERATOR::SimpleEventGenerator[0]->set_reuse_existing_vertex(true); diff --git a/detectors/EICDetector/run_EIC_production.sh b/detectors/EICDetector/run_EIC_production.sh deleted file mode 100644 index 866230cd..00000000 --- a/detectors/EICDetector/run_EIC_production.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash - -source /cvmfs/eic.opensciencegrid.org/ecce/gcc-8.3/opt/fun4all/core/bin/ecce_setup.sh -n $6 - -export ROOT_INCLUDE_PATH=$(pwd)/../../common:$ROOT_INCLUDE_PATH - -metaDataFile=${5}/${3}.txt -tmpLogFile=${3}.out - -d=`date +%Y/%m/%d` -t=`date +%H:%M` - -# Print production details to screen and to metadata file simultaneously -cat << EOF | tee ${metaDataFile} -====== Your production details ====== -Production started: ${d} ${t} -Production site: $9 -Production Host: ${HOSTNAME} -ECCE build: $6 -ECCE macros branch: ${12} -ECCE macros hash: $8 -PWG: $7 -Generator: ${10} -Collision type: ${11} -Input file: $2 -Output file: $3 -Output dir: $5 -Number of events: $1 -Skip: $4 -===================================== -EOF - -particleType= -if [ "${12}" == "production_singleParticle" ] -then - if [ "${11}" == "singlePion" ] - then - particleType="pi-" - elif [ "${11}" == "singlePionPlus" ] - then - particleType="pi+" - elif [ "${11}" == "singleMuon" ] - then - particleType="mu-" - elif [ "${11}" == "singleMuonPlus" ] - then - particleType="mu+" - elif [ "${11}" == "singlePositron" ] - then - particleType="e+" - else - particleType="e-" - fi -fi - -# Run Fun4all. Send output to stdout but also capture to temporary local file -if [ "${12}" == "production_singleParticle" ] -then - echo running root.exe -q -b Fun4All_G4_EICDetector.C\($1,\"$2\",\"$3\",\"\",$4,\"$5\"\,\"${particleType}\"\) - root.exe -q -b Fun4All_G4_EICDetector.C\($1,\"$2\",\"$3\",\"\",$4,\"$5\",\"${particleType}\"\) | tee ${tmpLogFile} -else - echo running root.exe -q -b Fun4All_G4_EICDetector.C\($1,\"$2\",\"$3\",\"\",$4,\"$5\"\) - root.exe -q -b Fun4All_G4_EICDetector.C\($1,\"$2\",\"$3\",\"\",$4,\"$5\"\) | tee ${tmpLogFile} -fi -rc_dst=$? -echo " rc for dst: $rc_dst" - -# Do some basic error handling here: is this failed we need to abort! Continuing might cause broken files on all levels. -if [ ".$rc_dst" != ".0" ] || ! [ -e "$outputPath/$outputFile" ] -then - echo " DST production failed. EXIT here, no file copy will be initiated!" - ls -lhrt $outputPath - exit $rc_dst -fi - -# Scan stdout of Fun4all for random number seeds and add to metadata file -echo production script finished, writing metadata -echo "" >> ${metaDataFile} -echo Seeds: >> ${metaDataFile} -grep 'PHRandomSeed::GetSeed()' ${tmpLogFile} | awk '{print $3}' >> ${metaDataFile} -rm ${tmpLogFile} - -echo "" >> ${metaDataFile} -echo md5sum: >> ${metaDataFile} -md5sum ${5}/${3} | awk '{print $1}' >> ${metaDataFile} - -echo "DST has been created" -echo "Now producing evaluators" - -root.exe -q -b Fun4All_runEvaluators.C\(0,\"$3\",\"$5\",0,\"$5\"\) - -rc_eval=$? -echo " rc for eval: $rc_eval" -# Do some more error handling here. -if [ ".$rc_eval" != ".0" ] -then - echo " EVAL production failed. Delete the potentially broken or incomplete EVAL files." - echo " --> but keeping the DST and continue to copy." - evalFileHeader=$(echo $3 | sed 's/.root//') - rm -rf ${outputPath}/eval_*/${evalFileHeader}* -fi - -echo "script done" -