VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
RootGM
source
solids
Para.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 Para
14
// ---------------
15
// VGM implementation for Root para solid.
16
//
17
// Author: Ivana Hrivnacova; IPN Orsay
18
19
#include "
RootGM/solids/Para.h
"
20
#include "
RootGM/common/Units.h
"
21
#include "
RootGM/solids/SolidMap.h
"
22
23
#include "TGeoPara.h"
24
25
//_____________________________________________________________________________
26
RootGM::Para::Para
(
const
std::string& name,
double
dx,
double
dy,
double
dz,
27
double
alpha,
double
theta,
double
phi)
28
:
VGM
::ISolid(),
29
VGM
::IPara(),
30
BaseVGM
::
VPara
(),
31
fPara(new TGeoPara(name.data(), dx /
RootGM
::
Units
::Length(),
32
dy /
RootGM
::
Units
::Length(), dz /
RootGM
::
Units
::Length(),
33
alpha /
RootGM
::
Units
::Angle(), theta /
RootGM
::
Units
::Angle(),
34
phi /
RootGM
::
Units
::Angle()))
35
{
47
48
RootGM::SolidMap::Instance
()->
AddSolid
(
this
, fPara);
49
}
50
51
//_____________________________________________________________________________
52
RootGM::Para::Para
(TGeoPara* para)
53
:
VGM
::ISolid(),
VGM
::IPara(),
BaseVGM
::
VPara
(), fPara(para)
54
{
56
57
RootGM::SolidMap::Instance
()->
AddSolid
(
this
, fPara);
58
}
59
60
//_____________________________________________________________________________
61
RootGM::Para::Para
() :
VGM
::ISolid(),
VGM
::IPara(),
BaseVGM
::
VPara
()
62
{
64
}
65
66
//_____________________________________________________________________________
67
RootGM::Para::Para
(
const
Para
& rhs)
68
:
VGM
::ISolid(rhs),
VGM
::IPara(rhs),
BaseVGM
::
VPara
(rhs)
69
{
71
}
72
73
//_____________________________________________________________________________
74
RootGM::Para::~Para
()
75
{
76
//
77
}
78
79
//_____________________________________________________________________________
80
std::string
RootGM::Para::Name
()
const
{
return
fPara->GetName(); }
81
82
//_____________________________________________________________________________
83
double
RootGM::Para::XHalfLength
()
const
84
{
85
return
fPara->GetX() *
RootGM::Units::Length
();
86
}
87
88
//_____________________________________________________________________________
89
double
RootGM::Para::YHalfLength
()
const
90
{
91
return
fPara->GetY() *
RootGM::Units::Length
();
92
}
93
94
//_____________________________________________________________________________
95
double
RootGM::Para::ZHalfLength
()
const
96
{
97
return
fPara->GetZ() *
RootGM::Units::Length
();
98
}
99
100
//_____________________________________________________________________________
101
double
RootGM::Para::Alpha
()
const
102
{
103
return
fPara->GetAlpha() *
RootGM::Units::Angle
();
104
}
105
106
//_____________________________________________________________________________
107
double
RootGM::Para::Theta
()
const
108
{
109
return
fPara->GetTheta() *
RootGM::Units::Angle
();
110
}
111
112
//_____________________________________________________________________________
113
double
RootGM::Para::Phi
()
const
114
{
115
return
fPara->GetPhi() *
RootGM::Units::Angle
();
116
}
Units.h
Para.h
SolidMap.h
BaseVGM::VPara::VPara
VPara()
Definition
VPara.cxx:30
RootGM::Para::Theta
virtual double Theta() const
Return polar angle of the line joining the centres of the faces at -hz and +hz in deg.
Definition
Para.cxx:107
RootGM::Para::Name
virtual std::string Name() const
Return the name of this solid.
Definition
Para.cxx:80
RootGM::Para::YHalfLength
virtual double YHalfLength() const
Return half-length along the y axis in mm.
Definition
Para.cxx:89
RootGM::Para::~Para
virtual ~Para()
Definition
Para.cxx:74
RootGM::Para::Para
Para()
Definition
Para.cxx:61
RootGM::Para::XHalfLength
virtual double XHalfLength() const
Return half-length along the x axis in mm.
Definition
Para.cxx:83
RootGM::Para::Para
Para(const std::string &name, double dx, double dy, double dz, double alpha, double theta, double phi)
Definition
Para.cxx:26
RootGM::Para::Alpha
virtual double Alpha() const
Return angle formed by the y axis and by the plane joining the centre of the faces parallel to the z-...
Definition
Para.cxx:101
RootGM::Para::Phi
virtual double Phi() const
Return azimuthal angle of the line joining the centres of the faces at -hz and +hz in deg.
Definition
Para.cxx:113
RootGM::Para::ZHalfLength
virtual double ZHalfLength() const
Return half-length along the z axis in mm.
Definition
Para.cxx:95
RootGM::SolidMap::AddSolid
void AddSolid(VGM::ISolid *, TGeoShape *)
Definition
SolidMap.cxx:59
RootGM::SolidMap::Instance
static SolidMap * Instance()
Definition
SolidMap.cxx:28
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