BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnATestHit.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
BmnATestHit class header only implementation
9
For use in alignment algorithm test
10
*/
11
12
#ifndef BMNATESTHIT_H
13
#define BMNATESTHIT_H
14
15
#include "
BmnATestDetectorPlane.h
"
16
#include "
BmnHitRecord.h
"
17
#include "
TPolyMarker3D.h
"
18
19
class
BmnATestHit
:
public
BmnHitRecord
20
{
21
public
:
22
BmnATestHit
(
const
CbmStsHit
* pHit,
const
BmnDetectorModel
& detModel)
23
:
BmnHitRecord
(pHit, detModel) {};
24
BmnATestHit
(
Double_t
x,
Double_t
y,
Double_t
z,
Double_t
dx,
Double_t
dy,
const
BmnATestDetectorPlane
* pDetector)
25
:
BmnHitRecord
(x, y, z, dx, dy, pDetector->
GetDetectorID
())
26
,
fpDetector
(pDetector) {};
27
void
Draw
()
const
;
// ROOT macro mode only
28
const
BmnATestDetectorPlane
*
GetDetector
() const noexcept {
return
fpDetector
; };
29
30
private
:
31
const
BmnATestDetectorPlane
*
fpDetector
{
nullptr
};
32
};
33
34
// visualization works in ROOT macro mode only
35
inline
void
BmnATestHit::Draw
()
const
36
{
37
SVect3
dot{
GetX
(),
GetY
(), 0.0};
38
dot =
fpDetector
->GetCrdRotation() * dot +
fpDetector
->GetCrdShift();
39
// note: x and z axis are swapped
40
Double_t
tmp;
41
tmp = dot[0];
42
dot[0] = dot[2];
43
dot[2] = tmp;
44
auto
* mrk =
new
TPolyMarker3D
(1, dot.Array(), 2);
45
mrk->SetMarkerColor(
BMN_TEST_HIT_COLOR
);
46
mrk->Draw();
47
48
dot(0) =
GetZ
();
49
dot(1) =
GetY
();
50
dot(2) =
GetX
();
51
mrk =
new
TPolyMarker3D
(1, dot.Array(), 4);
52
mrk->SetMarkerColor(
BMN_TEST_HIT_COLOR
);
53
mrk->Draw();
54
}
55
56
#endif
// BMNATESTHIT_H
Double_t
double Double_t
TPolyMarker3D.h
BmnATestDetectorPlane.h
SVect3
ROOT::Math::SVector< Double_t, 3 > SVect3
Definition
BmnAlignDefines.h:71
BmnHitRecord.h
BMN_TEST_HIT_COLOR
#define BMN_TEST_HIT_COLOR
Definition
BmnHitRecord.h:19
BmnATestDetectorPlane
Definition
BmnATestDetectorPlane.h:27
BmnATestHit::fpDetector
const BmnATestDetectorPlane * fpDetector
Definition
BmnATestHit.h:31
BmnATestHit::BmnATestHit
BmnATestHit(Double_t x, Double_t y, Double_t z, Double_t dx, Double_t dy, const BmnATestDetectorPlane *pDetector)
Definition
BmnATestHit.h:24
BmnATestHit::BmnATestHit
BmnATestHit(const CbmStsHit *pHit, const BmnDetectorModel &detModel)
Definition
BmnATestHit.h:22
BmnATestHit::GetDetector
const BmnATestDetectorPlane * GetDetector() const noexcept
Definition
BmnATestHit.h:28
BmnATestHit::Draw
void Draw() const
Definition
BmnATestHit.h:35
BmnDetectorModel
Definition
BmnDetectorModel.h:28
BmnHitRecord::GetY
Double_t GetY() const noexcept
Definition
BmnHitRecord.h:44
BmnHitRecord::GetX
Double_t GetX() const noexcept
Definition
BmnHitRecord.h:43
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::GetZ
Double_t GetZ() const noexcept
Definition
BmnHitRecord.h:45
CbmStsHit
Definition
CbmStsHit.h:27
TPolyMarker3D
align_new
src
BmnATestHit.h
Generated on
for BmnRoot by
1.17.0