VGM Version 5.3
Loading...
Searching...
No Matches
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
24
25#include "G4Hype.hh"
26#include "G4ReflectedSolid.hh"
27
28//_____________________________________________________________________________
29Geant4GM::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
47}
48
49//_____________________________________________________________________________
50Geant4GM::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
60}
61
62//_____________________________________________________________________________
63Geant4GM::Hype::Hype() : VGM::ISolid(), VGM::IHype(), BaseVGM::VHype()
64{
66}
67
68//_____________________________________________________________________________
70 : VGM::ISolid(rhs), VGM::IHype(rhs), BaseVGM::VHype(rhs)
71{
73}
74
75//_____________________________________________________________________________
77{
78 //
79}
80
81//_____________________________________________________________________________
82std::string Geant4GM::Hype::Name() const { return fHype->GetName(); }
83
84//_____________________________________________________________________________
86{
87 return fHype->GetInnerRadius() * ClhepVGM::Units::Length();
88}
89
90//_____________________________________________________________________________
92{
93 return fHype->GetInnerStereo() * ClhepVGM::Units::Angle();
94}
95
96//_____________________________________________________________________________
98{
99 return fHype->GetOuterRadius() * ClhepVGM::Units::Length();
100}
101
102//_____________________________________________________________________________
104{
105 return fHype->GetOuterStereo() * ClhepVGM::Units::Angle();
106}
107
108//_____________________________________________________________________________
110{
111 return fHype->GetZHalfLength() * ClhepVGM::Units::Length();
112}
static double Length()
Return CLHEP default length unit in VGM units.
Definition Units.cxx:83
static double Angle()
Return CLHEP default angle unit in VGM units.
Definition Units.cxx:92
VGM implementation for Geant4 hyperboloid solid.
Definition Hype.h:33
virtual double ZHalfLength() const
Return the half-length along the z axis in mm.
Definition Hype.cxx:109
virtual double OuterStereoAngle() const
Return the inner stereo angle.
Definition Hype.cxx:103
virtual std::string Name() const
Return the name of this solid.
Definition Hype.cxx:82
virtual double InnerStereoAngle() const
Return the inner stereo angle.
Definition Hype.cxx:91
virtual ~Hype()
Definition Hype.cxx:76
virtual double InnerRadius() const
Return the inner radius in mm.
Definition Hype.cxx:85
virtual double OuterRadius() const
Return the outer radius in mm.
Definition Hype.cxx:97
static SolidMap * Instance()
Definition SolidMap.cxx:28
void AddSolid(VGM::ISolid *, G4VSolid *)
Definition SolidMap.cxx:59
BaseVGM utilities.
Definition utilities.h:23
ClhepVGM utilities.
Definition transform.h:29
VGM interfaces.
Definition VMedium.h:28