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 UPolycone
15 // 19.04.13 Marek Gayer
16 // Created from original implementation in Geant4
17 // --------------------------------------------------------------------
20 double UPolycone::GetStartPhi() const
26 double UPolycone::GetEndPhi() const
32 bool UPolycone::IsOpen() const
38 bool UPolycone::IsGeneric() const
44 int UPolycone::GetNumRZCorner() const
50 UPolyconeSideRZ UPolycone::GetCorner(int index) const
52 return corners[index];
56 UPolyconeHistorical* UPolycone::GetOriginalParameters() const
58 return fOriginalParameters;
62 void UPolycone::SetOriginalParameters(UPolyconeHistorical* pars)
65 // UException("UPolycone::SetOriginalParameters()", "GeomSolids0002",
66 // FatalException, "NULL pointer to parameters!");
67 *fOriginalParameters = *pars;
73 void UPolycone::SetOriginalParameters()
75 int numPlanes = (int)numCorner / 2;
77 fOriginalParameters = new UPolyconeHistorical;
79 fOriginalParameters->fZValues.resize(numPlanes);
80 fOriginalParameters->Rmin.resize(numPlanes);
81 fOriginalParameters->Rmax.resize(numPlanes);
83 for (int j = 0; j < numPlanes; j++)
85 fOriginalParameters->fZValues[j] = corners[numPlanes + j].z();
86 fOriginalParameters->Rmax[j] = corners[numPlanes + j].r;
87 fOriginalParameters->Rmin[j] = corners[numPlanes - 1 - j].r;
90 fOriginalParameters->fStartAngle = startPhi;
91 fOriginalParameters->fOpeningAngle = endPhi - startPhi;
92 fOriginalParameters->fNumZPlanes = numPlanes;