Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGeoHype.h
Go to the documentation of this file.
1 // @(#)root/geom:$Id$
2 // Author: Mihaela Gheata 20/11/04
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGeoHype
13 #define ROOT_TGeoHype
14 
15 #include "TGeoTube.h"
16 
17 class TGeoHype : public TGeoTube
18 {
19 protected :
20 // data members inherited from TGeoTube:
21 // Double_t fRmin; // inner radius at z=0
22 // Double_t fRmax; // outer radius at z=0
23 // Double_t fDz; // half length
24  Double_t fStIn; // Stereo angle for inner surface
25  Double_t fStOut; // Stereo angle for inner surface
26 
27 private :
28 // Precomputed parameters:
29  Double_t fTin; // Tangent of stereo angle for inner surface
30  Double_t fTout; // Tangent of stereo angle for outer surface
31  Double_t fTinsq; // Squared tangent of stereo angle for inner surface
32  Double_t fToutsq; // Squared tangent of stereo angle for outer surface
33 
34 public:
35  // constructors
36  TGeoHype();
37  TGeoHype(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz);
38  TGeoHype(const char *name, Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz);
39  TGeoHype(Double_t *params);
40  // destructor
41  virtual ~TGeoHype();
42  // methods
43 
44  virtual Double_t Capacity() const;
45  virtual void ComputeBBox();
46  virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
47  virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
48  virtual Bool_t Contains(const Double_t *point) const;
49  virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
50  virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
51  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
52  virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
53  virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
54  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
55  virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
56  Int_t DistToHype(const Double_t *point, const Double_t *dir, Double_t *s, Bool_t inner, Bool_t in) const;
57  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
58  virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
59  Double_t start, Double_t step);
60  virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
61  virtual void GetBoundingCylinder(Double_t *param) const;
62  virtual const TBuffer3D &GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
63  virtual Int_t GetByteCount() const {return 64;}
64  virtual Bool_t GetPointsOnSegments(Int_t /*npoints*/, Double_t * /*array*/) const {return kFALSE;}
65  virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
66  virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const;
67  virtual Int_t GetNmeshVertices() const;
68  Double_t GetStIn() const {return fStIn;}
69  Double_t GetStOut() const {return fStOut;}
70  Bool_t HasInner() const {return !TestShapeBit(kGeoRSeg);}
71  Double_t RadiusHypeSq(Double_t z, Bool_t inner) const;
72  Double_t ZHypeSq(Double_t r, Bool_t inner) const;
73  virtual void InspectShape() const;
74  virtual Bool_t IsCylType() const {return kTRUE;}
75  virtual TBuffer3D *MakeBuffer3D() const;
76  //virtual void Paint(Option_t *option);
77  virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
78  virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
79  Double_t SafetyToHype(const Double_t *point, Bool_t inner, Bool_t in) const;
80  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
81  void SetHypeDimensions(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz);
82  virtual void SetDimensions(Double_t *param);
83  virtual void SetPoints(Double_t *points) const;
84  virtual void SetPoints(Float_t *points) const;
85  virtual void SetSegsAndPols(TBuffer3D &buff) const;
86  virtual void Sizeof3D() const;
87 
88  ClassDef(TGeoHype, 1) // hyperboloid class
89 
90 };
91 
92 #endif