-
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?
Conversation
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.
We should also use find_package to specify TPythia6 as a dependency and use it to define include paths etc.
@@ -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 comment
The 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?
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Too many statements on one line, missing spaces around operators.
gconfig/DecayConfigPy6.C
Outdated
@@ -5,6 +5,9 @@ void DecayConfig() { | |||
// specific types of decays defined below. | |||
|
|||
// Access the external decayer singleton and initialize it | |||
if (TString(gSystem->DynamicPathName("libtpythia6.so", kTRUE)) != TString("")){ |
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!
Builds fine on SLC9 |
@antonioiuliano2 Any updates on this? |
It would be good to add a changelog entry. While nothing user-facing should change, this is quite a major under-the-hood change. |
One thing we could try for backwards compatibility is to check whether ROOT has TPythia6, and if not search for the TPythia6 standalone package using find_package. |
macro/run_simScript.py
Outdated
except: #library not part of ROOT from 6.32 onward, need to load it externally | ||
ROOT.gSystem.Load("libtpythia6.so") | ||
test = ROOT.TPythia6() | ||
test = ROOT.TPythia6() # don't know any other way of forcing to load lib |
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.
If the libraries are in the correct place, this should not be necessary.
I think once we confirm that this build fine with:
And does not build with:
We can probably merge this first version. A changelog entry would still be appreciated ;) |
@antonioiuliano2 Have you tried generating some muon DIS events with this branch? |
Yes, I did a test with the muonShieldOptimization/makeMuonDIS.py script and the default muConcrete.root file. Nothing out of the order to report.
Added an entry to the CHANGELOG. |
Ok, could you please rebase? |
Dear all,
This pull request is related to the update for ROOT 6.32 without TPythia6 support:
ShipSoft/shipdist#102.
Basically, this pull request will tell FairShip to load the TPythia6 from the shared library, now separated from ROOT.
It is used by
Best Regards,
Antonio