BmnRoot
26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnRun8cgDM.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
BmnRun8cgDM class declaration
9
Run8 coarce-grained representation of detector elements via encoding
10
*/
11
12
#ifndef BMNRUN8CGDM_H
13
#define BMNRUN8CGDM_H
14
15
#include "
BmnRun8DM.h
"
16
17
/*
18
* Detector elements enumeration scheme
19
*
20
* SystemID - fixed constatns defined in BmnDetectorList.h
21
* StationID - sequence across all systems starting from 0 or 1 (currently 1)
22
* ModuleID - separate sequence for each station starting from 0 or 1 (currently 1)
23
*/
24
25
class
BmnRun8cgDM
:
public
BmnRun8DM
26
{
27
private
:
28
Int_t
fStationStep
[
SIL_STATION_CNT
+
GEM_STATION_CNT
];
29
30
protected
:
31
// one element per station half
32
virtual
Int_t
StationAlignables
(
Int_t
/*station*/
)
const
noexcept
override
{
return
2; }
33
34
virtual
void
Reset
() noexcept
override
35
{
36
fSystem
=
SIL_SYSTEM_ID
;
37
fStation
=
SIL_STATION_IDX
[
kFirst
];
38
fModule
=
MOD_NUM_START
-
fStationStep
[
fStation
-
STA_NUM_START
];
39
}
40
41
virtual
Int_t
NextID
() noexcept
override
42
{
43
// out of range check
44
if
(-1 ==
fSystem
)
45
return
-1;
// EOF marker must be negative
46
47
// next module
48
fModule
+=
fStationStep
[
fStation
-
STA_NUM_START
];
49
50
// next station check
51
if
((
fModule
-
MOD_NUM_START
) /
StationModules
(
fStation
-
STA_NUM_START
)) {
52
fModule
=
MOD_NUM_START
;
53
fStation
++;
54
// remember: stations has common enumeration across all systems
55
// currently only two systems are considered - silicon, then GEM
56
57
// EOF check
58
if
(
fStation
>
GEM_STATION_IDX
[
kLast
])
59
return
fSystem
= -1;
60
61
// next system check
62
if
(
fStation
>
SIL_STATION_IDX
[
kLast
])
63
fSystem
=
GEM_SYSTEM_ID
;
64
}
65
66
return
(
fSystem
<< 24) | (
fStation
<< 16) | (
fModule
<< 4) | 0b0010;
67
}
68
69
public
:
70
// convertion from CbmStsHit DetectorID
71
// for detailed CbmStsHit DetectorID layout see BmnRun8DM
72
virtual
Int_t
IDfromHit
(
Int_t
CbmDetectorID)
const
noexcept
override
73
{
74
Int_t
module{((CbmDetectorID >> 4) & 0xFFF) -
MOD_NUM_START
},
75
station{((CbmDetectorID >> 16) & 0xFF) -
STA_NUM_START
};
76
77
module
/= fStationStep[station];
78
module
*= fStationStep[station];
79
module
+= MOD_NUM_START;
80
81
return
(CbmDetectorID & 0xFFF000F) | (
module
<< 4);
82
}
83
84
BmnRun8cgDM
()
85
{
86
fDescription
=
"Run8 GEM and FSD hard parts (half stations): 22 elements"
;
87
88
// StationModules() is not virtual, so calling it from the constructor is safe
89
for
(
Int_t
i
= 0;
i
<
SIL_STATION_CNT
+
GEM_STATION_CNT
;
i
++)
90
fStationStep
[
i
] =
StationModules
(
i
) / 2;
91
}
92
virtual
~BmnRun8cgDM
()
override
;
// out-of-line vtable anchor
93
};
94
95
#endif
// BMNRUN8CGDM_H
BmnRun8DM.h
i
int i
Definition
P4_F32vec4.h:22
Int_t
int Int_t
BmnDetectorModel::fDescription
std::string fDescription
Definition
BmnDetectorModel.h:57
BmnRun8DM::fSystem
Int_t fSystem
Definition
BmnRun8DM.h:43
BmnRun8DM::GEM_STATION_CNT
static constexpr const Int_t GEM_STATION_CNT
Definition
BmnRun8DM.h:52
BmnRun8DM::kFirst
@ kFirst
Definition
BmnRun8DM.h:47
BmnRun8DM::kLast
@ kLast
Definition
BmnRun8DM.h:48
BmnRun8DM::SIL_STATION_IDX
static constexpr const Int_t SIL_STATION_IDX[2]
Definition
BmnRun8DM.h:55
BmnRun8DM::MOD_NUM_START
static constexpr const Int_t MOD_NUM_START
Definition
BmnRun8DM.h:53
BmnRun8DM::fStation
Int_t fStation
Definition
BmnRun8DM.h:43
BmnRun8DM::fModule
Int_t fModule
Definition
BmnRun8DM.h:43
BmnRun8DM::BmnRun8DM
BmnRun8DM()
Definition
BmnRun8DM.h:167
BmnRun8DM::STA_NUM_START
static constexpr const Int_t STA_NUM_START
Definition
BmnRun8DM.h:52
BmnRun8DM::SIL_STATION_CNT
static constexpr const Int_t SIL_STATION_CNT
Definition
BmnRun8DM.h:52
BmnRun8DM::GEM_STATION_IDX
static constexpr const Int_t GEM_STATION_IDX[2]
Definition
BmnRun8DM.h:56
BmnRun8DM::GEM_SYSTEM_ID
static constexpr const Int_t GEM_SYSTEM_ID
Definition
BmnRun8DM.h:51
BmnRun8DM::SIL_SYSTEM_ID
static constexpr const Int_t SIL_SYSTEM_ID
Definition
BmnRun8DM.h:51
BmnRun8DM::StationModules
Int_t StationModules(Int_t station) const noexcept
Definition
BmnRun8DM.h:62
BmnRun8cgDM::NextID
virtual Int_t NextID() noexcept override
Definition
BmnRun8cgDM.h:41
BmnRun8cgDM::~BmnRun8cgDM
virtual ~BmnRun8cgDM() override
BmnRun8cgDM::StationAlignables
virtual Int_t StationAlignables(Int_t) const noexcept override
Definition
BmnRun8cgDM.h:32
BmnRun8cgDM::IDfromHit
virtual Int_t IDfromHit(Int_t CbmDetectorID) const noexcept override
Definition
BmnRun8cgDM.h:72
BmnRun8cgDM::BmnRun8cgDM
BmnRun8cgDM()
Definition
BmnRun8cgDM.h:84
BmnRun8cgDM::Reset
virtual void Reset() noexcept override
Definition
BmnRun8cgDM.h:34
BmnRun8cgDM::fStationStep
Int_t fStationStep[SIL_STATION_CNT+GEM_STATION_CNT]
Definition
BmnRun8cgDM.h:28
align_new
models
BmnRun8cgDM.h
Generated on
for BmnRoot by
1.17.0