VGM Version 5.3
Loading...
Searching...
No Matches
EllipticalTube.cxx
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The RootGM 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 Root elliptical tube solid.
16//
17// Author: Ivana Hrivnacova; IPN Orsay
18
20#include "RootGM/common/Units.h"
22
23#include "TGeoEltu.h"
24
25//_____________________________________________________________________________
27 const std::string& name, double dx, double dy, double hz)
28 : VGM::ISolid(),
29 VGM::IEllipticalTube(),
30 BaseVGM::VEllipticalTube(),
31 fEllipticalTube(new TGeoEltu(name.data(), dx / RootGM::Units::Length(),
32 dy / RootGM::Units::Length(), hz / RootGM::Units::Length()))
33{
38
39 RootGM::SolidMap::Instance()->AddSolid(this, fEllipticalTube);
40}
41
42//_____________________________________________________________________________
44 : VGM::ISolid(),
45 VGM::IEllipticalTube(),
46 BaseVGM::VEllipticalTube(),
47 fEllipticalTube(eltu)
48{
50
51 RootGM::SolidMap::Instance()->AddSolid(this, fEllipticalTube);
52}
53
54//_____________________________________________________________________________
56 : VGM::ISolid(), VGM::IEllipticalTube(), BaseVGM::VEllipticalTube()
57{
59}
60
61//_____________________________________________________________________________
63 : VGM::ISolid(rhs), VGM::IEllipticalTube(rhs), BaseVGM::VEllipticalTube(rhs)
64{
66}
67
68//_____________________________________________________________________________
73
74//_____________________________________________________________________________
76{
77 return fEllipticalTube->GetName();
78}
79
80//_____________________________________________________________________________
82{
83 return fEllipticalTube->GetA() * RootGM::Units::Length();
84}
85
86//_____________________________________________________________________________
88{
89 return fEllipticalTube->GetB() * RootGM::Units::Length();
90}
91
92//_____________________________________________________________________________
94{
95 return fEllipticalTube->GetDz() * RootGM::Units::Length();
96}
VGM implementation for Root elliptical tube solid.
virtual double Dx() const
Return the semi-axis of the ellipse along x in mm.
virtual double Dy() const
Return the semi-axis of the ellipse along y in mm.
virtual std::string Name() const
Return the name of this solid.
virtual double ZHalfLength() const
Return the half-length along the z axis in mm.
void AddSolid(VGM::ISolid *, TGeoShape *)
Definition SolidMap.cxx:59
static SolidMap * Instance()
Definition SolidMap.cxx:28
Conversion from Root physical units to VGM units.
Definition Units.h:28
static double Length()
Return Root length unit in VGM units.
Definition Units.h:84
BaseVGM utilities.
Definition utilities.h:23
VGM implementation for Root.
Definition axis.h:28
VGM interfaces.
Definition VMedium.h:28