@@ -399,40 +399,28 @@ def extractVertexArgs(configKeyValuesStr, finalDiamondDict):
399399PTHATMIN = float (args .ptHatMin )
400400PTHATMAX = float (args .ptHatMax )
401401
402- # translate here collision type to PDG
402+ colsys = {'pp' :[2212 ,2212 ], 'pPb' :[2212 ,1000822080 ], 'Pbp' :[1000822080 ,2212 ], 'PbPb' :[1000822080 ,1000822080 ], 'pO' :[2212 ,1000080160 ], 'Op' :[1000080160 ,2212 ], 'OO' :[1000080160 ,1000080160 ], 'NeNe' :[1000100200 ,1000100200 ]}
403+ # translate here collision type to PDG of allowed particles
403404COLTYPE = args .col
405+ if COLTYPE in colsys .keys ():
406+ PDGA = colsys [COLTYPE ][0 ]
407+ PDGB = colsys [COLTYPE ][1 ]
408+ else :
409+ print ('o2dpg_sim_workflow: Error! Unknown collision system %s' % COLTYPE )
410+ exit (1 )
404411
405412doembedding = True if args .embedding == 'True' or args .embedding == True else False
406413
407- if COLTYPE == 'pp' :
408- PDGA = 2212 # proton
409- PDGB = 2212 # proton
410-
411- if COLTYPE == 'PbPb' :
412- PDGA = 1000822080 # Pb
413- PDGB = 1000822080 # Pb
414- if ECMS < 0 : # assign 5.02 TeV to Pb-Pb
415- print ('o2dpg_sim_workflow: Set CM Energy to PbPb case 5.02 TeV' )
416- ECMS = 5020.0
417-
418- if COLTYPE == 'pPb' :
419- PDGA = 2212 # proton
420- PDGB = 1000822080 # Pb
421-
422- if COLTYPE == 'Pbp' :
423- PDGA = 1000822080 # Pb
424- PDGB = 2212 # proton
425-
426414# If not set previously, set beam energy B equal to A
427415if EBEAMB < 0 and ECMS < 0 :
428416 EBEAMB = EBEAMA
429417 print ('o2dpg_sim_workflow: Set beam energy same in A and B beams' )
430- if COLTYPE == "pPb" or COLTYPE == "Pbp" :
431- print ('o2dpg_sim_workflow: Careful! both beam energies are the same ' )
418+ if PDGA != PDGB :
419+ print ('o2dpg_sim_workflow: Careful! Set same energies for different particle beams! ' )
432420
433421if ECMS > 0 :
434- if COLTYPE == "pPb" or COLTYPE == "Pbp" :
435- print ('o2dpg_sim_workflow: Careful! ECM set for pPb/Pbp collisions !' )
422+ if PDGA != PDGB :
423+ print ('o2dpg_sim_workflow: Careful! ECM set for for different particle beams !' )
436424
437425if ECMS < 0 and EBEAMA < 0 and EBEAMB < 0 :
438426 print ('o2dpg_sim_workflow: Error! CM or Beam Energy not set!!!' )
@@ -545,43 +533,37 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
545533 print ('o2dpg_sim_workflow: Error! embedding background generator name not provided' )
546534 exit (1 )
547535
536+ # PDG translation for background
537+ if COLTYPEBKG in colsys .keys ():
538+ PDGABKG = colsys [COLTYPEBKG ][0 ]
539+ PDGBBKG = colsys [COLTYPEBKG ][1 ]
540+ else :
541+ print ('o2dpg_sim_workflow: Error! Unknown background collision system %s' % COLTYPEBKG )
542+ exit (1 )
543+
548544 PROCESSBKG = args .procBkg
549545 ECMSBKG = float (args .eCM )
550546 EBEAMABKG = float (args .eA )
551547 EBEAMBBKG = float (args .eB )
552548
553- if COLTYPEBKG == 'pp' :
554- PDGABKG = 2212 # proton
555- PDGBBKG = 2212 # proton
556-
557549 if COLTYPEBKG == 'PbPb' :
558- PDGABKG = 1000822080 # Pb
559- PDGBBKG = 1000822080 # Pb
560550 if ECMSBKG < 0 : # assign 5.02 TeV to Pb-Pb
561551 print ('o2dpg_sim_workflow: Set BKG CM Energy to PbPb case 5.02 TeV' )
562552 ECMSBKG = 5020.0
563553 if GENBKG == 'pythia8' and PROCESSBKG != 'heavy_ion' :
564554 PROCESSBKG = 'heavy_ion'
565555 print ('o2dpg_sim_workflow: Process type not considered for Pythia8 PbPb' )
566556
567- if COLTYPEBKG == 'pPb' :
568- PDGABKG = 2212 # proton
569- PDGBBKG = 1000822080 # Pb
570-
571- if COLTYPEBKG == 'Pbp' :
572- PDGABKG = 1000822080 # Pb
573- PDGBBKG = 2212 # proton
574-
575557 # If not set previously, set beam energy B equal to A
576558 if EBEAMBBKG < 0 and ECMSBKG < 0 :
577559 EBEAMBBKG = EBEAMABKG
578560 print ('o2dpg_sim_workflow: Set beam energy same in A and B beams' )
579- if COLTYPEBKG == "pPb" or COLTYPEBKG == "Pbp" :
580- print ('o2dpg_sim_workflow: Careful! both beam energies in bkg are the same ' )
561+ if PDGABKG != PDGBBKG :
562+ print ('o2dpg_sim_workflow: Careful! Set same energies for different background beams! ' )
581563
582564 if ECMSBKG > 0 :
583- if COLTYPEBKG == "pPb" or COLTYPEBKG == "Pbp" :
584- print ('o2dpg_sim_workflow: Careful! bkg ECM set for pPb/Pbp collisions !' )
565+ if PDGABKG != PDGBBKG :
566+ print ('o2dpg_sim_workflow: Careful! ECM set for different background beams !' )
585567
586568 if ECMSBKG < 0 and EBEAMABKG < 0 and EBEAMBBKG < 0 :
587569 print ('o2dpg_sim_workflow: Error! bkg ECM or Beam Energy not set!!!' )
0 commit comments