CbmRoot
Loading...
Searching...
No Matches
CbmLitFieldApproximationQa.h
Go to the documentation of this file.
1/* Copyright (C) 2009-2013 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
12#ifndef CBMLITFIELDAPPROXIMATIONQA_H_
13#define CBMLITFIELDAPPROXIMATIONQA_H_
14
15#include "FairTask.h"
16
17#include <string>
18#include <vector>
19
20class FairField;
23class CbmHistManager;
24
25using std::string;
26using std::vector;
27
39class CbmLitFieldApproximationQa : public FairTask {
40 public:
45
50
54 virtual InitStatus Init();
55
59 virtual void Exec(Option_t* opt);
60
64 virtual void Finish();
65
66 /* Setters */
67 void SetSliceZPosition(const vector<Double_t>& zPos) { fZSlicePosition = zPos; }
68 void SetPolynomDegrees(const vector<UInt_t>& degrees) { fPolynomDegrees = degrees; }
69 void IsFixedBounds(Bool_t fixedBounds) { fFixedBounds = fixedBounds; }
70 void SetAcceptanceAngleX(double xangle) { fAcceptanceAngleX = xangle; }
71 void SetAcceptanceAngleY(double yangle) { fAcceptanceAngleY = yangle; }
72 void SetNofBinsX(int nofBinsX) { fNofBinsX = nofBinsX; }
73 void SetNofBinsY(int nofBinsY) { fNofBinsY = nofBinsY; }
74 void SetUseEllipseAcc(bool useEllipseAcc) { fUseEllipseAcc = useEllipseAcc; }
75 void SetOutputDir(const string& dir) { fOutputDir = dir; }
76 void SetPolynomDegreeIndex(unsigned int degreeIndex) { fPolynomDegreeIndex = degreeIndex; }
77
78 private:
82 void CreateHistos();
83
87 void CreateFieldHistos();
88
92 void CreateFitterHistos();
93
97 void CreateGridHistos();
98
102 void FillBHistos();
103
108
113
114 // Pointer to the magnetic field map
115 FairField* fField;
116
117 // Number of slices along Z for field approximation
119 // Slice is defined as rectangle at a certain Z position
120 // with upper left corner coordinate equals to [-X, -Y]
121 // and lower right corner coordinate equals to [X, Y].
122 // Z, X, Y coordinates for each slice.
123 // [slice number]
124 vector<Double_t> fZSlicePosition; // Z position of the slice
125 vector<Double_t> fXSlicePosition; // X coordinate
126 vector<Double_t> fYSlicePosition; // Y coordinate
127
128 // Output directory for images
130
131 //
132 // Field approximation variables
133 //
134 // Acceptance angle for X
136 // Acceptance angle for Y
138 // Number of bins for X
140 // Number of bins for Y
142 // If true than only values inside an ellipse will be used for field approximation
144 // Degree of the polynom
146 // Number of polynoms for tests
148 // Array with polynom degrees to be analyzed
149 vector<UInt_t> fPolynomDegrees;
150 // Field fitter tool for each polynom degree
151 vector<CbmLitFieldFitter*> fFitter;
152
153 //
154 // Field grid
155 //
156 // Field grid creator tool
158
159 CbmHistManager* fHM; // Histogram manager
160
161 Bool_t fFixedBounds; // Fixed bounds for error histograms
162
165
167};
168
169#endif /* CBMLITFIELDAPPROXIMATIONQA_H_ */
Histogram manager.
Field map approximation QA.
void CreateGridHistos()
Create histograms for grid creator.
void SetPolynomDegrees(const vector< UInt_t > &degrees)
void CreateFitterHistos()
Create histograms for field approximation.
virtual ~CbmLitFieldApproximationQa()
Destructor.
CbmLitFieldApproximationQa(const CbmLitFieldApproximationQa &)
void FillGridCreatorHistos()
fill histograms for grid creator tool.
virtual InitStatus Init()
Inherited from FairTask.
void FillBHistos()
Fill graphs and histos for field map for each field component (Bx, By, Bz, |B|).
void SetPolynomDegreeIndex(unsigned int degreeIndex)
vector< CbmLitFieldFitter * > fFitter
ClassDef(CbmLitFieldApproximationQa, 1)
void SetUseEllipseAcc(bool useEllipseAcc)
void SetSliceZPosition(const vector< Double_t > &zPos)
CbmLitFieldGridCreator * fGridCreator
virtual void Exec(Option_t *opt)
Inherited from FairTask.
void CreateFieldHistos()
Create field histograms.
CbmLitFieldApproximationQa & operator=(const CbmLitFieldApproximationQa &)
void IsFixedBounds(Bool_t fixedBounds)
virtual void Finish()
Inherited from FairTask.
void FillFieldApproximationHistos()
Fill histograms for polynomial field approximation.
Implementation of the polynomial field approximation.