EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TGeoSurfaceConverter.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TGeoSurfaceConverter.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
12 
13 #include <memory>
14 #include "RtypesCore.h"
15 
16 class TGeoShape;
17 class TGeoMatrix;
18 
19 namespace Acts {
20 
21 class CylinderBounds;
22 class DiscBounds;
23 class PlanarBounds;
24 class Surface;
25 class TGeoDetectorElement;
26 
38  static std::tuple<std::shared_ptr<const CylinderBounds>, const Transform3D,
39  double>
40  cylinderComponents(const TGeoShape& tgShape, const Double_t* rotation,
41  const Double_t* translation, const std::string& axes,
42  double scalor = 10.) noexcept(false);
43 
53  static std::tuple<std::shared_ptr<const DiscBounds>, const Transform3D,
54  double>
55  discComponents(const TGeoShape& tgShape, const Double_t* rotation,
56  const Double_t* translation, const std::string& axes,
57  double scalor = 10.) noexcept(false);
58 
68  static std::tuple<std::shared_ptr<const PlanarBounds>, const Transform3D,
69  double>
70  planeComponents(const TGeoShape& tgShape, const Double_t* rotation,
71  const Double_t* translation, const std::string& axes,
72  double scalor = 10.) noexcept(false);
73 
82  static std::shared_ptr<Surface> toSurface(
83  const TGeoShape& tgShape, const TGeoMatrix& tgMatrix,
84  const std::string& axes, double scalor = 10.) noexcept(false);
85 
90  static double toRadian(double degree) {
91  if (degree > 180.) {
92  degree -= 360;
93  }
94  return degree / 180. * M_PI;
95  }
96 };
97 
98 } // namespace Acts