Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SpacePointGrid.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SpacePointGrid.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018 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 
15 
16 #include <memory>
17 
18 namespace Acts {
19 
21  // minimum pT to be found by seedFinder
22  float minPt = 0;
23  // maximum extension of sensitive detector layer relevant for seeding as
24  // distance from x=y=0 (i.e. in r)
25  float rMax = 0;
26  // maximum extension of sensitive detector layer relevant for seeding in
27  // positive direction in z
28  float zMax = 0;
29  // maximum extension of sensitive detector layer relevant for seeding in
30  // negative direction in z
31  float zMin = 0;
32  // maximum distance in r from middle space point to bottom or top spacepoint
33  float deltaRMax = 0;
34  // maximum forward direction expressed as cot(theta)
35  float cotThetaMax = 0;
36  // maximum impact parameter in mm
37  float impactMax = 0;
38  // minimum phi value for phiAxis construction
39  float phiMin = -M_PI;
40  // maximum phi value for phiAxis construction
41  float phiMax = M_PI;
42  // Multiplicator for the number of phi-bins. The minimum number of phi-bins
43  // depends on min_pt, magnetic field: 2*M_PI/(minPT particle phi-deflection).
44  // phiBinDeflectionCoverage is a multiplier for this number. If
45  // numPhiNeighbors (in the configuration of the BinFinders) is configured to
46  // return 1 neighbor on either side of the current phi-bin (and you want to
47  // cover the full phi-range of minPT), leave this at 1.
49  // maximum number of phi bins
50  int maxPhiBins = 10000;
51  // enable non equidistant binning in z
52  std::vector<float> zBinEdges;
53  bool isInInternalUnits = false;
55  if (isInInternalUnits) {
56  throw std::runtime_error(
57  "Repeated conversion to internal units for SpacePointGridConfig");
58  }
59  using namespace Acts::UnitLiterals;
61  config.isInInternalUnits = true;
62  config.minPt /= 1_MeV;
63  config.rMax /= 1_mm;
64  config.zMax /= 1_mm;
65  config.zMin /= 1_mm;
66  config.deltaRMax /= 1_mm;
67 
68  return config;
69  }
70 };
71 
73  // magnetic field
74  float bFieldInZ = 0;
75  bool isInInternalUnits = false;
77  if (isInInternalUnits) {
78  throw std::runtime_error(
79  "Repeated conversion to internal units for SpacePointGridOptions");
80  }
81  using namespace Acts::UnitLiterals;
83  options.isInInternalUnits = true;
84  options.bFieldInZ /= 1000_T;
85 
86  return options;
87  }
88 };
89 
90 template <typename external_spacepoint_t>
91 using SpacePointGrid = detail::Grid<
92  std::vector<std::unique_ptr<InternalSpacePoint<external_spacepoint_t>>>,
93  detail::Axis<detail::AxisType::Equidistant,
94  detail::AxisBoundaryType::Closed>,
95  detail::Axis<detail::AxisType::Variable, detail::AxisBoundaryType::Bound>>;
96 
98  public:
99  template <typename external_spacepoint_t>
100  static std::unique_ptr<SpacePointGrid<external_spacepoint_t>> createGrid(
101  const Acts::SpacePointGridConfig& _config,
102  const Acts::SpacePointGridOptions& _options);
103 };
104 } // namespace Acts