Belle II Software  release-08-01-10
GeoSTRCreator Class Reference

The GeoSTRCreator class to create the Belle2 structure geometry. More...

#include <GeoSTRCreator.h>

Inheritance diagram for GeoSTRCreator:
Collaboration diagram for GeoSTRCreator:

Public Member Functions

 GeoSTRCreator ()
 The Constructor of the GeoSTRCreator class.
 
virtual ~GeoSTRCreator ()
 The destructor of the GeoSTRCreator class.
 
virtual void create (const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
 Creates the Geant4 objects for the structure geometry from Gearbox. More...
 
virtual void createPayloads (const GearDir &content, const IntervalOfValidity &iov) override
 Create the configuration objects and save them in the Database. More...
 
virtual void createFromDB (const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
 Create the geometry from the Database.
 
 BELLE2_DEFINE_EXCEPTION (DBNotImplemented, "Cannot create geometry from Database.")
 Exception that will be thrown in createFromDB if member is not yet implemented by creator.
 

Private Member Functions

STRGeometryPar createConfiguration (const GearDir &param)
 Create a parameter object from the Gearbox XML parameters. More...
 
void createGeometry (const STRGeometryPar &parameters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
 Create the geometry from a parameter object. More...
 
void readShield (const GearDir &content, STRGeometryPar &parameters, std::string side)
 Read xml files from GearDir for one of the ECL shields.
 
void readPole (const GearDir &content, STRGeometryPar &parameters, std::string side)
 Read xml files from GearDir for one of the Pole Pieces.
 

Detailed Description

The GeoSTRCreator class to create the Belle2 structure geometry.

The creator for the Belle II structural elements such as radiation shields and pole piece

Definition at line 38 of file GeoSTRCreator.h.

Member Function Documentation

◆ create()

virtual void create ( const GearDir content,
G4LogicalVolume &  topVolume,
geometry::GeometryTypes  type 
)
inlineoverridevirtual

Creates the Geant4 objects for the structure geometry from Gearbox.

This is the 'old' way of building the geometry from Gearbox (xml files). Expected to be deprecated in the future.

Parameters
contentA reference to the content part of the parameter description, which should to be used to create the ROOT objects.
topVolumeGeant4 logical top volume.
typeGeometry type.

Implements CreatorBase.

Definition at line 55 of file GeoSTRCreator.h.

56  {
57  STRGeometryPar config = createConfiguration(content);
58  createGeometry(config, topVolume, type);
59  }
void createGeometry(const STRGeometryPar &parameters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create the geometry from a parameter object.
STRGeometryPar createConfiguration(const GearDir &param)
Create a parameter object from the Gearbox XML parameters.

◆ createConfiguration()

STRGeometryPar createConfiguration ( const GearDir param)
private

Create a parameter object from the Gearbox XML parameters.

If more than one object is created these could be assigned to members or you could return a tuple.

Definition at line 148 of file GeoSTRCreator.cc.

149  {
150  STRGeometryPar strGeometryPar;
151 
152  // Get STR geometry parameters from Gearbox (no calculations here)
153  readShield(param, strGeometryPar, "FWD_Shield");
154  readShield(param, strGeometryPar, "BWD_Shield");
155  readPole(param, strGeometryPar, "PolePieceL");
156  readPole(param, strGeometryPar, "PolePieceR");
157 
158 
159  return strGeometryPar;
160  };
void readPole(const GearDir &content, STRGeometryPar &parameters, std::string side)
Read xml files from GearDir for one of the Pole Pieces.
void readShield(const GearDir &content, STRGeometryPar &parameters, std::string side)
Read xml files from GearDir for one of the ECL shields.

◆ createGeometry()

void createGeometry ( const STRGeometryPar parameters,
G4LogicalVolume &  topVolume,
geometry::GeometryTypes  type 
)
private

Create the geometry from a parameter object.

If more than one object is needed these could instead be taken from member variables or the number of parameters could be increased.

Definition at line 62 of file GeoSTRCreator.cc.

◆ createPayloads()

virtual void createPayloads ( const GearDir content,
const IntervalOfValidity iov 
)
inlineoverridevirtual

Create the configuration objects and save them in the Database.

If more than one object is needed adjust accordingly

Reimplemented from CreatorBase.

Definition at line 63 of file GeoSTRCreator.h.


The documentation for this class was generated from the following files: