BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnMeasureLin3.h
Go to the documentation of this file.
1/*
2 BM@N alignment routine
3 BM@N experiment at NICA complex, JINR, 2025
4
5 Department: Math & Soft Group of HEP lab
6 Author: Igor Polev, polev@jinr.int
7
8 BmnMeasureLin3 class header-only implementation
9 Reduced measurement model: 3 shifts only, no rotations at all
10 (phi, theta and psi are all excluded).
11*/
12
13#ifndef BMNMEASURELIN3_H
14#define BMNMEASURELIN3_H
15
16#include "BmnMeasureModel.h"
17
18/*
19 * Same linearized transformation as BmnMeasureLin6 with phi = theta = psi = 0,
20 * so the rotation matrix is the identity and only the shift survives.
21 *
22 * IMPORTANT: The formulae below are just reduced versions of full
23 * BmnMeasureLin6 model -- they was not checked separately.
24 *
25 * x_m = alpha_x + beta_x * z0 + dx - dz * beta_x_bar
26 * y_m = alpha_y + beta_y * z0 + dy - dz * beta_y_bar
27 *
28 * IMPORTANT: The phi, theta and psi slots of the parameter vector stay
29 * in place but carry no effect (SVectGL is fixed size 6).
30 * Do not forget to add the corresponding constraints!
31 */
32
34{
35 public:
36 const char* Description() const noexcept override; // out of line: anchors the vtable
37
38 inline Double_t X(Double_t z0, const SVectGL& gl, const SVectLC& lc) const noexcept override
39 {
40 const Double_t beta_x{lc(iX1)};
41 return lc(iX0) + beta_x * z0 + gl(idX) - gl(idZ) * beta_x;
42 }
43
44 inline Double_t Y(Double_t z0, const SVectGL& gl, const SVectLC& lc) const noexcept override
45 {
46 const Double_t beta_y{lc(iY1)};
47 return lc(iY0) + beta_y * z0 + gl(idY) - gl(idZ) * beta_y;
48 }
49
50 inline SVectGL dXdA(Double_t /*z0*/, const SVectLC& lc) const noexcept override
51 {
52 return SVectGL{
53 1.0, 0.0,
54 -lc(iX1), // d/ddZ = -beta_x
55 0.0, // d/dphi excluded
56 0.0, // d/dtheta excluded
57 0.0 // d/dpsi excluded
58 };
59 }
60
61 inline SVectGL dYdA(Double_t /*z0*/, const SVectLC& lc) const noexcept override
62 {
63 return SVectGL{
64 0.0, 1.0,
65 -lc(iY1), // d/ddZ = -beta_y
66 0.0, // d/dphi excluded
67 0.0, // d/dtheta excluded
68 0.0 // d/dpsi excluded
69 };
70 }
71
72 inline Bool_t AlignHit(FairHit& hit, const SVectGL& a) const noexcept override
73 {
74 // no rotation to undo: the exact correction is the shift itself
75 hit.SetXYZ(hit.GetX() - a(idX), hit.GetY() - a(idY), hit.GetZ() - a(idZ));
76 return kTRUE;
77 }
78
79 inline void AlignHitApproximately(SVect3& hit, const SVectGL& a) const noexcept override
80 {
81 hit(iX) -= a(idX);
82 hit(iY) -= a(idY);
83 hit(iZ) -= a(idZ);
84 }
85};
86
87#endif // BMNMEASURELIN3_H
@ iY1
@ iY0
@ iX1
@ iX0
RM::SVector< Double_t, 3 > SVect3
@ idX
@ idZ
@ idY
RM::SVector< Double_t, BMN_LOCAL_PARAMS_PT > SVectLC
RM::SVector< Double_t, BMN_GLOBAL_PARAMS_PD > SVectGL
@ iZ
@ iX
@ iY
bool Bool_t
double Double_t
constexpr Bool_t kTRUE
Double_t X(Double_t z0, const SVectGL &gl, const SVectLC &lc) const noexcept override
void AlignHitApproximately(SVect3 &hit, const SVectGL &a) const noexcept override
Bool_t AlignHit(FairHit &hit, const SVectGL &a) const noexcept override
Double_t Y(Double_t z0, const SVectGL &gl, const SVectLC &lc) const noexcept override
SVectGL dXdA(Double_t, const SVectLC &lc) const noexcept override
SVectGL dYdA(Double_t, const SVectLC &lc) const noexcept override
const char * Description() const noexcept override