Commit 49a9baf1 authored by Ewelina Maria Lobodzinska's avatar Ewelina Maria Lobodzinska
Browse files

Merge branch '21.6-com' into '21.6'

correct ParticleGun common fragments to work in 21.6

See merge request atlas/athena!45376
parents 490c8341 835da8fe
...@@ -68,7 +68,7 @@ class PEtaSampler(PG.MomSampler): ...@@ -68,7 +68,7 @@ class PEtaSampler(PG.MomSampler):
v4 = ROOT.TLorentzVector(px, py, pz, e) v4 = ROOT.TLorentzVector(px, py, pz, e)
return v4 return v4
a_particle = int(runArgs.jobConfig[0].split('_')[-1].split('.py')[0].replace('m','-')) a_particle = int(jofile.split('_')[-1].split('.py')[0].replace('m','-'))
pg = PG.ParticleGun() pg = PG.ParticleGun()
pg.sampler.pid = int(a_particle) #PID pg.sampler.pid = int(a_particle) #PID
......
...@@ -46,24 +46,24 @@ class MyParticleSampler(PG.ParticleSampler): ...@@ -46,24 +46,24 @@ class MyParticleSampler(PG.ParticleSampler):
return [ PG.SampledParticle( pid , mom , pos ) ] return [ PG.SampledParticle( pid , mom , pos ) ]
myE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[0]) myE = float(jofile.split('_E')[1].split('_')[0])
myZV = float(runArgs.jobConfig[0].split('_')[-1].split('.py')[0].replace("m","-")) myZV = float(jofile.split('_')[-1].split('.py')[0].replace("m","-"))
myPDGID = runArgs.jobConfig[0].split('_pid')[1].split('_')[0].replace('n','-') myPDGID = jofile.split('_pid')[1].split('_')[0].replace('n','-')
myPDGID = int(float(myPDGID.replace('p',''))) myPDGID = int(float(myPDGID.replace('p','')))
eta_li = [] eta_li = []
if "disj" in runArgs.jobConfig[0]: if "disj" in jofile:
myLowEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[0].replace('m','-')) myLowEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[1].replace('m','-')) myLowEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[2].replace('m','-')) myHighEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[3].replace('m','-')) myHighEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[3].replace('m','-'))
eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2]) eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2])
else: else:
myLowEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[0].replace('m','-')) myLowEta = 0.01*float(jofile.split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[1].replace('m','-')) myHighEta = 0.01*float(jofile.split('eta')[1].split('_')[1].replace('m','-'))
eta_li.extend([myLowEta,myHighEta]) eta_li.extend([myLowEta,myHighEta])
......
...@@ -67,22 +67,22 @@ class MyParticleSampler(PG.ParticleSampler): ...@@ -67,22 +67,22 @@ class MyParticleSampler(PG.ParticleSampler):
return [ PG.SampledParticle( pid , mom , pos ) ] return [ PG.SampledParticle( pid , mom , pos ) ]
myE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[0]) myE = float(jofile.split('_E')[1].split('_')[0])
myZV = float(runArgs.jobConfig[0].split('_')[-1].split('.py')[0].replace("m","-")) myZV = float(jofile.split('_')[-1].split('.py')[0].replace("m","-"))
myPDGID = int(float(runArgs.jobConfig[0].split('_pid')[1].split('_')[0].replace('m','-'))) myPDGID = int(float(jofile.split('_pid')[1].split('_')[0].replace('m','-')))
eta_li = [] eta_li = []
if "disj" in runArgs.jobConfig[0]: if "disj" in jofile:
myLowEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[0].replace('m','-')) myLowEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[1].replace('m','-')) myLowEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[2].replace('m','-')) myHighEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[3].replace('m','-')) myHighEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[3].replace('m','-'))
eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2]) eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2])
else: else:
myLowEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[0].replace('m','-')) myLowEta = 0.01*float(jofile.split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[1].replace('m','-')) myHighEta = 0.01*float(jofile.split('eta')[1].split('_')[1].replace('m','-'))
eta_li.extend([myLowEta,myHighEta]) eta_li.extend([myLowEta,myHighEta])
......
...@@ -68,25 +68,25 @@ class MyParticleSampler(PG.ParticleSampler): ...@@ -68,25 +68,25 @@ class MyParticleSampler(PG.ParticleSampler):
return [ PG.SampledParticle( pid , mom , pos ) ] return [ PG.SampledParticle( pid , mom , pos ) ]
E_li = [] E_li = []
myLowE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[0]) myLowE = float(jofile.split('_E')[1].split('_')[0])
myHighE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[1]) myHighE = float(jofile.split('_E')[1].split('_')[1])
E_li.extend([myLowE,myHighE]) E_li.extend([myLowE,myHighE])
myZV = float(runArgs.jobConfig[0].split('_')[-1].split('.py')[0].replace("m","-")) myZV = float(jofile.split('_')[-1].split('.py')[0].replace("m","-"))
myPDGID = int(float(runArgs.jobConfig[0].split('_pid')[1].split('_')[0].replace('m','-'))) myPDGID = int(float(jofile.split('_pid')[1].split('_')[0].replace('m','-')))
eta_li = [] eta_li = []
if "disj" in runArgs.jobConfig[0]: if "disj" in jofile:
myLowEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[0].replace('m','-')) myLowEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[1].replace('m','-')) myLowEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[2].replace('m','-')) myHighEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[3].replace('m','-')) myHighEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[3].replace('m','-'))
eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2]) eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2])
else: else:
myLowEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[0].replace('m','-')) myLowEta = 0.01*float(jofile.split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[1].replace('m','-')) myHighEta = 0.01*float(jofile.split('eta')[1].split('_')[1].replace('m','-'))
eta_li.extend([myLowEta,myHighEta]) eta_li.extend([myLowEta,myHighEta])
......
...@@ -46,24 +46,24 @@ class MyParticleSampler(PG.ParticleSampler): ...@@ -46,24 +46,24 @@ class MyParticleSampler(PG.ParticleSampler):
return [ PG.SampledParticle( pid , mom , pos ) ] return [ PG.SampledParticle( pid , mom , pos ) ]
myE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[0]) myE = float(jofile.split('_E')[1].split('_')[0])
myZV = float(runArgs.jobConfig[0].split('_')[-1].split('.py')[0].replace("m","-")) myZV = float(jofile.split('_')[-1].split('.py')[0].replace("m","-"))
myPDGID = runArgs.jobConfig[0].split('_pid')[1].split('_')[0].replace('n','-') myPDGID = jofile.split('_pid')[1].split('_')[0].replace('n','-')
myPDGID = int(float(myPDGID.split('_pid')[1].split('_')[0].replace('p',''))) myPDGID = int(float(myPDGID.split('_pid')[1].split('_')[0].replace('p','')))
eta_li = [] eta_li = []
if "disj" in runArgs.jobConfig[0]: if "disj" in jofile:
myLowEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[0].replace('m','-')) myLowEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[1].replace('m','-')) myLowEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[2].replace('m','-')) myHighEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[3].replace('m','-')) myHighEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[3].replace('m','-'))
eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2]) eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2])
else: else:
myLowEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[0].replace('m','-')) myLowEta = 0.01*float(jofile.split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[1].replace('m','-')) myHighEta = 0.01*float(jofile.split('eta')[1].split('_')[1].replace('m','-'))
eta_li.extend([myLowEta,myHighEta]) eta_li.extend([myLowEta,myHighEta])
......
...@@ -51,7 +51,7 @@ class MyParticleSampler(PG.ParticleSampler): ...@@ -51,7 +51,7 @@ class MyParticleSampler(PG.ParticleSampler):
return rtn return rtn
##MC15 style with Generate_tf.py ##MC15 style with Generate_tf.py
#args=runArgs.jobConfig[0].split('.py')[0] #args=jofile.split('.py')[0]
##MC16 style with Gen_tf.py ##MC16 style with Gen_tf.py
FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0] FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment