Skip to content
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

Bugfix for Delphes in Jet-Substructure module #208

Merged
merged 7 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/releases/changelog-v2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
reader mentioned in issue [#136](https://github.com/MadAnalysis/madanalysis5/issues/136).
([#167](https://github.com/MadAnalysis/madanalysis5/pull/167))

* Delphes crash fixed due to miscommunication between libraries see issue [#204](https://github.com/MadAnalysis/madanalysis5/issues/204).
([#208](https://github.com/MadAnalysis/madanalysis5/pull/208))

## Contributors

This release contains contributions from (in alphabetical order):
Expand Down
2 changes: 2 additions & 0 deletions madanalysis/IOinterface/job_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,8 @@ def WriteMakefiles(self, option="", **kwargs):

options.has_root_inc = self.main.archi_info.has_root
options.has_root_lib = self.main.archi_info.has_root
# @jackaraz: to prevent seg-fault error with delphes
options.has_fastjet_tag = self.main.archi_info.has_root and self.main.archi_info.has_fastjet
#options.has_userpackage = True
toRemove=['Log/compilation.log','Log/linking.log','Log/cleanup.log','Log/mrproper.log']

Expand Down
1 change: 1 addition & 0 deletions madanalysis/IOinterface/library_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ def WriteMakefileForInterfaces(self,package):
options.has_root = True
options.has_root_inc = True
options.has_root_lib = True
options.ma5_fastjet_mode = self.main.archi_info.has_root and self.main.archi_info.has_fastjet
BFuks marked this conversation as resolved.
Show resolved Hide resolved
toRemove.extend(['compilation_delphes.log','linking_delphes.log',\
'cleanup_delphes.log','mrproper_delphes.log'])
elif package=='test_delphes':
Expand Down
3 changes: 3 additions & 0 deletions madanalysis/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,9 @@ def BuildLibrary(self,forced=False):

# Delphes
if self.archi_info.has_delphes:
# @jackaraz: activate fastjet flag
if self.archi_info.has_fastjet:
os.environ["FASTJET_FLAG"] = "-DMA5_FASTJET_MODE"
libraries.append(['Delphes', 'interface to Delphes', 'delphes',
self.archi_info.ma5dir + '/tools/SampleAnalyzer/Lib/libdelphes_for_ma5.so',
self.archi_info.ma5dir + '/tools/SampleAnalyzer/Interfaces', False])
Expand Down
4 changes: 2 additions & 2 deletions tools/SampleAnalyzer/Commons/DataFormat/RecEventFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace MA5 {
emptyjet_.clear();
#ifdef MA5_FASTJET_MODE
// pseudojet : only available when fastjet is in use (code efficiency)
input_hadrons_.clear();
input_hadrons_.clear();
#endif
towers_ok_=false;
towers_.clear();
Expand Down Expand Up @@ -259,4 +259,4 @@ namespace MA5 {
RecParticleFormat* RecEventFormat::GetNewMht() { return &MHT_; }


}
}
4 changes: 2 additions & 2 deletions tools/SampleAnalyzer/Commons/DataFormat/RecEventFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace MA5
std::vector<fastjet::PseudoJet> input_hadrons_;
#endif

/// Create an empty jet
/// Empty jet (useful temporary object)
std::vector<RecJetFormat> emptyjet_;

/// Collection of reconstructed tracks
Expand Down Expand Up @@ -177,7 +177,7 @@ namespace MA5
// -------------------------------------------------------------
public :

/// Constructor withtout arguments
/// Constructor without arguments
RecEventFormat()
{ Reset(); }

Expand Down