G4TwistedBox.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: G4TwistedBox.cc 67011 2013-01-29 16:17:41Z gcosmo $
00028 //
00029 // 
00030 // --------------------------------------------------------------------
00031 // GEANT 4 class source file
00032 //
00033 //
00034 // G4TwistedBox.cc
00035 //
00036 // Author:
00037 //
00038 //   10/11/2004 - O.Link (Oliver.Link@cern.ch)
00039 //
00040 // --------------------------------------------------------------------
00041 
00042 #include "G4TwistedBox.hh"
00043 #include "G4SystemOfUnits.hh"
00044 #include "G4Polyhedron.hh"
00045 
00046 G4TwistedBox::G4TwistedBox( const G4String& pName,
00047                                   G4double  pPhiTwist,
00048                                   G4double  pDx, 
00049                                   G4double  pDy, 
00050                                   G4double  pDz )
00051   : G4VTwistedFaceted( pName, pPhiTwist,pDz,0.,0.,
00052                        pDy, pDx, pDx, pDy, pDx, pDx,0. )
00053 {
00054 }
00055 
00056 // Fake default constructor - sets only member data and allocates memory
00057 //                            for usage restricted to object persistency.
00058 //
00059 G4TwistedBox::G4TwistedBox( __void__& a )
00060   : G4VTwistedFaceted(a)
00061 {
00062 }
00063 
00064 G4TwistedBox::~G4TwistedBox()
00065 {
00066 }
00067 
00068 
00069 // Copy constructor
00070 //
00071 G4TwistedBox::G4TwistedBox(const G4TwistedBox& rhs)
00072   : G4VTwistedFaceted(rhs)
00073 {
00074 }
00075 
00076 
00077 // Assignment operator
00078 //
00079 G4TwistedBox& G4TwistedBox::operator = (const G4TwistedBox& rhs) 
00080 {
00081    // Check assignment to self
00082    //
00083    if (this == &rhs)  { return *this; }
00084 
00085    // Copy base class data
00086    //
00087    G4VTwistedFaceted::operator=(rhs);
00088 
00089    return *this;
00090 }
00091 
00092 
00093 std::ostream& G4TwistedBox::StreamInfo(std::ostream& os) const
00094 {
00095   //
00096   // Stream object contents to an output stream
00097   //
00098   os << "-----------------------------------------------------------\n"
00099      << "    *** Dump for solid - " << GetName() << " ***\n"
00100      << "    ===================================================\n"
00101      << " Solid type: G4TwistedBox\n"
00102      << " Parameters: \n"
00103      << "    pDx = "  << GetXHalfLength()/cm << " cm" << G4endl
00104      << "    pDy = "  << GetYHalfLength()/cm << " cm" << G4endl
00105      << "    pDz = "  << GetZHalfLength()/cm << " cm" << G4endl
00106      << "    pPhiTwist = " << GetPhiTwist()/degree << " deg" << G4endl 
00107      << "-----------------------------------------------------------\n";
00108 
00109   return os;
00110 }
00111 
00112 
00113 //=====================================================================
00114 //* GetEntityType -----------------------------------------------------
00115 
00116 G4GeometryType G4TwistedBox::GetEntityType() const
00117 {
00118   return G4String("G4TwistedBox");
00119 }
00120 
00121 //=====================================================================
00122 //* Clone -------------------------------------------------------------
00123 
00124 G4VSolid* G4TwistedBox::Clone() const
00125 {
00126   return new G4TwistedBox(*this);
00127 }

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