ATLAS Offline Software
Loading...
Searching...
No Matches
DumpGeo.cxx File Reference
#include "DumpGeo/DumpGeo.h"
#include "AthenaBaseComps/AthMsgStreamMacros.h"
#include "GeoModelInterfaces/IGeoDbTagSvc.h"
#include "GeoModelUtilities/GeoModelExperiment.h"
#include "GeoModelDBManager/GMDBManager.h"
#include "GeoModelKernel/GeoBox.h"
#include "GeoModelKernel/GeoVDetectorManager.h"
#include "GeoModelKernel/GeoVolumeCursor.h"
#include "GeoModelWrite/WriteGeoModel.h"
#include <cstdlib>
#include <filesystem>
#include <iomanip>
#include <iostream>
#include <stdexcept>
#include <system_error>
#include <vector>
#include "GeoModelKernel/Units.h"

Go to the source code of this file.

Macros

#define UNITS   GeoModelKernelUnits
#define gr   UNITS::gram
#define mole   UNITS::mole
#define cm3   UNITS::cm3

Functions

GeoPhysVol * createTheWorld ()

Macro Definition Documentation

◆ cm3

#define cm3   UNITS::cm3

◆ gr

#define gr   UNITS::gram

◆ mole

#define mole   UNITS::mole

◆ UNITS

#define UNITS   GeoModelKernelUnits

Definition at line 43 of file DumpGeo.cxx.

Function Documentation

◆ createTheWorld()

GeoPhysVol * createTheWorld ( )

Definition at line 47 of file DumpGeo.cxx.

47 {
48// Define the units
49#define gr UNITS::gram
50#define mole UNITS::mole
51#define cm3 UNITS::cm3
52
53 // Define the chemical elements
54 GeoElement* Nitrogen =
55 new GeoElement("Nitrogen", "N", 7.0, 14.0067 * gr / mole);
56 GeoElement* Oxygen = new GeoElement("Oxygen", "O", 8.0, 15.9995 * gr / mole);
57 GeoElement* Argon = new GeoElement("Argon", "Ar", 18.0, 39.948 * gr / mole);
58 GeoElement* Hydrogen =
59 new GeoElement("Hydrogen", "H", 1.0, 1.00797 * gr / mole);
60
61 // Define the materials
62 double densityOfAir = 0.001214 * gr / cm3;
63 GeoMaterial* air = new GeoMaterial("Air", densityOfAir);
64 air->add(Nitrogen, 0.7494);
65 air->add(Oxygen, 0.2369);
66 air->add(Argon, 0.0129);
67 air->add(Hydrogen, 0.0008);
68 air->lock();
69
70 //-----------------------------------------------------------------------------------//
71 // create the world volume container and
72 // get the 'world' volume, i.e. the root volume of the GeoModel tree
73 const GeoBox* worldBox =
74 new GeoBox(1000 * UNITS::cm, 1000 * UNITS::cm, 1000 * UNITS::cm);
75 const GeoLogVol* worldLog = new GeoLogVol("WorldLog", worldBox, air);
76 GeoPhysVol* world = new GeoPhysVol(worldLog);
77 return world;
78}
#define cm3
#define gr
#define mole