Skip to content

Commit bfa7c72

Browse files
author
Christian Holm Christensen
authored
AOD to HepMC tool (#12038)
Introduce a class to convert AOD events to HepMC The class `o2::eventgen::AODToHepMC` converts events stored in AOD tables to `HepMC3::GenEvent` objects. The objects are kept in-memory so that clients (e.g., a future `o2::analysis::RivetWrapper` or similar) can pick up that event structure and process it. The converter class will convert `o2::aod::McCollisions` and `o2::aod::McParticles` information, as well as auxiliary information in `o2::aod::HepMCXSections`, `o2::aod::HepMC::PdfInfos`, and `o2::aod::HeavIons`. The built `HepMC3::GenEvent` data structures can optionally be stored on disk in HepMC3 ASCII files. The application `o2-aod-mc-to-hepmc` uses this converter class to convert AOD files to HepMC files. Note that the converter _only_ depends on `Framework/AnalysisDataFormats.h` and not any other AOD information. Compilation of `Generators/src/AODToHepMC.cxx` is contingent on HepMC3 being found at configure time. The code is heavily documented and commented.
1 parent 42bd8ba commit bfa7c72

File tree

5 files changed

+1505
-0
lines changed

5 files changed

+1505
-0
lines changed

Generators/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ o2_add_library(Generators
5050
$<$<BOOL:${pythia_FOUND}>:src/DecayerPythia8Param.cxx>
5151
$<$<BOOL:${HepMC3_FOUND}>:src/GeneratorHepMC.cxx>
5252
$<$<BOOL:${HepMC3_FOUND}>:src/GeneratorHepMCParam.cxx>
53+
$<$<BOOL:${HepMC3_FOUND}>:src/AODToHepMC.cxx>
5354
PUBLIC_LINK_LIBRARIES FairRoot::Base O2::SimConfig O2::CommonUtils O2::DetectorsBase O2::ZDCBase
5455
O2::SimulationDataFormat ${pythia6Target} ${pythiaTarget} ${hepmcTarget}
5556
FairRoot::Gen
@@ -106,6 +107,7 @@ endif()
106107
if(HepMC3_FOUND)
107108
list(APPEND headers include/Generators/GeneratorHepMC.h)
108109
list(APPEND headers include/Generators/GeneratorHepMCParam.h)
110+
list(APPEND headers include/Generators/AODToHepMC.h)
109111
endif()
110112

111113
o2_target_root_dictionary(Generators HEADERS ${headers})

0 commit comments

Comments
 (0)