ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TGeoPara.h
Go to the documentation of this file.
1 // @(#)root/geom:$Id$
2 // Author: Andrei Gheata 31/01/02
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_TGeoPara
13 #define ROOT_TGeoPara
14 
15 #ifndef ROOT_TGeoBBox
16 #include "TGeoBBox.h"
17 #endif
18 
19 ////////////////////////////////////////////////////////////////////////////
20 // //
21 // TGeoPara - parallelipeped class. It has 6 parameters : //
22 // dx, dy, dz - half lengths in X, Y, Z //
23 // alpha - angle w.r.t the Y axis from center of low Y edge to //
24 // center of high Y edge [deg] //
25 // theta, phi - polar and azimuthal angles of the segment between //
26 // low and high Z surfaces [deg] //
27 // //
28 ////////////////////////////////////////////////////////////////////////////
29 
30 class TGeoPara : public TGeoBBox
31 {
32 protected :
33 // data members
34  Double_t fX; // X half-length
35  Double_t fY; // Y half-length
36  Double_t fZ; // Z half-length
37  Double_t fAlpha; // angle w.r.t Y from the center of low Y to the hihg Y
38  Double_t fTheta; // polar angle of segment between low and hi Z surfaces
39  Double_t fPhi; // azimuthal angle of segment between low and hi Z surfaces
40  Double_t fTxy; // tangent of XY section angle
41  Double_t fTxz; // tangent of XZ section angle
42  Double_t fTyz; // tangent of XZ section angle
43 
44 // methods
45 public:
46  // constructors
47  TGeoPara();
49  TGeoPara(const char *name, Double_t dx, Double_t dy, Double_t dz, Double_t alpha, Double_t theta, Double_t phi);
50  TGeoPara(Double_t *param);
51  // destructor
52  virtual ~TGeoPara();
53  // methods
54  virtual Double_t Capacity() const;
55  virtual void ComputeBBox();
56  virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm);
57  virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize);
58  virtual Bool_t Contains(const Double_t *point) const;
59  virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const;
60  virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1,
61  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
62  virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
63  virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1,
64  Double_t step=TGeoShape::Big(), Double_t *safe=0) const;
65  virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const;
66  virtual TGeoVolume *Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv,
67  Double_t start, Double_t step);
68  virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const;
69  virtual void GetBoundingCylinder(Double_t *param) const;
70  virtual Int_t GetByteCount() const {return 48;}
71  virtual Int_t GetFittingBox(const TGeoBBox *parambox, TGeoMatrix *mat, Double_t &dx, Double_t &dy, Double_t &dz) const;
72  virtual TGeoShape *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
73  virtual Int_t GetNmeshVertices() const {return 8;}
74  Double_t GetX() const {return fX;}
75  Double_t GetY() const {return fY;}
76  Double_t GetZ() const {return fZ;}
77  Double_t GetAlpha() const {return fAlpha;}
78  Double_t GetTheta() const {return fTheta;}
79  Double_t GetPhi() const {return fPhi;}
80  Double_t GetTxy() const {return fTxy;}
81  Double_t GetTxz() const {return fTxz;}
82  Double_t GetTyz() const {return fTyz;}
83  virtual void InspectShape() const;
84  virtual Bool_t IsCylType() const {return kFALSE;}
85  virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const;
86  virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const;
87  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
88  virtual void SetDimensions(Double_t *param);
89  virtual void SetPoints(Double_t *points) const;
90  virtual void SetPoints(Float_t *points) const;
91  virtual void Sizeof3D() const;
92 
93  ClassDef(TGeoPara, 1) // box primitive
94 };
95 
96 #endif
virtual Int_t GetByteCount() const
Definition: TGeoPara.h:70
Double_t GetTxy() const
Definition: TGeoPara.h:80
virtual TGeoShape * GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const
in case shape has some negative parameters, these has to be computed in order to fit the mother ...
Definition: TGeoPara.cxx:513
Double_t fY
Definition: TGeoPara.h:35
virtual void SetDimensions(Double_t *param)
Set dimensions starting from an array.
Definition: TGeoPara.cxx:592
float Float_t
Definition: RtypesCore.h:53
Float_t theta
Definition: shapesAnim.C:5
const char Option_t
Definition: RtypesCore.h:62
Double_t GetTyz() const
Definition: TGeoPara.h:82
virtual Int_t GetNmeshVertices() const
Definition: TGeoPara.h:73
virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize)
Compute the normal for an array o points so that norm.dot.dir is positive Input: Arrays of point coor...
Definition: TGeoPara.cxx:668
virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const
Check the inside status for each of the points in the array.
Definition: TGeoPara.cxx:658
virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const
Compute distance from array of input points having directions specisied by dirs. Store output in dist...
Definition: TGeoPara.cxx:684
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const
computes the closest distance from given point to this shape, according to option.
Definition: TGeoPara.cxx:550
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Double_t fTxy
Definition: TGeoPara.h:40
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
Definition: TGeoPara.cxx:170
Double_t fTheta
Definition: TGeoPara.h:38
Double_t GetPhi() const
Definition: TGeoPara.h:79
Double_t GetY() const
Definition: TGeoPara.h:75
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGeoPara.cxx:575
virtual void ComputeBBox()
compute bounding box
Definition: TGeoPara.cxx:158
virtual void Sizeof3D() const
fill size of this 3-D object
Definition: TGeoPara.cxx:648
Double_t fPhi
Definition: TGeoPara.h:39
#define ClassDef(name, id)
Definition: Rtypes.h:254
Double_t GetTxz() const
Definition: TGeoPara.h:81
Double_t GetAlpha() const
Definition: TGeoPara.h:77
virtual Double_t Capacity() const
Computes capacity of the shape in [length^3].
Definition: TGeoPara.cxx:149
virtual void InspectShape() const
print shape parameters
Definition: TGeoPara.cxx:533
virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const
compute distance from inside point to surface of the para Boundary safe algorithm.
Definition: TGeoPara.cxx:229
Double_t GetTheta() const
Definition: TGeoPara.h:78
virtual void SetPoints(Double_t *points) const
Create PARA mesh points.
Definition: TGeoPara.cxx:610
char * out
Definition: TBase64.cxx:29
virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const
Compute distance from array of input points having directions specisied by dirs. Store output in dist...
Definition: TGeoPara.cxx:676
Double_t GetZ() const
Definition: TGeoPara.h:76
point * points
Definition: X3DBuffer.c:20
virtual ~TGeoPara()
destructor
Definition: TGeoPara.cxx:142
virtual Int_t GetFittingBox(const TGeoBBox *parambox, TGeoMatrix *mat, Double_t &dx, Double_t &dy, Double_t &dz) const
Fills real parameters of a positioned box inside this. Returns 0 if successfull.
Definition: TGeoPara.cxx:438
virtual void GetBoundingCylinder(Double_t *param) const
— Fill vector param[4] with the bounding cylinder parameters.
Definition: TGeoPara.cxx:430
virtual TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
— Divide this paralelipiped shape belonging to volume "voldiv" into ndiv equal volumes called divname...
Definition: TGeoPara.cxx:357
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const
Get range of shape for a given axis.
Definition: TGeoPara.cxx:401
Double_t fAlpha
Definition: TGeoPara.h:37
Float_t phi
Definition: shapesAnim.C:6
double Double_t
Definition: RtypesCore.h:55
virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const
Compute safe distance from each of the points in the input array.
Definition: TGeoPara.cxx:694
Double_t fZ
Definition: TGeoPara.h:36
static Double_t Big()
Definition: TGeoShape.h:98
#define name(a, b)
Definition: linkTestLib0.cpp:5
virtual Bool_t IsCylType() const
Definition: TGeoPara.h:84
virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const
compute distance from inside point to surface of the para
Definition: TGeoPara.cxx:273
Double_t fX
Definition: TGeoPara.h:34
virtual Bool_t Contains(const Double_t *point) const
test if point is inside this sphere test Z range
Definition: TGeoPara.cxx:214
Double_t fTyz
Definition: TGeoPara.h:42
const Bool_t kTRUE
Definition: Rtypes.h:91
double norm(double *x, double *p)
Definition: unuranDistr.cxx:40
Double_t GetX() const
Definition: TGeoPara.h:74
Double_t fTxz
Definition: TGeoPara.h:41