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

WIP: construct detector from root detector element.

parent b9cdb003
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ DetSimAlg::initialize() {
}
// Detector Construction
m_root_detelem = ToolHandle<IDetElemTool>(m_root_det_elem.value());
runmgr->SetUserInitialization(new DetectorConstruction());
// Physics List
G4VUserPhysicsList *physicsList = nullptr;
......
......@@ -10,6 +10,7 @@
#include <DetSimInterface/IDetSimSvc.h>
#include <DetSimInterface/IAnaElemTool.h>
#include <DetSimInterface/IDetElemTool.h>
class DetSimAlg: public Algorithm {
public:
......@@ -22,6 +23,7 @@ public:
private:
SmartIF<IDetSimSvc> m_detsimsvc;
ToolHandleArray<IAnaElemTool> m_anaelemtools;
ToolHandle<IDetElemTool> m_root_detelem;
private:
......@@ -32,6 +34,7 @@ private:
Gaudi::Property<std::string> m_physics_lists_name{this, "PhysicsList", "QGSP_BERT"};
Gaudi::Property<std::vector<std::string>> m_ana_elems{this, "AnaElems"};
Gaudi::Property<std::string> m_root_det_elem{this, "RootDetElem"};
private:
......
#ifndef IDetElemTool_h
#define IDetElemTool_h
// IDetElemTool is used to wrap the construction of G4LogicalVolume.
// Please note that the placement of logical volume is fixed in the code.
// If necessary, another IDetElemPosTool can be used to produce the positions
// of the daughters.
// IDetElemTool should represent the high level detectors/modules.
#include "GaudiKernel/IAlgTool.h"
class G4LogicalVolume;
class IDetElemTool: virtual public IAlgTool {
public:
DeclareInterfaceID(IDetElemTool, 0, 1);
virtual ~IDetElemTool() {}
// return the constructed detector
virtual G4LogicalVolume* getLV() = 0;
};
#endif
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