VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
Geant4GM
source
solids
Box.cxx
Go to the documentation of this file.
1
// $Id$
2
3
// -----------------------------------------------------------------------
4
// The Geant4GM package of the Virtual Geometry Model
5
// Copyright (C) 2007, Ivana Hrivnacova
6
// All rights reserved.
7
//
8
// For the licensing terms see vgm/LICENSE.
9
// Contact: ivana@ipno.in2p3.fr
10
// -----------------------------------------------------------------------
11
12
//
13
// Class Box
14
// ---------------
15
// VGM implementation for Geant4 box solid.
16
//
17
// Author: Ivana Hrivnacova; IPN Orsay
18
19
#include "
ClhepVGM/Units.h
"
20
21
#include "
Geant4GM/solids/Box.h
"
22
#include "
Geant4GM/solids/SolidMap.h
"
23
24
#include "G4Box.hh"
25
#include "G4ReflectedSolid.hh"
26
27
//_____________________________________________________________________________
28
Geant4GM::Box::Box
(
const
std::string& name,
double
hx,
double
hy,
double
hz)
29
:
VGM
::ISolid(),
30
VGM
::IBox(),
31
BaseVGM
::
VBox
(),
32
fBox(new G4Box(name, hx /
ClhepVGM
::Units::Length(),
33
hy /
ClhepVGM
::Units::Length(), hz /
ClhepVGM
::Units::Length()))
34
{
39
40
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, fBox);
41
}
42
43
//_____________________________________________________________________________
44
Geant4GM::Box::Box
(G4Box* box, G4ReflectedSolid* reflBox)
45
:
VGM
::ISolid(),
VGM
::IBox(),
BaseVGM
::
VBox
(), fBox(box)
46
{
48
49
if
(reflBox)
50
Geant4GM::SolidMap::Instance
()->AddSolid(
this
, reflBox);
51
else
52
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, box);
53
}
54
55
//_____________________________________________________________________________
56
Geant4GM::Box::Box
() :
VGM
::ISolid(),
VGM
::IBox(),
BaseVGM
::
VBox
()
57
{
59
}
60
61
//_____________________________________________________________________________
62
Geant4GM::Box::Box
(
const
Box
& rhs)
63
:
VGM
::ISolid(rhs),
VGM
::IBox(rhs),
BaseVGM
::
VBox
(rhs)
64
{
66
}
67
68
//_____________________________________________________________________________
69
Geant4GM::Box::~Box
()
70
{
71
//
72
}
73
74
//_____________________________________________________________________________
75
std::string
Geant4GM::Box::Name
()
const
{
return
fBox->GetName(); }
76
77
//_____________________________________________________________________________
78
double
Geant4GM::Box::XHalfLength
()
const
79
{
80
return
fBox->GetXHalfLength() *
ClhepVGM::Units::Length
();
81
}
82
83
//_____________________________________________________________________________
84
double
Geant4GM::Box::YHalfLength
()
const
85
{
86
return
fBox->GetYHalfLength() *
ClhepVGM::Units::Length
();
87
}
88
89
//_____________________________________________________________________________
90
double
Geant4GM::Box::ZHalfLength
()
const
91
{
92
return
fBox->GetZHalfLength() *
ClhepVGM::Units::Length
();
93
}
Units.h
Box.h
SolidMap.h
BaseVGM::VBox::VBox
VBox()
Definition
VBox.cxx:30
ClhepVGM::Units::Length
static double Length()
Return CLHEP default length unit in VGM units.
Definition
Units.cxx:83
Geant4GM::Box::Name
virtual std::string Name() const
Return the name of this solid.
Definition
Box.cxx:75
Geant4GM::Box::Box
Box()
Definition
Box.cxx:56
Geant4GM::Box::Box
Box(const std::string &name, double hx, double hy, double hz)
Definition
Box.cxx:28
Geant4GM::Box::YHalfLength
virtual double YHalfLength() const
Return the half-length along the y axis in mm.
Definition
Box.cxx:84
Geant4GM::Box::ZHalfLength
virtual double ZHalfLength() const
Return the half-length along the z axis in mm.
Definition
Box.cxx:90
Geant4GM::Box::XHalfLength
virtual double XHalfLength() const
Return the half-length along the x axis in mm.
Definition
Box.cxx:78
Geant4GM::Box::~Box
virtual ~Box()
Definition
Box.cxx:69
Geant4GM::SolidMap::Instance
static SolidMap * Instance()
Definition
SolidMap.cxx:28
Geant4GM::SolidMap::AddSolid
void AddSolid(VGM::ISolid *, G4VSolid *)
Definition
SolidMap.cxx:59
BaseVGM
BaseVGM utilities.
Definition
utilities.h:23
ClhepVGM
ClhepVGM utilities.
Definition
transform.h:29
VGM
VGM interfaces.
Definition
VMedium.h:28
Generated on
for VGM by
1.17.0