BmnRoot
26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnMeasureLin4.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
BmnMeasureLin4 class header-only implementation
9
Reduced measurement model: 3 shifts + rotation about Z axis only
10
(phi and theta, the rotations about X and Y, are excluded).
11
*/
12
13
#ifndef BMNMEASURELIN4_H
14
#define BMNMEASURELIN4_H
15
16
#include "
BmnMeasureModel.h
"
17
18
/*
19
* Same linearized transformation as BmnMeasureLin6 with phi = theta = 0.
20
*
21
* IMPORTANT: The formulae below are just reduced versions of full
22
* BmnMeasureLin6 model -- they was not checked separately.
23
*
24
* R_z = | 1 -psi 0 |
25
* | psi 1 0 |
26
* | 0 0 1 |
27
*
28
* x_m = alpha_x + beta_x * z0 + dx - dz * beta_x_bar - psi * y_bar
29
* y_m = alpha_y + beta_y * z0 + dy - dz * beta_y_bar + psi * x_bar
30
*
31
* IMPORTANT: The phi and theta slots of the parameter vector stay
32
* in place but carry no effect (SVectGL is fixed size 6).
33
* Do not forget to add the corresponding constraints!
34
*/
35
36
class
BmnMeasureLin4
:
public
BmnMeasureModel
37
{
38
public
:
39
const
char
*
Description
()
const
noexcept
override
;
// out of line: anchors the vtable
40
41
inline
Double_t
X
(
Double_t
z0,
const
SVectGL
& gl,
const
SVectLC
& lc)
const
noexcept
override
42
{
43
const
Double_t
beta_x{lc(
iX1
)};
44
return
lc(
iX0
) + beta_x * z0 + gl(
idX
) - gl(
idZ
) * beta_x - gl(
iPsi
) * (lc(
iY0
) + lc(
iY1
) * z0);
45
}
46
47
inline
Double_t
Y
(
Double_t
z0,
const
SVectGL
& gl,
const
SVectLC
& lc)
const
noexcept
override
48
{
49
const
Double_t
beta_y{lc(
iY1
)};
50
return
lc(
iY0
) + beta_y * z0 + gl(
idY
) - gl(
idZ
) * beta_y + gl(
iPsi
) * (lc(
iX0
) + lc(
iX1
) * z0);
51
}
52
53
inline
SVectGL
dXdA
(
Double_t
z0,
const
SVectLC
& lc)
const
noexcept
override
54
{
55
return
SVectGL
{
56
1.0,
57
0.0,
58
-lc(
iX1
),
// d/ddZ = -beta_x
59
0.0,
// d/dphi excluded
60
0.0,
// d/dtheta excluded
61
-(lc(
iY0
) + lc(
iY1
) * z0)
// d/dpsi = -y_bar
62
};
63
}
64
65
inline
SVectGL
dYdA
(
Double_t
z0,
const
SVectLC
& lc)
const
noexcept
override
66
{
67
return
SVectGL
{
68
0.0,
69
1.0,
70
-lc(
iY1
),
// d/ddZ = -beta_y
71
0.0,
// d/dphi excluded
72
0.0,
// d/dtheta excluded
73
lc(
iX0
) + lc(
iX1
) * z0
// d/dpsi = x_bar
74
};
75
}
76
77
inline
Bool_t
AlignHit
(
FairHit
& hit,
const
SVectGL
& a)
const
noexcept
override
78
{
79
SMatr3x3
rot{
RM::SMatrixIdentity
()};
80
rot(1, 0) = a(
iPsi
);
81
rot(0, 1) = -a(
iPsi
);
82
83
Int_t
ifail;
84
SVect3
hitAligned{rot.
InverseFast
(ifail) *
SVect3
(hit.GetX() - a(
idX
), hit.GetY() - a(
idY
), -a(
idZ
))};
85
if
(ifail)
86
return
kFALSE
;
87
88
hit.SetXYZ(hitAligned(
iX
), hitAligned(
iY
), hitAligned(
iZ
) + hit.GetZ());
89
return
kTRUE
;
90
}
91
92
inline
void
AlignHitApproximately
(
SVect3
& hit,
const
SVectGL
& a)
const
noexcept
override
93
{
94
// First order approximate correction (Z rotation only)
95
const
Double_t
x_m{hit(
iX
)}, y_m{hit(
iY
)};
96
hit(
iX
) -= a(
iX
) - a(
iPsi
) * y_m;
97
hit(
iY
) -= a(
iY
) + a(
iPsi
) * x_m;
98
hit(
iZ
) -= a(
iZ
);
99
}
100
};
101
102
#endif
// BMNMEASURELIN4_H
iY1
@ iY1
Definition
BmnAlignDefines.h:45
iY0
@ iY0
Definition
BmnAlignDefines.h:44
iX1
@ iX1
Definition
BmnAlignDefines.h:43
iX0
@ iX0
Definition
BmnAlignDefines.h:42
SVect3
RM::SVector< Double_t, 3 > SVect3
Definition
BmnAlignDefines.h:59
idX
@ idX
Definition
BmnAlignDefines.h:32
idZ
@ idZ
Definition
BmnAlignDefines.h:34
iPsi
@ iPsi
Definition
BmnAlignDefines.h:37
idY
@ idY
Definition
BmnAlignDefines.h:33
SVectLC
RM::SVector< Double_t, BMN_LOCAL_PARAMS_PT > SVectLC
Definition
BmnAlignDefines.h:60
SVectGL
RM::SVector< Double_t, BMN_GLOBAL_PARAMS_PD > SVectGL
Definition
BmnAlignDefines.h:61
SMatr3x3
RM::SMatrix< Double_t, 3, 3 > SMatr3x3
Definition
BmnAlignDefines.h:63
iZ
@ iZ
Definition
BmnAlignDefines.h:27
iX
@ iX
Definition
BmnAlignDefines.h:25
iY
@ iY
Definition
BmnAlignDefines.h:26
BmnMeasureModel.h
Bool_t
bool Bool_t
Int_t
int Int_t
kFALSE
constexpr Bool_t kFALSE
Double_t
double Double_t
kTRUE
constexpr Bool_t kTRUE
BmnMeasureLin4
Definition
BmnMeasureLin4.h:37
BmnMeasureLin4::Y
Double_t Y(Double_t z0, const SVectGL &gl, const SVectLC &lc) const noexcept override
Definition
BmnMeasureLin4.h:47
BmnMeasureLin4::AlignHitApproximately
void AlignHitApproximately(SVect3 &hit, const SVectGL &a) const noexcept override
Definition
BmnMeasureLin4.h:92
BmnMeasureLin4::AlignHit
Bool_t AlignHit(FairHit &hit, const SVectGL &a) const noexcept override
Definition
BmnMeasureLin4.h:77
BmnMeasureLin4::X
Double_t X(Double_t z0, const SVectGL &gl, const SVectLC &lc) const noexcept override
Definition
BmnMeasureLin4.h:41
BmnMeasureLin4::Description
const char * Description() const noexcept override
Definition
BmnMeasureLin4.cxx:13
BmnMeasureLin4::dYdA
SVectGL dYdA(Double_t z0, const SVectLC &lc) const noexcept override
Definition
BmnMeasureLin4.h:65
BmnMeasureLin4::dXdA
SVectGL dXdA(Double_t z0, const SVectLC &lc) const noexcept override
Definition
BmnMeasureLin4.h:53
BmnMeasureModel
Definition
BmnMeasureModel.h:33
FairHit
ROOT::Math::SMatrix::InverseFast
SMatrix< T, D1, D2, R > InverseFast(int &ifail) const
ROOT::Math::SMatrixIdentity
align_new
models
BmnMeasureLin4.h
Generated on
for BmnRoot by
1.17.0