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
27// Legendre parameterisation of the open half-shell deformation, matching InextensionalDOFSet: inextensional
28// coefficients f_k, g_k of the normalised azimuth u, plus optional strictly radial modes h_{k,l} (l >= 1) in P_k(u)
29// P_l(v). See AlignmentDOF.h for the displacement field.
31 std::map<int, double> f; // k -> f_k
32 std::map<int, double> g; // k -> g_k
33 std::map<std::pair<int, int>, double> h; // (k, l) -> h_{k,l}, l >= 1
34};
35
44
46 static constexpr std::size_t NSensors = 6;
47 std::array<SensorMisalignment, NSensors> sensors{};
48
49 bool empty() const noexcept;
50 const SensorMisalignment& operator[](std::size_t idx) const { return sensors[idx]; }
51 SensorMisalignment& operator[](std::size_t idx) { return sensors[idx]; }
52};
53
55 int sensorID{-1};
56 int layerID{-1};
57 double x{0.}; // tracking-frame X / nominal radius at the measurement
58 double alpha{0.}; // tracking-frame alpha
59 double z{0.}; // tracking-frame measurement z
60};
61
63 double dy{0.};
64 double dz{0.};
65 bool accepted{true};
66
68 {
69 dy += other.dy;
70 dz += other.dz;
71 accepted = accepted && other.accepted;
72 return *this;
73 }
74};
75
76MisalignmentModel loadMisalignmentModel(const std::string& jsonPath);
77MisalignmentShift evaluateLegendreShift(const SensorMisalignment& sensor, const MisalignmentFrame& frame, const TrackSlopes& slopes);
78MisalignmentShift evaluateInextensionalShift(const SensorMisalignment& sensor, const MisalignmentFrame& frame, const TrackSlopes& slopes);
79
80} // namespace o2::its3::align
81
82#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< std::pair< int, int >, double > h
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