Warning, file /include/root/TGeoBBox.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGeoBBox
0013 #define ROOT_TGeoBBox
0014
0015 #include "TGeoShape.h"
0016
0017 class TGeoBBox : public TGeoShape {
0018 protected:
0019
0020 Double_t fDX;
0021 Double_t fDY;
0022 Double_t fDZ;
0023 Double_t fOrigin[3];
0024
0025 void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections, Bool_t localFrame) const override;
0026
0027 TGeoBBox(const TGeoBBox &) = delete;
0028 TGeoBBox &operator=(const TGeoBBox &) = delete;
0029
0030 public:
0031
0032 TGeoBBox();
0033 TGeoBBox(Double_t dx, Double_t dy, Double_t dz, Double_t *origin = nullptr);
0034 TGeoBBox(const char *name, Double_t dx, Double_t dy, Double_t dz, Double_t *origin = nullptr);
0035 TGeoBBox(Double_t *param);
0036
0037 ~TGeoBBox() override;
0038
0039 static Bool_t
0040 AreOverlapping(const TGeoBBox *box1, const TGeoMatrix *mat1, const TGeoBBox *box2, const TGeoMatrix *mat2)
0041 R__DEPRECATED(6, 34, "DEPRECATED, DO NOT USE ! The overlap detection does not work for all cases");
0042
0043 Double_t Capacity() const override;
0044 void ComputeBBox() override;
0045 void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) override;
0046 void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize) override;
0047 Bool_t Contains(const Double_t *point) const override;
0048 void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const override;
0049 static Bool_t Contains(const Double_t *point, Double_t dx, Double_t dy, Double_t dz, const Double_t *origin);
0050 Bool_t CouldBeCrossed(const Double_t *point, const Double_t *dir) const override;
0051 Int_t DistancetoPrimitive(Int_t px, Int_t py) 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 static Double_t DistFromInside(const Double_t *point, const Double_t *dir, Double_t dx, Double_t dy, Double_t dz,
0057 const Double_t *origin, Double_t stepmax = TGeoShape::Big());
0058 Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact = 1,
0059 Double_t step = TGeoShape::Big(), Double_t *safe = nullptr) const override;
0060 void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize,
0061 Double_t *step) const override;
0062 static Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Double_t dx, Double_t dy, Double_t dz,
0063 const Double_t *origin, Double_t stepmax = TGeoShape::Big());
0064 TGeoVolume *
0065 Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) override;
0066 const char *GetAxisName(Int_t iaxis) const override;
0067 Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const override;
0068 void GetBoundingCylinder(Double_t *param) const override;
0069 const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override;
0070 Int_t GetByteCount() const override { return 36; }
0071 virtual Double_t GetFacetArea(Int_t index = 0) const;
0072 virtual Bool_t GetPointsOnFacet(Int_t index, Int_t npoints, Double_t *array) const;
0073 Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const override;
0074 Int_t
0075 GetFittingBox(const TGeoBBox *parambox, TGeoMatrix *mat, Double_t &dx, Double_t &dy, Double_t &dz) const override;
0076 TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const override;
0077 void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const override;
0078 Int_t GetNmeshVertices() const override { return 8; }
0079 virtual Double_t GetDX() const { return fDX; }
0080 virtual Double_t GetDY() const { return fDY; }
0081 virtual Double_t GetDZ() const { return fDZ; }
0082 virtual const Double_t *GetOrigin() const { return fOrigin; }
0083 void InspectShape() const override;
0084 Bool_t IsCylType() const override { return kFALSE; }
0085 Bool_t IsValidBox() const override { return ((fDX < 0) || (fDY < 0) || (fDZ < 0)) ? kFALSE : kTRUE; }
0086 virtual Bool_t IsNullBox() const { return ((fDX < 1.E-16) && (fDY < 1.E-16) && (fDZ < 1.E-16)) ? kTRUE : kFALSE; }
0087 TBuffer3D *MakeBuffer3D() const override;
0088 Double_t Safety(const Double_t *point, Bool_t in = kTRUE) const override;
0089 void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const override;
0090 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0091 void SetBoxDimensions(Double_t dx, Double_t dy, Double_t dz, Double_t *origin = nullptr);
0092 void SetDimensions(Double_t *param) override;
0093 void SetBoxPoints(Double_t *points) const;
0094 void SetPoints(Double_t *points) const override;
0095 void SetPoints(Float_t *points) const override;
0096 void SetSegsAndPols(TBuffer3D &buffer) const override;
0097 void Sizeof3D() const override;
0098
0099 ClassDefOverride(TGeoBBox, 1)
0100 };
0101
0102 #endif