Belle II Software  release-05-01-25
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. More...
 
void readPole (const GearDir &content, STRGeometryPar &parameters, std::string side)
 Read xml files from GearDir for one of the Pole Pieces. More...
 

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 40 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.

Implements CreatorBase.

Definition at line 55 of file GeoSTRCreator.h.

56  {
57  STRGeometryPar config = createConfiguration(content);
58  createGeometry(config, topVolume, type);
59  }

◆ 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 151 of file GeoSTRCreator.cc.

152  {
153  STRGeometryPar strGeometryPar;
154 
155  // Get STR geometry parameters from Gearbox (no calculations here)
156  readShield(param, strGeometryPar, "FWD_Shield");
157  readShield(param, strGeometryPar, "BWD_Shield");
158  readPole(param, strGeometryPar, "PolePieceL");
159  readPole(param, strGeometryPar, "PolePieceR");
160 
161 
162  return strGeometryPar;
163  };

◆ 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 65 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.

◆ readPole()

void readPole ( const GearDir content,
STRGeometryPar parameters,
std::string  side 
)
private

Read xml files from GearDir for one of the Pole Pieces.

Definition at line 165 of file GeoSTRCreator.cc.

◆ readShield()

void readShield ( const GearDir content,
STRGeometryPar parameters,
std::string  side 
)
private

Read xml files from GearDir for one of the ECL shields.

Definition at line 200 of file GeoSTRCreator.cc.


The documentation for this class was generated from the following files:
Belle2::structure::GeoSTRCreator::createConfiguration
STRGeometryPar createConfiguration(const GearDir &param)
Create a parameter object from the Gearbox XML parameters.
Definition: GeoSTRCreator.cc:151
Belle2::structure::GeoSTRCreator::createGeometry
void createGeometry(const STRGeometryPar &parameters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create the geometry from a parameter object.
Definition: GeoSTRCreator.cc:65
Belle2::structure::GeoSTRCreator::readShield
void readShield(const GearDir &content, STRGeometryPar &parameters, std::string side)
Read xml files from GearDir for one of the ECL shields.
Definition: GeoSTRCreator.cc:200
Belle2::structure::GeoSTRCreator::readPole
void readPole(const GearDir &content, STRGeometryPar &parameters, std::string side)
Read xml files from GearDir for one of the Pole Pieces.
Definition: GeoSTRCreator.cc:165