VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
Geant4GM
source
solids
Paraboloid.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 Paraboloid
14
// -----------------
15
// VGM implementation for Geant4 paraboloid solid.
16
// If reflected, the parameters are changed as follows:
17
// r1 --> r2'
18
// r2 --> r1'
19
//
20
// Author: Ivana Hrivnacova; IPN Orsay
21
22
#include "
ClhepVGM/Units.h
"
23
24
#include "
Geant4GM/solids/Paraboloid.h
"
25
#include "
Geant4GM/solids/SolidMap.h
"
26
27
#include "G4Paraboloid.hh"
28
#include "G4ReflectedSolid.hh"
29
30
//_____________________________________________________________________________
31
Geant4GM::Paraboloid::Paraboloid
(
32
const
std::string& name,
double
r1,
double
r2,
double
hz)
33
:
VGM
::ISolid(),
34
VGM
::IParaboloid(),
35
BaseVGM
::
VParaboloid
(),
36
fIsReflected(false),
37
fParaboloid(0)
38
{
43
44
if
(r2 > r1) {
45
fParaboloid =
new
G4Paraboloid(name, hz /
ClhepVGM::Units::Length
(),
46
r1 /
ClhepVGM::Units::Length
(), r2 /
ClhepVGM::Units::Length
());
47
fIsReflected =
false
;
48
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, fParaboloid);
49
}
50
else
{
51
fParaboloid =
new
G4Paraboloid(name, hz /
ClhepVGM::Units::Length
(),
52
r2 /
ClhepVGM::Units::Length
(), r1 /
ClhepVGM::Units::Length
());
53
54
G4ReflectedSolid* reflParaboloid =
55
new
G4ReflectedSolid(name, fParaboloid, G4ReflectZ3D());
56
57
fIsReflected =
true
;
58
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, reflParaboloid);
59
}
60
}
61
62
//_____________________________________________________________________________
63
Geant4GM::Paraboloid::Paraboloid
(
64
G4Paraboloid* paraboloid, G4ReflectedSolid* reflParaboloid)
65
:
VGM
::ISolid(),
66
VGM
::IParaboloid(),
67
BaseVGM
::
VParaboloid
(),
68
fIsReflected(false),
69
fParaboloid(paraboloid)
70
{
72
73
if
(reflParaboloid) {
74
fIsReflected =
true
;
75
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, reflParaboloid);
76
}
77
else
78
Geant4GM::SolidMap::Instance
()->
AddSolid
(
this
, paraboloid);
79
}
80
81
//_____________________________________________________________________________
82
Geant4GM::Paraboloid::Paraboloid
()
83
:
VGM
::ISolid(),
VGM
::IParaboloid(),
BaseVGM
::
VParaboloid
()
84
{
86
}
87
88
//_____________________________________________________________________________
89
Geant4GM::Paraboloid::Paraboloid
(
const
Paraboloid
& rhs)
90
:
VGM
::ISolid(rhs),
VGM
::IParaboloid(rhs),
BaseVGM
::
VParaboloid
(rhs)
91
{
93
}
94
95
//_____________________________________________________________________________
96
Geant4GM::Paraboloid::~Paraboloid
()
97
{
98
//
99
}
100
101
//_____________________________________________________________________________
102
std::string
Geant4GM::Paraboloid::Name
()
const
103
{
104
return
fParaboloid->GetName();
105
}
106
107
//_____________________________________________________________________________
108
double
Geant4GM::Paraboloid::RadiusMinusZ
()
const
109
{
110
if
(!fIsReflected)
111
return
fParaboloid->GetRadiusMinusZ() *
ClhepVGM::Units::Length
();
112
else
113
return
fParaboloid->GetRadiusPlusZ() *
ClhepVGM::Units::Length
();
114
}
115
116
//_____________________________________________________________________________
117
double
Geant4GM::Paraboloid::RadiusPlusZ
()
const
118
{
119
if
(!fIsReflected)
120
return
fParaboloid->GetRadiusPlusZ() *
ClhepVGM::Units::Length
();
121
else
122
return
fParaboloid->GetRadiusMinusZ() *
ClhepVGM::Units::Length
();
123
}
124
125
//_____________________________________________________________________________
126
double
Geant4GM::Paraboloid::ZHalfLength
()
const
127
{
128
return
fParaboloid->GetZHalfLength() *
ClhepVGM::Units::Length
();
129
}
Units.h
Paraboloid.h
SolidMap.h
BaseVGM::VParaboloid::VParaboloid
VParaboloid()
Definition
VParaboloid.cxx:30
ClhepVGM::Units::Length
static double Length()
Return CLHEP default length unit in VGM units.
Definition
Units.cxx:83
Geant4GM::Paraboloid::Paraboloid
Paraboloid(const std::string &name, double r1, double r2, double hz)
Definition
Paraboloid.cxx:31
Geant4GM::Paraboloid::~Paraboloid
virtual ~Paraboloid()
Definition
Paraboloid.cxx:96
Geant4GM::Paraboloid::Paraboloid
Paraboloid()
Definition
Paraboloid.cxx:82
Geant4GM::Paraboloid::RadiusMinusZ
virtual double RadiusMinusZ() const
Return the radius at -z in mm.
Definition
Paraboloid.cxx:108
Geant4GM::Paraboloid::ZHalfLength
virtual double ZHalfLength() const
Return the half-length along the z axis in mm.
Definition
Paraboloid.cxx:126
Geant4GM::Paraboloid::Name
virtual std::string Name() const
Return the name of this solid.
Definition
Paraboloid.cxx:102
Geant4GM::Paraboloid::RadiusPlusZ
virtual double RadiusPlusZ() const
Return the radius at +z in mm.
Definition
Paraboloid.cxx:117
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
VGM
VGM interfaces.
Definition
VMedium.h:28
Generated on
for VGM by
1.17.0