diff --git a/Simulation/DetSimInterface/DetSimInterface/ISensDetTool.h b/Simulation/DetSimInterface/DetSimInterface/ISensDetTool.h index cb06d94000770797efc738f5720b73eda6568044..bdba7547e422e2f290e0d306db7fa0a8ad89dac6 100644 --- a/Simulation/DetSimInterface/DetSimInterface/ISensDetTool.h +++ b/Simulation/DetSimInterface/DetSimInterface/ISensDetTool.h @@ -21,7 +21,7 @@ public: virtual ~ISensDetTool() {}; - virtual G4VSensitiveDetector* createSD(const std::string& name); + virtual G4VSensitiveDetector* createSD(const std::string& name) = 0; }; diff --git a/Simulation/DetSimSD/CMakeLists.txt b/Simulation/DetSimSD/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..fff9acdf13864e6b6350562b75d99bd02b1819f6 --- /dev/null +++ b/Simulation/DetSimSD/CMakeLists.txt @@ -0,0 +1,31 @@ + +gaudi_subdir(DetSimSD v0r0) + +gaudi_depends_on_subdirs( + FWCore + Simulation/DetSimInterface +) + +find_package(Geant4 REQUIRED ui_all vis_all) +include(${Geant4_USE_FILE}) +find_package(DD4hep COMPONENTS DDG4 REQUIRED) + +set(DetSimSD_srcs + src/CalorimeterSensDetTool.cpp +) + +gaudi_add_module(DetSimSD ${DetSimSD_srcs} + INCLUDE_DIRS + # DetSimInterface + # FWCore + # DD4hep + # GaudiKernel + # Geant4 + LINK_LIBRARIES + # DetSimInterface + # FWCore + DD4hep + ${DD4hep_COMPONENT_LIBRARIES} + GaudiKernel + # Geant4 +) diff --git a/Simulation/DetSimSD/src/CalorimeterSensDetTool.cpp b/Simulation/DetSimSD/src/CalorimeterSensDetTool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35e0dcb295fd6b733b2619123a19d479e6ab0def --- /dev/null +++ b/Simulation/DetSimSD/src/CalorimeterSensDetTool.cpp @@ -0,0 +1,27 @@ +#include "CalorimeterSensDetTool.h" + +#include "G4VSensitiveDetector.hh" + +DECLARE_COMPONENT(CalorimeterSensDetTool); + +StatusCode +CalorimeterSensDetTool::initialize() { + StatusCode sc; + + return sc; +} + +StatusCode +CalorimeterSensDetTool::finalize() { + StatusCode sc; + + return sc; +} + +G4VSensitiveDetector* +CalorimeterSensDetTool::createSD(const std::string& name) { + + return nullptr; +} + + diff --git a/Simulation/DetSimSD/src/CalorimeterSensDetTool.h b/Simulation/DetSimSD/src/CalorimeterSensDetTool.h new file mode 100644 index 0000000000000000000000000000000000000000..5ecaf8c1af2220babcc73cefd5d900a84f9bc718 --- /dev/null +++ b/Simulation/DetSimSD/src/CalorimeterSensDetTool.h @@ -0,0 +1,31 @@ +#ifndef CalorimeterSensDetTool_h +#define CalorimeterSensDetTool_h + +/* + * CalorimeterSensDetTool is used to create the Calorimeter SD. + * + * -- 12 June 2020, Tao Lin <lintao@ihep.ac.cn> + */ + +#include "GaudiKernel/AlgTool.h" +#include "DetSimInterface/ISensDetTool.h" + +class CalorimeterSensDetTool: public extends<AlgTool, ISensDetTool> { + +public: + + using extends::extends; + + /// Overriding initialize and finalize + StatusCode initialize() override; + StatusCode finalize() override; + + /// Override ISensDetTool + virtual G4VSensitiveDetector* createSD(const std::string& name) override; + +private: + + +}; + +#endif