VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
RootGM
source
solids
Sphere.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 Sphere
14
// ---------------
15
// VGM implementation for Root sphere solid.
16
//
17
// Author: Ivana Hrivnacova; IPN Orsay
18
19
#include "
RootGM/solids/Sphere.h
"
20
#include "
RootGM/common/Units.h
"
21
#include "
RootGM/solids/SolidMap.h
"
22
23
#include "TGeoSphere.h"
24
25
//_____________________________________________________________________________
26
RootGM::Sphere::Sphere
(
const
std::string& name,
double
rin,
double
rout,
27
double
sphi,
double
dphi,
double
stheta,
double
dtheta)
28
:
VGM
::ISolid(),
29
VGM
::ISphere(),
30
BaseVGM
::
VSphere
(),
31
fSphere(new TGeoSphere(name.data(), rin /
RootGM
::
Units
::Length(),
32
rout /
RootGM
::
Units
::Length(), stheta /
RootGM
::
Units
::Angle(),
33
(stheta + dtheta) /
RootGM
::
Units
::Angle(), sphi /
RootGM
::
Units
::Angle(),
34
(sphi + dphi) /
RootGM
::
Units
::Angle()))
35
{
43
44
RootGM::SolidMap::Instance
()->
AddSolid
(
this
, fSphere);
45
}
46
47
//_____________________________________________________________________________
48
RootGM::Sphere::Sphere
(TGeoSphere* sphere)
49
:
VGM
::ISolid(),
VGM
::ISphere(),
BaseVGM
::
VSphere
(), fSphere(sphere)
50
{
52
53
RootGM::SolidMap::Instance
()->
AddSolid
(
this
, fSphere);
54
}
55
56
//_____________________________________________________________________________
57
RootGM::Sphere::Sphere
() :
VGM
::ISolid(),
VGM
::ISphere(),
BaseVGM
::
VSphere
()
58
{
60
}
61
62
//_____________________________________________________________________________
63
RootGM::Sphere::Sphere
(
const
Sphere
& rhs)
64
:
VGM
::ISolid(rhs),
VGM
::ISphere(rhs),
BaseVGM
::
VSphere
(rhs)
65
{
67
}
68
69
//_____________________________________________________________________________
70
RootGM::Sphere::~Sphere
()
71
{
72
//
73
}
74
75
//_____________________________________________________________________________
76
std::string
RootGM::Sphere::Name
()
const
{
return
fSphere->GetName(); }
77
78
//_____________________________________________________________________________
79
double
RootGM::Sphere::InnerRadius
()
const
80
{
81
return
fSphere->GetRmin() *
RootGM::Units::Length
();
82
}
83
84
//_____________________________________________________________________________
85
double
RootGM::Sphere::OuterRadius
()
const
86
{
87
return
fSphere->GetRmax() *
RootGM::Units::Length
();
88
}
89
90
//_____________________________________________________________________________
91
double
RootGM::Sphere::StartPhi
()
const
92
{
93
return
fSphere->GetPhi1() *
RootGM::Units::Angle
();
94
}
95
96
//_____________________________________________________________________________
97
double
RootGM::Sphere::DeltaPhi
()
const
98
{
99
return
(fSphere->GetPhi2() - fSphere->GetPhi1()) *
RootGM::Units::Angle
();
100
}
101
102
//_____________________________________________________________________________
103
double
RootGM::Sphere::StartTheta
()
const
104
{
105
return
fSphere->GetTheta1() *
RootGM::Units::Angle
();
106
}
107
108
//_____________________________________________________________________________
109
double
RootGM::Sphere::DeltaTheta
()
const
110
{
111
return
(fSphere->GetTheta2() - fSphere->GetTheta1()) *
RootGM::Units::Angle
();
112
}
Units.h
SolidMap.h
Sphere.h
BaseVGM::VSphere::VSphere
VSphere()
Definition
VSphere.cxx:30
RootGM::SolidMap::AddSolid
void AddSolid(VGM::ISolid *, TGeoShape *)
Definition
SolidMap.cxx:59
RootGM::SolidMap::Instance
static SolidMap * Instance()
Definition
SolidMap.cxx:28
RootGM::Sphere::Sphere
Sphere()
Definition
Sphere.cxx:57
RootGM::Sphere::~Sphere
virtual ~Sphere()
Definition
Sphere.cxx:70
RootGM::Sphere::StartTheta
virtual double StartTheta() const
Return the starting polar angle of the segment in deg.
Definition
Sphere.cxx:103
RootGM::Sphere::InnerRadius
virtual double InnerRadius() const
Return the inside radius of the shell in mm.
Definition
Sphere.cxx:79
RootGM::Sphere::Sphere
Sphere(const std::string &name, double rin, double rout, double sphi, double dphi, double stheta, double dtheta)
Definition
Sphere.cxx:26
RootGM::Sphere::OuterRadius
virtual double OuterRadius() const
Return the outside radius of the shell in mm.
Definition
Sphere.cxx:85
RootGM::Sphere::StartPhi
virtual double StartPhi() const
Return the starting azimuthal angle of the segment in deg.
Definition
Sphere.cxx:91
RootGM::Sphere::Name
virtual std::string Name() const
Return the name of this solid.
Definition
Sphere.cxx:76
RootGM::Sphere::DeltaPhi
virtual double DeltaPhi() const
Return the opening azimuthal angle of the segment in deg.
Definition
Sphere.cxx:97
RootGM::Sphere::DeltaTheta
virtual double DeltaTheta() const
Return the opening polar angle of the segment in deg.
Definition
Sphere.cxx:109
RootGM::Units
Conversion from Root physical units to VGM units.
Definition
Units.h:28
RootGM::Units::Length
static double Length()
Return Root length unit in VGM units.
Definition
Units.h:84
RootGM::Units::Angle
static double Angle()
Return Root angle unit in VGM units.
Definition
Units.h:85
BaseVGM
BaseVGM utilities.
Definition
utilities.h:23
RootGM
VGM implementation for Root.
Definition
axis.h:28
VGM
VGM interfaces.
Definition
VMedium.h:28
Generated on
for VGM by
1.17.0