Commit cd38c980 authored by Gernot Maier's avatar Gernot Maier
Browse files

cleanup

parent b08a9bdc
#
# search for events above an energy and
# convert to dst file
#
# requires:
# - access to evndisp files
# - file list with simtel production files
# - access to simtel files
#
# minimum energy in TeV
MINENERGY=100
# Azimuth
AZ="180deg"
# Particle
PART="gamma_onSource"
# Production
PROD="prod5-Paranal-20deg"
# output DST file
OFIL="${PROD}-${PART}-${AZ}-${MINENERGY}TeV.dst.root"
# temporary list with simtel files
TMPLIST="file_list_${MINENERGY}TeV_${AZ}.list"
rm -f ${TMPLIST}
touch ${TMPLIST}
# File list
FLIST="${CTA_USER_DATA_DIR}/analysis/AnalysisData/FileList_prod5/${PROD}/${PART}.list"
# files to search for
FF=$(find ${CTA_USER_DATA_DIR}/analysis/AnalysisData/${PROD}-sq11-LL/S.hyperarray/EVNDISPnoDLL/${PART}/ -name "279*HD_*_${AZ}.root")
####
# find runs with events above the given energy
for F in ${FF}
do
echo ${F}
RUN=$(root -l -q -b "find_event_energy.C( ${MINENERGY}, \"${F}\")"|grep RUN|awk '{print $2}')
echo ${RUN}
if [[ ${RUN} -gt "0" ]]; then
SIMF=$(grep "run${RUN}_" ${FLIST} | grep ${AZ})
echo ${SIMF} >> ${TMPLIST}
fi
done
###
# convert and put all into one file
CC=$(cat ${TMPLIST})
$EVNDISPSYS/bin/CTA.convert_hessio_to_VDST \
-c $CTA_EVNDISP_AUX_DIR/Calibration/prod5/prod5-IPR.root \
-a ${CTA_EVNDISP_AUX_DIR}/DetectorGeometry/CTA.prod5S.hyperarray.lis \
-minenergy ${MINENERGY} \
-o ${CTA_USER_DATA_DIR}/${OFIL} ${CC}
#/bin/CTA.convert_hessio_to_VDST -c $CTA_EVNDISP_AUX_DIR/Calibration/prod5/prod5-IPR.root -a ../Eventdisplay_AnalysisFiles_CTA/DetectorGeometry/CTA.prod5S.hyperarray.lis -minenergy 100. -o gamma_onSource-100TeV.dst.root /lustre/fs21/group/cta/prod5-grid/Prod5_Paranal_AdvancedBaseline_NSB1x/gamma_onSource/gamma_20deg_0deg_run100___cta-prod5-paranal_desert-2147m-Paranal-dark.simtel.zst
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment