-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build FairShip with the separated libTPythia6.so library #597
base: master
Are you sure you want to change the base?
Changes from 4 commits
851d9ba
0f4e6b2
ad1a0d6
a4091c5
8f75227
1da8c51
d1138d7
ecaac25
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,11 @@ | |
sys.exit('ERROR on input, exit') | ||
|
||
PDG = ROOT.TDatabasePDG.Instance() | ||
myPythia = ROOT.TPythia6() | ||
try: | ||
myPythia = ROOT.TPythia6() | ||
except: #library not part of ROOT from 6.32 onward, need to load it externally | ||
olantwin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ROOT.gSystem.Load("libtpythia6.so") | ||
myPythia = ROOT.TPythia6() | ||
tp = ROOT.tPythia6Generator() | ||
|
||
# Pythia6 can only accept names below in pyinit, hence reset PDG table: | ||
|
@@ -287,7 +291,7 @@ def fillp1(hist): | |
if stack[nstack][0]==idhist[i]: | ||
idpn=0 | ||
# decide on p or n target in Mo | ||
if random.random>fracp: idpn=1 | ||
if random.random()>fracp: idpn=1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Too many statements on one line, missing spaces around operators. |
||
idw=i*10+idpn*4+4 | ||
ib=h[str(idw)].FindBin(ptot,0.,0.) | ||
prbsig=h[str(idw)].GetBinContent(ib) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ ${CMAKE_SOURCE_DIR}/generators | |
${CMAKE_SOURCE_DIR}/shipdata | ||
${CMAKE_SOURCE_DIR}/veto | ||
${genfit2_INCDIR} | ||
${TPYTHIA6_INCLUDE_DIR} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we define a CMake Target as a dependency instead of manually including the libraries? |
||
) | ||
|
||
set(SYSTEM_INCLUDE_DIRECTORIES | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed, if the ROOT dictionaries are in the correct place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right,
I believe the issue with this and the similar comment is that I should use the same library name as the ROOT old TPythia6 library. libEGPythia6.so, instead of libtpythia6.so.
I will do it and remove all these redundant if conditions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, using the same library name seems like a good idea.
Thanks for the update!