Back to home page

EIC code displayed by LXR

 
 

    


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

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 G4Hype
0027 // --------------------------------------------------------------------
0028 
0029 inline
0030 G4double G4Hype::GetInnerRadius () const
0031   {
0032     return innerRadius;
0033   }
0034 
0035 inline
0036 G4double G4Hype::GetOuterRadius () const
0037   {
0038     return outerRadius;
0039   }
0040 
0041 inline
0042 G4double G4Hype::GetZHalfLength () const
0043   {
0044     return halfLenZ;
0045   }
0046 
0047 inline
0048 G4double G4Hype::GetInnerStereo () const
0049   {
0050     return innerStereo;
0051   }
0052 
0053 inline
0054 G4double G4Hype::GetOuterStereo () const
0055   {
0056     return outerStereo;
0057   }
0058 
0059 inline
0060 void G4Hype::SetInnerRadius (G4double newIRad) 
0061   { 
0062     innerRadius = newIRad;
0063     innerRadius2 = newIRad*newIRad;
0064     endInnerRadius2 = HypeInnerRadius2(halfLenZ);
0065     endInnerRadius = std::sqrt(endInnerRadius2);
0066     fCubicVolume = 0.;
0067     fRebuildPolyhedron = true;
0068   }
0069 
0070 inline
0071 void G4Hype::SetOuterRadius (G4double newORad) 
0072   { 
0073     outerRadius = newORad;
0074     outerRadius2 = newORad*newORad;
0075     endOuterRadius2 = HypeOuterRadius2(halfLenZ);
0076     endOuterRadius = std::sqrt(endOuterRadius2);
0077     fCubicVolume = 0.;
0078     fRebuildPolyhedron = true;
0079   } 
0080 
0081 inline
0082 void G4Hype::SetZHalfLength (G4double newHLZ)
0083   {
0084     halfLenZ = newHLZ ;
0085     fCubicVolume = 0.;
0086     fRebuildPolyhedron = true;
0087   }
0088 
0089 inline
0090 void G4Hype::SetInnerStereo (G4double newISte) 
0091   { 
0092     innerStereo = std::fabs(newISte);
0093     tanInnerStereo = std::tan(innerStereo);
0094     tanInnerStereo2 = tanInnerStereo*tanInnerStereo;
0095     endInnerRadius2 = HypeInnerRadius2(halfLenZ);
0096     endInnerRadius = std::sqrt(endInnerRadius2);
0097     fCubicVolume = 0.;
0098     fRebuildPolyhedron = true;
0099   }
0100 
0101 inline
0102 void G4Hype::SetOuterStereo (G4double newOSte)
0103   { 
0104     outerStereo = std::fabs(newOSte);
0105     tanOuterStereo = std::tan(outerStereo);
0106     tanOuterStereo2 = tanOuterStereo*tanOuterStereo;
0107     endOuterRadius2 = HypeOuterRadius2(halfLenZ);
0108     endOuterRadius = std::sqrt(endOuterRadius2);
0109     fCubicVolume = 0.;
0110     fRebuildPolyhedron = true;
0111   }
0112 
0113 inline
0114 G4bool G4Hype::InnerSurfaceExists() const
0115   {
0116     return (innerRadius > DBL_MIN) || (innerStereo != 0);
0117   }
0118 
0119 inline
0120 G4double G4Hype::HypeInnerRadius2(G4double zVal) const
0121   {
0122     return (tanInnerStereo2*zVal*zVal+innerRadius2);
0123   }
0124 
0125 inline
0126 G4double G4Hype::HypeOuterRadius2(G4double zVal) const
0127   {
0128     return (tanOuterStereo2*zVal*zVal+outerRadius2);
0129   }