File: EllipticalTubeStruct.h

package info (click to toggle)
vecgeom 1.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 23,928 kB
  • sloc: cpp: 88,717; ansic: 6,894; python: 1,035; sh: 582; sql: 538; makefile: 29
file content (47 lines) | stat: -rw-r--r-- 1,489 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// This file is part of VecGeom and is distributed under the
// conditions in the file LICENSE.txt in the top directory.
// For the full list of authors see CONTRIBUTORS.txt and `git log`.

/// Declaration of a struct with data members of the UnplacedEllipticalTube class
/// @file volumes/EllipticalTubeStruct.h
/// @author Raman Sehgal, Evgueni Tcherniaev

#ifndef VECGEOM_VOLUMES_ELLIPTICALTUBESTRUCT_H_
#define VECGEOM_VOLUMES_ELLIPTICALTUBESTRUCT_H_
#include "VecGeom/base/Global.h"
#include "VecGeom/base/Vector3D.h"

namespace vecgeom {

inline namespace VECGEOM_IMPL_NAMESPACE {

/// Struct with data members of the UnplacedEllipticalTube class
template <typename T = double>
struct EllipticalTubeStruct {

  // Elliptical Tube parameters
  //
  T fDx; ///< Semi-axis in X
  T fDy; ///< Semi-axis in Y
  T fDz; ///< Half length in Z

  T fSurfaceArea; ///< Area of the surface
  T fCubicVolume; ///< Volume

  // Precalculated cached values
  //
  T fRsph;    ///< Radius of bounding sphere
  T fDDx;     ///< Dx squared
  T fDDy;     ///< Dy squared
  T fSx;      ///< X scale factor
  T fSy;      ///< Y scale factor
  T fR;       ///< Resulting Radius, after scaling elipse to circle
  T fQ1;      ///< Coefficient in the approximation of dist = Q1*(x^2+y^2) - Q2
  T fQ2;      ///< Coefficient in the approximation of dist = Q1*(x^2+y^2) - Q2
  T fScratch; ///< Half length of scratching segment squared
};

} // namespace VECGEOM_IMPL_NAMESPACE
} // namespace vecgeom

#endif