BmnRoot
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
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
24Int_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
37{
38 return 2;
39}
40
41Int_t BmnRun8cgDetModel::Alignables() const noexcept
42{
43 return 2 * (SIL_STATION_CNT + GEM_STATION_CNT);
44}
45
52
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
66 {
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
74 return fSystem = -1;
75
76 // next system check
79 }
80
81 return (fSystem << 24) | (fStation << 16) | (fModule << 4) | 0b0010;
82}
int i
Definition P4_F32vec4.h:22
static constexpr const Int_t GEM_MODULES[GEM_STATION_CNT]
static constexpr const Int_t STA_NUM_START
static constexpr const Int_t SIL_SYSTEM_ID
static constexpr const Int_t MOD_NUM_START
static constexpr const Int_t SIL_MODULES[SIL_STATION_CNT]
static constexpr const Int_t GEM_SYSTEM_ID
static constexpr const Int_t SIL_STATION_IDX[2]
static constexpr const Int_t GEM_STATION_CNT
static constexpr const Int_t SIL_STATION_CNT
static constexpr const Int_t GEM_STATION_IDX[2]
virtual Int_t Alignables() const noexcept override
virtual Int_t NextID() noexcept override
virtual Int_t MaxModulesInStation() const noexcept override
virtual void Reset() noexcept override
virtual Int_t IDfromHit(Int_t HitDetectorID) const noexcept override