10#include <online_book/awesome/geometry/AWESOMEGeometryCreator.h>
13#include <framework/gearbox/Unit.h>
14#include <framework/logging/Logger.h>
15#include <geometry/CreatorFactory.h>
16#include <geometry/Materials.h>
17#include <geometry/utilities.h>
21#include <G4PVPlacement.hh>
22#include <G4Transform3D.hh>
23#include <G4UserLimits.hh>
26using namespace Belle2::AWESOME;
49 B2INFO(
"Contents of bar:");
50 for (
double value : content.
getArray(
"bar")) {
51 B2INFO(
LogVar(
"Value", value));
57 G4Box* activeShape =
new G4Box(
"ActiveBox",
58 activeParams.getLength(
"width") /
Unit::mm / 2.0,
59 activeParams.getLength(
"length") /
Unit::mm / 2.0,
60 activeParams.getLength(
"height") /
Unit::mm / 2.0
62 std::string material = activeParams.getString(
"Material");
68 active->SetUserLimits(
new G4UserLimits(stepSize));
70 new G4PVPlacement(G4Translate3D(0, 0, activeParams.getLength(
"z") /
Unit::mm),
71 active,
"ActivePlacement", &topVolume,
false, 1);
void create(const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes)
Create the AWESOME detector geometry in the world volume.
AWESOMESensitiveDetector * m_sensitiveDetector
The AWESOME sensitive detector.
virtual ~AWESOMEGeometryCreator()
Default destructor.
AWESOMEGeometryCreator()
Default constructor.
Sensitive Detector implementation of the AWESOME detector.
GearDir is the basic class used for accessing the parameter store.
static const double mm
[millimeters]
static const double um
[micrometers]
std::vector< double > getArray(const std::string &path) const noexcept(false)
Get the parameter path as a list of double values converted to the standard unit.
double getLength(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard length unit.
std::vector< GearDir > getNodes(const std::string &path="") const
Get vector of GearDirs which point to all the nodes the given path evaluates to.
static G4Material * get(const std::string &name)
Find given material.
Class to store variables with their name which were sent to the logging service.
void setColor(G4LogicalVolume &volume, const std::string &color)
Set the color of a logical volume.
GeometryTypes
Flag indicating the type of geometry to be used.
Abstract base class for different kinds of events.
Very simple class to provide an easy way to register creators with the CreatorManager.