VGM Version 5.3
Loading...
Searching...
No Matches
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"
22
23#include "TGeoPara.h"
24
25//_____________________________________________________________________________
26RootGM::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
49}
50
51//_____________________________________________________________________________
52RootGM::Para::Para(TGeoPara* para)
53 : VGM::ISolid(), VGM::IPara(), BaseVGM::VPara(), fPara(para)
54{
56
58}
59
60//_____________________________________________________________________________
61RootGM::Para::Para() : VGM::ISolid(), VGM::IPara(), BaseVGM::VPara()
62{
64}
65
66//_____________________________________________________________________________
68 : VGM::ISolid(rhs), VGM::IPara(rhs), BaseVGM::VPara(rhs)
69{
71}
72
73//_____________________________________________________________________________
75{
76 //
77}
78
79//_____________________________________________________________________________
80std::string RootGM::Para::Name() const { return fPara->GetName(); }
81
82//_____________________________________________________________________________
84{
85 return fPara->GetX() * RootGM::Units::Length();
86}
87
88//_____________________________________________________________________________
90{
91 return fPara->GetY() * RootGM::Units::Length();
92}
93
94//_____________________________________________________________________________
96{
97 return fPara->GetZ() * RootGM::Units::Length();
98}
99
100//_____________________________________________________________________________
102{
103 return fPara->GetAlpha() * RootGM::Units::Angle();
104}
105
106//_____________________________________________________________________________
108{
109 return fPara->GetTheta() * RootGM::Units::Angle();
110}
111
112//_____________________________________________________________________________
113double RootGM::Para::Phi() const
114{
115 return fPara->GetPhi() * RootGM::Units::Angle();
116}
VGM implementation for Root para solid.
Definition Para.h:32
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
virtual std::string Name() const
Return the name of this solid.
Definition Para.cxx:80
virtual double YHalfLength() const
Return half-length along the y axis in mm.
Definition Para.cxx:89
virtual ~Para()
Definition Para.cxx:74
virtual double XHalfLength() const
Return half-length along the x axis in mm.
Definition Para.cxx:83
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
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
virtual double ZHalfLength() const
Return half-length along the z axis in mm.
Definition Para.cxx:95
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
static double Angle()
Return Root angle unit in VGM units.
Definition Units.h:85
BaseVGM utilities.
Definition utilities.h:23
VGM implementation for Root.
Definition axis.h:28
VGM interfaces.
Definition VMedium.h:28