Loading...
Searching...
No Matches
DetectorConstruction.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26/// \file radiobiology/include/DetectorConstruction.hh
27/// \brief Definition of the RadioBio::DetectorConstruction class
28
29#ifndef RadiobiologyDetectorConstruction_h
30#define RadiobiologyDetectorConstruction_h 1
31
32#include "G4SystemOfUnits.hh"
33#include "G4ThreeVector.hh"
34#include "G4VUserDetectorConstruction.hh"
35#include "globals.hh"
36
37class G4LogicalVolume;
38class G4Material;
39
40namespace RadioBio
41{
42
43// Forward declariation of other radiobiology classes
44class DetectorMessenger;
45
46/**
47 * @brief Mandatory class for the construction of geometry.
48 *
49 * This class is used to create the world volume and keep track of some
50 * dimensions. World volume is the only one created and saved here,
51 * whereas voxels and sensitiveness are accounted for by another
52 * class.
53 *
54 * @note Different class will use some information to this class such
55 * as geometrical constraints on the simulation world volume.
56 *
57 */
58
59class DetectorConstruction : public G4VUserDetectorConstruction
60{
61 public:
64
65 public:
66 /** @brief Method overriding pure virtual
67 * G4VUserDetectorConstruction one */
68 G4VPhysicalVolume* Construct() override;
69 /** @brief Method overriding pure virtual
70 * G4VUserDetectorConstruction one */
71 void ConstructSDandField() override;
72
73 // Set cubical world size
74 /** @brief Method to set the world volume
75 * to be cubical with given side */
76 void SetSize(G4double);
77
78 // Set world size for non-cubic boxes
79 /** @brief Method to set the world volume
80 * to be a box with given (potentially different) sides */
81 void SetSize(G4ThreeVector);
82 /** @brief Method to set the X width of the world volume
83 * @param x X width of the box */
84 void SetSizeX(G4double x);
85 /** @brief Method to set the Y width of the world volume
86 * @param y Y width of the box */
87 void SetSizeY(G4double y);
88 /** @brief Method to set the Z width of the world volume
89 * @param z Z width of the box */
90 void SetSizeZ(G4double z);
91
92 /** @brief Method to set the world material
93 *
94 * @note there will not be any different material throughout the
95 * whole simulation
96 *
97 * @param mat string containing the name of the material
98 * according to NIST database */
99 void SetMaterial(G4String mat);
100
101 public:
102 /** @brief Returns a pointer to the world physical volume */
103 const G4VPhysicalVolume* GetWorld() { return fPBox; }
104
105 G4double GetSizeX() const { return fBoxSizeX; }
106 G4double GetSizeY() const { return fBoxSizeY; }
107 G4double GetSizeZ() const { return fBoxSizeZ; }
108
109
110 /** @brief Returns a pointer to the world material */
112 {
113 return fMaterial;
114 }
115
116 /** @brief Prints on screen some parameters for this class */
117 void PrintParameters();
118
119 private:
120 // World physical and logical
123
124 // World box sizes
125 G4double fBoxSizeX = 1. * m;
126 G4double fBoxSizeY = 1. * m;
127 G4double fBoxSizeZ = 1. * m;
128
129 // World box material
131
132 // Pointer to the messenger
134
135 private:
136 /** @brief Private method to construct geometry */
138};
139
140} // namespace RadioBio
141
142#endif // DetectorConstruction_h
G4VPhysicalVolume * Construct() override
Method overriding pure virtual G4VUserDetectorConstruction one.
void PrintParameters()
Prints on screen some parameters for this class.
G4VPhysicalVolume * ConstructVolumes()
Private method to construct geometry.
void SetSizeY(G4double y)
Method to set the Y width of the world volume.
void SetSize(G4double)
Method to set the world volume to be cubical with given side.
void SetSizeZ(G4double z)
Method to set the Z width of the world volume.
void SetSizeX(G4double x)
Method to set the X width of the world volume.
G4Material * GetMaterial()
Returns a pointer to the world material.
void ConstructSDandField() override
Method overriding pure virtual G4VUserDetectorConstruction one.
void SetMaterial(G4String mat)
Method to set the world material.
const G4VPhysicalVolume * GetWorld()
Returns a pointer to the world physical volume.

Applications | User Support | Publications | Collaboration