12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #!/bin/bash
- #
- #SBATCH -D /mnt/pool/nica/8/parfenovpeter/TMP
- #SBATCH -J run_qncorrection
- #SBATCH -p fast
- #SBATCH -a 1-100
- #
- #SBATCH -o /mnt/pool/nica/7/parfenovpeter/TMP/slurm_%A_%a.out
- #SBATCH -e /mnt/pool/nica/7/parfenovpeter/TMP/slurm_%A_%a.err
- #
- export ecm=7.7
- export sys=AuAu
- export model=STAR
- export datatype=star #mc or reco
- export JOB_ID=${SLURM_ARRAY_JOB_ID}
- export TASK_ID=${SLURM_ARRAY_TASK_ID}
- #export correction_in_file=/scratch2/parfenov/Soft/SoftQnTest/testQn/MpdAnalysisTreeConverter/OUT_QNANALYSIS/UrQMD_AuAu_7.7gev_reco_correction_ga/3766895/correction_in.root
- # export correction_in_file=/scratch2/parfenov/Soft/SoftQnTest/testQn/MpdAnalysisTreeConverter/OUT_QNANALYSIS/UrQMD_AuAu_7.7gev_reco_correction_ba/3767179/correction_in.root
- source /mnt/pool/nica/8/parfenovpeter/Soft/Unicluster/ROOT/build-cxx17/bin/thisroot.sh
- export QNANALYSIS_DIR=/mnt/pool/nica/8/parfenovpeter/Soft/Unicluster/QnAnalysis/
- export LD_LIBRARY_PATH=${QNANALYSIS_DIR}/install/lib:${LD_LIBRARY_PATH}
- export tree_name=aTree
- export n_events=-1
- export config_file=/mnt/pool/nica/8/parfenovpeter/Soft/Unicluster/StAtConverter/qnanalysis-setups/star-analysis-config.yml
- # export config_file=$QNANALYSIS_DIR/setups/mpd/mpd-analysis-config-bad-acc.yml
- export config_name=test_$datatype
- export cuts_macro=/mnt/pool/nica/8/parfenovpeter/Soft/Unicluster/StAtConverter/qnanalysis-setups/CutsEvent.C
- export cuts_setup=star/auau/27gev
- export correlate_config_file=/mnt/pool/nica/8/parfenovpeter/Soft/Unicluster/StAtConverter/qnanalysis-setups/star-correlation.yml
- export correlate_config_name=_tasks_$datatype
- export correlate_tree_name=tree
- export START_POSITION=$PWD
- export MAIN_DIR=/mnt/pool/nica/8/parfenovpeter/Soft/Unicluster/StAtConverter/
- export INPUT_FILELISTS=$MAIN_DIR/batch/at_filelists.list
- export INPUT_FILELIST=`sed "${TASK_ID}q;d" $INPUT_FILELISTS`
- export COMMIT=${model}_${sys}_${ecm}gev_${datatype}_correction
- export JOBID=${JOB_ID}
- export OUT=$MAIN_DIR/OUT_QNANALYSIS/$COMMIT/$JOBID
- export OUT_LOG=$OUT/log
- export OUT_CORRECT=$OUT/correct
- export OUT_CORRELATE=$OUT/correlate
- export QA_FILE=$OUT/qa
- export LOG=${OUT_LOG}/JOB_${JOB_ID}_${TASK_ID}.log
- export OUTPUT_CORRECT=${OUT_CORRECT}/correction_out_${datatype}_${JOB_ID}_${TASK_ID}.root
- export OUTPUT_CORRELATE=${OUT_CORRELATE}/correlation_out_${datatype}_${JOB_ID}_${TASK_ID}.root
- export QA_FILE=${QA_FILE}/qa_${datatype}_${JOB_ID}_${TASK_ID}.root
- export TMPALL=$MAIN_DIR/TMP
- export TMPDIR=$TMPALL/TMP_${JOB_ID}_${TASK_ID}
- mkdir -p $TMPDIR
- mkdir -p $OUT
- mkdir -p $OUT_LOG
- mkdir -p $OUT_CORRECT
- #mkdir -p $OUT_CORRELATE
- mkdir -p $QA_FILE
- export BIN_CORRECT=$QNANALYSIS_DIR/build/src/QnAnalysisCorrect/QnAnalysisCorrect
- export BIN_CORRELATE=$QNANALYSIS_DIR/build/src/QnAnalysisCorrelate/QnAnalysisCorrelate
- export correlate_tree_name=tree
- echo "Node host name: $HOSTNAME" &>> $LOG
- echo "Node architecture name: $ARC" &>> $LOG
- echo "Binary file: $BIN_CORRECT" &>> $LOG
- echo "QnAnalysisCorrect options:" &>> $LOG
- echo " -i $INPUT_FILELIST" &>> $LOG
- echo " -t $tree_name" &>> $LOG
- echo " -n $n_events" &>> $LOG
- echo " --yaml-config-file $config_file" &>> $LOG
- echo " --yaml-config-name $config_name" &>> $LOG
- echo " --cuts-macro $cuts_macro" &>> $LOG
- echo " --event-cuts $cuts_setup" &>> $LOG
- echo " --qa-file $QA_FILE" &>> $LOG
- echo "Output file will be stored here: $OUTPUT_CORRECT" &>> $LOG
- echo "" &>>$LOG
- cd $TMPDIR
- if [ -f "$correction_in_file" ]; then
- rsync -vuzP $correction_in_file ${TMPDIR}/correction_in.root &>> $LOG
- fi
- $BIN_CORRECT -i $INPUT_FILELIST -t $tree_name -n $n_events --yaml-config-file $config_file --yaml-config-name $config_name --cuts-macro $cuts_macro --event-cuts $cuts_setup --qa-file $QA_FILE &>> $LOG
- mv -v ./correction_out.root $OUTPUT_CORRECT &>> $LOG
- cd $START_POSITION
- rm -rfv $TMPDIR &>> $LOG
- echo "Job is done!" &>> $LOG
|