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

Class GeoEKLMCreator. More...

#include <GeoEKLMCreator.h>

Inheritance diagram for GeoEKLMCreator:
Collaboration diagram for GeoEKLMCreator:

Public Member Functions

 GeoEKLMCreator ()
 Constructor.
 
 ~GeoEKLMCreator ()
 Destructor.
 
void create (const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
 Creation of the detector geometry from Gearbox (XML). More...
 
void createFromDB (const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
 Creation of the detector geometry from database. More...
 
void createPayloads (const GearDir &content, const IntervalOfValidity &iov) override
 Creation of payloads. More...
 
 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

void createMaterials ()
 Creation of materials.
 
void readXMLDataStrips ()
 Read strip parameters from XML database.
 
void createSectionSolid ()
 Create section solid.
 
G4LogicalVolume * createLayerLogicalVolume (const char *name) const
 Create layer logical volume. More...
 
void createLayerSolid ()
 Create layer solid.
 
G4LogicalVolume * createSectorLogicalVolume (const char *name) const
 Create sector logical volume. More...
 
void createSectorSolid ()
 Create sector solid.
 
void createSectorCoverLogicalVolume ()
 Create sector cover solid.
 
G4Tubs * createSectorSupportInnerTube ()
 Create inner tube of sector support structure.
 
G4Tubs * createSectorSupportOuterTube ()
 Create outer tube of sector support structure.
 
G4Box * createSectorSupportBoxX (G4Transform3D &t)
 Create X side of sector support structure. More...
 
G4Box * createSectorSupportBoxY (G4Transform3D &t)
 Create Y side of sector support structure. More...
 
G4Box * createSectorSupportBoxTop (G4Transform3D &t)
 Create box in the cutted corner of sector support structure. More...
 
void createSectorSupportLogicalVolume ()
 Create sector support logical volume.
 
void createSectorSupportCorner1LogicalVolume ()
 Create sector support corner 1 logical volume.
 
void createSectorSupportCorner2LogicalVolume ()
 Create sector support corner 2 logical volume.
 
void createSectorSupportCorner3LogicalVolume ()
 Create sector support corner 3 logical volume.
 
void createSectorSupportCorner4LogicalVolume ()
 Create sector support corner 4 logical volume.
 
void createSubtractionBoxSolid ()
 Create subtraction box solid.
 
G4SubtractionSolid * cutSolidCorner (const char *name, G4VSolid *solid, G4Box *subtractionBox, const HepGeom::Transform3D &transf, bool largerAngles, double x1, double y1, double x2, double y2)
 Cut corner of a solid. More...
 
G4SubtractionSolid * cutSolidCorner (const char *name, G4VSolid *solid, G4Box *subtractionBox, const HepGeom::Transform3D &transf, bool largerAngles, double x, double y, double ang)
 Cut corner of a solid. More...
 
void createPlaneSolid (int n)
 Create plane solid. More...
 
void createSegmentSupportLogicalVolume (int iPlane, int iSegmentSupport)
 Create segment support logical volume. More...
 
G4VSolid * unifySolids (G4VSolid **solids, HepGeom::Transform3D *transf, int nSolids, const std::string &name)
 Unify a group of solids. More...
 
void createPlasticSheetLogicalVolume (int iSegment)
 Create plastic sheet logical volume. More...
 
void createStripSegmentLogicalVolume (int iSegment)
 Create strip segment logical volume. More...
 
void createSegmentLogicalVolume (int iSegment)
 Create segment logical volume (strips + plastic sheets). More...
 
void createStripLogicalVolume (int iStrip)
 Create strip logical volume. More...
 
void createStripGrooveLogicalVolume (int iStrip)
 Create strip groove logical volume. More...
 
void createScintillatorLogicalVolume (int iStrip)
 Create scintillator logical volume. More...
 
void createShieldDetailALogicalVolume ()
 Create shield detail A logical volume.
 
void createShieldDetailBLogicalVolume ()
 Create shield detail B logical volume.
 
void createShieldDetailCLogicalVolume ()
 Create shield detail C logical volume.
 
void createShieldDetailDLogicalVolume ()
 Create shield detail D logical volume.
 
void createSolids ()
 Create solids (or logical volumes which must be created only once). More...
 
bool detectorLayer (int section, int layer) const
 Check if a given layer is a detector layer. More...
 
G4LogicalVolume * createSection (G4LogicalVolume *topVolume) const
 Create section. More...
 
G4LogicalVolume * createLayer (G4LogicalVolume *section) const
 Create layer. More...
 
G4LogicalVolume * createSector (G4LogicalVolume *layer) const
 Create sector. More...
 
void createSectorCover (int iCover, G4LogicalVolume *sector) const
 Create sector cover. More...
 
void createSectorSupport (G4LogicalVolume *sector) const
 Create sector support structure (main part without corners). More...
 
void createSectorSupportCorner1 (G4LogicalVolume *sector) const
 Create sector support corner 1. More...
 
void createSectorSupportCorner2 (G4LogicalVolume *sector) const
 Create sector support corner 2. More...
 
void createSectorSupportCorner3 (G4LogicalVolume *sector) const
 Create sector support corner 3. More...
 
void createSectorSupportCorner4 (G4LogicalVolume *sector) const
 Create sector support corner 4. More...
 
G4LogicalVolume * createPlane (G4LogicalVolume *sector) const
 Create plane. More...
 
void createSegmentSupport (int iSegmentSupport, G4LogicalVolume *plane) const
 Create segment support. More...
 
void createPlasticSheet (int iSheetPlane, int iSheet) const
 Create plastic sheet. More...
 
void createStripSegment (int iSegment) const
 Create strip segment. More...
 
void createSegment (G4LogicalVolume *plane) const
 Create segment (strips + plastic sheets). More...
 
void createStrip (G4LogicalVolume *segment) const
 Create strip. More...
 
void createStripGroove (int iStrip) const
 Create strip groove. More...
 
void createScintillator (int iStrip) const
 Create scintillator. More...
 
void createShield (G4LogicalVolume *sector) const
 Create shield. More...
 
void newVolumes ()
 Create new volumes.
 
void newSensitive ()
 Create new sensitive detectors.
 
void deleteVolumes ()
 Delete volumes.
 
void deleteSensitive ()
 Delete sensitive detectors.
 
double getSectorSupportCornerAngle ()
 Get cutted corner angle. More...
 
void create (G4LogicalVolume &topVolume)
 Creation of the detector geometry. More...
 

Private Attributes

struct Solids m_Solids
 Solids.
 
struct LogicalVolumes m_LogVol
 Logical volumes.
 
struct Materials m_Materials
 Materials.
 
struct VolumeNumbers m_CurVol
 Current volumes.
 
const EKLMElementNumbersm_ElementNumbers
 Element numbers.
 
TransformDatam_TransformData
 Transformation data.
 
const GeometryDatam_GeoDat
 Geometry data.
 
KLM::SensitiveDetectorm_Sensitive
 Sensitive detector.
 

Detailed Description

Class GeoEKLMCreator.

The creator for the EKLM geometry of the Belle II detector.

Definition at line 205 of file GeoEKLMCreator.h.

Member Function Documentation

◆ create() [1/2]

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

Creation of the detector geometry from Gearbox (XML).

Parameters
[in]contentXML data directory.
[in]topVolumeGeant world volume.
[in]typeGeometry type.

Implements CreatorBase.

Definition at line 1927 of file GeoEKLMCreator.cc.

1930 {
1931  (void)content;
1932  (void)type;
1934  try {
1935  m_TransformData =
1937  } catch (std::bad_alloc& ba) {
1938  B2FATAL(MemErr);
1939  }
1940  newVolumes();
1941  newSensitive();
1942  create(topVolume);
1943 }
TransformData * m_TransformData
Transformation data.
void newVolumes()
Create new volumes.
void newSensitive()
Create new sensitive detectors.
void create(const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Creation of the detector geometry from Gearbox (XML).
const GeometryData * m_GeoDat
Geometry data.
static const GeometryData & Instance(enum DataSource dataSource=c_Database, const GearDir *gearDir=nullptr)
Instantiation.
Definition: GeometryData.cc:33
@ c_Gearbox
Gearbox (XML).
Definition: GeometryData.h:46
Transformation data.
Definition: TransformData.h:35
@ c_Displacement
Use displacement data (for geometry).
Definition: TransformData.h:44

◆ create() [2/2]

void create ( G4LogicalVolume &  topVolume)
private

Creation of the detector geometry.

Parameters
[in]topVolumeGeant world volume.

Definition at line 1860 of file GeoEKLMCreator.cc.

◆ createFromDB()

void createFromDB ( const std::string &  name,
G4LogicalVolume &  topVolume,
geometry::GeometryTypes  type 
)
overridevirtual

Creation of the detector geometry from database.

Parameters
[in]nameName of the component in the database.
[in]topVolumeGeant world volume.
[in]typeGeometry type.

Reimplemented from CreatorBase.

Definition at line 1945 of file GeoEKLMCreator.cc.

◆ createLayer()

G4LogicalVolume * createLayer ( G4LogicalVolume *  section) const
private

Create layer.

Parameters
[in]sectionSection logical volume.
Returns
Layer logical volume.

Definition at line 1495 of file GeoEKLMCreator.cc.

◆ createLayerLogicalVolume()

G4LogicalVolume * createLayerLogicalVolume ( const char *  name) const
private

Create layer logical volume.

Parameters
[in]nameLayer logical volume name.
Returns
Layer logical volume.

Definition at line 228 of file GeoEKLMCreator.cc.

◆ createPayloads()

void createPayloads ( const GearDir content,
const IntervalOfValidity iov 
)
overridevirtual

Creation of payloads.

Parameters
contentXML data directory.
iovInterval of validity.

Reimplemented from CreatorBase.

Definition at line 1963 of file GeoEKLMCreator.cc.

◆ createPlane()

G4LogicalVolume * createPlane ( G4LogicalVolume *  sector) const
private

Create plane.

Parameters
[in]sectorSector logical volume.
Returns
Plane logical volume.

Definition at line 1641 of file GeoEKLMCreator.cc.

◆ createPlaneSolid()

void createPlaneSolid ( int  n)
private

Create plane solid.

Parameters
[in]nNumber of plane, from 0 to 1.

Definition at line 794 of file GeoEKLMCreator.cc.

◆ createPlasticSheet()

void createPlasticSheet ( int  iSheetPlane,
int  iSheet 
) const
private

Create plastic sheet.

Parameters
[in]iSheetPlaneNumber of sheet plane.
[in]iSheetNumber of sheet (segment).

Definition at line 1689 of file GeoEKLMCreator.cc.

◆ createPlasticSheetLogicalVolume()

void createPlasticSheetLogicalVolume ( int  iSegment)
private

Create plastic sheet logical volume.

Parameters
[in]iSegmentNumber of segment (0-based).

Definition at line 1026 of file GeoEKLMCreator.cc.

◆ createScintillator()

void createScintillator ( int  iStrip) const
private

Create scintillator.

Parameters
[in]iStripNumber of strip in the length-based array.

Definition at line 1779 of file GeoEKLMCreator.cc.

◆ createScintillatorLogicalVolume()

void createScintillatorLogicalVolume ( int  iStrip)
private

Create scintillator logical volume.

Parameters
[in]iStripNumber of strip in length-based array.

Definition at line 1201 of file GeoEKLMCreator.cc.

◆ createSection()

G4LogicalVolume * createSection ( G4LogicalVolume *  topVolume) const
private

Create section.

Parameters
[in]topVolumeGeant world volume.
Returns
Section logical volume.

Definition at line 1472 of file GeoEKLMCreator.cc.

◆ createSector()

G4LogicalVolume * createSector ( G4LogicalVolume *  layer) const
private

Create sector.

Parameters
[in]layerLayer logical volume.
Returns
Sector logical volume.

Definition at line 1513 of file GeoEKLMCreator.cc.

◆ createSectorCover()

void createSectorCover ( int  iCover,
G4LogicalVolume *  sector 
) const
private

Create sector cover.

Parameters
[in]iCoverNumber of cover.
[in]sectorSector logical volume.

Definition at line 1532 of file GeoEKLMCreator.cc.

◆ createSectorLogicalVolume()

G4LogicalVolume * createSectorLogicalVolume ( const char *  name) const
private

Create sector logical volume.

Parameters
[in]nameSector logical volume name.
Returns
Sector logical volume.

Definition at line 253 of file GeoEKLMCreator.cc.

◆ createSectorSupport()

void createSectorSupport ( G4LogicalVolume *  sector) const
private

Create sector support structure (main part without corners).

Parameters
[in]sectorSector logical volume.

Definition at line 1624 of file GeoEKLMCreator.cc.

◆ createSectorSupportBoxTop()

G4Box * createSectorSupportBoxTop ( G4Transform3D &  t)
private

Create box in the cutted corner of sector support structure.

Parameters
[out]tTransformation.

Sets t to the transformation of the box.

Definition at line 397 of file GeoEKLMCreator.cc.

◆ createSectorSupportBoxX()

G4Box * createSectorSupportBoxX ( G4Transform3D &  t)
private

Create X side of sector support structure.

Parameters
[out]tTransformation.

Sets t to the transformation of the box.

Definition at line 349 of file GeoEKLMCreator.cc.

◆ createSectorSupportBoxY()

G4Box * createSectorSupportBoxY ( G4Transform3D &  t)
private

Create Y side of sector support structure.

Parameters
[out]tTransformation.

Sets t to the transformation of the box.

Definition at line 373 of file GeoEKLMCreator.cc.

◆ createSectorSupportCorner1()

void createSectorSupportCorner1 ( G4LogicalVolume *  sector) const
private

Create sector support corner 1.

Parameters
[in]sectorSector logical volume.

Definition at line 1554 of file GeoEKLMCreator.cc.

◆ createSectorSupportCorner2()

void createSectorSupportCorner2 ( G4LogicalVolume *  sector) const
private

Create sector support corner 2.

Parameters
[in]sectorSector logical volume.

Definition at line 1570 of file GeoEKLMCreator.cc.

◆ createSectorSupportCorner3()

void createSectorSupportCorner3 ( G4LogicalVolume *  sector) const
private

Create sector support corner 3.

Parameters
[in]sectorSector logical volume.

Definition at line 1588 of file GeoEKLMCreator.cc.

◆ createSectorSupportCorner4()

void createSectorSupportCorner4 ( G4LogicalVolume *  sector) const
private

Create sector support corner 4.

Parameters
[in]sectorSector logical volume.

Definition at line 1606 of file GeoEKLMCreator.cc.

◆ createSegment()

void createSegment ( G4LogicalVolume *  plane) const
private

Create segment (strips + plastic sheets).

Parameters
[in]planePlane logical volume.

Definition at line 1726 of file GeoEKLMCreator.cc.

◆ createSegmentLogicalVolume()

void createSegmentLogicalVolume ( int  iSegment)
private

Create segment logical volume (strips + plastic sheets).

Parameters
[in]iSegmentNumber of segment (0-based).

Definition at line 1110 of file GeoEKLMCreator.cc.

◆ createSegmentSupport()

void createSegmentSupport ( int  iSegmentSupport,
G4LogicalVolume *  plane 
) const
private

Create segment support.

Parameters
[in]iSegmentSupportNumber of segment support.
[in]planePlane logical volume.

Definition at line 1665 of file GeoEKLMCreator.cc.

◆ createSegmentSupportLogicalVolume()

void createSegmentSupportLogicalVolume ( int  iPlane,
int  iSegmentSupport 
)
private

Create segment support logical volume.

Parameters
[in]iPlaneNumber of plane.
[in]iSegmentSupportNumber of segment support.

Definition at line 874 of file GeoEKLMCreator.cc.

◆ createShield()

void createShield ( G4LogicalVolume *  sector) const
private

Create shield.

Parameters
[in]sectorSector logical volume.

Definition at line 1794 of file GeoEKLMCreator.cc.

◆ createSolids()

void createSolids ( )
private

Create solids (or logical volumes which must be created only once).

createSectorSupportCornerXSolid() must be called after createSectorSupportSolid()

Definition at line 1420 of file GeoEKLMCreator.cc.

◆ createStrip()

void createStrip ( G4LogicalVolume *  segment) const
private

Create strip.

Parameters
[in]segmentSegment logical volume.

Definition at line 1744 of file GeoEKLMCreator.cc.

◆ createStripGroove()

void createStripGroove ( int  iStrip) const
private

Create strip groove.

Parameters
[in]iStripNumber of strip in the length-based array.

Definition at line 1761 of file GeoEKLMCreator.cc.

◆ createStripGrooveLogicalVolume()

void createStripGrooveLogicalVolume ( int  iStrip)
private

Create strip groove logical volume.

Parameters
[in]iStripNumber of strip in length-based array.

Definition at line 1174 of file GeoEKLMCreator.cc.

◆ createStripLogicalVolume()

void createStripLogicalVolume ( int  iStrip)
private

Create strip logical volume.

Parameters
[in]iStripNumber of strip in length-based array.

Definition at line 1146 of file GeoEKLMCreator.cc.

◆ createStripSegment()

void createStripSegment ( int  iSegment) const
private

Create strip segment.

Parameters
[in]iSegmentNumber of segment.

Definition at line 1713 of file GeoEKLMCreator.cc.

◆ createStripSegmentLogicalVolume()

void createStripSegmentLogicalVolume ( int  iSegment)
private

Create strip segment logical volume.

Parameters
[in]iSegmentNumber of segment (0-based).

Definition at line 1080 of file GeoEKLMCreator.cc.

◆ cutSolidCorner() [1/2]

G4SubtractionSolid * cutSolidCorner ( const char *  name,
G4VSolid *  solid,
G4Box *  subtractionBox,
const HepGeom::Transform3D &  transf,
bool  largerAngles,
double  x,
double  y,
double  ang 
)
private

Cut corner of a solid.

Parameters
[in]nameName of resulting solid.
[in]solidSolid.
[in]subtractionBoxBox used for subtractions.
[in]transfAdditional transformation of subtraction box.
[in]largerAnglesIf true then cut larger angles.
[in]xInitial point x coordinate.
[in]yInitial point y coordinate.
[in]angAngle.

Definition at line 768 of file GeoEKLMCreator.cc.

◆ cutSolidCorner() [2/2]

G4SubtractionSolid * cutSolidCorner ( const char *  name,
G4VSolid *  solid,
G4Box *  subtractionBox,
const HepGeom::Transform3D &  transf,
bool  largerAngles,
double  x1,
double  y1,
double  x2,
double  y2 
)
private

Cut corner of a solid.

Parameters
[in]nameName of resulting solid.
[in]solidSolid.
[in]subtractionBoxBox used for subtractions.
[in]transfAdditional transformation of subtraction box.
[in]largerAnglesIf true then cut larger angles.
[in]x1First point x coordinate.
[in]y1First point y coordinate.
[in]x2Second point x coordinate.
[in]y2Second point y coordinate.

Definition at line 757 of file GeoEKLMCreator.cc.

◆ detectorLayer()

bool detectorLayer ( int  section,
int  layer 
) const
private

Check if a given layer is a detector layer.

Parameters
[in]sectionSection number.
[in]layerLayer number.
Returns
True if this layer is a detector layer.

Definition at line 1854 of file GeoEKLMCreator.cc.

◆ getSectorSupportCornerAngle()

double getSectorSupportCornerAngle ( )
private

Get cutted corner angle.

Returns
Angle.

◆ unifySolids()

G4VSolid * unifySolids ( G4VSolid **  solids,
HepGeom::Transform3D *  transf,
int  nSolids,
const std::string &  name 
)
private

Unify a group of solids.

Parameters
[in]solidsSolids.
[in]transfTransformations.
[in]nSolidsNumber of solids.
[in]nameFirst part of solid names.

Definition at line 949 of file GeoEKLMCreator.cc.


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