Geant4  10.01.p02
UPolyhedra.icc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * This Software is part of the AIDA Unified Solids Library package *
4 // * See: https://aidasoft.web.cern.ch/USolids *
5 // ********************************************************************
6 //
7 // $Id:$
8 //
9 // --------------------------------------------------------------------
10 //
11 // UPolyhedra.icc
12 //
13 // Implementation of inline methods of UPolyhedra
14 //
15 // 19.09.13 Marek Gayer
16 // Created from original implementation in Geant4
17 // --------------------------------------------------------------------
18 
19 inline
20 int UPolyhedra::GetNumSide() const
21 {
22  return fNumSides;
23 }
24 
25 inline
26 double UPolyhedra::GetStartPhi() const
27 {
28  return fStartPhi;
29 }
30 
31 inline
32 double UPolyhedra::GetEndPhi() const
33 {
34  return fEndPhi;
35 }
36 
37 inline
38 bool UPolyhedra::IsOpen() const
39 {
40  return fPhiIsOpen;
41 }
42 
43 inline
44 bool UPolyhedra::IsGeneric() const
45 {
46  return fGenericPgon;
47 }
48 
49 inline
50 int UPolyhedra::GetNumRZCorner() const
51 {
52  return fNumCorner;
53 }
54 
55 inline
56 UPolyhedraSideRZ UPolyhedra::GetCorner(const int index) const
57 {
58  return fCorners[index];
59 }
60 
61 inline
62 UPolyhedraHistorical* UPolyhedra::GetOriginalParameters()
63 {
64  return &fOriginalParameters;
65 }
66 
67 inline
68 void UPolyhedra::SetOriginalParameters(UPolyhedraHistorical& pars)
69 {
70  fOriginalParameters = pars;
71  fCubicVolume = 0.;
72 }
73 
74 inline
75 void UPolyhedra::SetOriginalParameters()
76 {
77  int fNumPlanes = (int) fNumCorner / 2;
78 
79  fOriginalParameters.fZValues.resize(fNumPlanes);
80  fOriginalParameters.Rmin.resize(fNumPlanes);
81  fOriginalParameters.Rmax.resize(fNumPlanes);
82 
83  for (int j = 0; j < fNumPlanes; j++)
84  {
85  fOriginalParameters.fZValues[j] = fCorners[fNumPlanes + j].z;
86  fOriginalParameters.Rmax[j] = fCorners[fNumPlanes + j].r;
87  fOriginalParameters.Rmin[j] = fCorners[fNumPlanes - 1 - j].r;
88  }
89 
90  fOriginalParameters.fStartAngle = fStartPhi;
91  fOriginalParameters.fOpeningAngle = fEndPhi - fStartPhi;
92  fOriginalParameters.fNumZPlanes = fNumPlanes;
93  fOriginalParameters.fNumSide = fNumSides;
94 
95 }