Project
Loading...
Searching...
No Matches
MisalignmentUtils.h
Go to the documentation of this file.
1// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef O2_ITS3_ALIGNMENT_MISALIGNMENTUTILS_H
13#define O2_ITS3_ALIGNMENT_MISALIGNMENTUTILS_H
14
15#include <array>
16#include <cstddef>
17#include <map>
18#include <string>
19#include <utility>
20
23
24namespace o2::its3::align
25{
26
28 std::map<int, std::array<double, 4>> modes; // n -> (a_n, b_n, c_n, d_n)
29 double alpha{0.};
30 double beta{0.};
31};
32
41
43 static constexpr std::size_t NSensors = 6;
44 std::array<SensorMisalignment, NSensors> sensors{};
45
46 bool empty() const noexcept;
47 const SensorMisalignment& operator[](std::size_t idx) const { return sensors[idx]; }
48 SensorMisalignment& operator[](std::size_t idx) { return sensors[idx]; }
49};
50
52 int sensorID{-1};
53 int layerID{-1};
54 double x{0.}; // tracking-frame X / nominal radius at the measurement
55 double alpha{0.}; // tracking-frame alpha
56 double z{0.}; // tracking-frame measurement z
57};
58
60 double dy{0.};
61 double dz{0.};
62 bool accepted{true};
63
65 {
66 dy += other.dy;
67 dz += other.dz;
68 accepted = accepted && other.accepted;
69 return *this;
70 }
71};
72
73MisalignmentModel loadMisalignmentModel(const std::string& jsonPath);
74MisalignmentShift evaluateLegendreShift(const SensorMisalignment& sensor, const MisalignmentFrame& frame, const TrackSlopes& slopes);
75MisalignmentShift evaluateInextensionalShift(const SensorMisalignment& sensor, const MisalignmentFrame& frame, const TrackSlopes& slopes);
76
77} // namespace o2::its3::align
78
79#endif
Definition of the NDim Legendre Polynominals.
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
GLint GLenum GLint x
Definition glcorearb.h:403
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
MisalignmentShift evaluateInextensionalShift(const SensorMisalignment &sensor, const MisalignmentFrame &frame, const TrackSlopes &slopes)
MisalignmentModel loadMisalignmentModel(const std::string &jsonPath)
MisalignmentShift evaluateLegendreShift(const SensorMisalignment &sensor, const MisalignmentFrame &frame, const TrackSlopes &slopes)
std::map< int, std::array< double, 4 > > modes
SensorMisalignment & operator[](std::size_t idx)
static constexpr std::size_t NSensors
std::array< SensorMisalignment, NSensors > sensors
MisalignmentShift & operator+=(const MisalignmentShift &other)
o2::math_utils::Legendre2DPolynominal legendre
InextensionalMisalignment inextensional
VectorOfTObjectPtrs other