Geant4  10.01.p01
G4TwistedTrap.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4TwistedTrap.hh 66356 2012-12-18 09:02:32Z gcosmo $
28 //
29 //
30 // --------------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 //
34 // G4TwistedTrap
35 //
36 // Class description:
37 //
38 // A G4TwistedTrap is a general twisted trapezoid: The faces perpendicular to the
39 // z planes are trapezia, and their centres are not necessarily on
40 // a line parallel to the z axis.
41 //
42 // pDz Half-length along the z-axis
43 // pTheta Polar angle of the line joining the centres of the faces
44 // at -/+pDz
45 // pPhi Azimuthal angle of the line joing the centre of the face at
46 // -pDz to the centre of the face at +pDz
47 // pDy1 Half-length along y of the face at -pDz
48 // pDx1 Half-length along x of the side at y=-pDy1 of the face at -pDz
49 // pDx2 Half-length along x of the side at y=+pDy1 of the face at -pDz
50 //
51 // pDy2 Half-length along y of the face at +pDz
52 // pDx3 Half-length along x of the side at y=-pDy2 of the face at +pDz
53 // pDx4 Half-length along x of the side at y=+pDy2 of the face at +pDz
54 // pAlph Angle with respect to the y axis from the centre of the side
55 //
56 //
57 // A special regular case of a trapezoid with equal endcaps is available,
58 // with polar,azimuthal and tilt angles set to zero.
59 //
60 
61 // Author:
62 //
63 // 27-Oct-2004 - O.Link (Oliver.Link@cern.ch)
64 //
65 // --------------------------------------------------------------------
66 #ifndef __G4TWISTEDTRAP__
67 #define __G4TWISTEDTRAP__
68 
69 #include "G4VTwistedFaceted.hh"
70 
72 {
73  public: // with description
74 
75  G4TwistedTrap(const G4String &pName,
76  G4double pPhiTwist,
77  G4double pDx1, // half x length at -pDz,-pDy
78  G4double pDx2, // half x length at -pDz,+pDy
79  G4double pDy,
80  G4double pDz);
81 
82 
83  G4TwistedTrap(const G4String &pName, // Name of instance
84  G4double pPhiTwist, // twist angle
85  G4double pDz, // half z length
86  G4double pTheta, // direction between end planes
87  G4double pPhi, // defined by polar and azim. angles
88  G4double pDy1, // half y length at -pDz
89  G4double pDx1, // half x length at -pDz,-pDy
90  G4double pDx2, // half x length at -pDz,+pDy
91  G4double pDy2, // half y length at +pDz
92  G4double pDx3, // half x length at +pDz,-pDy
93  G4double pDx4, // half x length at +pDz,+pDy
94  G4double pAlph // tilt angle
95  );
96 
97  virtual ~G4TwistedTrap();
98 
99  // accessors
100 
101  inline G4double GetY1HalfLength() const { return GetDy1() ; }
102  inline G4double GetX1HalfLength() const { return GetDx1() ; }
103  inline G4double GetX2HalfLength() const { return GetDx2() ; }
104  inline G4double GetY2HalfLength() const { return GetDy2() ; }
105  inline G4double GetX3HalfLength() const { return GetDx3() ; }
106  inline G4double GetX4HalfLength() const { return GetDx4() ; }
107  inline G4double GetZHalfLength() const { return GetDz() ; }
108  inline G4double GetPhiTwist() const { return GetTwistAngle() ; }
109  inline G4double GetTiltAngleAlpha() const { return GetAlpha() ; }
110  inline G4double GetPolarAngleTheta() const { return GetTheta() ; }
111  inline G4double GetAzimuthalAnglePhi() const { return GetPhi() ; }
112 
114 
115  G4VSolid* Clone() const;
116 
117  std::ostream &StreamInfo(std::ostream& os) const;
118 
119  public: // without description
120 
121  G4TwistedTrap(__void__&);
122  // Fake default constructor for usage restricted to direct object
123  // persistency for clients requiring preallocation of memory for
124  // persistifiable objects.
125 
126  G4TwistedTrap(const G4TwistedTrap& rhs);
127  G4TwistedTrap& operator=(const G4TwistedTrap& rhs);
128  // Copy constructor and assignment operator.
129 
130 } ;
131 
132 #endif
G4GeometryType GetEntityType() const
G4double GetPolarAngleTheta() const
G4TwistedTrap(const G4String &pName, G4double pPhiTwist, G4double pDx1, G4double pDx2, G4double pDy, G4double pDz)
G4double GetDy2() const
G4double GetZHalfLength() const
G4double GetDy1() const
G4double GetDx3() const
G4double GetTwistAngle() const
G4double GetY1HalfLength() const
G4double GetTheta() const
G4VSolid * Clone() const
G4double GetX3HalfLength() const
G4double GetDx2() const
std::ostream & StreamInfo(std::ostream &os) const
G4double GetX4HalfLength() const
G4double GetPhi() const
virtual ~G4TwistedTrap()
G4TwistedTrap & operator=(const G4TwistedTrap &rhs)
G4double GetAlpha() const
G4double GetAzimuthalAnglePhi() const
G4double GetDx1() const
double G4double
Definition: G4Types.hh:76
G4double GetDx4() const
G4double GetX1HalfLength() const
G4double GetTiltAngleAlpha() const
G4double GetX2HalfLength() const
G4double GetDz() const
G4double GetPhiTwist() const
G4double GetY2HalfLength() const