BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnAlignDefines.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.ru
7
8
Global defines for alignment task
9
*/
10
11
#ifndef BMN_ALIGN_DEFINES_H
12
#define BMN_ALIGN_DEFINES_H
13
14
#include "
Math/SMatrix.h
"
15
#include "
Math/SVector.h
"
16
#include "
RtypesCore.h
"
17
18
// main configuration parameters
19
#define BMN_MODULE_COUNT 22
// total number of FSD+GEM alignable detector elements (run 8)
20
#define BMN_CORRECTIONS {"dX", "dY", "dZ"}
21
#define BMN_GLOBAL_PARAMS_PD 3
// global alignment parameters per detector
22
#define BMN_LOCAL_PARAMS_PT 4
// local alignment parameters per track
23
#define BMN_MIN_HITS_PER_TRACK 5
// minimum alowed number of hits in track
24
#define BMN_MAX_CHI2_PER_NDF 5.0
// maximum allowed chi2 per hit in track
25
#define BMN_MIN_HITS_PORTION 0.1
// minimum portion of even part of tracks that must hit detector
26
27
// TODO: avoid variables in this header
28
constexpr
static
Int_t
BMN_GLPARAMS_TOTAL
{
BMN_MODULE_COUNT
*
BMN_GLOBAL_PARAMS_PD
};
29
30
#define BMN_SVD_LOW 10.0
// threshold for SVD values visualization
31
#define BMN_ALMOST_ZERO 1.0E-12
// approximate zero value for hard tests
32
#define BMN_CLOSE_TO_ZERO 1.0E-6
// approximate zero for (soft) tests of numerical solution
33
#define BMN_DRAW_TRACKS_CNT 20
// number of random tracks to draw
34
35
#define BMN_MAX_HIT_RAM_SIZE 8589934592
// 8GB RAM limit
36
#define BMN_MIN_TRACKS_PER_THREAD 1000
// multi-threading chunks
37
#define BMN_TRACKS_READ_PORTION 100000
// UI
38
#define BMN_THREAD_TRACKS_TICK 40000
// UI
39
40
// alignment algorithm parameters
41
#define BMN_MIN_ACTIVE_DETECTORS 1
// minimum number of active detectors to continue alignment
42
#define BMN_MIN_REL_PROGRESS 0.001
// relative tolerance for MSE convergence
43
#define BMN_REL_PROGRESS_GOOD 0.05
// relative iteration progress to turn off regularization
44
#define BMN_MIN_REGULAR_ITERS 3
// minimum number of sequential iterations with egularization
45
#define BMN_MAX_REGULAR_RETRY 10
// maximum number of retries with regularization turned on
46
#define BMN_1D_STEP_TOLERANCE 0.01
// absolute tolerance for 1D minimizer
47
#define BMN_BRENT_GRID_SIZE 4
// number of points in Brent preliminary grid
48
#define BMN_LM_ITERATIONS_MIN 3
// minimum number of Levenberg–Marquardt iterations (at least 2 required)
49
#define BMN_LM_ITERATIONS_MAX \
50
10
// maximum number of Levenberg–Marquardt iterations
51
// (at least BMN_LM_ITERATIONS_MIN + 1)
52
#define BMN_LM_MULT_STEP 10.0
// multiplier for Levenberg–Marquardt factor
53
54
// alignment algorithm test parameters
55
#define BMN_TEST_MODULE_COUNT 16
56
#define BMN_TEST_AVERAGE_DX 0.0208
// taken from real data 0.0208
57
#define BMN_TEST_AVERAGE_DY 0.1234
// taken from real data 0.1234
58
#define BMN_TEST_ALPHA1_SIGMA 1.0
59
#define BMN_TEST_ALPHA2_MIN -1.0
// not really physical value
60
#define BMN_TEST_ALPHA2_MAX 1.0
// not really physical value
61
#define BMN_ALIGN_PARAM_TOLERENCE 0.1
62
63
#define BMN_RESIDUALS_BINS 201
64
#define BMN_RESIDUALS_RANGE_X 0.2
65
#define BMN_RESIDUALS_RANGE_Y 1.0
66
#define BMN_RESIDUALS_MAX 1000.0
67
68
// fixed-size matrix types aliases
69
70
typedef
ROOT::Math::SVector<Double_t, 2>
SVect2
;
// used in DEBUG only right now
71
typedef
ROOT::Math::SVector<Double_t, 3>
SVect3
;
72
typedef
ROOT::Math::SVector<Double_t, BMN_LOCAL_PARAMS_PT>
SVectLC
;
73
typedef
ROOT::Math::SVector<Double_t, BMN_GLOBAL_PARAMS_PD>
SVectGL
;
74
typedef
ROOT::Math::SVector<Double_t, BMN_GLPARAMS_TOTAL>
SVectGLT
;
75
76
typedef
ROOT::Math::SMatrix<Double_t, 3, 3>
SMatr3x3
;
77
typedef
ROOT::Math::SMatrix<Double_t, BMN_LOCAL_PARAMS_PT, BMN_LOCAL_PARAMS_PT>
SMatrLC
;
78
typedef
ROOT::Math::SMatrix<Double_t, BMN_GLOBAL_PARAMS_PD, BMN_GLOBAL_PARAMS_PD>
SMatrGL
;
79
typedef
ROOT::Math::SMatrix<Double_t, BMN_GLPARAMS_TOTAL, BMN_GLPARAMS_TOTAL>
SMatrC
;
80
typedef
ROOT::Math::SMatrix<Double_t, BMN_GLPARAMS_TOTAL, BMN_LOCAL_PARAMS_PT>
SMatrG
;
81
typedef
ROOT::Math::SMatrix<Double_t, BMN_GLOBAL_PARAMS_PD, BMN_LOCAL_PARAMS_PT>
SMatrGP
;
82
83
enum
CoordIdx
84
{
85
iX
= 0,
86
iY
= 1,
87
iZ
= 2
88
};
89
90
enum
LocalParamsIdx
91
{
92
iX0
= 0,
93
iX1
= 1,
94
iY0
= 2,
95
iY1
= 3
96
};
97
98
// using global random generator for reproducibility purposes
99
// TODO: try to avoid static variables in this header
100
#include "
TRandom3.h
"
101
static
TRandom3
BMN_RND
{0};
102
103
#endif
RtypesCore.h
Int_t
int Int_t
SMatrix.h
SVector.h
TRandom3.h
SVect2
ROOT::Math::SVector< Double_t, 2 > SVect2
Definition
BmnAlignDefines.h:70
SMatrC
ROOT::Math::SMatrix< Double_t, BMN_GLPARAMS_TOTAL, BMN_GLPARAMS_TOTAL > SMatrC
Definition
BmnAlignDefines.h:79
SMatrGL
ROOT::Math::SMatrix< Double_t, BMN_GLOBAL_PARAMS_PD, BMN_GLOBAL_PARAMS_PD > SMatrGL
Definition
BmnAlignDefines.h:78
LocalParamsIdx
LocalParamsIdx
Definition
BmnAlignDefines.h:91
iY1
@ iY1
Definition
BmnAlignDefines.h:95
iY0
@ iY0
Definition
BmnAlignDefines.h:94
iX1
@ iX1
Definition
BmnAlignDefines.h:93
iX0
@ iX0
Definition
BmnAlignDefines.h:92
SVectGLT
ROOT::Math::SVector< Double_t, BMN_GLPARAMS_TOTAL > SVectGLT
Definition
BmnAlignDefines.h:74
SMatrG
ROOT::Math::SMatrix< Double_t, BMN_GLPARAMS_TOTAL, BMN_LOCAL_PARAMS_PT > SMatrG
Definition
BmnAlignDefines.h:80
SMatrGP
ROOT::Math::SMatrix< Double_t, BMN_GLOBAL_PARAMS_PD, BMN_LOCAL_PARAMS_PT > SMatrGP
Definition
BmnAlignDefines.h:81
SMatrLC
ROOT::Math::SMatrix< Double_t, BMN_LOCAL_PARAMS_PT, BMN_LOCAL_PARAMS_PT > SMatrLC
Definition
BmnAlignDefines.h:77
BMN_RND
static TRandom3 BMN_RND
Definition
BmnAlignDefines.h:101
SVectGL
ROOT::Math::SVector< Double_t, BMN_GLOBAL_PARAMS_PD > SVectGL
Definition
BmnAlignDefines.h:73
SMatr3x3
ROOT::Math::SMatrix< Double_t, 3, 3 > SMatr3x3
Definition
BmnAlignDefines.h:76
BMN_GLPARAMS_TOTAL
static constexpr Int_t BMN_GLPARAMS_TOTAL
Definition
BmnAlignDefines.h:28
SVect3
ROOT::Math::SVector< Double_t, 3 > SVect3
Definition
BmnAlignDefines.h:71
SVectLC
ROOT::Math::SVector< Double_t, BMN_LOCAL_PARAMS_PT > SVectLC
Definition
BmnAlignDefines.h:72
BMN_MODULE_COUNT
#define BMN_MODULE_COUNT
Definition
BmnAlignDefines.h:19
CoordIdx
CoordIdx
Definition
BmnAlignDefines.h:84
iZ
@ iZ
Definition
BmnAlignDefines.h:87
iX
@ iX
Definition
BmnAlignDefines.h:85
iY
@ iY
Definition
BmnAlignDefines.h:86
BMN_GLOBAL_PARAMS_PD
#define BMN_GLOBAL_PARAMS_PD
Definition
BmnAlignDefines.h:21
ROOT::Math::SMatrix
ROOT::Math::SVector
TRandom3
install
include
BmnAlignDefines.h
Generated on
for BmnRoot by
1.17.0