2 // ********************************************************************
3 // * This Software is part of the AIDA Unified Solids Library package *
4 // * See: https://aidasoft.web.cern.ch/USolids *
5 // ********************************************************************
9 // --------------------------------------------------------------------
13 // Implementation of inline methods of UPolyhedra
15 // 19.09.13 Marek Gayer
16 // Created from original implementation in Geant4
17 // --------------------------------------------------------------------
20 int UPolyhedra::GetNumSide() const
26 double UPolyhedra::GetStartPhi() const
32 double UPolyhedra::GetEndPhi() const
38 bool UPolyhedra::IsOpen() const
44 bool UPolyhedra::IsGeneric() const
50 int UPolyhedra::GetNumRZCorner() const
56 UPolyhedraSideRZ UPolyhedra::GetCorner(const int index) const
58 return fCorners[index];
62 UPolyhedraHistorical* UPolyhedra::GetOriginalParameters()
64 return &fOriginalParameters;
68 void UPolyhedra::SetOriginalParameters(UPolyhedraHistorical& pars)
70 fOriginalParameters = pars;
75 void UPolyhedra::SetOriginalParameters()
77 int fNumPlanes = (int) fNumCorner / 2;
79 fOriginalParameters.fZValues.resize(fNumPlanes);
80 fOriginalParameters.Rmin.resize(fNumPlanes);
81 fOriginalParameters.Rmax.resize(fNumPlanes);
83 for (int j = 0; j < fNumPlanes; j++)
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;
90 fOriginalParameters.fStartAngle = fStartPhi;
91 fOriginalParameters.fOpeningAngle = fEndPhi - fStartPhi;
92 fOriginalParameters.fNumZPlanes = fNumPlanes;
93 fOriginalParameters.fNumSide = fNumSides;