BmnRoot
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.ru
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 "BmnAligner.h"
17#include "BmnTask.h"
18#include "TClonesArray.h"
19#include "TH2D.h"
20
21#include <map>
22#include <vector>
23
25 : public BmnAligner<>
26 , public BmnTask
27{
28 private:
29 TClonesArray* fpStsHitsArray{nullptr};
30 const char* fAlignFilePath;
31 const Bool_t fLorentzCorrectionApply;
32
33 public:
34 BmnAlignerApply() = delete;
35 BmnAlignerApply(const BmnMeasureModel* measureModel,
36 const BmnDetectorModel* modelDetector,
37 const char* alignFilePath,
38 Bool_t applyLorentz = kTRUE)
39 : BmnAligner<>(measureModel, modelDetector)
40 , fAlignFilePath(alignFilePath)
41 , fLorentzCorrectionApply(applyLorentz) {};
42 virtual ~BmnAlignerApply() = default;
43
44 virtual InitStatus Init();
45 virtual void Exec(Option_t* opt);
46 virtual void Finish();
47
48 private:
49 /*
50 * Lorentz corrections section-----------------------------------------------------------------
51 *
52 * The code below is directly taken from BmnToCbmHitConverter::ApplyAlignment(CbmStsHit*).
53 * It implements the Lorentz correction of hit positions and was not revised, except few
54 * lines marked with tag PLV. Indentation is the kept as in the original code.
55 */
56
57 // PLV : begin
58 // hLorCorX and hLorCorY are moved from local variables of method ApplyAlignment()
59 // static attribute was removed and indentation was changed
60 // original code:
61 // static TH2D *hLorCorX[2][17] = {{nullptr}, {nullptr}}, *hLorCorY[2][17] = {{nullptr}, {nullptr}};
62 // modified code:
63 TH2D *hLorCorX[2][17] = {{nullptr}, {nullptr}}, *hLorCorY[2][17] = {{nullptr}, {nullptr}};
64 // PLV : end
65 void ReadCorrections(int irun,
66 int igem,
67 std::map<int, std::vector<Double_t>>* locCorX,
68 std::map<int, std::vector<Double_t>>* locCorY,
69 int& nx,
70 int& ny);
71 Bool_t fieldFlag; // AZ-310823
72
73 /*
74 * End of Lorentz corrections section ---------------------------------------------------------
75 */
76 public:
77 ClassDef(BmnAlignerApply, 0); // don't write to ROOT file
78};
79
80#endif // BMNALIGNERAPPLY_H
virtual ~BmnAlignerApply()=default
ClassDef(BmnAlignerApply, 0)
BmnAlignerApply()=delete
virtual void Exec(Option_t *opt)
virtual void Finish()
BmnAlignerApply(const BmnMeasureModel *measureModel, const BmnDetectorModel *modelDetector, const char *alignFilePath, Bool_t applyLorentz=kTRUE)
virtual InitStatus Init()
BmnTask.
Definition BmnTask.h:13