Skip to content

Commit 3598232

Browse files
authored
Fix box and gun pythia executables (#103)
- Fix seed for background - Add more decays to bck event - Update cleaning script - Linking also summary file in current directory
1 parent f78d25d commit 3598232

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

examples/scripts/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ fwdRes/fwdRes.C
2121
lutWrite*.cc
2222
*.hepmc
2323
HistoManager.h
24+
lutCovm.hh

examples/scripts/clean.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rm *.cfg *.log *.txt
66
rm *.so *.d *.pcm
77
rm *ACLiC*
88
rm *.tcl
9-
rm -f lutCovm.el.dat lutCovm.mu.dat lutCovm.pi.dat lutCovm.ka.dat lutCovm.pr.dat
9+
rm -f ./lutCovm.*.dat
1010
rm *.C *.h
1111
rm *.pdf *.swp
1212
rm dpl-config.json imgui.ini
@@ -18,3 +18,4 @@ rm lutWrite*.cc
1818
rm DetectorK.*
1919
rm -r fwdRes
2020
rm -r __pycache__
21+
rm lutCovm.hh

examples/scripts/createO2tables.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ def write_config(entry, prefix=""):
437437
run_cmd(f"cat {summaryfile} >> {s}")
438438
else:
439439
run_cmd(f"mv {summaryfile} {output_path}")
440+
run_cmd(f"ln -s {output_path}/{summaryfile} ./")
440441

441442
if qa:
442443
msg(" --- running test analysis", color=bcolors.HEADER)

rpythia8/rpythia8-box.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
using namespace Pythia8;
1010

11-
int main(int argc, char **argv)
11+
int main(int argc, char** argv)
1212
{
1313

1414
int nevents, pdg, seed;
@@ -114,6 +114,8 @@ int main(int argc, char **argv)
114114
std::cout << "Error: could not read config file \"" << background_config << "\"" << std::endl;
115115
return 1;
116116
}
117+
pythia_bkg->readString("Random:setSeed = on");
118+
pythia_bkg->readString("Random:seed =" + std::to_string(seed));
117119
pythia_bkg->init();
118120
}
119121

@@ -148,6 +150,8 @@ int main(int argc, char **argv)
148150
// background
149151
if (pythia_bkg) {
150152
pythia_bkg->next();
153+
if (decay)
154+
pythia_bkg->moreDecays();
151155
pythia.event += pythia_bkg->event;
152156
}
153157

rpythia8/rpythia8-gun.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ int main(int argc, char** argv)
111111
std::cout << "Error: could not read config file \"" << background_config << "\"" << std::endl;
112112
return 1;
113113
}
114+
pythia_bkg->readString("Random:setSeed = on");
115+
pythia_bkg->readString("Random:seed =" + std::to_string(seed));
114116
pythia_bkg->init();
115117
}
116118

@@ -131,6 +133,8 @@ int main(int argc, char** argv)
131133
// background
132134
if (pythia_bkg) {
133135
pythia_bkg->next();
136+
if (decay)
137+
pythia_bkg->moreDecays();
134138
pythia.event += pythia_bkg->event;
135139
}
136140

0 commit comments

Comments
 (0)