Skip to content

Commit 8202ca3

Browse files
committed
Prepare anchorMC script to also run the async_reco part
Extending the anchorMC setup to also run the async_pass recontruction. This is useful so we can use the same script for multiple tests (anchorMC or data reconstruction passes) on alibi.
1 parent a9b3876 commit 8202ca3

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

MC/run/ANCHOR/2021/OCT/pass4/anchorMC.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ cp $O2DPG_ROOT/DATA/production/configurations/2021/OCT/${ALIEN_JDL_LPMPASSNAME:-
3232
sed -i 's/GPU_global.dEdxUseFullGainMap=1;GPU_global.dEdxDisableResidualGainMap=1/GPU_global.dEdxSplineTopologyCorrFile=splines_for_dedx_V1_MC_iter0_PP.root;GPU_global.dEdxDisableTopologyPol=1;GPU_global.dEdxDisableGainMap=1;GPU_global.dEdxDisableResidualGainMap=1;GPU_global.dEdxDisableResidualGain=1/' setenv_extra.sh
3333
chmod +x async_pass.sh
3434

35-
# take out line running the workflow (we don't have data input)
36-
sed -i '/WORKFLOWMODE=run/d' async_pass.sh
35+
# take out line running the workflow (if we don't have data input)
36+
[ ${CTF_TEST_FILE} ] || sed -i '/WORKFLOWMODE=run/d' async_pass.sh
3737

3838
# remove comments in order to set ALIEN_JDL stuff
3939
# (if not set already)
@@ -44,21 +44,33 @@ fi
4444
sed -i 's/JDL_ANCHORYEAR/JDL_LPMANCHORYEAR/' async_pass.sh
4545

4646
# set number of timeframes to xx if necessary
47-
# sed -i 's/NTIMEFRAMES=-1/NTIMEFRAMES=xx/' async_pass.sh
47+
sed -i 's/NTIMEFRAMES=-1/NTIMEFRAMES=1/' async_pass.sh
4848

4949
[[ ! -f commonInput.tgz ]] && alien.py cp /alice/cern.ch/user/a/alidaq/OCT/apass4/commonInput.tgz file:.
5050
[[ ! -f runInput_${RUNNUMBER} ]] && alien.py cp /alice/cern.ch/user/a/alidaq/OCT/apass4/runInput_${RUNNUMBER}.tgz file:.
5151
[[ ! -f TPC_calibdEdx.220301.tgz ]] && alien.py cp /alice/cern.ch/user/a/alidaq/OCT/apass4/TPC_calibdEdx.220301.tgz file:.
5252
tar -xzf TPC_calibdEdx.220301.tgz
5353
cp calibdEdx.pol/*.root .
54+
tar -xzf commonInput.tgz
55+
56+
# hack to have o2sim_geometry.root file present if not part of download but -aligned was
57+
if [[ -f o2sim_geometry-aligned.root && ! -f o2sim_geometry.root ]]; then
58+
ln -s o2sim_geometry-aligned.root o2sim_geometry.root
59+
fi
5460

5561
# create workflow ---> creates the file that can be parsed
5662
export IGNORE_EXISTING_SHMFILES=1
5763
touch list.list
5864
ALIEN_JDL_LPMPRODUCTIONTAG_KEEP=$ALIEN_JDL_LPMPRODUCTIONTAG
5965
echo "Substituting ALIEN_JDL_LPMPRODUCTIONTAG=$ALIEN_JDL_LPMPRODUCTIONTAG with ALIEN_JDL_LPMANCHORPRODUCTION=$ALIEN_JDL_LPMANCHORPRODUCTION for simulating reco pass..."
6066
ALIEN_JDL_LPMPRODUCTIONTAG=$ALIEN_JDL_LPMANCHORPRODUCTION
61-
./async_pass.sh
67+
./async_pass.sh ${CTF_TEST_FILE:-""} 2&> async_pass_log.log
68+
RECO_RC=$?
69+
echo "RECO finished with ${RECO_RC}"
70+
if [ "${NO_MC}" ]; then
71+
return ${RECO_RC} 2>/dev/null || exit ${RECO_RC} # optionally quit here and don't do MC (useful for testing)
72+
fi
73+
6274
ALIEN_JDL_LPMPRODUCTIONTAG=$ALIEN_JDL_LPMPRODUCTIONTAG_KEEP
6375
echo "Setting back ALIEN_JDL_LPMPRODUCTIONTAG to $ALIEN_JDL_LPMPRODUCTIONTAG"
6476

0 commit comments

Comments
 (0)