Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:51

0001 // @(#)root/geom:$Id$
0002 // Author: Mihaela Gheata   20/11/04
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGeoHype
0013 #define ROOT_TGeoHype
0014 
0015 #include "TGeoTube.h"
0016 
0017 class TGeoHype : public TGeoTube {
0018 protected:
0019    // data members inherited from TGeoTube:
0020    //   Double_t              fRmin; // inner radius at z=0
0021    //   Double_t              fRmax; // outer radius at z=0
0022    //   Double_t              fDz;   // half length
0023    Double_t fStIn;  // Stereo angle for inner surface
0024    Double_t fStOut; // Stereo angle for inner surface
0025 
0026 private:
0027    // Precomputed parameters:
0028    Double_t fTin;    // Tangent of stereo angle for inner surface
0029    Double_t fTout;   // Tangent of stereo angle for outer surface
0030    Double_t fTinsq;  // Squared tangent of stereo angle for inner surface
0031    Double_t fToutsq; // Squared tangent of stereo angle for outer surface
0032 
0033    TGeoHype(const TGeoHype &) = delete;
0034    TGeoHype &operator=(const TGeoHype &) = delete;
0035 
0036 public:
0037    // constructors
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    // destructor
0043    ~TGeoHype() override;
0044    // methods
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 /*npoints*/, Double_t * /*array*/) 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    // virtual void          Paint(Option_t *option);
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) // hyperboloid class
0093 };
0094 
0095 #endif