Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:06

0001 // This file is part of VecGeom and is distributed under the
0002 // conditions in the file LICENSE.txt in the top directory.
0003 // For the full list of authors see CONTRIBUTORS.txt and `git log`.
0004 
0005 /// Declaration of a struct with data members of the UnplacedEllipsoid class
0006 /// @file volumes/EllipsoidStruct.h
0007 /// @author Evgueni Tcherniaev
0008 
0009 #ifndef VECGEOM_VOLUMES_ELLIPSOIDSTRUCT_H_
0010 #define VECGEOM_VOLUMES_ELLIPSOIDSTRUCT_H_
0011 #include "VecGeom/base/Global.h"
0012 #include "VecGeom/base/Vector3D.h"
0013 
0014 namespace vecgeom {
0015 
0016 inline namespace VECGEOM_IMPL_NAMESPACE {
0017 
0018 /// Struct with data members of the UnplacedEllipsoid class
0019 template <typename T = double>
0020 struct EllipsoidStruct {
0021 
0022   // Ellipsoid parameters
0023   T fDx;         ///< Semi-axis in x
0024   T fDy;         ///< Semi-axis in y
0025   T fDz;         ///< Semi-axis in z
0026   T fZBottomCut; ///< Bottom cut in z
0027   T fZTopCut;    ///< Top cut in z
0028 
0029   T fSurfaceArea; ///< Area of the surface
0030   T fCubicVolume; ///< Volume
0031 
0032   // Precalculated cached values
0033   T fXmax; ///< Extent in x
0034   T fYmax; ///< Extent in y
0035   T fRsph; ///< Radius of bounding sphere
0036   T fR;    ///< Resulting radius, after scaling ellipsoid to sphere
0037   T fSx;   ///< X scale factor
0038   T fSy;   ///< Y scale factor
0039   T fSz;   ///< Z scale factor
0040 
0041   // Scaled cuts
0042   T fScZBottomCut; ///< Scaled bottom cut in z
0043   T fScZTopCut;    ///< Scaled top cut in z
0044   T fScZMidCut;    ///< Scaled middle z position between cuts
0045   T fScZDimCut;    ///< Scaled half z dimension between cuts
0046 
0047   // Coefficients for approximation of distance near the surface
0048   T fQ1; ///< 1st coefficient in the approximation of dist = Q1*(x^2+y^2+z^2) - Q2
0049   T fQ2; ///< 2nd coefficient in the approximation of dist = Q1*(x^2+y^2+z^2) - Q2
0050 };
0051 
0052 } // namespace VECGEOM_IMPL_NAMESPACE
0053 } // namespace vecgeom
0054 
0055 #endif