]>
Commit | Line | Data |
---|---|---|
c41ca2c7 | 1 | // $Id$ |
2 | // Category: geometry | |
c41ca2c7 | 3 | // |
499b353a | 4 | // Author: I. Hrivnacova, 12.10.2000 |
5 | // | |
6 | // Class TG4Polyhedra | |
7 | // ------------------ | |
c41ca2c7 | 8 | // See the class description in the header file. |
9 | ||
10 | #include "TG4Polyhedra.h" | |
11 | #include "TG4Globals.h" | |
12 | ||
72095f7c | 13 | //_____________________________________________________________________________ |
c41ca2c7 | 14 | TG4Polyhedra::TG4Polyhedra(const G4Polyhedra& rhs) |
15 | : G4Polyhedra(rhs) { | |
16 | // | |
17 | } | |
18 | ||
72095f7c | 19 | //_____________________________________________________________________________ |
c41ca2c7 | 20 | TG4Polyhedra::~TG4Polyhedra() { |
21 | // | |
22 | } | |
23 | ||
24 | // private methods | |
72095f7c | 25 | |
26 | //_____________________________________________________________________________ | |
c41ca2c7 | 27 | void TG4Polyhedra::CheckOrigin() |
28 | { | |
29 | // Checks if polycone was created in a "historical way" | |
30 | // and give exception otherwise. | |
31 | // --- | |
32 | ||
33 | if (!original_parameters) { | |
34 | G4String text = "TG4Polyhedra::CheckOrigin: \n"; | |
35 | text = text + " Polycone has not defined original parameters."; | |
36 | TG4Globals::Exception(text); | |
37 | } | |
38 | } | |
39 | ||
40 | ||
41 | // public methods | |
42 | ||
72095f7c | 43 | //_____________________________________________________________________________ |
c41ca2c7 | 44 | G4int TG4Polyhedra::GetNofZPlanes() |
45 | { | |
46 | // Returns nof z planes. | |
47 | // ---- | |
48 | ||
49 | CheckOrigin(); | |
50 | ||
51 | return original_parameters->Num_z_planes; | |
52 | } | |
53 | ||
54 | ||
72095f7c | 55 | //_____________________________________________________________________________ |
c41ca2c7 | 56 | G4double* TG4Polyhedra::GetRmin() |
57 | { | |
58 | // Returns array of rmin parameters of the planes. | |
59 | // ---- | |
60 | ||
61 | CheckOrigin(); | |
62 | ||
63 | return original_parameters->Rmin; | |
64 | } | |
65 | ||
72095f7c | 66 | //_____________________________________________________________________________ |
c41ca2c7 | 67 | G4double* TG4Polyhedra::GetRmax() |
68 | { | |
69 | // Returns array of rmax parameters of the planes. | |
70 | // ---- | |
71 | ||
72 | CheckOrigin(); | |
73 | ||
74 | return original_parameters->Rmax; | |
75 | } | |
76 | ||
72095f7c | 77 | //_____________________________________________________________________________ |
c41ca2c7 | 78 | G4double* TG4Polyhedra::GetZ() |
79 | { | |
80 | // Returns array of z parameters of the planes. | |
81 | // ---- | |
82 | ||
83 | CheckOrigin(); | |
84 | ||
85 | return original_parameters->Z_values; | |
86 | } |