Skip to content

Commit 4cb0e4d

Browse files
committed
Possibility to pass ConfigKeyValues for the QED simulation
In the same spirit as already possible for signal + background event simulation.
1 parent b055e0c commit 4cb0e4d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
parser.add_argument('-iniBkg',help='embedding background generator init parameters file (full path required)', default='${O2DPG_ROOT}/MC/config/common/ini/basic.ini')
9494
parser.add_argument('-confKeyBkg',help='embedding background configuration key values, for example: "GeneratorPythia8.config=pythia8bkg.cfg"', default='')
9595
parser.add_argument('-colBkg',help='embedding background collision system', default='PbPb')
96+
parser.add_argument('-confKeyQED',help='Config key parameters influencing the QED background simulator', default='')
9697

9798
parser.add_argument('-e',help='simengine', default='TGeant4', choices=['TGeant4', 'TGeant3', 'TFluka'])
9899
parser.add_argument('-tf',type=int,help='number of timeframes', default=2)
@@ -719,11 +720,17 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
719720
# ATTENTION: CHANGING THE PARAMETERS/CUTS HERE MIGHT INVALIDATE THE QED INTERACTION RATES USED ELSEWHERE
720721
#
721722
########################################################################################################
723+
724+
# determine final conf key for QED simulation
725+
QEDBaseConfig = "GeneratorExternal.fileName=$O2_ROOT/share/Generators/external/QEDLoader.C;QEDGenParam.yMin=-7;QEDGenParam.yMax=7;QEDGenParam.ptMin=0.001;QEDGenParam.ptMax=1.;QEDGenParam.Z="+str(Zsys[COLTYPE])+";QEDGenParam.cmEnergy="+str(ECMS)+";Diamond.width[2]=6.;"
726+
QEDCONFKEY = constructConfigKeyArg(create_geant_config(args, QEDBaseConfig + args.confKeyQED))
727+
722728
QED_task['cmd'] = 'o2-sim -e TGeant3 --field ccdb -j ' + str('1') + ' -o qed' \
723729
+ ' -n ' + str(NEventsQED) + ' -m PIPE ITS MFT FT0 FV0 FDD ' \
724730
+ ('', ' --timestamp ' + str(args.timestamp))[args.timestamp!=-1] + ' --run ' + str(args.run) \
725731
+ ' --seed ' + str(TFSEED) \
726-
+ ' -g extgen --configKeyValues \"GeneratorExternal.fileName=$O2_ROOT/share/Generators/external/QEDLoader.C;QEDGenParam.yMin=-7;QEDGenParam.yMax=7;QEDGenParam.ptMin=0.001;QEDGenParam.ptMax=1.;QEDGenParam.Z='+str(Zsys[COLTYPE])+';QEDGenParam.cmEnergy='+str(ECMS)+';Diamond.width[2]=6.\"' # + ' --fromCollContext collisioncontext.root'
732+
+ ' -g extgen ' \
733+
+ QEDCONFKEY
727734
QED_task['cmd'] += '; RC=$?; QEDXSecCheck=`grep xSectionQED qedgenparam.ini | sed \'s/xSectionQED=//\'`'
728735
QED_task['cmd'] += '; echo "CheckXSection ' + str(QEDXSecExpected[COLTYPE]) + ' = $QEDXSecCheck"; [[ ${RC} == 0 ]]'
729736
# TODO: propagate the Xsecion ratio dynamically

0 commit comments

Comments
 (0)