BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnRun8cgDetModel.cxx
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
BmnRun8DetModel class implementation
9
*/
10
11
#include "
BmnRun8cgDetModel.h
"
12
13
BmnRun8cgDetModel::BmnRun8cgDetModel
()
14
{
15
for
(
Int_t
i
= 0;
i
<
SIL_STATION_CNT
+
GEM_STATION_CNT
;
i
++)
16
if
(
i
<
SIL_STATION_CNT
)
17
fStationStep
[
i
] =
SIL_MODULES
[
i
] / 2;
18
else
19
fStationStep
[
i
] =
GEM_MODULES
[
i
-
SIL_STATION_CNT
] / 2;
20
}
21
22
// convertion from CbmStsHit DetectorID
23
// for detailed CbmStsHit DetectorID layout see BmnRun8DetModel
24
Int_t
BmnRun8cgDetModel::IDfromHit
(
Int_t
CbmDetectorID)
const
noexcept
25
{
26
Int_t
module{((CbmDetectorID >> 4) & 0xFFF) -
MOD_NUM_START
},
27
station{((CbmDetectorID >> 16) & 0xFF) -
STA_NUM_START
};
28
29
module
/= fStationStep[station];
30
module
*= fStationStep[station];
31
module
+= MOD_NUM_START;
32
33
return
(CbmDetectorID & 0xFFF000F) | (
module
<< 4);
34
}
35
36
Int_t
BmnRun8cgDetModel::MaxModulesInStation
() const noexcept
37
{
38
return
2;
39
}
40
41
Int_t
BmnRun8cgDetModel::Alignables
() const noexcept
42
{
43
return
2 * (
SIL_STATION_CNT
+
GEM_STATION_CNT
);
44
}
45
46
void
BmnRun8cgDetModel::Reset
() noexcept
47
{
48
fSystem
=
SIL_SYSTEM_ID
;
49
fStation
=
SIL_STATION_IDX
[
kFirst
];
50
fModule
=
MOD_NUM_START
-
fStationStep
[
fStation
-
STA_NUM_START
];
51
}
52
53
Int_t
BmnRun8cgDetModel::NextID
() noexcept
54
{
55
// out of range check
56
if
(-1 ==
fSystem
)
57
return
-1;
// EOF marker must be negative
58
59
// next module
60
fModule
+=
fStationStep
[
fStation
-
STA_NUM_START
];
61
62
// next station check
63
if
((
fModule
-
MOD_NUM_START
)
64
/ (
fSystem
==
GEM_SYSTEM_ID
?
GEM_MODULES
[
fStation
-
GEM_STATION_IDX
[
kFirst
]]
65
:
SIL_MODULES
[
fStation
-
SIL_STATION_IDX
[
kFirst
]]))
66
{
67
fModule
=
MOD_NUM_START
;
68
fStation
++;
69
// remember: stations has common enumeration across all systems
70
// currently only two systems are considered - silicon, then GEM
71
72
// EOF check
73
if
(
fStation
>
GEM_STATION_IDX
[
kLast
])
74
return
fSystem
= -1;
75
76
// next system check
77
if
(
fStation
>
SIL_STATION_IDX
[
kLast
])
78
fSystem
=
GEM_SYSTEM_ID
;
79
}
80
81
return
(
fSystem
<< 24) | (
fStation
<< 16) | (
fModule
<< 4) | 0b0010;
82
}
i
int i
Definition
P4_F32vec4.h:22
Int_t
int Int_t
BmnRun8cgDetModel.h
BmnRun8DetModel::GEM_MODULES
static constexpr const Int_t GEM_MODULES[GEM_STATION_CNT]
Definition
BmnRun8DetModel.h:43
BmnRun8DetModel::STA_NUM_START
static constexpr const Int_t STA_NUM_START
Definition
BmnRun8DetModel.h:38
BmnRun8DetModel::SIL_SYSTEM_ID
static constexpr const Int_t SIL_SYSTEM_ID
Definition
BmnRun8DetModel.h:37
BmnRun8DetModel::MOD_NUM_START
static constexpr const Int_t MOD_NUM_START
Definition
BmnRun8DetModel.h:39
BmnRun8DetModel::SIL_MODULES
static constexpr const Int_t SIL_MODULES[SIL_STATION_CNT]
Definition
BmnRun8DetModel.h:43
BmnRun8DetModel::GEM_SYSTEM_ID
static constexpr const Int_t GEM_SYSTEM_ID
Definition
BmnRun8DetModel.h:37
BmnRun8DetModel::fStation
Int_t fStation
Definition
BmnRun8DetModel.h:29
BmnRun8DetModel::SIL_STATION_IDX
static constexpr const Int_t SIL_STATION_IDX[2]
Definition
BmnRun8DetModel.h:41
BmnRun8DetModel::fSystem
Int_t fSystem
Definition
BmnRun8DetModel.h:29
BmnRun8DetModel::kFirst
@ kFirst
Definition
BmnRun8DetModel.h:33
BmnRun8DetModel::kLast
@ kLast
Definition
BmnRun8DetModel.h:34
BmnRun8DetModel::GEM_STATION_CNT
static constexpr const Int_t GEM_STATION_CNT
Definition
BmnRun8DetModel.h:38
BmnRun8DetModel::SIL_STATION_CNT
static constexpr const Int_t SIL_STATION_CNT
Definition
BmnRun8DetModel.h:38
BmnRun8DetModel::fModule
Int_t fModule
Definition
BmnRun8DetModel.h:29
BmnRun8DetModel::GEM_STATION_IDX
static constexpr const Int_t GEM_STATION_IDX[2]
Definition
BmnRun8DetModel.h:42
BmnRun8cgDetModel::BmnRun8cgDetModel
BmnRun8cgDetModel()
Definition
BmnRun8cgDetModel.cxx:13
BmnRun8cgDetModel::Alignables
virtual Int_t Alignables() const noexcept override
Definition
BmnRun8cgDetModel.cxx:41
BmnRun8cgDetModel::NextID
virtual Int_t NextID() noexcept override
Definition
BmnRun8cgDetModel.cxx:53
BmnRun8cgDetModel::MaxModulesInStation
virtual Int_t MaxModulesInStation() const noexcept override
Definition
BmnRun8cgDetModel.cxx:36
BmnRun8cgDetModel::fStationStep
Int_t fStationStep[SIL_STATION_CNT+GEM_STATION_CNT]
Definition
BmnRun8cgDetModel.h:28
BmnRun8cgDetModel::Reset
virtual void Reset() noexcept override
Definition
BmnRun8cgDetModel.cxx:46
BmnRun8cgDetModel::IDfromHit
virtual Int_t IDfromHit(Int_t HitDetectorID) const noexcept override
Definition
BmnRun8cgDetModel.cxx:24
align_new
src
BmnRun8cgDetModel.cxx
Generated on
for BmnRoot by
1.17.0