BmnRoot
26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnAlignReport.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
BmnAlignReport class declaration
9
Textual analysis of alignment results
10
*/
11
12
#ifndef BMNALIGNREPORT_H
13
#define BMNALIGNREPORT_H
14
15
#include "
BmnAligner.h
"
16
17
#include <
TPad.h
>
18
19
class
TH1
;
// only pointers and references to it are named below
20
21
/*
22
* Reads what an alignment run produced and logs it: the summary of a finished
23
* run, the weak modes of the solved system, and the parameter correlations.
24
*
25
* A consumer of BmnAligner, not a part of it - everything here is read-only
26
* over the aligner's public interface, so there is no state to hold and the
27
* methods are static. Weak mode analysis may write a constraints snippet file,
28
* and Draw() creates a canvas; those are the only side effects.
29
*/
30
31
class
BmnAlignReport
32
{
33
public
:
34
BmnAlignReport
() =
delete
;
35
36
// summary of a finished run: MSE and residual changes, constraint
37
// satisfaction, composite corrections, timings
38
static
void
Results
(
const
BmnAligner
& aligner);
39
40
// eigenvectors of the solved system below an eigenvalue threshold, with
41
// their overlap against the constraints already in force. With dumpNew the
42
// unconstrained ones are written out as a ready-to-paste constraints file.
43
static
void
ModesBelow
(
const
BmnAligner
& aligner,
Double_t
absThreshold,
Bool_t
dumpNew =
kTRUE
);
44
45
// parameter pairs whose correlation exceeds a threshold, plus the
46
// per-parameter global correlation
47
static
void
Correlations
(
const
BmnAligner
& aligner,
48
Double_t
absThreshold = 0.9,
49
Int_t
topK = 20,
50
Bool_t
skipIntraDet =
kFALSE
);
51
52
// Canvas view of a result: residuals before and after, the SVD spectrum
53
// tail, and a sample of tracks in 3D. Everything drawn is copied, so the
54
// canvas keeps working after the aligner it was built from is gone.
55
// number is the ordered number of the result starting from 1, negative
56
// values mean counting from the end.
57
static
void
Draw
(
const
BmnAligner
& aligner,
Int_t
number = -1);
58
59
protected
:
60
// relative change of a value, as a percentage or in orders of magnitude
61
static
char
*
Change
(
Double_t
before,
Double_t
after);
62
63
// the eight pads Draw() lays out, passed between its helpers instead of
64
// being held as state - there is nothing to remember between calls
65
struct
Pads
66
{
67
TPad
*
resSXbefore
{
nullptr
},
// synthetic X residuals before alignment
68
*
resSXafter
{
nullptr
},
// synthetic X residuals after alignment
69
*
resSYbefore
{
nullptr
},
// synthetic Y residuals before alignment
70
*
resSYafter
{
nullptr
},
// synthetic Y residuals after alignment
71
*
resX
{
nullptr
},
// 1D total residuals by X
72
*
resY
{
nullptr
},
// 1D total residuals by Y
73
*
svd
{
nullptr
},
// SVD singular values
74
*
tracks
{
nullptr
};
// 3D tracks visualization
75
};
76
static
Pads
PrepareCanvas
();
77
static
void
DrawResiduals
(
const
BmnAligner
& aligner,
const
Pads& pads, std::size_t idx);
78
79
private
:
80
// A pad must not point into the aligner's own histograms: the canvas
81
// outlives the run in macro mode, and redrawing a deleted histogram would
82
// crash. Every plot is therefore drawn from a detached copy.
83
static
TH1
*
ClonePlot
(
const
TH1
& source);
84
};
85
86
#endif
// BMNALIGNREPORT_H
BmnAligner.h
Bool_t
bool Bool_t
Int_t
int Int_t
kFALSE
constexpr Bool_t kFALSE
Double_t
double Double_t
kTRUE
constexpr Bool_t kTRUE
TPad.h
BmnAlignReport::PrepareCanvas
static Pads PrepareCanvas()
Definition
BmnAlignReport.cxx:446
BmnAlignReport::BmnAlignReport
BmnAlignReport()=delete
BmnAlignReport::DrawResiduals
static void DrawResiduals(const BmnAligner &aligner, const Pads &pads, std::size_t idx)
Definition
BmnAlignReport.cxx:484
BmnAlignReport::Correlations
static void Correlations(const BmnAligner &aligner, Double_t absThreshold=0.9, Int_t topK=20, Bool_t skipIntraDet=kFALSE)
Definition
BmnAlignReport.cxx:329
BmnAlignReport::ModesBelow
static void ModesBelow(const BmnAligner &aligner, Double_t absThreshold, Bool_t dumpNew=kTRUE)
Definition
BmnAlignReport.cxx:141
BmnAlignReport::ClonePlot
static TH1 * ClonePlot(const TH1 &source)
Definition
BmnAlignReport.cxx:439
BmnAlignReport::Change
static char * Change(Double_t before, Double_t after)
Definition
BmnAlignReport.cxx:41
BmnAlignReport::Draw
static void Draw(const BmnAligner &aligner, Int_t number=-1)
Definition
BmnAlignReport.cxx:614
BmnAlignReport::Results
static void Results(const BmnAligner &aligner)
Definition
BmnAlignReport.cxx:50
BmnAligner
Definition
BmnAligner.h:36
TH1
TPad
BmnAlignReport::Pads
Definition
BmnAlignReport.h:66
BmnAlignReport::Pads::resY
TPad * resY
Definition
BmnAlignReport.h:72
BmnAlignReport::Pads::resSXbefore
TPad * resSXbefore
Definition
BmnAlignReport.h:67
BmnAlignReport::Pads::resX
TPad * resX
Definition
BmnAlignReport.h:71
BmnAlignReport::Pads::resSYbefore
TPad * resSYbefore
Definition
BmnAlignReport.h:69
BmnAlignReport::Pads::resSYafter
TPad * resSYafter
Definition
BmnAlignReport.h:70
BmnAlignReport::Pads::tracks
TPad * tracks
Definition
BmnAlignReport.h:74
BmnAlignReport::Pads::svd
TPad * svd
Definition
BmnAlignReport.h:73
BmnAlignReport::Pads::resSXafter
TPad * resSXafter
Definition
BmnAlignReport.h:68
align_new
src
BmnAlignReport.h
Generated on
for BmnRoot by
1.17.0