Skip to content

Commit 6e030b5

Browse files
chiarazampolliBenedikt Volkel
authored andcommitted
If ZDC is not there, scale with FT0
1 parent c5d960c commit 6e030b5

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

DATA/production/configurations/asyncReco/setenv_extra.sh

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,24 @@ if [[ -z $RUN_IR ]] || [[ -z $RUN_DURATION ]] || [[ -z $RUN_BFIELD ]]; then
206206
export RUN_IR=`cat IR.txt`
207207
export RUN_DURATION=`cat Duration.txt`
208208
export RUN_BFIELD=`cat BField.txt`
209+
export RUN_DETECTOR_LIST=`cat DetList.txt`
209210
fi
211+
echo "DETECTOR LIST for current run ($RUNNUMBER) = $RUN_DETECTOR_LIST"
212+
echo "DURATION for current run ($RUNNUMBER) = $RUN_DURATION"
213+
echo "B FIELD for current run ($RUNNUMBER) = $RUN_BFIELD"
210214
echo "IR for current run ($RUNNUMBER) = $RUN_IR"
211215
if (( $(echo "$RUN_IR <= 0" | bc -l) )); then
212216
echo "Changing run IR to 1 Hz, because $RUN_IR makes no sense"
213217
RUN_IR=1
214218
fi
215-
echo "Duration of current run ($RUNNUMBER) = $RUN_DURATION"
219+
220+
# Let's check if ZDC is in the detector list; this is needed for TPC dist correction scaling in PbPb 2023
221+
SCALE_WITH_ZDC=1
222+
SCALE_WITH_FT0=1
223+
isZDCinDataTaking=`echo $RUN_DETECTOR_LIST | grep ZDC`
224+
isFT0inDataTaking=`echo $RUN_DETECTOR_LIST | grep FT0`
225+
[[ -z $isZDCinDataTaking ]] && SCALE_WITH_ZDC=0
226+
[[ -z $isFT0inDataTaking ]] && SCALE_WITH_FT0=0
216227

217228
# For runs shorter than 10 minutes we have only a single slot.
218229
# In that case we have to adopt the slot length in order to
@@ -315,7 +326,16 @@ elif [[ $ALIGNLEVEL == 1 ]]; then
315326

316327
if [[ $ALIEN_JDL_LPMANCHORYEAR == "2023" ]] && [[ $BEAMTYPE == "PbPb" ]]; then
317328
unset TPC_CORR_SCALING
318-
export TPC_CORR_SCALING="--ctp-lumi-factor 2.414 --require-ctp-lumi"
329+
export TPC_CORR_SCALING=" --ctp-lumi-factor 2.414 --require-ctp-lumi"
330+
if [[ $SCALE_WITH_ZDC == 0 ]]; then
331+
# scaling with FT0
332+
if [[ $SCALE_WITH_FT0 == 1 ]]; then
333+
export TPC_CORR_SCALING=" --ctp-lumi-source 1 --ctp-lumi-factor 135. --require-ctp-lumi '
334+
else
335+
echo "Neither ZDC nor FT0 are in the run, and this is from 2023 PbPb: we cannot scale TPC ditortion corrections, aborting..."
336+
return 1
337+
fi
338+
fi
319339
fi
320340
321341
if [[ $PERIOD != @(LHC22c|LHC22d|LHC22e|JUN|LHC22f) ]] ; then

0 commit comments

Comments
 (0)