00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id: G4TwistedTrap.hh 67011 2013-01-29 16:17:41Z gcosmo $ 00028 // 00029 // 00030 // -------------------------------------------------------------------- 00031 // GEANT 4 class header file 00032 // 00033 // 00034 // G4TwistedTrap 00035 // 00036 // Class description: 00037 // 00038 // A G4TwistedTrap is a general twisted trapezoid: The faces perpendicular to the 00039 // z planes are trapezia, and their centres are not necessarily on 00040 // a line parallel to the z axis. 00041 // 00042 // pDz Half-length along the z-axis 00043 // pTheta Polar angle of the line joining the centres of the faces 00044 // at -/+pDz 00045 // pPhi Azimuthal angle of the line joing the centre of the face at 00046 // -pDz to the centre of the face at +pDz 00047 // pDy1 Half-length along y of the face at -pDz 00048 // pDx1 Half-length along x of the side at y=-pDy1 of the face at -pDz 00049 // pDx2 Half-length along x of the side at y=+pDy1 of the face at -pDz 00050 // 00051 // pDy2 Half-length along y of the face at +pDz 00052 // pDx3 Half-length along x of the side at y=-pDy2 of the face at +pDz 00053 // pDx4 Half-length along x of the side at y=+pDy2 of the face at +pDz 00054 // pAlph Angle with respect to the y axis from the centre of the side 00055 // 00056 // 00057 // A special regular case of a trapezoid with equal endcaps is available, 00058 // with polar,azimuthal and tilt angles set to zero. 00059 // 00060 00061 // Author: 00062 // 00063 // 27-Oct-2004 - O.Link (Oliver.Link@cern.ch) 00064 // 00065 // -------------------------------------------------------------------- 00066 #ifndef __G4TWISTEDTRAP__ 00067 #define __G4TWISTEDTRAP__ 00068 00069 #include "G4VTwistedFaceted.hh" 00070 00071 class G4TwistedTrap : public G4VTwistedFaceted 00072 { 00073 public: // with description 00074 00075 G4TwistedTrap(const G4String &pName, 00076 G4double pPhiTwist, 00077 G4double pDx1, // half x length at -pDz,-pDy 00078 G4double pDx2, // half x length at -pDz,+pDy 00079 G4double pDy, 00080 G4double pDz); 00081 00082 00083 G4TwistedTrap(const G4String &pName, // Name of instance 00084 G4double pPhiTwist, // twist angle 00085 G4double pDz, // half z length 00086 G4double pTheta, // direction between end planes 00087 G4double pPhi, // defined by polar and azim. angles 00088 G4double pDy1, // half y length at -pDz 00089 G4double pDx1, // half x length at -pDz,-pDy 00090 G4double pDx2, // half x length at -pDz,+pDy 00091 G4double pDy2, // half y length at +pDz 00092 G4double pDx3, // half x length at +pDz,-pDy 00093 G4double pDx4, // half x length at +pDz,+pDy 00094 G4double pAlph // tilt angle 00095 ); 00096 00097 virtual ~G4TwistedTrap(); 00098 00099 // accessors 00100 00101 inline G4double GetY1HalfLength() const { return GetDy1() ; } 00102 inline G4double GetX1HalfLength() const { return GetDx1() ; } 00103 inline G4double GetX2HalfLength() const { return GetDx2() ; } 00104 inline G4double GetY2HalfLength() const { return GetDy2() ; } 00105 inline G4double GetX3HalfLength() const { return GetDx3() ; } 00106 inline G4double GetX4HalfLength() const { return GetDx4() ; } 00107 inline G4double GetZHalfLength() const { return GetDz() ; } 00108 inline G4double GetPhiTwist() const { return GetTwistAngle() ; } 00109 inline G4double GetTiltAngleAlpha() const { return GetAlpha() ; } 00110 inline G4double GetPolarAngleTheta() const { return GetTheta() ; } 00111 inline G4double GetAzimuthalAnglePhi() const { return GetPhi() ; } 00112 00113 G4GeometryType GetEntityType() const; 00114 00115 G4VSolid* Clone() const; 00116 00117 std::ostream &StreamInfo(std::ostream& os) const; 00118 00119 public: // without description 00120 00121 G4TwistedTrap(__void__&); 00122 // Fake default constructor for usage restricted to direct object 00123 // persistency for clients requiring preallocation of memory for 00124 // persistifiable objects. 00125 00126 G4TwistedTrap(const G4TwistedTrap& rhs); 00127 G4TwistedTrap& operator=(const G4TwistedTrap& rhs); 00128 // Copy constructor and assignment operator. 00129 00130 } ; 00131 00132 #endif