Skip to content
Snippets Groups Projects
Commit e423b1d7 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

WIP: Prepare for the plcio output.

parent eb7d8cfd
No related branches found
No related tags found
No related merge requests found
......@@ -9,11 +9,19 @@ find_package(Geant4 REQUIRED ui_all vis_all)
include(${Geant4_USE_FILE})
find_package(DD4hep COMPONENTS DDG4 REQUIRED)
# For EDM & I/O
find_package(podio REQUIRED)
find_package(plcio REQUIRED)
# find_package(LCIO REQUIRED)
set(DetSimAna_srcs
src/ExampleAnaElemTool.cpp
)
message("podio_LIBRARIES: ${podio_LIBRARIES}")
message("plcio_LIBRARIES: ${plcio_LIBRARIES}")
gaudi_add_module(DetSimAna ${DetSimAna_srcs}
INCLUDE_DIRS DetSimInterface DD4hep GaudiKernel Geant4
INCLUDE_DIRS DetSimInterface DD4hep GaudiKernel Geant4
${plcio_INCLUDE_DIRS} ${podio_INCLUDE_DIRS}
LINK_LIBRARIES DetSimInterface DD4hep ${DD4hep_COMPONENT_LIBRARIES} GaudiKernel Geant4
${plcio_LIBRARIES} ${podio_LIBRARIES}
)
......@@ -59,6 +59,10 @@ ExampleAnaElemTool::EndOfEventAction(const G4Event* anEvent) {
<< " #" << icol
<< " has " << nhits << " hits."
<< endmsg;
if (nhits==0) {
// just skip this collection.
continue;
}
// There are different types (new and old)
dd4hep::sim::Geant4HitCollection* coll = dynamic_cast<dd4hep::sim::Geant4HitCollection*>(collect);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment