File indexing completed on 2025-01-18 10:11:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGeoHype
0013 #define ROOT_TGeoHype
0014
0015 #include "TGeoTube.h"
0016
0017 class TGeoHype : public TGeoTube {
0018 protected:
0019
0020
0021
0022
0023 Double_t fStIn;
0024 Double_t fStOut;
0025
0026 private:
0027
0028 Double_t fTin;
0029 Double_t fTout;
0030 Double_t fTinsq;
0031 Double_t fToutsq;
0032
0033 TGeoHype(const TGeoHype &) = delete;
0034 TGeoHype &operator=(const TGeoHype &) = delete;
0035
0036 public:
0037
0038 TGeoHype();
0039 TGeoHype(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz);
0040 TGeoHype(const char *name, Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz);
0041 TGeoHype(Double_t *params);
0042
0043 ~TGeoHype() override;
0044
0045
0046 Double_t Capacity() const override;
0047 void ComputeBBox() override;
0048 void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) override;
0049 void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize) override;
0050 Bool_t Contains(const Double_t *point) const override;
0051 void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const override;
0052 Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact = 1, Double_t step = TGeoShape::Big(),
0053 Double_t *safe = nullptr) const override;
0054 void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize,
0055 Double_t *step) const override;
0056 Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact = 1,
0057 Double_t step = TGeoShape::Big(), Double_t *safe = nullptr) const override;
0058 void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize,
0059 Double_t *step) const override;
0060 Int_t DistToHype(const Double_t *point, const Double_t *dir, Double_t *s, Bool_t inner, Bool_t in) const;
0061 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0062 TGeoVolume *
0063 Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) override;
0064 Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const override;
0065 void GetBoundingCylinder(Double_t *param) const override;
0066 const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override;
0067 Int_t GetByteCount() const override { return 64; }
0068 Bool_t GetPointsOnSegments(Int_t , Double_t * ) const override { return kFALSE; }
0069 TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const override;
0070 void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const override;
0071 Int_t GetNmeshVertices() const override;
0072 Double_t GetStIn() const { return fStIn; }
0073 Double_t GetStOut() const { return fStOut; }
0074 Bool_t HasInner() const { return !TestShapeBit(kGeoRSeg); }
0075 Double_t RadiusHypeSq(Double_t z, Bool_t inner) const;
0076 Double_t ZHypeSq(Double_t r, Bool_t inner) const;
0077 void InspectShape() const override;
0078 Bool_t IsCylType() const override { return kTRUE; }
0079 TBuffer3D *MakeBuffer3D() const override;
0080
0081 Double_t Safety(const Double_t *point, Bool_t in = kTRUE) const override;
0082 void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const override;
0083 Double_t SafetyToHype(const Double_t *point, Bool_t inner, Bool_t in) const;
0084 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0085 void SetHypeDimensions(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz);
0086 void SetDimensions(Double_t *param) override;
0087 void SetPoints(Double_t *points) const override;
0088 void SetPoints(Float_t *points) const override;
0089 void SetSegsAndPols(TBuffer3D &buff) const override;
0090 void Sizeof3D() const override;
0091
0092 ClassDefOverride(TGeoHype, 1)
0093 };
0094
0095 #endif