Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:21

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 // Implementation of inline methods of G4GenericTrap
0027 // --------------------------------------------------------------------
0028 
0029 inline 
0030 G4double G4GenericTrap::GetZHalfLength() const
0031 {
0032   return fDz;
0033 }
0034 
0035 // --------------------------------------------------------------------
0036 
0037 inline 
0038 G4int G4GenericTrap::GetNofVertices() const
0039 {
0040   return G4int(fVertices.size());
0041 }  
0042 
0043 // --------------------------------------------------------------------
0044 
0045 inline
0046 G4TwoVector G4GenericTrap::GetVertex(G4int index) const
0047 {
0048   if ( index<0 || index >= G4int(fVertices.size()) )
0049   {
0050     G4Exception ("G4GenericTrap::GetVertex()", "GeomSolids0003",
0051                  FatalException, "Index outside range.");
0052     return {};
0053   }
0054   return fVertices[index];
0055 }  
0056 
0057 // --------------------------------------------------------------------
0058 
0059 inline 
0060 const std::vector<G4TwoVector>& G4GenericTrap::GetVertices() const
0061 {
0062   return fVertices;
0063 }  
0064 
0065 // --------------------------------------------------------------------
0066 
0067 inline 
0068 G4double G4GenericTrap::GetTwistAngle(G4int index) const
0069 {
0070   if ( (index<0) || (index >= G4int(fVertices.size())) )
0071   {
0072     G4Exception ("G4GenericTrap::GetTwistAngle()", "GeomSolids0003",
0073                  FatalException, "Index outside range.");
0074     return 0.;
0075   }
0076   return fTwist[index];
0077 }
0078 
0079 // --------------------------------------------------------------------
0080 
0081 inline
0082 G4bool G4GenericTrap::IsTwisted() const
0083 {
0084   return fIsTwisted;
0085 }
0086 
0087 // --------------------------------------------------------------------
0088 
0089 inline
0090 void G4GenericTrap::SetTwistAngle(G4int index, G4double twist)
0091 {
0092   if ( (index<0) || (index >= G4int(fVertices.size())) )
0093   {
0094     G4Exception ("G4GenericTrap::SetTwistAngle()", "GeomSolids0003",
0095                  FatalException, "Index outside range.");
0096   }
0097   else
0098   {
0099     fTwist[index]=twist;
0100   }
0101 }
0102 
0103 // --------------------------------------------------------------------
0104 
0105 inline
0106 G4int G4GenericTrap::GetVisSubdivisions()const
0107 {
0108   return fVisSubdivisions;
0109 }
0110 
0111 // --------------------------------------------------------------------
0112 
0113 inline
0114 void G4GenericTrap::SetVisSubdivisions(G4int subdiv)
0115 {
0116   fVisSubdivisions=subdiv;
0117 }
0118 
0119 // --------------------------------------------------------------------
0120 
0121 inline
0122 G4ThreeVector G4GenericTrap::GetMinimumBBox() const
0123 {
0124   return fMinBBoxVector;
0125 }
0126 
0127 // --------------------------------------------------------------------
0128 
0129 inline
0130 G4ThreeVector G4GenericTrap::GetMaximumBBox() const
0131 {
0132   return fMaxBBoxVector;
0133 }
0134 
0135 // --------------------------------------------------------------------
0136