PandaRoot
PndFtsGeom.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //
14 // Created by Bartosz Sobol on 03.05.2020.
15 //
16 
17 #pragma once
18 
19 #include <array>
20 
21 #include "PndFtsStraw.h"
22 #include "PndFtsSimpleHit.h"
23 
24 namespace PndFtsTrackFinder {
25 
26 constexpr uint16_t GEOM_STRAWS_ARRAY_SIZE = 12224;
27 constexpr uint16_t GEOM_STRAWS_LAYERS_Z_SIZE = 48;
28 
29 using GeomStrawsArrayT = std::array<PndFtsStraw, GEOM_STRAWS_ARRAY_SIZE>;
30 using GeomLayersZArrayT = std::array<float, GEOM_STRAWS_LAYERS_Z_SIZE>;
31 
32 struct PndFtsGeom {
33 
34  constexpr inline PndFtsGeom(GeomStrawsArrayT straws, GeomLayersZArrayT layersZ) noexcept : fStraws{straws}, fLayersZ{layersZ} {}
35 
36  [[nodiscard]] constexpr inline PndFtsStraw Straw(const uint16_t strawId) const noexcept { return fStraws[strawId - 1]; }
37 
38  [[nodiscard]] constexpr inline PndFtsStraw Straw(const PndFtsSimpleHit &hit) const noexcept { return fStraws[hit.fStrawId - 1]; }
39 
40  [[nodiscard]] constexpr inline float LayerZ(const uint16_t layerId) const noexcept { return fLayersZ[layerId - 1]; }
41 
44 };
45 
46 } // namespace PndFtsTrackFinder
const GeomStrawsArrayT fStraws
Definition: PndFtsGeom.h:42
constexpr uint16_t GEOM_STRAWS_LAYERS_Z_SIZE
Definition: PndFtsGeom.h:27
constexpr uint16_t GEOM_STRAWS_ARRAY_SIZE
Definition: PndFtsGeom.h:26
std::array< PndFtsStraw, GEOM_STRAWS_ARRAY_SIZE > GeomStrawsArrayT
Definition: PndFtsGeom.h:29
constexpr PndFtsStraw Straw(const uint16_t strawId) const noexcept
Definition: PndFtsGeom.h:36
std::array< float, GEOM_STRAWS_LAYERS_Z_SIZE > GeomLayersZArrayT
Definition: PndFtsGeom.h:30
constexpr float LayerZ(const uint16_t layerId) const noexcept
Definition: PndFtsGeom.h:40
constexpr PndFtsStraw Straw(const PndFtsSimpleHit &hit) const noexcept
Definition: PndFtsGeom.h:38
constexpr PndFtsGeom(GeomStrawsArrayT straws, GeomLayersZArrayT layersZ) noexcept
Definition: PndFtsGeom.h:34
const GeomLayersZArrayT fLayersZ
Definition: PndFtsGeom.h:43