2626parser .add_argument ('-confKey' ,help = 'generator or trigger configuration key values, for example: GeneratorPythia8.config=pythia8.cfg' , default = '' )
2727
2828parser .add_argument ('-eCMS' ,help = 'CMS energy' , default = - 1 )
29+ parser .add_argument ('-eBeamA' ,help = 'Beam A energy' , default = 6499. ) #6369 PbPb, 2.510 pp 5 TeV, 4 pPb
30+ parser .add_argument ('-eBeamB' ,help = 'Beam B energy' , default = - 1 )
2931parser .add_argument ('-col' ,help = 'collision sytem: pp, PbPb, pPb, Pbp, ...' , default = 'pp' )
3032parser .add_argument ('-ptHatBin' ,help = 'pT hard bin number' , default = - 1 )
3133parser .add_argument ('-ptHatMin' ,help = 'pT hard minimum when no bin requested' , default = 0 )
@@ -160,7 +162,9 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
160162 # function encapsulating the signal sim part
161163 # first argument is timeframe id
162164 RNDSEED = args .seed # 0 means random seed !
163- ECMS = args .eCMS
165+ ECMS = float (args .eCMS )
166+ EBEAMA = float (args .eBeamA )
167+ EBEAMB = float (args .eBeamB )
164168 NSIGEVENTS = args .ns
165169 GENERATOR = args .gen
166170 INIFILE = ''
@@ -231,7 +235,7 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
231235 PDGA = 1000822080 # Pb
232236 PDGB = 1000822080 # Pb
233237 if ECMS < 0 : # assign 5.02 TeV to Pb-Pb
234- print ('>>> Set CM Energy to PbPb case 5.02 TeV' )
238+ print ('o2dpg_sim_workflow: Set CM Energy to PbPb case 5.02 TeV' )
235239 ECMS = 5020.0
236240
237241 if COLTYPE == 'pPb' :
@@ -242,8 +246,19 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
242246 PDGA = 1000822080 # Pb
243247 PDGB = 2212 # proton
244248
245- if ECMS < 0 :
246- print ('Error: Collision Energy not set!!!' )
249+ # If not set previously, set beam energy B equal to A
250+ if EBEAMB < 0 and ECMS < 0 :
251+ EBEAMB = EBEAMA
252+ print ('o2dpg_sim_workflow: Set beam energy same in A and B beams' )
253+ if COLTYPE == "pPb" or COLTYPE == "Pbp" :
254+ print ('o2dpg_sim_workflow: Careful! both beam energies are the same' )
255+
256+ if ECMS > 0 :
257+ if COLTYPE == "pPb" or COLTYPE == "Pbp" :
258+ print ('o2dpg_sim_workflow: Careful! ECM set for pPb/Pbp collisions!' )
259+
260+ if ECMS < 0 and EBEAMA < 0 and EBEAMB < 0 :
261+ print ('o2dpg_sim_workflow: Error! CM or Beam Energy not set!!!' )
247262 exit (1 )
248263
249264 # produce the signal configuration
0 commit comments