Analysis Software
Documentation for sPHENIX simulation 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 <cmath>
14 #include <memory>
15 #include <string>
16 #include <tuple>
17 
18 #include "RtypesCore.h"
19 
20 class TGeoShape;
21 class TGeoMatrix;
22 
23 namespace Acts {
24 
25 class CylinderBounds;
26 class DiscBounds;
27 class PlanarBounds;
28 class Surface;
29 class TGeoDetectorElement;
30 
42  static std::tuple<std::shared_ptr<const CylinderBounds>, const Transform3,
43  double>
44  cylinderComponents(const TGeoShape& tgShape, const Double_t* rotation,
45  const Double_t* translation, const std::string& axes,
46  double scalor = 10.) noexcept(false);
47 
57  static std::tuple<std::shared_ptr<const DiscBounds>, const Transform3, double>
58  discComponents(const TGeoShape& tgShape, const Double_t* rotation,
59  const Double_t* translation, const std::string& axes,
60  double scalor = 10.) noexcept(false);
61 
71  static std::tuple<std::shared_ptr<const PlanarBounds>, const Transform3,
72  double>
73  planeComponents(const TGeoShape& tgShape, const Double_t* rotation,
74  const Double_t* translation, const std::string& axes,
75  double scalor = 10.) noexcept(false);
76 
86  static std::tuple<std::shared_ptr<Surface>, ActsScalar> toSurface(
87  const TGeoShape& tgShape, const TGeoMatrix& tgMatrix,
88  const std::string& axes, double scalor = 10.) noexcept(false);
89 
94  static double toRadian(double degree) {
95  if (degree > 180. and degree < 360.) {
96  degree -= 360.;
97  }
98  return degree / 180. * M_PI;
99  }
100 };
101 
102 } // namespace Acts