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