BmnRoot
26.10.0-233-gb9bbe585
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.int
7
8
BmnATestHit class header only implementation
9
For use in alignment algorithm test
10
*/
11
12
/*
13
=== DEPRECATION NOTICE =========================================
14
Due to complex changes in BmnAligner, this class requires rework
15
================================================================
16
*/
17
18
#ifndef BMNATESTHIT_H
19
#define BMNATESTHIT_H
20
21
#include "
BmnATestDetectorPlane.h
"
22
#include "
BmnHitRecord.h
"
23
#include "
TPolyMarker3D.h
"
24
25
class
BmnATestHit
:
public
BmnHitRecord
26
{
27
public
:
28
BmnATestHit
(
const
CbmStsHit
* pHit,
const
BmnDetectorModel
& detModel)
29
:
BmnHitRecord
(pHit, detModel) {};
30
BmnATestHit
(
Double_t
x,
Double_t
y,
Double_t
z,
Double_t
dx,
Double_t
dy,
const
BmnATestDetectorPlane
* pDetector)
31
:
BmnHitRecord
(x, y, z, dx, dy, pDetector->
GetDetectorID
())
32
,
fpDetector
(pDetector) {};
33
void
Draw
()
const
;
// ROOT macro mode only
34
const
BmnATestDetectorPlane
*
GetDetector
() const noexcept {
return
fpDetector
; };
35
36
private
:
37
const
BmnATestDetectorPlane
*
fpDetector
{
nullptr
};
38
};
39
40
// visualization works in ROOT macro mode only
41
inline
void
BmnATestHit::Draw
()
const
42
{
43
SVect3
dot{
GetX
(),
GetY
(), 0.0};
44
dot =
fpDetector
->GetCrdRotation() * dot +
fpDetector
->GetCrdShift();
45
// note: x and z axis are swapped
46
Double_t
tmp;
47
tmp = dot[0];
48
dot[0] = dot[2];
49
dot[2] = tmp;
50
auto
* mrk =
new
TPolyMarker3D
(1, dot.Array(), 2);
51
mrk->SetMarkerColor(
BMN_TEST_HIT_COLOR
);
52
mrk->Draw();
53
54
dot(0) =
GetZ
();
55
dot(1) =
GetY
();
56
dot(2) =
GetX
();
57
mrk =
new
TPolyMarker3D
(1, dot.Array(), 4);
58
mrk->SetMarkerColor(
BMN_TEST_HIT_COLOR
);
59
mrk->Draw();
60
}
61
62
#endif
// BMNATESTHIT_H
BmnATestDetectorPlane.h
SVect3
RM::SVector< Double_t, 3 > SVect3
Definition
BmnAlignDefines.h:59
BmnHitRecord.h
BMN_TEST_HIT_COLOR
#define BMN_TEST_HIT_COLOR
Definition
BmnHitRecord.h:18
Double_t
double Double_t
TPolyMarker3D.h
BmnATestDetectorPlane
Definition
BmnATestDetectorPlane.h:33
BmnATestHit::BmnATestHit
BmnATestHit(Double_t x, Double_t y, Double_t z, Double_t dx, Double_t dy, const BmnATestDetectorPlane *pDetector)
Definition
BmnATestHit.h:30
BmnATestHit::BmnATestHit
BmnATestHit(const CbmStsHit *pHit, const BmnDetectorModel &detModel)
Definition
BmnATestHit.h:28
BmnATestHit::fpDetector
const BmnATestDetectorPlane * fpDetector
Definition
BmnATestHit.h:37
BmnATestHit::GetDetector
const BmnATestDetectorPlane * GetDetector() const noexcept
Definition
BmnATestHit.h:34
BmnATestHit::Draw
void Draw() const
Definition
BmnATestHit.h:41
BmnDetectorModel
Definition
BmnDetectorModel.h:28
BmnHitRecord::GetY
Double_t GetY() const noexcept
Definition
BmnHitRecord.h:49
BmnHitRecord::GetX
Double_t GetX() const noexcept
Definition
BmnHitRecord.h:48
BmnHitRecord::BmnHitRecord
BmnHitRecord(const CbmStsHit *pHit, const BmnDetectorModel &detModel)
Definition
BmnHitRecord.h:34
BmnHitRecord::GetDetectorID
Int_t GetDetectorID() const noexcept
Definition
BmnHitRecord.h:54
BmnHitRecord::GetZ
Double_t GetZ() const noexcept
Definition
BmnHitRecord.h:50
CbmStsHit
Definition
CbmStsHit.h:27
TPolyMarker3D
align_new
deprecated
BmnATestHit.h
Generated on
for BmnRoot by
1.17.0