PandaRoot
PndFtsGeom.h
Go to the documentation of this file.
1 //
2 // Created by Bartosz Sobol on 03.05.2020.
3 //
4 
5 #pragma once
6 
7 #include <array>
8 
9 #include "PndFtsStraw.h"
10 #include "PndFtsSimpleHit.h"
11 
12 namespace PndFtsTrackFinder {
13 
14 constexpr uint16_t GEOM_STRAWS_ARRAY_SIZE = 12224;
15 constexpr uint16_t GEOM_STRAWS_LAYERS_Z_SIZE = 48;
16 
17 using GeomStrawsArrayT = std::array<PndFtsStraw, GEOM_STRAWS_ARRAY_SIZE>;
18 using GeomLayersZArrayT = std::array<float, GEOM_STRAWS_LAYERS_Z_SIZE>;
19 
20 struct PndFtsGeom {
21 
22  constexpr inline PndFtsGeom(GeomStrawsArrayT straws, GeomLayersZArrayT layersZ) noexcept : fStraws{straws}, fLayersZ{layersZ} {}
23 
24  [[nodiscard]] constexpr inline PndFtsStraw Straw(const uint16_t strawId) const noexcept { return fStraws[strawId - 1]; }
25 
26  [[nodiscard]] constexpr inline PndFtsStraw Straw(const PndFtsSimpleHit &hit) const noexcept { return fStraws[hit.fStrawId - 1]; }
27 
28  [[nodiscard]] constexpr inline float LayerZ(const uint16_t layerId) const noexcept { return fLayersZ[layerId - 1]; }
29 
32 };
33 
34 } // namespace PndFtsTrackFinder
const GeomStrawsArrayT fStraws
Definition: PndFtsGeom.h:30
constexpr uint16_t GEOM_STRAWS_LAYERS_Z_SIZE
Definition: PndFtsGeom.h:15
constexpr uint16_t GEOM_STRAWS_ARRAY_SIZE
Definition: PndFtsGeom.h:14
std::array< PndFtsStraw, GEOM_STRAWS_ARRAY_SIZE > GeomStrawsArrayT
Definition: PndFtsGeom.h:17
constexpr PndFtsStraw Straw(const uint16_t strawId) const noexcept
Definition: PndFtsGeom.h:24
std::array< float, GEOM_STRAWS_LAYERS_Z_SIZE > GeomLayersZArrayT
Definition: PndFtsGeom.h:18
constexpr float LayerZ(const uint16_t layerId) const noexcept
Definition: PndFtsGeom.h:28
constexpr PndFtsStraw Straw(const PndFtsSimpleHit &hit) const noexcept
Definition: PndFtsGeom.h:26
constexpr PndFtsGeom(GeomStrawsArrayT straws, GeomLayersZArrayT layersZ) noexcept
Definition: PndFtsGeom.h:22
const GeomLayersZArrayT fLayersZ
Definition: PndFtsGeom.h:31