BmnRoot
26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnRun8cgHalfDM.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
BmnRun8cgHalfDM class declaration
9
Run8 coarse-grained representation, single half of each station only
10
*/
11
12
#ifndef BMNRUN8CGHALFDM_H
13
#define BMNRUN8CGHALFDM_H
14
15
#include "
BmnRun8cgDM.h
"
16
17
/*
18
* Common base for the coarse-grained half-station models. Same scheme as
19
* BmnRun8cgDM, but only one half of every station is alignable (one element
20
* per station). Top elements carry the first half of module numbers, bottom
21
* elements the second half (see BmnRun8DM). Derived classes pick the kept
22
* half via KeepBottomHalf(). Intended for data with half-station hits only.
23
*/
24
25
class
BmnRun8cgHalfDM
:
public
BmnRun8cgDM
26
{
27
protected
:
28
// selects which half of every station is alignable
29
virtual
Bool_t
KeepBottomHalf
() const noexcept = 0;
30
31
// only the kept half of the station survives
32
virtual
Int_t
StationAlignables
(
Int_t
/*station*/
) const noexcept
override
{
return
1; }
33
34
virtual
void
Reset
() noexcept
override
35
{
36
fSystem
=
SIL_SYSTEM_ID
;
37
fStation
=
SIL_STATION_IDX
[
kFirst
] - 1;
// set iterator BEFORE first station
38
fModule
=
MOD_NUM_START
;
// recomputed per station in NextID
39
}
40
41
virtual
Int_t
NextID
() noexcept
override
42
{
43
if
(-1 ==
fSystem
)
44
return
-1;
// EOF marker must be negative
45
46
fStation
++;
// one alignable element per half-station
47
48
// EOF check
49
if
(
fStation
>
GEM_STATION_IDX
[
kLast
])
50
return
fSystem
= -1;
51
52
// next system check
53
if
(
fStation
>
SIL_STATION_IDX
[
kLast
])
54
fSystem
=
GEM_SYSTEM_ID
;
55
56
// top halfs allways has fModule = MOD_NUM_START
57
// but bottom halfs depends on modules count
58
if
(
KeepBottomHalf
())
59
fModule
=
MOD_NUM_START
+
StationModules
(
fStation
-
STA_NUM_START
) / 2;
60
61
return
(
fSystem
<< 24) | (
fStation
<< 16) | (
fModule
<< 4) | 0b0010;
62
}
63
64
public
:
65
virtual
Bool_t
IgnoreHit
(
Int_t
CbmDetectorID)
const
noexcept
override
66
{
67
const
Int_t
module{((CbmDetectorID >> 4) & 0xFFF) -
MOD_NUM_START
},
68
station{((CbmDetectorID >> 16) & 0xFF) -
STA_NUM_START
}, half{
StationModules
(station) / 2};
69
return
KeepBottomHalf
() ? module < half : module >= half;
70
}
71
virtual
Bool_t
IgnoresSome
() const noexcept
override
{
return
kTRUE
; }
72
};
73
74
#endif
// BMNRUN8CGHALFDM_H
BmnRun8cgDM.h
Bool_t
bool Bool_t
Int_t
int Int_t
kTRUE
constexpr Bool_t kTRUE
BmnRun8DM::fSystem
Int_t fSystem
Definition
BmnRun8DM.h:43
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::STA_NUM_START
static constexpr const Int_t STA_NUM_START
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::BmnRun8cgDM
BmnRun8cgDM()
Definition
BmnRun8cgDM.h:84
BmnRun8cgHalfDM
Definition
BmnRun8cgHalfDM.h:26
BmnRun8cgHalfDM::StationAlignables
virtual Int_t StationAlignables(Int_t) const noexcept override
Definition
BmnRun8cgHalfDM.h:32
BmnRun8cgHalfDM::Reset
virtual void Reset() noexcept override
Definition
BmnRun8cgHalfDM.h:34
BmnRun8cgHalfDM::NextID
virtual Int_t NextID() noexcept override
Definition
BmnRun8cgHalfDM.h:41
BmnRun8cgHalfDM::KeepBottomHalf
virtual Bool_t KeepBottomHalf() const noexcept=0
BmnRun8cgHalfDM::IgnoreHit
virtual Bool_t IgnoreHit(Int_t CbmDetectorID) const noexcept override
Definition
BmnRun8cgHalfDM.h:65
BmnRun8cgHalfDM::IgnoresSome
virtual Bool_t IgnoresSome() const noexcept override
Definition
BmnRun8cgHalfDM.h:71
align_new
models
BmnRun8cgHalfDM.h
Generated on
for BmnRoot by
1.17.0