BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnAlignerApply.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 BmnAlignerApply class declaration
9 Interface for alignment correction application
10 To be used in reconstruction macros
11*/
12
13#ifndef BMNALIGNERAPPLY_H
14#define BMNALIGNERAPPLY_H
15
16#include "BmnAlignDefines.h"
17#include "BmnAlignHierarchy.h"
18#include "BmnDetectorModel.h"
19#include "BmnMeasureModel.h"
20#include "BmnTask.h"
21
22#include <TClonesArray.h>
23#include <TH2D.h>
24#include <map>
25
26/*
27 * Applies a stored alignment solution to hits during reconstruction.
28 *
29 * It reads a solution file and shifts hits by what it says; it does not solve
30 * anything, so it holds no aligner. The corrections a solution file lists per
31 * element are the *effective* ones - whatever the hierarchy that produced them
32 * looked like, its levels are already summed into these - hence the flat
33 * parametrization below is all that is needed to read the file.
34 */
35
37{
38 private:
41 BmnAlignHierarchy fHierarchy; // flat, just to address the file
42 VecSVectGL_t fCorrections; // per element, as loaded
43
44 const char* fAlignFilePath;
48
49 public:
50 BmnAlignerApply() = delete;
51 BmnAlignerApply(const BmnMeasureModel* measureModel,
52 const BmnDetectorModel* modelDetector,
53 const char* alignFilePath,
54 Bool_t applyLorentz = kTRUE)
55 : fpMeasureModel(measureModel)
56 , fpDetModel(modelDetector)
57 , fAlignFilePath(alignFilePath)
58 , fLorentzCorrectionApply(applyLorentz) {};
59 virtual ~BmnAlignerApply();
60
61 virtual InitStatus Init();
62 virtual void Exec(Option_t* opt);
63 virtual void Finish();
64
65 private:
66 InitStatus LorentzCorrectionInit();
67 /*
68 * Lorentz corrections section-----------------------------------------------------------------
69 *
70 * The members below are taken from BmnToCbmHitConverter. The histograms are detached from
71 * ROOT directories (AZ-010926), so this class owns them and deletes them in the destructor.
72 */
74 std::map<int, TH2D*> fhLorCorX[17], fhLorCorY[17]; // AZ-220826
75
76 /*
77 * End of Lorentz corrections section ---------------------------------------------------------
78 */
79 public:
80 ClassDef(BmnAlignerApply, 0); // don't write to ROOT file
81};
82
83#endif // BMNALIGNERAPPLY_H
std::vector< SVectGL > VecSVectGL_t
bool Bool_t
int Int_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
const char Option_t
#define ClassDef(name, id)
const BmnMeasureModel * fpMeasureModel
std::map< int, TH2D * > fhLorCorX[17]
const char * fAlignFilePath
TClonesArray * fpStsHitsArray
BmnAlignerApply()=delete
std::map< int, TH2D * > fhLorCorY[17]
virtual void Exec(Option_t *opt)
virtual void Finish()
BmnAlignerApply(const BmnMeasureModel *measureModel, const BmnDetectorModel *modelDetector, const char *alignFilePath, Bool_t applyLorentz=kTRUE)
const BmnDetectorModel * fpDetModel
VecSVectGL_t fCorrections
BmnAlignHierarchy fHierarchy
const Bool_t fLorentzCorrectionApply
virtual InitStatus Init()
InitStatus LorentzCorrectionInit()
virtual ~BmnAlignerApply()
BmnTask()
Default constructor.
Definition BmnTask.cxx:3