G4TwistedTrap.cc

Go to the documentation of this file.
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.cc 67011 2013-01-29 16:17:41Z gcosmo $
00028 //
00029 // 
00030 // --------------------------------------------------------------------
00031 // GEANT 4 class source file
00032 //
00033 //
00034 // G4TwistedTrap.cc
00035 //
00036 // Author:
00037 //
00038 //   10/11/2004 - O.Link (Oliver.Link@cern.ch)
00039 //
00040 // --------------------------------------------------------------------
00041 
00042 #include "G4TwistedTrap.hh"
00043 #include "G4SystemOfUnits.hh"
00044 #include "G4Polyhedron.hh"
00045 
00046 G4TwistedTrap::G4TwistedTrap( const G4String &pName,
00047                                     G4double  pPhiTwist,
00048                                     G4double  pDx1,
00049                                     G4double  pDx2,
00050                                     G4double  pDy,
00051                                     G4double  pDz)
00052   : G4VTwistedFaceted( pName, pPhiTwist,pDz,0.,0.,
00053                        pDy, pDx1, pDx2, pDy, pDx1, pDx2,0. )
00054 {
00055 }
00056 
00057 G4TwistedTrap::
00058 G4TwistedTrap(const G4String &pName,      // Name of instance
00059                     G4double  pPhiTwist,  // twist angle
00060                     G4double  pDz,        // half z length
00061                     G4double  pTheta,  // direction between end planes
00062                     G4double  pPhi,    // defined by polar and azimuthal angles
00063                     G4double  pDy1,    // half y length at -pDz
00064                     G4double  pDx1,    // half x length at -pDz,-pDy
00065                     G4double  pDx2,    // half x length at -pDz,+pDy
00066                     G4double  pDy2,    // half y length at +pDz
00067                     G4double  pDx3,    // half x length at +pDz,-pDy
00068                     G4double  pDx4,    // half x length at +pDz,+pDy
00069                     G4double  pAlph    // tilt angle
00070               )
00071   : G4VTwistedFaceted( pName, pPhiTwist, pDz, pTheta,
00072                        pPhi, pDy1, pDx1, pDx2, pDy2, pDx3, pDx4, pAlph )
00073 {
00074 }
00075 
00076 // Fake default constructor - sets only member data and allocates memory
00077 //                            for usage restricted to object persistency.
00078 //
00079 G4TwistedTrap::G4TwistedTrap( __void__& a )
00080   : G4VTwistedFaceted(a)
00081 {
00082 }
00083 
00084 G4TwistedTrap::~G4TwistedTrap()
00085 {
00086 }
00087 
00088 // Copy constructor
00089 //
00090 G4TwistedTrap::G4TwistedTrap(const G4TwistedTrap& rhs)
00091   : G4VTwistedFaceted(rhs)
00092 {
00093 }
00094 
00095 // Assignment operator
00096 //
00097 G4TwistedTrap& G4TwistedTrap::operator = (const G4TwistedTrap& rhs) 
00098 {
00099    // Check assignment to self
00100    //
00101    if (this == &rhs)  { return *this; }
00102 
00103    // Copy base class data
00104    //
00105    G4VTwistedFaceted::operator=(rhs);
00106 
00107    return *this;
00108 }
00109 
00110 std::ostream& G4TwistedTrap::StreamInfo(std::ostream& os) const
00111 {
00112   //
00113   // Stream object contents to an output stream
00114   //
00115   os << "-----------------------------------------------------------\n"
00116      << "    *** Dump for solid - " << GetName() << " ***\n"
00117      << "    ===================================================\n"
00118      << " Solid type: G4TwistedTrap\n"
00119      << " Parameters: \n"
00120      << "    Twist angle         = " << GetPhiTwist()/degree << " deg"
00121      << G4endl 
00122      << "    Polar Angle Theta   = " << GetPolarAngleTheta()/degree << " deg"
00123      << G4endl 
00124      << "    Azimuthal Angle Phi = " << GetAzimuthalAnglePhi()/degree << " deg"
00125      << G4endl 
00126      << "    pDy1 = " << GetY1HalfLength()/cm << " cm" << G4endl
00127      << "    pDx1 = " << GetX1HalfLength()/cm << " cm" << G4endl
00128      << "    pDx2 = " << GetX2HalfLength()/cm << " cm" << G4endl
00129      << "    pDy2 = " << GetY2HalfLength()/cm << " cm" << G4endl
00130      << "    pDx3 = " << GetX3HalfLength()/cm << " cm" << G4endl
00131      << "    pDx4 = " << GetX4HalfLength()/cm << " cm" << G4endl
00132      << "    pDz = "  << GetZHalfLength()/cm << " cm" << G4endl
00133      << "    Tilt Angle Alpha    = " << GetTiltAngleAlpha()/degree << " deg"
00134      << G4endl 
00135      << "-----------------------------------------------------------\n";
00136 
00137   return os;
00138 }
00139 
00140 
00141 //=====================================================================
00142 //* GetEntityType -----------------------------------------------------
00143 
00144 G4GeometryType G4TwistedTrap::GetEntityType() const
00145 {
00146   return G4String("G4TwistedTrap");
00147 }
00148 
00149 //=====================================================================
00150 //* Clone -------------------------------------------------------------
00151 
00152 G4VSolid* G4TwistedTrap::Clone() const
00153 {
00154   return new G4TwistedTrap(*this);
00155 }

Generated on Mon May 27 17:50:04 2013 for Geant4 by  doxygen 1.4.7