ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeometryObject.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GeometryObject.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-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 
17 
18 namespace Acts {
19 
29  public:
31  GeometryObject() = default;
32 
34  GeometryObject(const GeometryObject&) = default;
35 
39  GeometryObject(const GeometryID& geoID) : m_geoID(geoID) {}
40 
45  if (&geoID != this) {
46  m_geoID = geoID.m_geoID;
47  }
48  return *this;
49  }
50 
52  const GeometryID& geoID() const;
53 
60  virtual const Vector3D binningPosition(const GeometryContext& gctx,
61  BinningValue bValue) const = 0;
62 
69  virtual double binningPositionValue(const GeometryContext& gctx,
70  BinningValue bValue) const;
71 
75  void assignGeoID(const GeometryID& geoID);
76 
77  protected:
79 };
80 
81 inline const GeometryID& GeometryObject::geoID() const {
82  return m_geoID;
83 }
84 
85 inline void GeometryObject::assignGeoID(const GeometryID& geoID) {
86  m_geoID = geoID;
87 }
88 
90  BinningValue bValue) const {
91  return VectorHelpers::cast(binningPosition(gctx, bValue), bValue);
92 }
93 } // namespace Acts