BmnRoot 26.10.0-233-gb9bbe585
Software framework of the BM@N experiment
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
22#include "BmnHitRecord.h"
23#include "TPolyMarker3D.h"
24
26{
27 public:
28 BmnATestHit(const CbmStsHit* pHit, const BmnDetectorModel& detModel)
29 : BmnHitRecord(pHit, detModel) {};
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:
38};
39
40// visualization works in ROOT macro mode only
41inline 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
RM::SVector< Double_t, 3 > SVect3
#define BMN_TEST_HIT_COLOR
double Double_t
BmnATestHit(Double_t x, Double_t y, Double_t z, Double_t dx, Double_t dy, const BmnATestDetectorPlane *pDetector)
Definition BmnATestHit.h:30
BmnATestHit(const CbmStsHit *pHit, const BmnDetectorModel &detModel)
Definition BmnATestHit.h:28
const BmnATestDetectorPlane * fpDetector
Definition BmnATestHit.h:37
const BmnATestDetectorPlane * GetDetector() const noexcept
Definition BmnATestHit.h:34
void Draw() const
Definition BmnATestHit.h:41
Double_t GetY() const noexcept
Double_t GetX() const noexcept
BmnHitRecord(const CbmStsHit *pHit, const BmnDetectorModel &detModel)
Int_t GetDetectorID() const noexcept
Double_t GetZ() const noexcept