@@ -848,29 +848,32 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True, runcommand=True):
848848 # ATTENTION: CHANGING THE PARAMETERS/CUTS HERE MIGHT INVALIDATE THE QED INTERACTION RATES USED ELSEWHERE
849849 #
850850 ########################################################################################################
851+ # recompute the number of workers to increase CPU efficiency
852+ NWORKERS_TF = compute_n_workers (INTRATE , COLTYPE , n_workers_user = NWORKERS ) if (not args .force_n_workers ) else NWORKERS
851853
852854 # determine final conf key for QED simulation
853855 QEDBaseConfig = "GeneratorExternal.fileName=$O2_ROOT/share/Generators/external/QEDLoader.C;QEDGenParam.yMin=-7;QEDGenParam.yMax=7;QEDGenParam.ptMin=0.001;QEDGenParam.ptMax=1.;QEDGenParam.xSectionHad=" + str (XSecSys [COLTYPE ])+ ";QEDGenParam.Z=" + str (Zsys [COLTYPE ])+ ";QEDGenParam.cmEnergy=" + str (ECMS )+ ";Diamond.width[2]=6.;"
854856 QEDCONFKEY = constructConfigKeyArg (create_geant_config (args , QEDBaseConfig + args .confKeyQED ))
855857 qed_detectorlist = ' ITS MFT FT0 FV0 FDD '
856858 if args .detectorList == 'ALICE2.1' :
857859 qed_detectorlist = qed_detectorlist .replace ('ITS' , 'IT3' )
858- QED_task ['cmd' ] = 'o2-sim -e TGeant3 --field ccdb -j ' + str ('1' ) + ' -o qed' \
859- + ' -n ' + str (NEventsQED ) + ' -m ' + qed_detectorlist \
860- + ('' , ' --timestamp ' + str (args .timestamp ))[args .timestamp != - 1 ] + ' --run ' + str (args .run ) \
861- + ' --seed ' + str (TFSEED ) \
862- + ' -g extgen ' \
863- + ' --detectorList ' + args .detectorList + ' ' \
864- + QEDCONFKEY
860+ # QED_task['cmd'] = 'o2-sim -e TGeant3 --field ccdb -j ' + str('1') + ' -o qed' \
861+ # + ' -n ' + str(NEventsQED) + ' -m ' + qed_detectorlist \
862+ # + ('', ' --timestamp ' + str(args.timestamp))[args.timestamp!=-1] + ' --run ' + str(args.run) \
863+ # + ' --seed ' + str(TFSEED) \
864+ # + ' -g extgen ' \
865+ # + ' --detectorList ' + args.detectorList + ' ' \
866+ # + QEDCONFKEY
867+ # Replace the normal simulation with the fastgen simulation just developed
868+ QED_task ['cmd' ] = 'o2-generators-qed-fast-gen -j ' + str (NWORKERS_TF ) + ' -n ' + str (NEventsQED ) + ' -s ' + str (TFSEED )
865869 QED_task ['cmd' ] += '; RC=$?; QEDXSecCheck=`grep xSectionQED qedgenparam.ini | sed \' s/xSectionQED=//\' `'
866870 QED_task ['cmd' ] += '; echo "CheckXSection ' + str (QEDXSecExpected [COLTYPE ]) + ' = $QEDXSecCheck"; [[ ${RC} == 0 ]]'
871+ # Remove the cfm_*.onnx files after the generation
872+ QED_task ['cmd' ] += '; rm -f cfm_*.onnx'
867873 # TODO: propagate the Xsecion ratio dynamically
868874 QEDdigiargs = ' --simPrefixQED qed' + ' --qed-x-section-ratio ' + str (QEDXSecExpected [COLTYPE ]/ XSecSys [COLTYPE ])
869875 workflow ['stages' ].append (QED_task )
870876
871- # recompute the number of workers to increase CPU efficiency
872- NWORKERS_TF = compute_n_workers (INTRATE , COLTYPE , n_workers_user = NWORKERS ) if (not args .force_n_workers ) else NWORKERS
873-
874877 # produce the signal configuration
875878 SGN_CONFIG_task = createTask (name = 'gensgnconf_' + str (tf ), tf = tf , cwd = timeframeworkdir )
876879 SGN_CONFIG_task ['cmd' ] = 'echo "placeholder / dummy task"'
0 commit comments