VGM Version 5.3
Loading...
Searching...
No Matches
Paraboloid.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 Paraboloid
14// -----------------
15// VGM implementation for Root paraboloid solid.
16//
17// Author: Ivana Hrivnacova; IPN Orsay
18
20#include "RootGM/common/Units.h"
22
23#include "TGeoParaboloid.h"
24#include "TGeoShape.h"
25
26//_____________________________________________________________________________
28 const std::string& name, double r1, double r2, double hz)
29 : VGM::ISolid(),
30 VGM::IParaboloid(),
31 BaseVGM::VParaboloid(),
32 fParaboloid(new TGeoParaboloid(name.data(), r1 / RootGM::Units::Length(),
33 r2 / RootGM::Units::Length(), hz / RootGM::Units::Length()))
34{
39
40 RootGM::SolidMap::Instance()->AddSolid(this, fParaboloid);
41}
42
43//_____________________________________________________________________________
44RootGM::Paraboloid::Paraboloid(TGeoParaboloid* paraboloid)
45 : VGM::ISolid(),
46 VGM::IParaboloid(),
47 BaseVGM::VParaboloid(),
48 fParaboloid(paraboloid)
49{
51
52 RootGM::SolidMap::Instance()->AddSolid(this, fParaboloid);
53}
54
55//_____________________________________________________________________________
57 : VGM::ISolid(), VGM::IParaboloid(), BaseVGM::VParaboloid()
58{
60}
61
62//_____________________________________________________________________________
64 : VGM::ISolid(rhs), VGM::IParaboloid(rhs), BaseVGM::VParaboloid(rhs)
65{
67}
68
69//_____________________________________________________________________________
74
75//_____________________________________________________________________________
76std::string RootGM::Paraboloid::Name() const { return fParaboloid->GetName(); }
77
78//_____________________________________________________________________________
80{
81 return fParaboloid->GetRlo() * RootGM::Units::Length();
82}
83
84//_____________________________________________________________________________
86{
87 return fParaboloid->GetRhi() * RootGM::Units::Length();
88}
89
90//_____________________________________________________________________________
92{
93 return fParaboloid->GetDz() * RootGM::Units::Length();
94}
VGM implementation for Root paraboloid solid.
Definition Paraboloid.h:32
virtual double RadiusMinusZ() const
Return the radius at -z in mm.
virtual double RadiusPlusZ() const
Return the radius at +z 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 ~Paraboloid()
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