k4SimGeant4
Loading...
Searching...
No Matches
GdmlDetectorConstruction.h
Go to the documentation of this file.
1#ifndef SIMG4COMMON_GDMLDETECTORCONSTRUCTION_H
2#define SIMG4COMMON_GDMLDETECTORCONSTRUCTION_H
3
4// Geant
5#include "G4GDMLParser.hh"
6#include "G4VUserDetectorConstruction.hh"
7
8// Gaudi
9#include "GaudiKernel/IMessageSvc.h"
10#include "GaudiKernel/MsgStream.h"
11#include "GaudiKernel/ServiceHandle.h"
12
20namespace sim {
21class GdmlDetectorConstruction : public G4VUserDetectorConstruction {
22public:
26 explicit GdmlDetectorConstruction(const std::string& aFileName, bool validate=false);
31 virtual G4VPhysicalVolume* Construct() override;
36 virtual void ConstructSDandField() override;
37
38private:
40 ServiceHandle<IMessageSvc> m_msgSvc;
42 MsgStream m_log;
44 G4GDMLParser m_parser;
46 std::string m_fileName;
47};
48}
49
50#endif /* SIMG4COMMON_GDMLDETECTORCONSTRUCTION_H */
Definition GdmlDetectorConstruction.h:21
virtual void ConstructSDandField() override
Create sensitive detectors.
Definition GdmlDetectorConstruction.cpp:16
GdmlDetectorConstruction(const std::string &aFileName, bool validate=false)
Constructor.
Definition GdmlDetectorConstruction.cpp:5
virtual ~GdmlDetectorConstruction()
Definition GdmlDetectorConstruction.cpp:12
std::string m_fileName
name of the GDML file
Definition GdmlDetectorConstruction.h:46
MsgStream m_log
Message Stream.
Definition GdmlDetectorConstruction.h:42
G4GDMLParser m_parser
Parser of the GDML file.
Definition GdmlDetectorConstruction.h:44
virtual G4VPhysicalVolume * Construct() override
Create volumes using the GDML parser.
Definition GdmlDetectorConstruction.cpp:14
ServiceHandle< IMessageSvc > m_msgSvc
Message Service.
Definition GdmlDetectorConstruction.h:40
Conversion between units.
Definition ConstantField.h:14