CbmRoot
Loading...
Searching...
No Matches
CaGridEntry.h
Go to the documentation of this file.
1/* Copyright (C) 2010-2020 Frankfurt Institute for Advanced Studies, Goethe-Universität Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Valentina Akishina, Igor Kulakov [committer], Maksym Zyzak */
4
5#pragma once // include this header only once per compilation unit
6
7#include "CaDefs.h"
8#include "CaHit.h"
9#include "CaSimd.h"
10
11namespace cbm::algo::ca
12{
13
16 struct GridEntry {
17
18 GridEntry() = default;
19
20 GridEntry(const ca::Hit& hit, ca::HitIndex_t id) { Set(hit, id); };
21
22 void Set(const ca::Hit& hit, ca::HitIndex_t id)
23 {
24 fObjectId = id;
25 x = hit.X();
26 y = hit.Y();
27 z = hit.Z();
28 t = hit.T();
29 rangeX = hit.RangeX();
30 rangeY = hit.RangeY();
31 rangeT = hit.RangeT();
32 }
33
35
36 fscal Z() const { return z; }
37 fscal T() const { return t; }
38 fscal X() const { return x; }
39 fscal Y() const { return y; }
40 fscal RangeX() const { return rangeX; }
41 fscal RangeY() const { return rangeY; }
42 fscal RangeT() const { return rangeT; }
43
44 private:
45 constexpr static fscal kUndef = 0.; // TODO: test with constants::Undef<fscal>
46
48
49 fscal x{kUndef}; // x coordinate of the hit
50 fscal y{kUndef}; // y coordinate of the hit
51 fscal z{kUndef}; // z coordinate of the hit
52 fscal t{kUndef}; // t coordinate of the hit
53 fscal rangeX{kUndef}; // x range of the hit
54 fscal rangeY{kUndef}; // y range of the hit
55 fscal rangeT{kUndef}; // t range of the hit
56 };
57
58} // namespace cbm::algo::ca
Compile-time constants definition for the CA tracking algorithm.
A generic hit for the CA tracker (header)
ca::Hit class describes a generic hit for the CA tracker
Definition CaHit.h:32
fscal Z() const
Get the Z coordinate.
Definition CaHit.h:108
fscal RangeX() const
Get the +/- range of uncertainty of X coordinate.
Definition CaHit.h:126
fscal Y() const
Get the Y coordinate.
Definition CaHit.h:105
fscal RangeY() const
Get the +/- range of uncertainty of Y coordinate.
Definition CaHit.h:129
fscal RangeT() const
Get the +/- range of uncertainty of time.
Definition CaHit.h:132
fscal T() const
Get the time.
Definition CaHit.h:111
fscal X() const
Get the X coordinate.
Definition CaHit.h:102
TODO: SZh 8.11.2022: add selection of parameterisation.
Definition CaBranch.h:14
kf::fscal fscal
Definition CaSimd.h:14
unsigned int HitIndex_t
Index of ca::Hit.
Definition CaHit.h:27
A class to store hit information on the ca::Grid.
Definition CaGridEntry.h:16
void Set(const ca::Hit &hit, ca::HitIndex_t id)
Definition CaGridEntry.h:22
ca::HitIndex_t GetObjectId() const
Definition CaGridEntry.h:34
GridEntry(const ca::Hit &hit, ca::HitIndex_t id)
Definition CaGridEntry.h:20
static constexpr fscal kUndef
Definition CaGridEntry.h:45
ca::HitIndex_t fObjectId
hit id in L1Algo::fWindowHits array
Definition CaGridEntry.h:47