diff --git a/GRID/utils/grid_submit.sh b/GRID/utils/grid_submit.sh index d8fb95397..381569f27 100755 --- a/GRID/utils/grid_submit.sh +++ b/GRID/utils/grid_submit.sh @@ -201,6 +201,7 @@ while [ $# -gt 0 ] ; do -c) CONTINUE_WORKDIR=$2; shift 2 ;; # this should be the workdir of a job to continue (without HOME and ALIEN_TOPWORKDIR) --local) LOCAL_MODE="ON"; shift 1 ;; # if we want emulate execution in the local workdir (no GRID interaction) --script) SCRIPT=$2; shift 2 ;; # the job script to submit + --scriptArgs) SCRIPTARGS=$2; shift 2 ;; # arguments for the job script --jobname) JOBNAME=$2; shift 2 ;; # the job name associated to the job --> determined directory name on GRID --topworkdir) ALIEN_TOPWORKDIR=$2; shift 2 ;; # the top workdir relative to GRID home --ttl) JOBTTL=$2; shift 2 ;; # allows to specifiy ttl for job @@ -575,7 +576,7 @@ export PATH=$PATH:$PWD # ----------- EXECUTE ACTUAL JOB ------------------------------------ # source the actual job script from the work dir chmod +x ./alien_jobscript.sh -./alien_jobscript.sh +./alien_jobscript.sh ${SCRIPTARGS} # fetch the return code RC=$? diff --git a/MC/config/PWGUD/ini/makeStarlightConfig.py b/MC/config/PWGUD/ini/makeStarlightConfig.py index 6d87e3a9f..97f5929a4 100755 --- a/MC/config/PWGUD/ini/makeStarlightConfig.py +++ b/MC/config/PWGUD/ini/makeStarlightConfig.py @@ -8,18 +8,9 @@ parser = argparse.ArgumentParser(description='Make Starlight configuration', formatter_class=argparse.ArgumentDefaultsHelpFormatter) -parser.add_argument('--pZ', type=int, default='82', - help='Projectile charge') +parser.add_argument('--collType',default='PbPb', choices=['PbPb', 'pPb', 'Pbp', 'pp', 'OO', 'pO', 'Op'], + help='Colission system') -parser.add_argument('--pA', type=int, default='208', - help='Projectile atomic number') - -parser.add_argument('--tZ', type=int, default='82', - help='Target charge') - -parser.add_argument('--tA', type=int, default='208', - help='Target atomic number') - parser.add_argument('--eCM', type=float, default='5360', help='Centre-of-mass energy') @@ -36,6 +27,42 @@ args = parser.parse_args() +if 'PbPb' in args.collType: + pZ = 82 + pA = 208 + tZ = 82 + tA = 208 +if 'pPb' in args.collType: + pZ = 1 + pA = 1 + tZ = 82 + tA = 208 +if 'Pbp' in args.collType: + pZ = 82 + pA = 208 + tZ = 1 + tA = 1 +if 'pp' in args.collType: + pZ = 1 + pA = 1 + tZ = 1 + tA = 1 +if 'OO' in args.collType: + pZ = 8 + pA = 16 + tZ = 8 + tA = 16 +if 'pO' in args.collType: + pZ = 1 + pA = 1 + tZ = 8 + tA = 16 +if 'Op' in args.collType: + pZ = 8 + pA = 16 + tZ = 1 + tA = 1 + ### open output file fout = open(args.output, 'w') @@ -43,10 +70,10 @@ fout.write('[GeneratorExternal] \n') if 'Psi2sToMuPi' in args.process or 'Psi2sToElPi' in args.process or 'RhoPrime' in args.process or 'OmegaTo3Pi' in args.process or 'JpsiToElRad' in args.process : fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C \n') - fout.write('funcName = GeneratorStarlightToEvtGen("%s", %f, %d, %d, %d, %d) \n' % (args.process,args.eCM ,args.pZ ,args.pA,args.tZ,args.tA)) + fout.write('funcName = GeneratorStarlightToEvtGen("%s", %f, %d, %d, %d, %d) \n' % (args.process,args.eCM ,pZ,pA,tZ,tA)) else: fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlight.C \n') - fout.write('funcName = GeneratorStarlight("%s", %f, %d, %d, %d, %d) \n' % (args.process,args.eCM ,args.pZ ,args.pA,args.tZ,args.tA)) + fout.write('funcName = GeneratorStarlight("%s", %f, %d, %d, %d, %d) \n' % (args.process,args.eCM ,pZ,pA,tZ,tA)) ###Trigger fout.write('[TriggerExternal] \n') diff --git a/MC/run/PWGUD/runSTARlightANCHOR.sh b/MC/run/PWGUD/runSTARlightANCHOR.sh new file mode 100755 index 000000000..0d67a4e04 --- /dev/null +++ b/MC/run/PWGUD/runSTARlightANCHOR.sh @@ -0,0 +1,27 @@ +# Run as: ${O2DPG_ROOT}/GRID/utils/grid_submit.sh --script ./runSTARlightANCHOR.sh --scriptArgs 'kCohPsi2sToMuPi PbPb 5360 cent' --jobname SLtest --outputspec "*.log@disk=1","*.root@disk=2" --packagespec "VO_ALICE@O2sim::v20240626-1" --wait --fetch-output --asuser mbroz --local + +export ALIEN_JDL_LPMANCHORPASSNAME=apass2 +export ALIEN_JDL_MCANCHOR=apass2 +export ALIEN_JDL_COLLISIONSYSTEM=PbPb +export ALIEN_JDL_CPULIMIT=8 +export ALIEN_JDL_LPMPASSNAME=apass2 +export ALIEN_JDL_LPMRUNNUMBER=544389 +export ALIEN_JDL_LPMPRODUCTIONTYPE=MC +export ALIEN_JDL_LPMINTERACTIONTYPE=PbPb +export ALIEN_JDL_LPMPRODUCTIONTAG=MyPass2Test +export ALIEN_JDL_LPMANCHORRUN=544389 +export ALIEN_JDL_LPMANCHORPRODUCTION=LHC23zzi +export ALIEN_JDL_LPMANCHORYEAR=2023 + +export NTIMEFRAMES=2 +export NSIGEVENTS=5 +export NBKGEVENTS=1 +export SPLITID=2 +export PRODSPLIT=100 +export CYCLE=0 +export ALIEN_PROC_ID=2963436952 + +export ALIEN_JDL_ANCHOR_SIM_OPTIONS="-gen external -ini ${PWD}/GenStarlight.ini -nb ${NBKGEVENTS} -colBkg PbPb -genBkg pythia8 -procBkg heavy_ion" + +${O2DPG_ROOT}/MC/config/PWGUD/ini/makeStarlightConfig.py --process $1 --collType $2 --eCM $3 --rapidity $4 +${O2DPG_ROOT}/MC/run/ANCHOR/anchorMC.sh \ No newline at end of file