#!/bin/bash # #$ -wd /scratch2/$USER/TMP #$ -cwd #$ -N run_QnAnalysis #$ -q all.q #$ -l h_rt=0:45:00 #$ -l s_rt=0:45:00 #$ -t 1-100 # #$ -o /scratch2/$USER/TMP #$ -e /scratch2/$USER/TMP # export ecm=7.7 export sys=AuAu export model=UrQMD export datatype=reco #mc or reco export correction=twist # plain, recentered, twist, rescaled #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/3767201/correction_in.root source /scratch2/parfenov/Soft/SoftQnTest/testQn/MpdAnalysisTreeConverter/external_soft_installation_scripts/SetEnv_cxx17.sh export tree_name=aTree export n_events=10000 #export config_file=$QNANALYSIS_DIR/setups/mpd/mpd-analysis-config.yml export config_file=$QNANALYSIS_DIR/setups/mpd/mpd-analysis-config-bad-acc.yml export config_name=test_$datatype export cuts_macro=$QNANALYSIS_DIR/setups/mpd/CutsMC.C export cuts_setup=mpd/auau/7gev/mc export correlate_config_file=$QNANALYSIS_DIR/setups/mpd/mpd-correlation-${correction}.yml export correlate_config_name=_tasks_$datatype export correlate_tree_name=tree export START_POSITION=$PWD export MAIN_DIR=/scratch2/parfenov/Soft/SoftQnTest/testQn/MpdAnalysisTreeConverter export INPUT_FILELISTS=$MAIN_DIR/batch/at_filelists.list export INPUT_FILELIST=`sed "${SGE_TASK_ID}q;d" $INPUT_FILELISTS` export COMMIT=${model}_${sys}_${ecm}gev_${datatype}_badacc_${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}_${SGE_TASK_ID}.log export OUTPUT_CORRECT=${OUT_CORRECT}/correction_out_${datatype}_${JOB_ID}_${SGE_TASK_ID}.root export OUTPUT_CORRELATE=${OUT_CORRELATE}/correlation_out_${datatype}_${JOB_ID}_${SGE_TASK_ID}.root export QA_FILE=${QA_FILE}/qa_${datatype}_${JOB_ID}_${SGE_TASK_ID}.root export TMPALL=$MAIN_DIR/TMP export TMPDIR=$TMPALL/TMP_${JOB_ID}_${SGE_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 echo "Binary file: $BIN_CORRELATE" &>> $LOG echo "QnAnalysisCorrelate options:" &>> $LOG echo " --input-file $OUTPUT_CORRECT" &>> $LOG echo " --input-tree $correlate_tree_name" &>> $LOG echo " --configuration-file $correlate_config_file" &>> $LOG echo " --configuration-name $correlate_config_name" &>> $LOG echo " --output-file $OUTPUT_CORRELATE" &>> $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 $BIN_CORRELATE --input-file $OUTPUT_CORRECT --input-tree $correlate_tree_name --configuration-file $correlate_config_file --configuration-name $correlate_config_name --output-file $OUTPUT_CORRELATE &>> $LOG cd $START_POSITION rm -rfv $TMPDIR &>> $LOG echo "Job is done!" &>> $LOG