VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
Geant4GM
source
solids
Hype.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 Hype
14
// -----------------
15
// VGM implementation for Geant4 hyperboloid solid.
16
// If reflected, the parameters are not changed.
17
//
18
// Author: Ivana Hrivnacova; IPN Orsay
19
20
#include "
ClhepVGM/Units.h
"
21
22
#include "
Geant4GM/solids/Hype.h
"
23
#include "
Geant4GM/solids/SolidMap.h
"
24
25
#include "G4Hype.hh"
26
#include "G4ReflectedSolid.hh"
27
28
//_____________________________________________________________________________
29
Geant4GM::Hype::Hype
(
const
std::string& name,
double
r1,
double
r2,
30
double
stereo1,
double
stereo2,
double
hz)
31
:
VGM
::ISolid(),
32
VGM
::IHype(),
33
BaseVGM
::
VHype
(),
34
fHype(new G4Hype(name, r1 /
ClhepVGM
::Units::Length(),
35
r2 /
ClhepVGM
::Units::Length(), stereo1 /
ClhepVGM
::Units::Angle(),
36
stereo2 /
ClhepVGM
::Units::Angle(), hz /
ClhepVGM
::Units::Length()))
37
{
45
46
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, fHype);
47
}
48
49
//_____________________________________________________________________________
50
Geant4GM::Hype::Hype
(G4Hype* hype, G4ReflectedSolid* reflHype)
51
:
VGM
::ISolid(),
VGM
::IHype(),
BaseVGM
::
VHype
(), fHype(hype)
52
{
54
55
if
(reflHype) {
56
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, reflHype);
57
}
58
else
59
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, hype);
60
}
61
62
//_____________________________________________________________________________
63
Geant4GM::Hype::Hype
() :
VGM
::ISolid(),
VGM
::IHype(),
BaseVGM
::
VHype
()
64
{
66
}
67
68
//_____________________________________________________________________________
69
Geant4GM::Hype::Hype
(
const
Hype
& rhs)
70
:
VGM
::ISolid(rhs),
VGM
::IHype(rhs),
BaseVGM
::
VHype
(rhs)
71
{
73
}
74
75
//_____________________________________________________________________________
76
Geant4GM::Hype::~Hype
()
77
{
78
//
79
}
80
81
//_____________________________________________________________________________
82
std::string
Geant4GM::Hype::Name
()
const
{
return
fHype->GetName(); }
83
84
//_____________________________________________________________________________
85
double
Geant4GM::Hype::InnerRadius
()
const
86
{
87
return
fHype->GetInnerRadius() *
ClhepVGM::Units::Length
();
88
}
89
90
//_____________________________________________________________________________
91
double
Geant4GM::Hype::InnerStereoAngle
()
const
92
{
93
return
fHype->GetInnerStereo() *
ClhepVGM::Units::Angle
();
94
}
95
96
//_____________________________________________________________________________
97
double
Geant4GM::Hype::OuterRadius
()
const
98
{
99
return
fHype->GetOuterRadius() *
ClhepVGM::Units::Length
();
100
}
101
102
//_____________________________________________________________________________
103
double
Geant4GM::Hype::OuterStereoAngle
()
const
104
{
105
return
fHype->GetOuterStereo() *
ClhepVGM::Units::Angle
();
106
}
107
108
//_____________________________________________________________________________
109
double
Geant4GM::Hype::ZHalfLength
()
const
110
{
111
return
fHype->GetZHalfLength() *
ClhepVGM::Units::Length
();
112
}
Units.h
Hype.h
SolidMap.h
BaseVGM::VHype::VHype
VHype()
Definition
VHype.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::Hype::ZHalfLength
virtual double ZHalfLength() const
Return the half-length along the z axis in mm.
Definition
Hype.cxx:109
Geant4GM::Hype::OuterStereoAngle
virtual double OuterStereoAngle() const
Return the inner stereo angle.
Definition
Hype.cxx:103
Geant4GM::Hype::Name
virtual std::string Name() const
Return the name of this solid.
Definition
Hype.cxx:82
Geant4GM::Hype::InnerStereoAngle
virtual double InnerStereoAngle() const
Return the inner stereo angle.
Definition
Hype.cxx:91
Geant4GM::Hype::~Hype
virtual ~Hype()
Definition
Hype.cxx:76
Geant4GM::Hype::Hype
Hype(const std::string &name, double r1, double r2, double stereo1, double stereo2, double hz)
Definition
Hype.cxx:29
Geant4GM::Hype::InnerRadius
virtual double InnerRadius() const
Return the inner radius in mm.
Definition
Hype.cxx:85
Geant4GM::Hype::OuterRadius
virtual double OuterRadius() const
Return the outer radius in mm.
Definition
Hype.cxx:97
Geant4GM::Hype::Hype
Hype()
Definition
Hype.cxx:63
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