Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-08 09:10:47

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4TwistedTrd
0027 //
0028 // Class description:
0029 //
0030 // A G4TwistedTrd is a twisted trapezoid with the X and Y dimensions
0031 // varying along Z.
0032 //
0033 //
0034 // Member Data:
0035 //
0036 //   pDx1    Half-length along x at the surface positioned at -dz
0037 //   pDx2    Half-length along x at the surface positioned at +dz
0038 //   pDy1    Half-length along y at the surface positioned at -dz
0039 //   pDy2    Half-length along y at the surface positioned at +dz
0040 //   pDz     Half-length along z axis
0041 //   pPhiTwist Twist angle
0042 
0043 // Author: Oliver Link (CERN), 18.03.2005 - Created
0044 // --------------------------------------------------------------------
0045 #ifndef G4TWISTEDTRD_HH
0046 #define G4TWISTEDTRD_HH
0047 
0048 #include "G4VTwistedFaceted.hh"
0049 
0050 /**
0051  * @brief G4TwistedTrd is a twisted trapezoid with the X and Y dimensions
0052  * varying along Z.
0053  */
0054 
0055 class G4TwistedTrd : public G4VTwistedFaceted
0056 {
0057   public:
0058 
0059     /**
0060      * Constructs a twisted Trd, given its parameters.
0061      *  @param[in] pName The solid name.
0062      *  @param[in] pDx1 Half-length along X at the surface positioned at -dz.
0063      *  @param[in] pDx2 Half-length along X at the surface positioned at +dz.
0064      *  @param[in] pDy1 Half-length along Y at the surface positioned at -dz.
0065      *  @param[in] pDy2 Half-length along Y at the surface positioned at +dz.
0066      *  @param[in] pDz Half-length along Z axis.
0067      *  @param[in] pPhiTwist The twist angle.
0068      */
0069     G4TwistedTrd( const G4String& pName,
0070                         G4double  pDx1,
0071                         G4double  pDx2,
0072                         G4double  pDy1,
0073                         G4double  pDy2,
0074                         G4double  pDz,
0075                         G4double  pPhiTwist );
0076 
0077     /**
0078      * Default destructor.
0079      */
0080     ~G4TwistedTrd() override = default;
0081 
0082     /**
0083      * Accessors.
0084      */
0085     inline G4double GetX1HalfLength() const { return GetDx1() ; }
0086     inline G4double GetX2HalfLength() const { return GetDx3() ; }
0087     inline G4double GetY1HalfLength() const { return GetDy1() ; }
0088     inline G4double GetY2HalfLength() const { return GetDy2() ; }
0089     inline G4double GetZHalfLength()  const { return GetDz()  ; }
0090     inline G4double GetPhiTwist()     const { return GetTwistAngle() ; }
0091 
0092     /**
0093      * Returns the type ID, "G4TwistedTrd" of the solid.
0094      */
0095     G4GeometryType GetEntityType() const override;
0096 
0097     /**
0098      * Returning an estimation of the solid volume (capacity) and
0099      * surface area, in internal units.
0100      */
0101     G4double GetCubicVolume() override;
0102     G4double GetSurfaceArea() override;
0103 
0104     /**
0105      * Makes a clone of the object for use in multi-treading.
0106      *  @returns A pointer to the new cloned allocated solid.
0107      */
0108     G4VSolid* Clone() const override;
0109 
0110     /**
0111      * Streams the object contents to an output stream.
0112      */
0113     std::ostream&  StreamInfo(std::ostream& os) const override;
0114 
0115     /**
0116      * Fake default constructor for usage restricted to direct object
0117      * persistency for clients requiring preallocation of memory for
0118      * persistifiable objects.
0119      */
0120     G4TwistedTrd(__void__&);
0121 
0122     /**
0123      * Copy constructor and assignment operator.
0124      */
0125     G4TwistedTrd(const G4TwistedTrd& rhs);
0126     G4TwistedTrd& operator=(const G4TwistedTrd& rhs);
0127 } ;
0128 
0129 #endif