Skip to content

Commit b73e89f

Browse files
Merge pull request #407 from chiarazampolli/addPIDqc
Adding PID QC at async time
1 parent 659b6cf commit b73e89f

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

DATA/common/setenv.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ LIST_OF_DETECTORS="ITS,MFT,TPC,TOF,FT0,MID,EMC,PHS,CPV,ZDC,FDD,HMP,FV0,TRD,MCH,C
2828

2929
LIST_OF_GLORECO="ITSTPC,TPCTRD,ITSTPCTRD,TPCTOF,ITSTPCTOF,MFTMCH,MCHMID,PRIMVTX,SECVTX,AOD"
3030

31+
LIST_OF_PID="FT0-TOF"
32+
3133
# Detectors used in the workflow / enabled parameters
3234
if [[ -z "${WORKFLOW_DETECTORS+x}" ]] || [[ "0$WORKFLOW_DETECTORS" == "0ALL" ]]; then export WORKFLOW_DETECTORS=$LIST_OF_DETECTORS; fi
3335
if [[ -z "${WORKFLOW_DETECTORS_QC+x}" ]] || [[ "0$WORKFLOW_DETECTORS_QC" == "0ALL" ]]; then export WORKFLOW_DETECTORS_QC="$WORKFLOW_DETECTORS,$LIST_OF_GLORECO"; fi
@@ -160,6 +162,20 @@ has_matching_qc()
160162
has_detector_matching $1 && [[ $WORKFLOW_DETECTORS_QC =~ (^|,)"$1"(,|$) ]]
161163
}
162164

165+
has_pid_qc()
166+
{
167+
PIDDETECTORS=$(echo $1 | tr "-" "\n")
168+
for PIDDETECTOR in $PIDDETECTORS;
169+
do
170+
echo PIDDETECTOR=$PIDDETECTOR 1>&2
171+
if [[ $PIDDETECTOR == "TOF" ]]; then
172+
(! has_detectors_reco ITS TPC TOF || ! has_detector_matching ITSTPCTOF) && return 1
173+
fi
174+
! has_detector_qc $PIDDETECTOR && return 1
175+
done
176+
return 0
177+
}
178+
163179
workflow_has_parameter()
164180
{
165181
[[ $WORKFLOW_PARAMETERS =~ (^|,)"$1"(,|$) ]]

DATA/production/qc-workflow.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ if [[ -z $QC_JSON_FROM_OUTSIDE ]]; then
5353
[[ -z "$QC_JSON_PRIMVTX" ]] && QC_JSON_PRIMVTX=$O2DPG_ROOT/DATA/production/qc-async/primvtx.json
5454
[[ -z "$QC_JSON_ITSTPC" ]] && QC_JSON_ITSTPC=$O2DPG_ROOT/DATA/production/qc-async/itstpc.json
5555
[[ -z "$QC_JSON_ITSTPCTOF" ]] && QC_JSON_ITSTPCTOF=$O2DPG_ROOT/DATA/production/qc-async/itstpctof.json
56+
[[ -z "$QC_JSON_PID_FT0TOF" ]] && QC_JSON_PID_FT0TOF=$O2DPG_ROOT/DATA/production/qc-async/pidft0tof.json
5657
[[ -z "$QC_JSON_GLOBAL" ]] && QC_JSON_GLOBAL=$O2DPG_ROOT/DATA/production/qc-async/qc-global.json
5758
fi
5859

@@ -96,6 +97,15 @@ if [[ -z $QC_JSON_FROM_OUTSIDE ]]; then
9697
fi
9798
done
9899

100+
# PID QC
101+
for i in `echo $LIST_OF_PID | sed "s/,/ /g"`; do
102+
PIDDETFORFILE=`echo $i | sed "s/-//g"`
103+
PID_JSON_FILE="QC_JSON_PID_$PIDDETFORFILE"
104+
if has_pid_qc $i && [ ! -z "${!PID_JSON_FILE}" ]; then
105+
add_QC_JSON pid$i ${!PID_JSON_FILE}
106+
fi
107+
done
108+
99109
# arbitrary extra QC
100110
if [[ ! -z "$QC_JSON_EXTRA" ]]; then
101111
add_QC_JSON EXTRA ${QC_JSON_EXTRA}

0 commit comments

Comments
 (0)