VGM Version 5.3
Loading...
Searching...
No Matches
EllipticalTube.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 EllipticalTube
14// --------------------
15// VGM implementation for Geant4 elliptical tube solid.
16//
17// Author: Ivana Hrivnacova; IPN Orsay
18
19#include "ClhepVGM/Units.h"
20
23
24#include "G4EllipticalTube.hh"
25#include "G4ReflectedSolid.hh"
26
27#
28//_____________________________________________________________________________
30 const std::string& name, double dx, double dy, double hz)
31 : VGM::ISolid(),
32 VGM::IEllipticalTube(),
33 BaseVGM::VEllipticalTube(),
34 fEllipticalTube(new G4EllipticalTube(name, dx / ClhepVGM::Units::Length(),
35 dy / ClhepVGM::Units::Length(), hz / ClhepVGM::Units::Length()))
36{
41
42 Geant4GM::SolidMap::Instance()->AddSolid(this, fEllipticalTube);
43}
44
45//_____________________________________________________________________________
47 G4EllipticalTube* eltu, G4ReflectedSolid* reflEltu)
48 : VGM::ISolid(),
49 VGM::IEllipticalTube(),
50 BaseVGM::VEllipticalTube(),
51 fEllipticalTube(eltu)
52{
54
55 if (reflEltu)
56 Geant4GM::SolidMap::Instance()->AddSolid(this, reflEltu);
57 else
59}
60
61//_____________________________________________________________________________
63 : VGM::ISolid(), VGM::IEllipticalTube(), BaseVGM::VEllipticalTube()
64{
66}
67
68//_____________________________________________________________________________
70 : VGM::ISolid(rhs), VGM::IEllipticalTube(rhs), BaseVGM::VEllipticalTube(rhs)
71{
73}
74
75//_____________________________________________________________________________
80
81//_____________________________________________________________________________
83{
84 return fEllipticalTube->GetName();
85}
86
87//_____________________________________________________________________________
89{
90 return fEllipticalTube->GetDx() * ClhepVGM::Units::Length();
91}
92
93//_____________________________________________________________________________
95{
96 return fEllipticalTube->GetDy() * ClhepVGM::Units::Length();
97}
98
99//_____________________________________________________________________________
101{
102 return fEllipticalTube->GetDz() * ClhepVGM::Units::Length();
103}
static double Length()
Return CLHEP default length unit in VGM units.
Definition Units.cxx:83
VGM implementation for Geant4 elliptical tube solid.
virtual double Dy() const
Return the semi-axis of the ellipse along y in mm.
virtual double ZHalfLength() const
Return the half-length along the z axis in mm.
virtual std::string Name() const
Return the name of this solid.
virtual double Dx() const
Return the semi-axis of the ellipse along x in mm.
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