BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
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
25class BmnRun8cgDM : public BmnRun8DM
26{
27 private:
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 {
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
49
50 // next station check
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
59 return fSystem = -1;
60
61 // next system check
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
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++)
91 }
92 virtual ~BmnRun8cgDM() override; // out-of-line vtable anchor
93};
94
95#endif // BMNRUN8CGDM_H
int i
Definition P4_F32vec4.h:22
int Int_t
std::string fDescription
Int_t fSystem
Definition BmnRun8DM.h:43
static constexpr const Int_t GEM_STATION_CNT
Definition BmnRun8DM.h:52
static constexpr const Int_t SIL_STATION_IDX[2]
Definition BmnRun8DM.h:55
static constexpr const Int_t MOD_NUM_START
Definition BmnRun8DM.h:53
Int_t fStation
Definition BmnRun8DM.h:43
Int_t fModule
Definition BmnRun8DM.h:43
static constexpr const Int_t STA_NUM_START
Definition BmnRun8DM.h:52
static constexpr const Int_t SIL_STATION_CNT
Definition BmnRun8DM.h:52
static constexpr const Int_t GEM_STATION_IDX[2]
Definition BmnRun8DM.h:56
static constexpr const Int_t GEM_SYSTEM_ID
Definition BmnRun8DM.h:51
static constexpr const Int_t SIL_SYSTEM_ID
Definition BmnRun8DM.h:51
Int_t StationModules(Int_t station) const noexcept
Definition BmnRun8DM.h:62
virtual Int_t NextID() noexcept override
Definition BmnRun8cgDM.h:41
virtual ~BmnRun8cgDM() override
virtual Int_t StationAlignables(Int_t) const noexcept override
Definition BmnRun8cgDM.h:32
virtual Int_t IDfromHit(Int_t CbmDetectorID) const noexcept override
Definition BmnRun8cgDM.h:72
virtual void Reset() noexcept override
Definition BmnRun8cgDM.h:34
Int_t fStationStep[SIL_STATION_CNT+GEM_STATION_CNT]
Definition BmnRun8cgDM.h:28