VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
Geant4GM
source
solids
Tubs.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 Tubs
14
// ---------------
15
// VGM implementation for Geant4 tubs solid.
16
//
17
// Author: Ivana Hrivnacova; IPN Orsay
18
19
#include "
ClhepVGM/Units.h
"
20
21
#include "
Geant4GM/solids/SolidMap.h
"
22
#include "
Geant4GM/solids/Tubs.h
"
23
24
#include "G4ReflectedSolid.hh"
25
#include "G4Tubs.hh"
26
27
//_____________________________________________________________________________
28
Geant4GM::Tubs::Tubs
(
const
std::string& name,
double
rin,
double
rout,
29
double
hz,
double
sphi,
double
dphi)
30
:
VGM
::ISolid(),
31
VGM
::ITubs(),
32
BaseVGM
::
VTubs
(),
33
fTubs(new G4Tubs(name, rin /
ClhepVGM
::Units::Length(),
34
rout /
ClhepVGM
::Units::Length(), hz /
ClhepVGM
::Units::Length(),
35
sphi /
ClhepVGM
::Units::Angle(), dphi /
ClhepVGM
::Units::Angle()))
36
{
43
44
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, fTubs);
45
}
46
47
//_____________________________________________________________________________
48
Geant4GM::Tubs::Tubs
(G4Tubs* tubs, G4ReflectedSolid* reflTubs)
49
:
VGM
::ISolid(),
VGM
::ITubs(),
BaseVGM
::
VTubs
(), fTubs(tubs)
50
{
52
53
if
(reflTubs)
54
Geant4GM::SolidMap::Instance
()->AddSolid(
this
, reflTubs);
55
else
56
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, tubs);
57
}
58
59
//_____________________________________________________________________________
60
Geant4GM::Tubs::Tubs
() :
VGM
::ISolid(),
VGM
::ITubs(),
BaseVGM
::
VTubs
()
61
{
63
}
64
65
//_____________________________________________________________________________
66
Geant4GM::Tubs::Tubs
(
const
Tubs
& rhs)
67
:
VGM
::ISolid(rhs),
VGM
::ITubs(rhs),
BaseVGM
::
VTubs
(rhs)
68
{
70
}
71
72
//_____________________________________________________________________________
73
Geant4GM::Tubs::~Tubs
()
74
{
75
//
76
}
77
78
//_____________________________________________________________________________
79
std::string
Geant4GM::Tubs::Name
()
const
{
return
fTubs->GetName(); }
80
81
//_____________________________________________________________________________
82
double
Geant4GM::Tubs::InnerRadius
()
const
83
{
84
return
fTubs->GetInnerRadius() *
ClhepVGM::Units::Length
();
85
}
86
87
//_____________________________________________________________________________
88
double
Geant4GM::Tubs::OuterRadius
()
const
89
{
90
return
fTubs->GetOuterRadius() *
ClhepVGM::Units::Length
();
91
}
92
93
//_____________________________________________________________________________
94
double
Geant4GM::Tubs::ZHalfLength
()
const
95
{
96
return
fTubs->GetZHalfLength() *
ClhepVGM::Units::Length
();
97
}
98
99
//_____________________________________________________________________________
100
double
Geant4GM::Tubs::StartPhi
()
const
101
{
102
return
fTubs->GetStartPhiAngle() *
ClhepVGM::Units::Angle
();
103
}
104
105
//_____________________________________________________________________________
106
double
Geant4GM::Tubs::DeltaPhi
()
const
107
{
108
return
fTubs->GetDeltaPhiAngle() *
ClhepVGM::Units::Angle
();
109
}
Units.h
SolidMap.h
Tubs.h
BaseVGM::VTubs::VTubs
VTubs()
Definition
VTubs.cxx:30
ClhepVGM::Units::Length
static double Length()
Return CLHEP default length unit in VGM units.
Definition
Units.cxx:83
ClhepVGM::Units::Angle
static double Angle()
Return CLHEP default angle unit in VGM units.
Definition
Units.cxx:92
Geant4GM::SolidMap::Instance
static SolidMap * Instance()
Definition
SolidMap.cxx:28
Geant4GM::SolidMap::AddSolid
void AddSolid(VGM::ISolid *, G4VSolid *)
Definition
SolidMap.cxx:59
Geant4GM::Tubs::Tubs
Tubs(const std::string &name, double rin, double rout, double hz, double sphi, double dphi)
Definition
Tubs.cxx:28
Geant4GM::Tubs::Name
virtual std::string Name() const
Return the name of this solid.
Definition
Tubs.cxx:79
Geant4GM::Tubs::Tubs
Tubs()
Definition
Tubs.cxx:60
Geant4GM::Tubs::OuterRadius
virtual double OuterRadius() const
Return the outside radius in mm.
Definition
Tubs.cxx:88
Geant4GM::Tubs::DeltaPhi
virtual double DeltaPhi() const
Return the opening angle of the segment in deg.
Definition
Tubs.cxx:106
Geant4GM::Tubs::ZHalfLength
virtual double ZHalfLength() const
Return the half-length along the z axis in m.
Definition
Tubs.cxx:94
Geant4GM::Tubs::InnerRadius
virtual double InnerRadius() const
Return the inside radius in mm.
Definition
Tubs.cxx:82
Geant4GM::Tubs::~Tubs
virtual ~Tubs()
Definition
Tubs.cxx:73
Geant4GM::Tubs::StartPhi
virtual double StartPhi() const
Return the starting angle of the segment in deg.
Definition
Tubs.cxx:100
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