ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SingleHitSpacePointBuilder.ipp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SingleHitSpacePointBuilder.ipp
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 template <typename Cluster>
11  const Cluster& cluster) const {
12  // Local position information
13  auto par = cluster.parameters();
15  return local;
16 }
17 
18 template <typename Cluster>
20  const GeometryContext& gctx, const Cluster& cluster) const {
21  // Receive corresponding surface
22  auto& clusterSurface = cluster.referenceSurface();
23 
24  // Transform local into global position information
26  clusterSurface.localToGlobal(gctx, localCoords(cluster), mom, pos);
27 
28  return pos;
29 }
30 
31 template <typename Cluster>
32 void Acts::SpacePointBuilder<Acts::SpacePoint<Cluster>>::calculateSpacePoints(
33  const GeometryContext& gctx, const std::vector<const Cluster*>& clusters,
34  std::vector<Acts::SpacePoint<Cluster>>& spacePointStorage) const {
35  // Set the space point for all stored hits
36  for (const auto& c : clusters) {
37  Acts::SpacePoint<Cluster> spacePoint;
38  spacePoint.vector = globalCoords(gctx, *c);
39  spacePoint.clusterModule.push_back(c);
40  spacePointStorage.push_back(std::move(spacePoint));
41  }
42 }