-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_pythia
More file actions
executable file
·46 lines (32 loc) · 1.63 KB
/
run_pythia
File metadata and controls
executable file
·46 lines (32 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/python3
import os,sys
shower = 2 #using vincia (default)
if len(sys.argv)>1 and sys.argv[1]=="1":
shower = 1 #using pythia shower
print("Using pythia shower")
else:
print("Using VINCIA shower")
def RunOn(LHEF):
##IMAGE='matthewfeickert/pythia-python:latest'
IMAGE='matthewfeickert/pythia-python:pythia8.308-hepmc2.06.11-fastjet3.4.0-python3.10'
COMPILER="g++ main00.cc -o main00 -I/usr/local/venv/include -O2 -pedantic -W -Wall -Wshadow -fPIC -pthread \
-std=c++14 -DGZIP -lz -L/usr/local/venv/lib -Wl,-rpath,/usr/local/venv/lib -lpythia8 -ldl \
-I/usr/local/venv/include -L/usr/local/venv/lib -Wl,-rpath,/usr/local/venv/lib -lHepMC -DHEPMC2;"
EXECUTOR="./main00 -e -1 -s {} -f {};".format(shower, LHEF)
CLEANER="rm main00"
CMD="$COMPILER";"$EXEC";"$CLEANER"
CMD="docker run -i --rm -u `id -u $USER`:`id -g` -v $PWD:/home/docker/work {} '{} {} {}'".format(IMAGE,COMPILER,EXECUTOR,CLEANER)
os.system(CMD)
localtest=False
LHE = []
LHE+= ['/userdata/FragmentationStudy/data/50k_events/eeToJJJ_50k_unweighted_events.lhe.gz']
LHE+= ['/userdata/FragmentationStudy/data/50k_events/eeToZgamma_50k_unweighted_events.lhe.gz']
LHE+= ['/userdata/FragmentationStudy/data/50k_ZZ_1TeV_events/eeToZZtoJJ_50k_1TeV_unweighted_events.lhe.gz']
MyStorage='/userdata/FragmentationStudy/enibigir/default'
for i,f in enumerate(LHE):
path, lhe = os.path.split(f)
if not localtest: os.system('cp {} .'.format(f))
RunOn(lhe)
if not localtest: os.system('rm {}'.format(lhe))
##os.system('mv {} {}/'.format(ff,path))
##os.system('mv {} {}/'.format(lhe.replace('.lhe.gz','.hepmc'),MyStorage))