BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnHitRecord.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.ru
7
8
BmnHitRecord header-only implementation
9
Minimalistic structure for optimezed storage in RAM
10
*/
11
12
#ifndef BMNHITRECORD_H
13
#define BMNHITRECORD_H
14
15
#include "
BmnAlignDefines.h
"
16
#include "
BmnDetectorModel.h
"
17
#include "CbmStsHit.h"
18
19
#define BMN_TEST_HIT_COLOR kRed
20
21
class
BmnHitRecord
22
{
23
private
:
24
Double_t
fX
,
fY
,
fZ
,
fWx
,
fWy
;
25
Int_t
fDetectorID
;
26
constexpr
static
Double_t
MAX_WEIGHT
{1.0 / (
BMN_CLOSE_TO_ZERO
*
BMN_CLOSE_TO_ZERO
)};
27
28
public
:
29
BmnHitRecord
(
const
CbmStsHit
* pHit,
const
BmnDetectorModel
& detModel)
30
:
fX
(pHit->
GetX
())
31
,
fY
(pHit->
GetY
())
32
,
fZ
(pHit->
GetZ
())
33
,
fWx
((pHit->GetDx() <
BMN_CLOSE_TO_ZERO
) ?
MAX_WEIGHT
: 1.0 / (pHit->GetDx() * pHit->GetDx()))
34
,
fWy
((pHit->GetDy() <
BMN_CLOSE_TO_ZERO
) ?
MAX_WEIGHT
: 1.0 / (pHit->GetDy() * pHit->GetDy()))
35
,
fDetectorID
(detModel.IDfromHit(pHit->
GetDetectorID
())) {};
36
BmnHitRecord
(
Double_t
x,
Double_t
y,
Double_t
z,
Double_t
dx,
Double_t
dy,
Int_t
detectorId)
37
:
fX
(x)
38
,
fY
(y)
39
,
fZ
(z)
40
,
fWx
((dx <
BMN_CLOSE_TO_ZERO
) ?
MAX_WEIGHT
: 1.0 / (dx * dx))
41
,
fWy
((dy <
BMN_CLOSE_TO_ZERO
) ?
MAX_WEIGHT
: 1.0 / (dy * dy))
42
,
fDetectorID
(detectorId) {};
43
Double_t
GetX
() const noexcept {
return
fX
; }
44
Double_t
GetY
() const noexcept {
return
fY
; }
45
Double_t
GetZ
() const noexcept {
return
fZ
; }
46
Double_t
GetWx
() const noexcept {
return
fWx
; }
47
Double_t
GetWy
() const noexcept {
return
fWy
; }
48
Int_t
GetDetectorID
() const noexcept {
return
fDetectorID
; }
49
};
50
51
#endif
// BMNHITRECORD_H
Int_t
int Int_t
Double_t
double Double_t
BmnAlignDefines.h
BMN_CLOSE_TO_ZERO
#define BMN_CLOSE_TO_ZERO
Definition
BmnAlignDefines.h:32
BmnDetectorModel.h
BmnDetectorModel
Definition
BmnDetectorModel.h:28
BmnHitRecord::fWx
Double_t fWx
Definition
BmnHitRecord.h:24
BmnHitRecord::GetWy
Double_t GetWy() const noexcept
Definition
BmnHitRecord.h:47
BmnHitRecord::GetY
Double_t GetY() const noexcept
Definition
BmnHitRecord.h:44
BmnHitRecord::fX
Double_t fX
Definition
BmnHitRecord.h:24
BmnHitRecord::GetX
Double_t GetX() const noexcept
Definition
BmnHitRecord.h:43
BmnHitRecord::fDetectorID
Int_t fDetectorID
Definition
BmnHitRecord.h:25
BmnHitRecord::BmnHitRecord
BmnHitRecord(const CbmStsHit *pHit, const BmnDetectorModel &detModel)
Definition
BmnHitRecord.h:29
BmnHitRecord::GetDetectorID
Int_t GetDetectorID() const noexcept
Definition
BmnHitRecord.h:48
BmnHitRecord::MAX_WEIGHT
static constexpr Double_t MAX_WEIGHT
Definition
BmnHitRecord.h:26
BmnHitRecord::BmnHitRecord
BmnHitRecord(Double_t x, Double_t y, Double_t z, Double_t dx, Double_t dy, Int_t detectorId)
Definition
BmnHitRecord.h:36
BmnHitRecord::fWy
Double_t fWy
Definition
BmnHitRecord.h:24
BmnHitRecord::fY
Double_t fY
Definition
BmnHitRecord.h:24
BmnHitRecord::GetWx
Double_t GetWx() const noexcept
Definition
BmnHitRecord.h:46
BmnHitRecord::GetZ
Double_t GetZ() const noexcept
Definition
BmnHitRecord.h:45
BmnHitRecord::fZ
Double_t fZ
Definition
BmnHitRecord.h:24
CbmStsHit
Definition
CbmStsHit.h:27
align_new
src
BmnHitRecord.h
Generated on
for BmnRoot by
1.17.0