gsystem
Loading...
Searching...
No Matches
gsystemConventions.h File Reference

Conventions and shared constants for the detector-system module. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gsystem

Variables

constexpr char gsystem::GMIRRORSKINSURFACE [] = "SkinSurface"
 Border value marking an optical surface applied to the whole volume skin.
constexpr char gsystem::GSYSTEMCOMPONENTMATERIAL [] = "Component"
Database row sizes

Expected number of positional fields for serialized DB/ASCII rows.

The module reads geometry and material data as serialized, positional vectors. These constants define the expected number of fields for each record type.

constexpr int gsystem::GVOLUMENUMBEROFPARS = 22
constexpr int gsystem::GVOLUMELEGACYNUMBEROFPARS = 21
 Number of database parameters defining a legacy gvolume entry without g4placement_type.
constexpr int gsystem::GMATERIALNUMBEROFPARS = 18
 Number of database parameters defining a gmaterial entry.
constexpr int gsystem::GMIRRORNUMBEROFPARS = 16
 Number of database parameters defining a gmirror entry.
Default placement strings

Default position and rotation strings, primarily for the ROOT/world volume.

These are used when creating the implicit ROOT/world volume or when a configuration requests a default placement. Units are embedded in the strings and interpreted by the same utilities used by geometry parsing.

constexpr char gsystem::DEFAULTPOSITION [] = "0*cm, 0*cm, 0*cm"
constexpr char gsystem::DEFAULTROTATION [] = "0*deg, 0*deg, 0*deg"
constexpr char gsystem::DEFAULTG4PLACEMENTTYPE [] = "active"
Error codes

Module-level exit/status codes.

Values are in the 200s range and are used by the logger error path to provide stable identifiers for common failure modes.

constexpr int gsystem::ERR_GVOLUMEALREADYPRESENT = 201
constexpr int gsystem::ERR_GWRONGNUMBEROFPARS = 202
constexpr int gsystem::ERR_GSETUPFILENOTOFOUND = 203
constexpr int gsystem::ERR_GVOLUMENOTFOUND = 204
constexpr int gsystem::ERR_GDIRNOTFOUND = 205
constexpr int gsystem::ERR_GMATERIALOPTICALPROPERTYMISMATCH = 206
constexpr int gsystem::ERR_GMATERIALNOTFOUND = 207
constexpr int gsystem::ERR_GVOLUMENAMECONTAINSINVALID = 208
constexpr int gsystem::ERR_GSQLITEERROR = 209
constexpr int gsystem::ERR_GMATERIALALREADYPRESENT = 210
constexpr int gsystem::ERR_EXPERIMENTNOTFOUND = 211
constexpr int gsystem::ERR_G4PLACEMENTTYPE = 212
constexpr int gsystem::ERR_GMIRRORALREADYPRESENT = 213
constexpr int gsystem::ERR_GMIRRORNOTFOUND = 214
constexpr int gsystem::ERR_GMIRRORINVALID = 215
Environment and naming conventions

Shared names used across factories and core types.

constexpr char gsystem::GEMCDB_ENV [] = "GEMCDB_ENV"
constexpr char gsystem::ROOTWORLDGVOLUMENAME [] = "root"
 Canonical name for the ROOT/world gvolume entry.
constexpr char gsystem::ROOTDEFINITION [] = "G4Box 15*m 15*m 15*m G4_AIR"
constexpr char gsystem::MOTHEROFUSALL [] = "akasha"
 Special mother-name marker for the top-level world root.
constexpr char gsystem::GSYSTEM_DELIMITER [] = "/"
 Delimiter used to build fully-qualified names (system/name).
Factory labels

Identifiers used in configuration to select concrete factories.

constexpr char gsystem::GSYSTEMASCIIFACTORYLABEL [] = "ascii"
constexpr char gsystem::GSYSTEMCADTFACTORYLABEL [] = "CAD"
constexpr char gsystem::GSYSTEMGDMLTFACTORYLABEL [] = "GDML"
constexpr char gsystem::GSYSTEMMYSQLTFACTORYLABEL [] = "mysql"
constexpr char gsystem::GSYSTEMSQLITETFACTORYLABEL [] = "sqlite"
constexpr char gsystem::GSYSTEMSQLITETDEFAULTFILE [] = "gemc.db"
 Default sqlite DB filename used when the user does not specify one.
constexpr char gsystem::GSYSTEMSASCIISEARCHDIR [] = "."
 Default search directory for ASCII factory files.

Detailed Description

This header centralizes:

  • geometry/material row sizes used by database-backed factories;
  • default placement/rotation strings for ROOT/world volumes;
  • common error codes used by geometry/material loaders;
  • factory labels and naming conventions.

Assumptions:

  • Volumes and materials in each system must have a unique name.

Definition in file gsystemConventions.h.