ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DoubleHitSpacePointBuilder.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DoubleHitSpacePointBuilder.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018-2019 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 
14 #include "Acts/Utilities/Units.hpp"
15 
16 namespace Acts {
17 
21  double diffTheta2 = 1.;
23  double diffPhi2 = 1.;
25  double diffDist = 100. * UnitConstants::mm;
27  double stripLengthTolerance = 0.01;
29  double stripLengthGapTolerance = 0.01;
31  Vector3D vertex = {0., 0., 0.};
33  bool usePerpProj = false;
34 };
35 
46 template <typename Cluster>
47 class SpacePointBuilder<SpacePoint<Cluster>> {
48  public:
52 
62  void makeClusterPairs(const GeometryContext& gctx,
63  const std::vector<const Cluster*>& clustersFront,
64  const std::vector<const Cluster*>& clustersBack,
65  std::vector<std::pair<const Cluster*, const Cluster*>>&
66  clusterPairs) const;
67 
75  void calculateSpacePoints(
76  const GeometryContext& gctx,
77  const std::vector<std::pair<const Cluster*, const Cluster*>>&
78  clusterPairs,
79  std::vector<SpacePoint<Cluster>>& spacePoints) const;
80 
81  private:
84 
90  Vector2D localCoords(const Cluster& cluster) const;
91 
96  Vector3D globalCoords(const GeometryContext& gctx,
97  const Cluster& cluster) const;
98 
103  std::pair<Vector3D, Vector3D> endsOfStrip(const GeometryContext& gctx,
104  const Cluster& cluster) const;
105 };
106 } // namespace Acts