BmnRoot
26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnRun8HalfDM.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
BmnRun8HalfDM class declaration
9
Run8 full-granularity representation, single half of each station only
10
*/
11
12
#ifndef BMNRUN8HALFDM_H
13
#define BMNRUN8HALFDM_H
14
15
#include "
BmnRun8DM.h
"
16
17
#include <
TString.h
>
18
#include <numeric>
19
20
/*
21
* Common base for the fine-grained half-assembly models: same every-module
22
* scheme as BmnRun8DM, but only one half of every station is alignable
23
* (38 elements). Top elements carry the first half of module numbers, bottom
24
* elements the second half. Derived classes pick the kept half via
25
* KeepBottomHalf().
26
*
27
* Hierarchical parametrization
28
* ----------------------------
29
* The half of a station is a rigid mechanical unit, so the model declares one
30
* composite node per station half on top of the 38 element-level nodes. Each
31
* composite therefore carries its own 6 rigid-body corrections, and every
32
* element carries a full set of its own within it - see BmnAlignHierarchy.
33
* Pivots are left to the default (centre of gravity of the owned elements,
34
* i.e. the beam axis at their mean z).
35
*/
36
37
class
BmnRun8HalfDM
:
public
BmnRun8DM
38
{
39
protected
:
40
// selects which half of every station is alignable
41
virtual
Bool_t
KeepBottomHalf
() const noexcept = 0;
42
43
// the bottom half starts where the station's own module count says it does
44
virtual
Int_t
FirstModule
(
Int_t
station) const noexcept
override
45
{
46
return
MOD_NUM_START
+ (
KeepBottomHalf
() ?
StationModules
(station) / 2 : 0);
47
}
48
// half of what the full model aligns in that station
49
virtual
Int_t
StationAlignables
(
Int_t
station)
const
noexcept
override
50
{
51
return
BmnRun8DM::StationAlignables
(station) / 2;
52
}
53
54
public
:
55
virtual
Bool_t
IgnoreHit
(
Int_t
CbmDetectorID)
const
noexcept
override
56
{
57
const
Int_t
module{((CbmDetectorID >> 4) & 0xFFF) -
MOD_NUM_START
},
58
station{((CbmDetectorID >> 16) & 0xFF) -
STA_NUM_START
}, half{
StationModules
(station) / 2};
59
return
KeepBottomHalf
() ? module < half : module >= half;
60
}
61
virtual
Bool_t
IgnoresSome
() const noexcept
override
{
return
kTRUE
; }
62
63
virtual
std::vector<Composite>
Composites
()
const override
64
{
65
// NextID() walks the stations in order and never revisits one, so the
66
// elements of a station half occupy a contiguous index range
67
std::vector<Composite> nodes;
68
nodes.reserve(
LastStation
() -
FirstStation
() + 1);
69
for
(
Int_t
station =
FirstStation
(), leaf = 0; station <=
LastStation
(); station++) {
70
Composite
node;
71
node.
name
=
Form
(
"STA%02d"
, station +
STA_NUM_START
);
72
node.
leaves
.resize(
StationAlignables
(station));
73
std::iota(node.
leaves
.begin(), node.
leaves
.end(), leaf);
74
leaf += node.
leaves
.size();
75
nodes.push_back(std::move(node));
76
}
77
return
nodes;
78
}
79
};
80
81
#endif
// BMNRUN8HALFDM_H
BmnRun8DM.h
Bool_t
bool Bool_t
Int_t
int Int_t
kTRUE
constexpr Bool_t kTRUE
TString.h
Form
char * Form(const char *fmt,...)
BmnRun8DM::FirstStation
virtual Int_t FirstStation() const noexcept
Definition
BmnRun8DM.h:78
BmnRun8DM::StationAlignables
virtual Int_t StationAlignables(Int_t station) const noexcept
Definition
BmnRun8DM.h:69
BmnRun8DM::MOD_NUM_START
static constexpr const Int_t MOD_NUM_START
Definition
BmnRun8DM.h:53
BmnRun8DM::BmnRun8DM
BmnRun8DM()
Definition
BmnRun8DM.h:167
BmnRun8DM::STA_NUM_START
static constexpr const Int_t STA_NUM_START
Definition
BmnRun8DM.h:52
BmnRun8DM::LastStation
virtual Int_t LastStation() const noexcept
Definition
BmnRun8DM.h:79
BmnRun8DM::StationModules
Int_t StationModules(Int_t station) const noexcept
Definition
BmnRun8DM.h:62
BmnRun8HalfDM
Definition
BmnRun8HalfDM.h:38
BmnRun8HalfDM::IgnoreHit
virtual Bool_t IgnoreHit(Int_t CbmDetectorID) const noexcept override
Definition
BmnRun8HalfDM.h:55
BmnRun8HalfDM::KeepBottomHalf
virtual Bool_t KeepBottomHalf() const noexcept=0
BmnRun8HalfDM::FirstModule
virtual Int_t FirstModule(Int_t station) const noexcept override
Definition
BmnRun8HalfDM.h:44
BmnRun8HalfDM::IgnoresSome
virtual Bool_t IgnoresSome() const noexcept override
Definition
BmnRun8HalfDM.h:61
BmnRun8HalfDM::StationAlignables
virtual Int_t StationAlignables(Int_t station) const noexcept override
Definition
BmnRun8HalfDM.h:49
BmnRun8HalfDM::Composites
virtual std::vector< Composite > Composites() const override
Definition
BmnRun8HalfDM.h:63
BmnDetectorModel::Composite
Definition
BmnDetectorModel.h:33
BmnDetectorModel::Composite::leaves
VecInt_t leaves
Definition
BmnDetectorModel.h:36
BmnDetectorModel::Composite::name
std::string name
Definition
BmnDetectorModel.h:34
align_new
models
BmnRun8HalfDM.h
Generated on
for BmnRoot by
1.17.0