Commit 835da8fe authored by Ewelina Maria Lobodzinska's avatar Ewelina Maria Lobodzinska
Browse files

correct ParticleGun common fragments to work in 21.6

parent 490c8341
......@@ -68,7 +68,7 @@ class PEtaSampler(PG.MomSampler):
v4 = ROOT.TLorentzVector(px, py, pz, e)
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.sampler.pid = int(a_particle) #PID
......
......@@ -46,24 +46,24 @@ class MyParticleSampler(PG.ParticleSampler):
return [ PG.SampledParticle( pid , mom , pos ) ]
myE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[0])
myZV = float(runArgs.jobConfig[0].split('_')[-1].split('.py')[0].replace("m","-"))
myE = float(jofile.split('_E')[1].split('_')[0])
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','')))
eta_li = []
if "disj" in runArgs.jobConfig[0]:
myLowEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[3].replace('m','-'))
if "disj" in jofile:
myLowEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[3].replace('m','-'))
eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2])
else:
myLowEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[1].replace('m','-'))
myLowEta = 0.01*float(jofile.split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(jofile.split('eta')[1].split('_')[1].replace('m','-'))
eta_li.extend([myLowEta,myHighEta])
......
......@@ -67,22 +67,22 @@ class MyParticleSampler(PG.ParticleSampler):
return [ PG.SampledParticle( pid , mom , pos ) ]
myE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[0])
myZV = float(runArgs.jobConfig[0].split('_')[-1].split('.py')[0].replace("m","-"))
myPDGID = int(float(runArgs.jobConfig[0].split('_pid')[1].split('_')[0].replace('m','-')))
myE = float(jofile.split('_E')[1].split('_')[0])
myZV = float(jofile.split('_')[-1].split('.py')[0].replace("m","-"))
myPDGID = int(float(jofile.split('_pid')[1].split('_')[0].replace('m','-')))
eta_li = []
if "disj" in runArgs.jobConfig[0]:
myLowEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[3].replace('m','-'))
if "disj" in jofile:
myLowEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[3].replace('m','-'))
eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2])
else:
myLowEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[1].replace('m','-'))
myLowEta = 0.01*float(jofile.split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(jofile.split('eta')[1].split('_')[1].replace('m','-'))
eta_li.extend([myLowEta,myHighEta])
......
......@@ -68,25 +68,25 @@ class MyParticleSampler(PG.ParticleSampler):
return [ PG.SampledParticle( pid , mom , pos ) ]
E_li = []
myLowE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[0])
myHighE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[1])
myLowE = float(jofile.split('_E')[1].split('_')[0])
myHighE = float(jofile.split('_E')[1].split('_')[1])
E_li.extend([myLowE,myHighE])
myZV = float(runArgs.jobConfig[0].split('_')[-1].split('.py')[0].replace("m","-"))
myPDGID = int(float(runArgs.jobConfig[0].split('_pid')[1].split('_')[0].replace('m','-')))
myZV = float(jofile.split('_')[-1].split('.py')[0].replace("m","-"))
myPDGID = int(float(jofile.split('_pid')[1].split('_')[0].replace('m','-')))
eta_li = []
if "disj" in runArgs.jobConfig[0]:
myLowEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[3].replace('m','-'))
if "disj" in jofile:
myLowEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[3].replace('m','-'))
eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2])
else:
myLowEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[1].replace('m','-'))
myLowEta = 0.01*float(jofile.split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(jofile.split('eta')[1].split('_')[1].replace('m','-'))
eta_li.extend([myLowEta,myHighEta])
......
......@@ -46,24 +46,24 @@ class MyParticleSampler(PG.ParticleSampler):
return [ PG.SampledParticle( pid , mom , pos ) ]
myE = float(runArgs.jobConfig[0].split('_E')[1].split('_')[0])
myZV = float(runArgs.jobConfig[0].split('_')[-1].split('.py')[0].replace("m","-"))
myE = float(jofile.split('_E')[1].split('_')[0])
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','')))
eta_li = []
if "disj" in runArgs.jobConfig[0]:
myLowEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(runArgs.jobConfig[0].split('eta_')[1].split('_')[3].replace('m','-'))
if "disj" in jofile:
myLowEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[0].replace('m','-'))
myLowEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[1].replace('m','-'))
myHighEta1 = 0.01*float(jofile.split('eta_')[1].split('_')[2].replace('m','-'))
myHighEta2 = 0.01*float(jofile.split('eta_')[1].split('_')[3].replace('m','-'))
eta_li.extend([myLowEta1,myLowEta2,myHighEta1,myHighEta2])
else:
myLowEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(runArgs.jobConfig[0].split('eta')[1].split('_')[1].replace('m','-'))
myLowEta = 0.01*float(jofile.split('eta')[1].split('_')[0].replace('m','-'))
myHighEta = 0.01*float(jofile.split('eta')[1].split('_')[1].replace('m','-'))
eta_li.extend([myLowEta,myHighEta])
......
......@@ -51,7 +51,7 @@ class MyParticleSampler(PG.ParticleSampler):
return rtn
##MC15 style with Generate_tf.py
#args=runArgs.jobConfig[0].split('.py')[0]
#args=jofile.split('.py')[0]
##MC16 style with Gen_tf.py
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