9#include <vxd/geometry/GeoVXDCreator.h>
10#include <vxd/geometry/GeoCache.h>
11#include <vxd/simulation/SensitiveDetector.h>
12#include <simulation/background/BkgSensitiveDetector.h>
14#include <geometry/CreatorFactory.h>
15#include <geometry/Materials.h>
16#include <geometry/utilities.h>
17#include <framework/gearbox/GearDir.h>
19#include <boost/algorithm/string.hpp>
20#include <boost/format.hpp>
22#include <G4ReflectionFactory.hh>
23#include <G4LogicalVolume.hh>
28#include <G4Polycone.hh>
29#include <G4PVPlacement.hh>
30#include <G4AssemblyVolume.hh>
31#include <G4UserLimits.hh>
32#include <G4Point3D.hh>
34#include <G4TessellatedSolid.hh>
35#include <G4QuadrangularFacet.hh>
36#include <G4TriangularFacet.hh>
38#include <CLHEP/Units/PhysicalConstants.h>
39#include <CLHEP/Units/SystemOfUnits.h>
51 using namespace geometry;
69 for (G4UserLimits* userLimit :
m_UserLimits)
delete userLimit;
75 vector<VXDGeoPlacement> placements,
bool originCenter,
bool allowOutside)
78 B2DEBUG(100,
"Creating component " << name);
79 vector<VXDGeoComponent> subComponents;
80 subComponents.reserve(placements.size());
83 bool widthResize = component.getWidth() <= 0;
84 bool lengthResize = component.getLength() <= 0;
85 bool heightResize = component.getHeight() <= 0;
90 B2FATAL(
"A component is requested that was not created before!");
94 B2DEBUG(100,
"SubComponent " << p.getName());
95 B2DEBUG(100, boost::format(
"Placement: u:%1% cm, v:%2% cm, w:%3% + %4% cm") % p.getU() % p.getV() % p.getW() % p.getWOffset());
96 B2DEBUG(100, boost::format(
"Dimensions: %1%x%2%x%3% cm") % sub.getWidth() % sub.getLength() % sub.getHeight());
100 if (!allowOutside) B2FATAL(
"Cannot place component " << p.getName() <<
" outside of component " << name);
101 }
else if (sub.getHeight() + p.getWOffset() > component.getHeight()) {
104 B2FATAL(
"Subcomponent " << p.getName() <<
" does not fit into volume: "
105 <<
"height " << sub.getHeight() <<
" > " << component.getHeight());
107 component.getHeight() = sub.getHeight() + p.getWOffset();
111 double minWidth = max(abs(p.getU() + sub.getWidth() / 2.0), abs(p.getU() - sub.getWidth() / 2.0));
112 double minLength = max(abs(p.getV() + sub.getLength() / 2.0), abs(p.getV() - sub.getLength() / 2.0));
113 if (minWidth > component.getWidth() + component.getWidth() * numeric_limits<double>::epsilon()) {
115 B2FATAL(
"Subcomponent " << p.getName() <<
" does not fit into volume: "
116 <<
"minWidth " << minWidth <<
" > " << component.getWidth());
118 component.setWidth(minWidth * 2.0);
120 if (minLength > component.getLength() + component.getLength() * numeric_limits<double>::epsilon()) {
122 B2FATAL(
"Subcomponent " << p.getName() <<
" does not fit into volume: "
123 <<
"minLength " << minLength <<
" > " << component.getLength());
125 component.setLength(minLength * 2.0);
127 subComponents.push_back(sub);
131 if (component.getWidth() <= 0 || component.getLength() <= 0 || component.getHeight() <= 0) {
132 B2FATAL(
"At least one dimension of component " << name <<
" is zero which does not make sense");
136 if (!component.getVolume()) {
137 G4VSolid* componentShape =
createTrapezoidal(name, component.getWidth(), component.getWidth2(), component.getLength(),
138 component.getHeight());
139 component.setVolume(
new G4LogicalVolume(componentShape,
Materials::get(component.getMaterial()), name));
142 B2DEBUG(100, boost::format(
"Component %1% dimensions: %2%x%3%x%4% cm") % name % component.getWidth() % component.getLength() %
143 component.getHeight());
146 for (
size_t i = 0; i < placements.size(); ++i) {
150 G4Transform3D transform =
getPosition(component, s, p, originCenter);
153 assembly.
add(s.getVolume(), transform);
155 new G4PVPlacement(transform, s.getVolume(), name +
"." + p.getName(), component.getVolume(),
false, i);
160 if (component.getColor().empty()) {
161 B2DEBUG(200,
"Component " << name <<
" is an Air volume, setting invisible");
164 B2DEBUG(200,
"Component " << name <<
" color: " << component.getColor());
165 setColor(*component.getVolume(), component.getColor());
167 B2DEBUG(100,
"--> Created component " << name);
174 G4RotationMatrix rotation(params.getAlpha(), params.getBeta(), params.getGamma());
176 return G4Transform3D(rotation, translation);
182 double u(placement.
getU()), v(placement.
getV()), w(0);
183 switch (placement.
getW()) {
185 w = - mother.
getHeight() / 2.0 - daughter.getHeight() / 2.0;
188 w = - mother.
getHeight() / 2.0 + daughter.getHeight() / 2.0;
194 w = mother.
getHeight() / 2.0 - daughter.getHeight() / 2.0;
197 w = mother.
getHeight() / 2.0 + daughter.getHeight() / 2.0;
204 return G4Translate3D(u, v, w + placement.
getWOffset());
210 G4LogicalVolume& envelopeVolume)
213 G4LogicalVolume* top = &topVolume;
214 if (params.getInsideEnvelope()) {
215 top = &envelopeVolume;
219 const double width = params.getWidth();
220 const double length = params.getLength();
221 const double height = params.getHeight();
226 const std::vector<VXDGeoRadiationSensorsPositionPar>& Positions = params.getPositions();
229 const double r = position.getRadius();
230 const double z = position.getZ();
231 const double theta = position.getTheta();
233 const std::map<int, double>& Sensors = position.getSensors();
234 for (
const std::pair<const int, double>& sensor : Sensors) {
237 const double phi = sensor.second;
238 const int id = sensor.first;
240 const std::string name = params.getSubDetector() +
".DiamondSensor." + std::to_string(
id);
242 if (not shape) shape =
new G4Box(
"radiationSensorDiamond", width / 2 * CLHEP::cm, length / 2 * CLHEP::cm, height / 2 * CLHEP::cm);
243 G4LogicalVolume* volume =
new G4LogicalVolume(shape, material, name);
246 volume->SetSensitiveDetector(sensitive);
248 G4Transform3D transform = G4RotateZ3D(phi - M_PI / 2) * G4Translate3D(0, r * CLHEP::cm,
249 z * CLHEP::cm) * G4RotateX3D(-M_PI / 2 - theta);
250 new G4PVPlacement(transform, volume, name, top,
false, 1);
260 const double tana = tan(angle);
261 height = min(tana * length, min(tana * width, height));
262 offset = height / tana;
264 const double hwidth = width / 2.0;
265 const double hwidth2 = width2 / 2.0;
266 const double hlength = length / 2.0;
267 const double hheight = height / 2.0;
269 if (width2 <= 0 || width == width2) {
271 return new G4Box(name, hwidth, hlength, hheight);
273 return new G4Trd(name, hwidth, hwidth - offset, hlength, hlength - offset, hheight);
278 return new G4Trap(name, hheight, 0, 0, hlength, hwidth, hwidth2, 0, hlength - offset, hwidth - offset, hwidth2 - offset, 0);
282 const G4Transform3D& placement,
288 G4Transform3D ladderPlacement = placement * G4RotateZ3D(phi) * ladderPos *
getAlignment(parameters.getAlignment(ladder));
293 vector<G4Point3D> lastSensorEdge;
295 VxdID sensorID(ladder);
299 std::map<string, VXDGeoSensor>::iterator it =
m_sensorMap.find(p.getSensorTypeID());
301 B2FATAL(
"Invalid SensorTypeID " << p.getSensorTypeID() <<
", please check the definition of " << sensorID);
304 string name =
m_prefix +
"." + (string)sensorID;
309 G4Transform3D reflection;
310 if (p.getFlipU()) reflection = reflection * G4ReflectX3D();
311 if (p.getFlipV()) reflection = reflection * G4ReflectY3D();
312 if (p.getFlipW()) reflection = reflection * G4ReflectZ3D();
314 G4VSolid* sensorShape =
createTrapezoidal(name, s.getWidth(), s.getWidth2(), s.getLength(),
320 s.setVolume(
new G4LogicalVolume(sensorShape, sensorMaterial, name));
327 G4VSolid* activeShape =
createTrapezoidal(name +
".Active", s.getActiveArea().getWidth(), s.getActiveArea().getWidth2(),
328 s.getActiveArea().getLength(), s.getActiveArea().getHeight());
336 G4LogicalVolume* active =
new G4LogicalVolume(activeShape, sensorMaterial, name +
".Active",
341 setColor(*active, s.getActiveArea().getColor());
345 G4Transform3D activePosition = G4Translate3D(s.getActiveArea().getWidth() / 2.0, s.getActiveArea().getLength() / 2.0, 0) *
346 getPosition(s, s.getActiveArea(), s.getActivePlacement(),
false);
348 G4ReflectionFactory::Instance()->Place(activePosition * reflection, name +
".Active", active, s.getVolume(),
349 false, (
int)sensorID,
false);
355 G4RotationMatrix rotation(0, -M_PI / 2.0, -M_PI / 2.0);
356 G4Transform3D sensorAlign =
getAlignment(parameters.getAlignment(sensorID));
357 G4Transform3D sensorPlacement = G4Rotate3D(rotation) * sensorAlign * reflection;
359 if (s.getSlanted()) {
363 sensorPlacement = G4Translate3D(0.0, 0.0, p.getZ()) * sensorPlacement;
366 sensorPlacement = ladderPlacement * sensorPlacement;
368 assembly.
add(s.getVolume());
369 assembly.
place(volume, sensorPlacement);
374 double v = s.getLength() / 2.0;
376 std::vector<G4Point3D> curSensorEdge(4);
378 curSensorEdge[0] = sensorPlacement * reflection * G4Point3D(u, v, + w);
379 curSensorEdge[1] = sensorPlacement * reflection * G4Point3D(u, v, - w);
380 curSensorEdge[2] = sensorPlacement * reflection * G4Point3D(-u, v, - w);
381 curSensorEdge[3] = sensorPlacement * reflection * G4Point3D(-u, v, + w);
383 if (lastSensorEdge.size()) {
386 for (
int i = 0; i < 4; ++i) glueOK &= curSensorEdge[i].z() <= lastSensorEdge[i].z();
388 B2WARNING(
"Cannot place Glue at sensor " + (
string)sensorID +
389 " since it overlaps with the last module in z");
392 G4TessellatedSolid* solidTarget =
new G4TessellatedSolid(
m_prefix +
".Glue." + (
string)sensorID);
395 solidTarget->AddFacet(
new G4QuadrangularFacet(
396 curSensorEdge[3], curSensorEdge[2], curSensorEdge[1], curSensorEdge[0], ABSOLUTE));
398 solidTarget->AddFacet(
new G4QuadrangularFacet(
399 lastSensorEdge[0], lastSensorEdge[1], lastSensorEdge[2], lastSensorEdge[3], ABSOLUTE));
402 solidTarget->AddFacet(
new G4TriangularFacet(
403 curSensorEdge[3], curSensorEdge[0], lastSensorEdge[0], ABSOLUTE));
404 solidTarget->AddFacet(
new G4TriangularFacet(
405 lastSensorEdge[0], lastSensorEdge[3], curSensorEdge[3], ABSOLUTE));
407 solidTarget->AddFacet(
new G4TriangularFacet(
408 curSensorEdge[1], curSensorEdge[2], lastSensorEdge[2], ABSOLUTE));
409 solidTarget->AddFacet(
new G4TriangularFacet(
410 lastSensorEdge[2], lastSensorEdge[1], curSensorEdge[1], ABSOLUTE));
412 solidTarget->AddFacet(
new G4TriangularFacet(
413 curSensorEdge[0], curSensorEdge[1], lastSensorEdge[1], ABSOLUTE));
414 solidTarget->AddFacet(
new G4TriangularFacet(
415 lastSensorEdge[1], lastSensorEdge[0], curSensorEdge[0], ABSOLUTE));
417 solidTarget->AddFacet(
new G4TriangularFacet(
418 curSensorEdge[2], curSensorEdge[3], lastSensorEdge[3], ABSOLUTE));
419 solidTarget->AddFacet(
new G4TriangularFacet(
420 lastSensorEdge[3], lastSensorEdge[2], curSensorEdge[2], ABSOLUTE));
422 solidTarget->SetSolidClosed(
true);
425 m_prefix +
".Glue." + (
string)sensorID);
427 new G4PVPlacement(G4Transform3D(), glue,
m_prefix +
".Glue." + (
string)sensorID, volume,
false, 1);
431 lastSensorEdge.resize(4);
432 lastSensorEdge[0] = sensorPlacement * reflection * G4Point3D(u, -v, + w);
433 lastSensorEdge[1] = sensorPlacement * reflection * G4Point3D(u, -v, - w);
434 lastSensorEdge[2] = sensorPlacement * reflection * G4Point3D(-u, -v, - w);
435 lastSensorEdge[3] = sensorPlacement * reflection * G4Point3D(-u, -v, + w);
439 return ladderPlacement;
459 sensorInfo.getSensorID(),
460 sensorInfo.getSensorTypeID(),
462 sensorInfo.getFlipU(),
463 sensorInfo.getFlipV(),
464 sensorInfo.getFlipW()
473 VxdID ladder(layerID, ladderID, 0);
476 string path = (boost::format(
"Align[@component='%1%']/") % ladder).str();
479 B2WARNING(
"Could not find alignment parameters for ladder " << ladder);
483 params.getLength(
"dv"),
484 params.getLength(
"dw"),
485 params.getAngle(
"alpha"),
486 params.getAngle(
"beta"),
487 params.getAngle(
"gamma")
493 VxdID sensorID(ladder);
496 std::map<string, VXDGeoSensorPar>::iterator it = vxdGeometryPar.
getSensorMap().find(p.getSensorTypeID());
498 B2FATAL(
"Invalid SensorTypeID " << p.getSensorTypeID() <<
", please check the definition of " << sensorID);
507 string pathSensor = (boost::format(
"Align[@component='%1%']/") % sensorID).str();
510 B2WARNING(
"Could not find alignment parameters for sensorID " << sensorID);
543 string path = (boost::format(
"descendant::Component[@name='%1%']/") % name).str();
544 GearDir params(componentsDir, path);
546 B2FATAL(
"Could not find definition for component " << name);
552 params.getString(
"Color",
""),
553 params.getLength(
"width", 0),
554 params.getLength(
"width2", 0),
555 params.getLength(
"length", 0),
556 params.getLength(
"height", 0),
557 params.getAngle(
"angle", 0)
560 if (c.getWidth() <= 0 || c.getLength() <= 0 || c.getHeight() <= 0) {
561 B2DEBUG(100,
"One dimension empty, using auto resize for component");
568 int chipID = params.getInt(
"activeChipID");
577 string path = (boost::format(
"Ladder[@layer=%1%]/") % layer).str();
578 GearDir paramsLadder(components, path);
580 B2FATAL(
"Could not find Ladder definition for layer " << layer);
587 paramsLadder.
getAngle(
"slantedAngle", 0),
588 paramsLadder.
getLength(
"slantedRadius", 0),
589 paramsLadder.
getLength(
"Glue/oversize", 0),
590 paramsLadder.
getString(
"Glue/Material",
"")
596 sensorInfo.getInt(
"@id"),
597 sensorInfo.getString(
"@type"),
598 sensorInfo.getLength(
"."),
599 sensorInfo.getBool(
"@flipU",
false),
600 sensorInfo.getBool(
"@flipV",
false),
601 sensorInfo.getBool(
"@flipW",
false)
608 vector<VXDGeoPlacementPar> result;
609 for (
const GearDir& component : path.getNodes(
"Component")) {
611 if (!component.exists(
"@type")) {
612 type = component.getString(
"@name");
614 type = component.getString(
"@type");
616 int nPos = max(component.getNumberNodes(
"u"), component.getNumberNodes(
"v"));
617 nPos = max(nPos, component.getNumberNodes(
"w"));
618 nPos = max(nPos, component.getNumberNodes(
"woffset"));
619 for (
int iPos = 1; iPos <= nPos; ++iPos) {
620 string index = (boost::format(
"[%1%]") % iPos).str();
623 component.getLength(
"u" + index, 0),
624 component.getLength(
"v" + index, 0),
625 component.getString(
"w" + index,
"bottom"),
626 component.getLength(
"woffset" + index, 0)
The Class for BeamBackground Sensitive Detector.
GearDir is the basic class used for accessing the parameter store.
virtual std::string getString(const std::string &path="") const noexcept(false) override
Get the parameter path as a string.
Base class for all Sensitive Detectors to create hits during simulation.
static const double mm
[millimeters]
The Class for VXD Alignment payload.
The Class for VXD geometry component.
Class holding all parameters for an VXD geometry component.
double getWidth() const
get the width of the component
double & getHeight()
get the height of the component
double getLength() const
get the length of the component
The Class for VXD Ladder payload.
const std::string & getGlueMaterial() const
get the glue material
double getSlantedAngle() const
get the slant angle for slanted sensors
const std::vector< VXDGeoSensorPlacementPar > & getSensors() const
get list of sensors
double getRadius() const
get the radius of all sensors except slanted ones
double getShift() const
get the shift along the u coordinate for all sensors in the ladder
double getSlantedRadius() const
get the radius for slanted sensors
double getGlueSize() const
get the additional glue size, e.g.
Struct containing all parameters of one ladder.
const std::vector< VXDGeoSensorPlacement > & getSensors() const
get list of sensors
int getLayerID() const
get the layer id
const std::string & getGlueMaterial() const
get the glue material
double getSlantedAngle() const
get the slant angle for slanted sensors
double getRadius() const
get the radius of all sensors except slanted ones
double getShift() const
get the shift along the u coordinate for all sensors in the ladder
void addSensor(const VXDGeoSensorPlacement &sensor)
add a sensor to the list of sensors in the ladder
double getSlantedRadius() const
get the radius for slanted sensors
double getGlueSize() const
get the additional glue size, e.g.
The Class for VXD placement payload.
Class holding all parameters to place a VXD geometry subcomponent.
double getU() const
get local u coordinate where to place the component
double getV() const
get local v coordinate where to place the component
EPosW getW() const
get local w position where to place the component
@ c_bottom
Place the component at the bottom of the mother.
@ c_above
Place the component above the mother.
@ c_center
Place the component at the center of the mother.
@ c_top
Place the component at the top of the mother.
@ c_below
Place the component below the mother.
double getWOffset() const
get offset to local w position where to place the component
The Class for VXD Radiation Sensor parameters.
The Class for VXD Radiation Sensor Position parameters.
The Class for VXD Sensor payload.
The Class for VXD Sensor Placement payload.
Struct holding the information where a sensor should be placed inside the ladder.
Struct holding all parameters for a completeVXD Sensor.
The Class for VXD geometry.
const std::map< std::string, VXDGeoComponentPar > & getComponentMap() const
get component maps
const std::map< std::string, VXDGeoSensorPar > & getSensorMap() const
get sensor map
const VXDGlobalPar & getGlobalParams() const
get global parameters
std::map< std::string, VXDAlignmentPar > & getAlignmentMap()
get alignmant map
const std::vector< std::string > & getComponentInsertOder() const
get component insert order
std::map< int, VXDGeoLadderPar > & getLadderMap()
get ladder map
std::map< std::string, int > & getSensitiveChipIdMap()
get sensitive chip id map
bool getOnlyActiveMaterial() const
Get whether only active materials will be placed for tracking studies.
bool getActiveChips() const
Get whether chips are sensitive
std::string getDefaultMaterial() const
Get default material.
void addSensorPlacement(VxdID ladder, VxdID sensor, const G4Transform3D &placement)
Remember how sensor is placed into ladder.
static GeoCache & getInstance()
Return a reference to the singleton instance.
void addLadderPlacement(VxdID halfShell, VxdID ladder, const G4Transform3D &placement)
Remember how ladder is placed into half-shell.
Class to group some Geant4 volumes and place them all at once with a given transformation matrix.
void place(G4LogicalVolume *mother, const G4Transform3D &transform)
Place all the volumes already added to the assembly in the given mother.
void add(G4LogicalVolume *volume, const G4Transform3D &transform=G4Transform3D())
Add a volume to the assembly.
std::map< std::string, VXDGeoSensor > m_sensorMap
Map containing Information about all defined sensor types.
float m_minimumElectrons
minimum number of electrons to be deposited by a particle to be saved
G4VSolid * createTrapezoidal(const std::string &name, double width, double width2, double length, double &height, double angle=0)
Create a trapezoidal solid.
virtual void readLadderComponents(int layerID, int ladderID, GearDir content, VXDGeometryPar &vxdGeometryPar)
Read parameters for ladder components and their alignment corresponding to the given ladder id.
void createDiamonds(const VXDGeoRadiationSensorsPar ¶ms, G4LogicalVolume &topVolume, G4LogicalVolume &envelopeVolume)
Create diamond radiation sensors.
std::vector< Simulation::SensitiveDetectorBase * > m_sensitive
List to all created sensitive detector instances.
std::string m_prefix
Prefix to prepend to all volume names.
bool m_onlyActiveMaterial
If this is true, only active Materials will be placed for tracking studies.
double m_activeStepSize
Stepsize to be used inside active volumes.
float m_distanceTolerance
tolerance for Geant4 steps to be merged to a single step
virtual void readLadder(int layer, GearDir components, VXDGeometryPar &geoparameters)
Read parameters for a ladder in layer with given ID from gearbox and layer store them in payload.
VXDGeoLadder m_ladder
Parameters of the currently active ladder.
std::map< std::string, Belle2::VxdID > m_halfShellVxdIDs
Used for translation of half-shell name into a VxdID to consitently handle it in hierarchy.
bool m_onlyPrimaryTrueHits
If true only create TrueHits from primary particles and ignore secondaries.
G4Transform3D getPosition(const VXDGeoComponent &mother, const VXDGeoComponent &daughter, const VXDGeoPlacement &placement, bool originCenter)
Return the position where a daughter component is to be placed.
float m_electronTolerance
tolerance for the energy deposition in electrons to be merged in a single step
std::vector< G4UserLimits * > m_UserLimits
Vector of G4UserLimit pointers.
G4Transform3D getAlignment(const VXDAlignmentPar ¶ms)
Get Alignment from paylead object.
void readComponent(const std::string &name, GearDir components, VXDGeometryPar &vxdGeometryPar)
Read parameters for component name from Gearbox into geometry payload.
virtual ~GeoVXDCreator()
The destructor of the GeoVXDCreator class.
GeoVXDAssembly createSubComponents(const std::string &name, VXDGeoComponent &component, std::vector< VXDGeoPlacement > placements, bool originCenter=true, bool allowOutside=false)
Place a list of subcomponents into an component.
void readSubComponents(const std::vector< VXDGeoPlacementPar > &placements, const GearDir &componentsDir, VXDGeometryPar &vxdGeometryPar)
Read parameters for all components in placement container from Gearbox into payload.
std::map< std::string, VXDGeoComponent > m_componentCache
Cache of all previously created components.
G4Transform3D placeLadder(int ladderID, double phi, G4LogicalVolume *volume, const G4Transform3D &placement, const VXDGeometryPar ¶meters)
Place ladder corresponding to the given ladder id into volume setLayer has to be called first to set ...
virtual void setCurrentLayer(int layer, const VXDGeometryPar ¶meters)
Read parameters for given layer and store in m_ladder.
std::vector< VXDGeoPlacementPar > getSubComponents(const GearDir &path)
Return vector of VXDGeoPlacements with all the components defined inside a given path.
virtual SensitiveDetectorBase * createSensitiveDetector(VxdID sensorID, const VXDGeoSensor &sensor, const VXDGeoSensorPlacement &placement)=0
Return a SensitiveDetector implementation for a given sensor.
bool m_seeNeutrons
Make sensitive detectors also see neutrons.
std::string m_defaultMaterial
Name of the Material to be used for Air.
std::string m_currentHalfShell
Current half-shell being processed (need to know ladder parent for hierarchy)
GeoVXDCreator(const std::string &prefix)
Constructor of the GeoVXDCreator class.
Base class for Sensitive Detector implementation of PXD and SVD.
void setOptions(bool seeNeutrons, bool onlyPrimaryTrueHits, float distanceTolerance, float electronTolerance, float minimumElectrons)
Set all common options.
Class to uniquely identify a any structure of the PXD and SVD.
void setSensorNumber(baseType sensor)
Set the sensor id.
double getAngle(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard angle 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.
void setVisibility(G4LogicalVolume &volume, bool visible)
Helper function to quickly set the visibility of a given volume.
void setColor(G4LogicalVolume &volume, const std::string &color)
Set the color of a logical volume.
Abstract base class for different kinds of events.