VGM Version 5.3
Loading...
Searching...
No Matches
Ellipsoid.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 Ellipsoid
14// ---------------
15// VGM implementation for Geant4 ellipsoid solid.
16//
17// Author: Ivana Hrivnacova; IPN Orsay
18
19#include "ClhepVGM/Units.h"
20
23
24#include "G4Ellipsoid.hh"
25#include "G4ReflectedSolid.hh"
26
27//_____________________________________________________________________________
28Geant4GM::Ellipsoid::Ellipsoid(const std::string& name, double dx, double dy,
29 double dz, double zBottomCut, double zTopCut)
30 : VGM::ISolid(),
31 VGM::IEllipsoid(),
32 BaseVGM::VEllipsoid(),
33 fEllipsoid(new G4Ellipsoid(name, dx / ClhepVGM::Units::Length(),
34 dy / ClhepVGM::Units::Length(), dz / ClhepVGM::Units::Length(),
35 zBottomCut / ClhepVGM::Units::Length(),
36 zTopCut / ClhepVGM::Units::Length()))
37{
44
45 Geant4GM::SolidMap::Instance()->AddSolid(this, fEllipsoid);
46}
47
48//_____________________________________________________________________________
50 G4Ellipsoid* ellipsoid, G4ReflectedSolid* reflEllipsoid)
51 : VGM::ISolid(),
52 VGM::IEllipsoid(),
53 BaseVGM::VEllipsoid(),
54 fEllipsoid(ellipsoid)
55{
57
58 if (reflEllipsoid)
59 Geant4GM::SolidMap::Instance()->AddSolid(this, reflEllipsoid);
60 else
61 Geant4GM::SolidMap::Instance()->AddSolid(this, ellipsoid);
62}
63
64//_____________________________________________________________________________
66 : VGM::ISolid(), VGM::IEllipsoid(), BaseVGM::VEllipsoid()
67{
69}
70
71//_____________________________________________________________________________
73 : VGM::ISolid(rhs), VGM::IEllipsoid(rhs), BaseVGM::VEllipsoid(rhs)
74{
76}
77
78//_____________________________________________________________________________
83
84//_____________________________________________________________________________
85std::string Geant4GM::Ellipsoid::Name() const { return fEllipsoid->GetName(); }
86
87//_____________________________________________________________________________
89{
90 return fEllipsoid->GetSemiAxisMax(0) * ClhepVGM::Units::Length();
91}
92
93//_____________________________________________________________________________
95{
96 return fEllipsoid->GetSemiAxisMax(1) * ClhepVGM::Units::Length();
97}
98
99//_____________________________________________________________________________
101{
102 return fEllipsoid->GetSemiAxisMax(2) * ClhepVGM::Units::Length();
103}
104
105//_____________________________________________________________________________
107{
108 return fEllipsoid->GetZBottomCut() * ClhepVGM::Units::Length();
109}
110
111//_____________________________________________________________________________
113{
114 return fEllipsoid->GetZTopCut() * ClhepVGM::Units::Length();
115}
static double Length()
Return CLHEP default length unit in VGM units.
Definition Units.cxx:83
VGM implementation for Geant4 ellipsoid solid.
Definition Ellipsoid.h:33
virtual double ZTopCut() const
Return the z top cut in mm.
virtual double XSemiAxis() const
Return the semi-axis of the ellipse along x in mm.
Definition Ellipsoid.cxx:88
virtual std::string Name() const
Return the name of this solid.
Definition Ellipsoid.cxx:85
virtual double YSemiAxis() const
Return the semi-axis of the ellipse along y in mm.
Definition Ellipsoid.cxx:94
virtual double ZBottomCut() const
Return the z bottom cut in mm.
virtual double ZSemiAxis() const
Return the semi-axis of the ellipse along z 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