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

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