Skip to content

Commit 35a6314

Browse files
sawenzelalcaliva
authored andcommitted
anchoredMC: Development for 2-tag strategy
Improvements to anchoredMC so that we can use the 2-tag software strategy for MC production. In other words, we can * use (latest) O2sim tag for everything related to O2DPG workflow setup, Geant transport and digitization. * a tagged (more stable) software release for the reconstruction steps. This reconstruction software should be selected through the ALIEN_JDL_O2DPG_ASYNC_RECO_TAG variable. (cherry picked from commit a77ed47)
1 parent 58b9731 commit 35a6314

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

MC/run/ANCHOR/anchorMC.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ NWORKERS=${NWORKERS:-8}
145145
# set a default seed if not given
146146
SEED=${ALIEN_PROC_ID:-${SEED:-1}}
147147

148+
#<----- START OF part that should run under a clean alternative software environment if this was given ------
149+
(
150+
151+
if [ "${ALIEN_JDL_O2DPG_ASYNC_RECO_TAG}" ]; then
152+
echo_info "Using tag ${ALIEN_JDL_O2DPG_ASYNC_RECO_TAG} to setup anchored MC"
153+
/cvmfs/alice.cern.ch/bin/alienv printenv "${ALIEN_JDL_O2DPG_ASYNC_RECO_TAG}" &> async_environment.env
154+
source async_environment.env
155+
fi
148156

149157
# default async_pass.sh script
150158
DPGRECO=$O2DPG_ROOT/DATA/production/configurations/asyncReco/async_pass.sh
@@ -193,6 +201,9 @@ if [[ "${RECO_RC}" != "0" ]] ; then
193201
exit ${RECO_RC}
194202
fi
195203

204+
)
205+
#<----- END OF part that should run under a clean alternative software environment if this was given ------
206+
196207
ALIEN_JDL_LPMPRODUCTIONTAG=$ALIEN_JDL_LPMPRODUCTIONTAG_KEEP
197208
echo_info "Setting back ALIEN_JDL_LPMPRODUCTIONTAG to $ALIEN_JDL_LPMPRODUCTIONTAG"
198209

@@ -213,17 +224,19 @@ MODULES="--skipModules ZDC"
213224
ALICEO2_CCDB_LOCALCACHE=${ALICEO2_CCDB_LOCALCACHE:-$(pwd)/ccdb}
214225

215226
# these arguments will be digested by o2dpg_sim_workflow_anchored.py
216-
baseargs="-tf ${NTIMEFRAMES} --split-id ${SPLITID} --prod-split ${PRODSPLIT} --cycle ${CYCLE} --run-number ${ALIEN_JDL_LPMRUNNUMBER} \
217-
${ALIEN_JDL_RUN_TIME_SPAN_FILE:+--run-time-span-file ${ALIEN_JDL_RUN_TIME_SPAN_FILE} ${ALIEN_JDL_INVERT_IRFRAME_SELECTION:+--invert-irframe-selection}}" \
218-
${ALIEN_JDL_MC_ORBITS_PER_TF:+--orbitsPerTF ${ALIEN_JDL_MC_ORBITS_PER_TF}}
227+
baseargs="-tf ${NTIMEFRAMES} --split-id ${SPLITID} --prod-split ${PRODSPLIT} --cycle ${CYCLE} --run-number ${ALIEN_JDL_LPMRUNNUMBER} \
228+
${ALIEN_JDL_RUN_TIME_SPAN_FILE:+--run-time-span-file ${ALIEN_JDL_RUN_TIME_SPAN_FILE} ${ALIEN_JDL_INVERT_IRFRAME_SELECTION:+--invert-irframe-selection}} \
229+
${ALIEN_JDL_MC_ORBITS_PER_TF:+--orbitsPerTF ${ALIEN_JDL_MC_ORBITS_PER_TF}}"
219230

220-
# these arguments will be passed as well but only evetually be digested by o2dpg_sim_workflow.py which is called from o2dpg_sim_workflow_anchored.py
231+
# these arguments will be passed as well but only eventually be digested by o2dpg_sim_workflow.py which is called from o2dpg_sim_workflow_anchored.py
221232
remainingargs="-seed ${SEED} -ns ${NSIGEVENTS} --include-local-qc --pregenCollContext"
222233
remainingargs="${remainingargs} -e ${ALIEN_JDL_SIMENGINE} -j ${NWORKERS}"
223234
remainingargs="${remainingargs} -productionTag ${ALIEN_JDL_LPMPRODUCTIONTAG:-alibi_anchorTest_tmp}"
224235
# prepend(!) ALIEN_JDL_ANCHOR_SIM_OPTIONS
225236
# since the last passed argument wins, e.g. -productionTag cannot be overwritten by the user
226237
remainingargs="${ALIEN_JDL_ANCHOR_SIM_OPTIONS} ${remainingargs} --anchor-config config-json.json"
238+
# apply software tagging choice
239+
remainingargs="${remainingargs} ${ALIEN_JDL_O2DPG_ASYNC_RECO_TAG:+--alternative-reco-software ${ALIEN_JDL_O2DPG_ASYNC_RECO_TAG}}"
227240

228241
echo_info "baseargs passed to o2dpg_sim_workflow_anchored.py: ${baseargs}"
229242
echo_info "remainingargs forwarded to o2dpg_sim_workflow.py: ${remainingargs}"
@@ -240,6 +253,7 @@ fi
240253
TIMESTAMP=`grep "Determined timestamp to be" ${anchoringLogFile} | awk '//{print $6}'`
241254
echo_info "TIMESTAMP IS ${TIMESTAMP}"
242255

256+
243257
# check if this job is exluded because it falls inside a bad data-taking period
244258
ISEXCLUDED=$(grep "TIMESTAMP IS EXCLUDED IN RUN" ${anchoringLogFile})
245259
if [ "${ISEXCLUDED}" ]; then

0 commit comments

Comments
 (0)