BmnRoot
26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnSimpleDM.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
BmnSimpleDM class declaration
9
Trivial enumerated detector elements starting from 0
10
For use in alignment test algorithm
11
*/
12
13
#ifndef BMNSIMPLEDM_H
14
#define BMNSIMPLEDM_H
15
16
#include "
BmnDetectorModel.h
"
17
18
#include <
TString.h
>
19
20
class
BmnSimpleDM
:
public
BmnDetectorModel
21
{
22
private
:
23
Int_t
fIdx
;
24
const
Int_t
fModuleCnt
;
25
26
protected
:
27
// detector modules enumeration: see base class
28
virtual
void
Reset
() noexcept
override
29
{
30
fIdx
= -1;
// must set iterator BEFORE first element
31
// according to base class definition
32
}
33
virtual
Int_t
NextID
() noexcept
override
34
{
35
fIdx
++;
36
if
(0 >
fIdx
||
fIdx
>=
fModuleCnt
)
37
return
fIdx
= -2;
// -1 is reserved for reset status
38
return
fIdx
;
39
}
40
41
public
:
42
virtual
Int_t
MaxModulesInStation
() const noexcept
override
{
return
1; }
43
virtual
Int_t
Alignables
() const noexcept
override
{
return
fModuleCnt
; }
44
// Dumb converter - not intended to be used
45
virtual
Int_t
IDfromHit
(
Int_t
HitDetectorID)
const
noexcept
override
{
return
HitDetectorID; }
46
// the ID is the element index itself, there is nothing to decode
47
virtual
std::string
DecodeID
(
Int_t
id
)
const override
{
return
Form
(
"elem %3d"
,
id
); }
48
49
BmnSimpleDM
() =
delete
;
50
explicit
BmnSimpleDM
(
Int_t
moduleCnt)
51
:
fModuleCnt
(moduleCnt) {};
52
virtual
~BmnSimpleDM
()
override
;
// out-of-line vtable anchor
53
};
54
55
#endif
// BMNSIMPLEDM_H
BmnDetectorModel.h
Int_t
int Int_t
TString.h
Form
char * Form(const char *fmt,...)
BmnDetectorModel::BmnDetectorModel
BmnDetectorModel()=default
BmnSimpleDM::NextID
virtual Int_t NextID() noexcept override
Definition
BmnSimpleDM.h:33
BmnSimpleDM::IDfromHit
virtual Int_t IDfromHit(Int_t HitDetectorID) const noexcept override
Definition
BmnSimpleDM.h:45
BmnSimpleDM::MaxModulesInStation
virtual Int_t MaxModulesInStation() const noexcept override
Definition
BmnSimpleDM.h:42
BmnSimpleDM::DecodeID
virtual std::string DecodeID(Int_t id) const override
Definition
BmnSimpleDM.h:47
BmnSimpleDM::~BmnSimpleDM
virtual ~BmnSimpleDM() override
BmnSimpleDM::BmnSimpleDM
BmnSimpleDM(Int_t moduleCnt)
Definition
BmnSimpleDM.h:50
BmnSimpleDM::fIdx
Int_t fIdx
Definition
BmnSimpleDM.h:23
BmnSimpleDM::fModuleCnt
const Int_t fModuleCnt
Definition
BmnSimpleDM.h:24
BmnSimpleDM::BmnSimpleDM
BmnSimpleDM()=delete
BmnSimpleDM::Reset
virtual void Reset() noexcept override
Definition
BmnSimpleDM.h:28
BmnSimpleDM::Alignables
virtual Int_t Alignables() const noexcept override
Definition
BmnSimpleDM.h:43
align_new
models
BmnSimpleDM.h
Generated on
for BmnRoot by
1.17.0