VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
RootGM
source
solids
Box.cxx
Go to the documentation of this file.
1
// $Id$
2
3
// -----------------------------------------------------------------------
4
// The RootGM 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 Root box solid.
16
//
17
// Author: Ivana Hrivnacova; IPN Orsay
18
19
#include "
RootGM/solids/Box.h
"
20
#include "
RootGM/common/Units.h
"
21
#include "
RootGM/solids/SolidMap.h
"
22
23
#include "TGeoBBox.h"
24
25
//_____________________________________________________________________________
26
RootGM::Box::Box
(
const
std::string& name,
double
hx,
double
hy,
double
hz)
27
:
VGM
::ISolid(),
28
VGM
::IBox(),
29
BaseVGM
::
VBox
(),
30
fBox(new TGeoBBox(name.data(), hx /
RootGM
::
Units
::Length(),
31
hy /
RootGM
::
Units
::Length(), hz /
RootGM
::
Units
::Length()))
32
{
37
38
RootGM::SolidMap::Instance
()->
AddSolid
(
this
, fBox);
39
}
40
41
//_____________________________________________________________________________
42
RootGM::Box::Box
(TGeoBBox* box,
bool
addInMap)
43
:
VGM
::ISolid(),
VGM
::IBox(),
BaseVGM
::
VBox
(), fBox(box)
44
{
46
47
if
(addInMap)
RootGM::SolidMap::Instance
()->AddSolid(
this
, fBox);
48
}
49
50
//_____________________________________________________________________________
51
RootGM::Box::Box
() :
VGM
::ISolid(),
VGM
::IBox(),
BaseVGM
::
VBox
()
52
{
54
}
55
56
//_____________________________________________________________________________
57
RootGM::Box::Box
(
const
Box
& rhs)
58
:
VGM
::ISolid(rhs),
VGM
::IBox(rhs),
BaseVGM
::
VBox
(rhs)
59
{
61
}
62
63
//_____________________________________________________________________________
64
RootGM::Box::~Box
()
65
{
66
//
67
}
68
69
//
70
// public methods
71
//
72
73
//_____________________________________________________________________________
74
std::string
RootGM::Box::Name
()
const
{
return
fBox->GetName(); }
75
76
//_____________________________________________________________________________
77
double
RootGM::Box::XHalfLength
()
const
78
{
79
return
fBox->GetDX() *
RootGM::Units::Length
();
80
}
81
82
//_____________________________________________________________________________
83
double
RootGM::Box::YHalfLength
()
const
84
{
85
return
fBox->GetDY() *
RootGM::Units::Length
();
86
}
87
88
//_____________________________________________________________________________
89
double
RootGM::Box::ZHalfLength
()
const
90
{
91
return
fBox->GetDZ() *
RootGM::Units::Length
();
92
}
Units.h
Box.h
SolidMap.h
BaseVGM::VBox::VBox
VBox()
Definition
VBox.cxx:30
RootGM::Box::Box
Box(const std::string &name, double hx, double hy, double hz)
Definition
Box.cxx:26
RootGM::Box::YHalfLength
virtual double YHalfLength() const
Return the half-length along the y axis in mm.
Definition
Box.cxx:83
RootGM::Box::XHalfLength
virtual double XHalfLength() const
Return the half-length along the x axis in mm.
Definition
Box.cxx:77
RootGM::Box::Name
virtual std::string Name() const
Return the name of this solid.
Definition
Box.cxx:74
RootGM::Box::~Box
virtual ~Box()
Definition
Box.cxx:64
RootGM::Box::ZHalfLength
virtual double ZHalfLength() const
Return the half-length along the z axis in mm.
Definition
Box.cxx:89
RootGM::Box::Box
Box()
Definition
Box.cxx:51
RootGM::SolidMap::AddSolid
void AddSolid(VGM::ISolid *, TGeoShape *)
Definition
SolidMap.cxx:59
RootGM::SolidMap::Instance
static SolidMap * Instance()
Definition
SolidMap.cxx:28
RootGM::Units
Conversion from Root physical units to VGM units.
Definition
Units.h:28
RootGM::Units::Length
static double Length()
Return Root length unit in VGM units.
Definition
Units.h:84
BaseVGM
BaseVGM utilities.
Definition
utilities.h:23
RootGM
VGM implementation for Root.
Definition
axis.h:28
VGM
VGM interfaces.
Definition
VMedium.h:28
Generated on
for VGM by
1.17.0