CbmRoot
CbmLitFieldQa.h
Go to the documentation of this file.
1 
8 #ifndef CBMLITFIELDQA_H_
9 #define CBMLITFIELDQA_H_
10 
11 #include "FairTask.h"
12 #include <string>
13 #include <utility>
14 #include <vector>
15 
16 class FairField;
17 class TList;
18 class CbmHistManager;
19 
20 using std::string;
21 using std::vector;
22 
29 class CbmLitFieldQa : public FairTask {
30 public:
34  CbmLitFieldQa();
35 
39  virtual ~CbmLitFieldQa();
40 
44  virtual InitStatus Init();
45 
49  virtual void Exec(Option_t* opt);
50 
54  virtual void Finish();
55 
56  /* Setters */
57  void SetSliceZPosition(const vector<Double_t>& zPos) {
58  fZSlicePosition = zPos;
59  }
60  // void SetAcceptanceAngleX(Double_t xangle) { fAcceptanceAngleX = xangle; }
61  // void SetAcceptanceAngleY(Double_t yangle) { fAcceptanceAngleY = yangle; }
62  void SetNofBinsX(Int_t nofBinsX) { fNofBinsX = nofBinsX; }
63  void SetNofBinsY(Int_t nofBinsY) { fNofBinsY = nofBinsY; }
64  void SetZMin(Double_t zMin) { fZMin = zMin; }
65  void SetZMax(Double_t zMax) { fZMax = zMax; }
66  void SetZStep(Double_t zStep) { fZStep = zStep; }
67  void SetMinZFieldIntegral(Double_t minZ) { fMinZFieldIntegral = minZ; }
68  void SetMaxZFieldIntegral(Double_t maxZ) { fMaxZFieldIntegral = maxZ; }
69  void SetOutputDir(const string& dir) { fOutputDir = dir; }
70 
71 private:
75  void CreateHistos();
76 
80  void FillBHistos();
81 
86 
87  // Pointer to the magnetic field map
88  FairField* fField;
89 
90  // Slice is defined as rectangle at a certain Z position
91  // with upper left corner coordinate equals to [-X, -Y]
92  // and lower right corner coordinate equals to [X, Y].
93  // Z, X, Y coordinates for each slice.
94  // [slice number]
95  vector<Double_t> fZSlicePosition; // Z position of the slice
96  vector<Double_t> fXSlicePosition; // X coordinate of slice
97  vector<Double_t> fYSlicePosition; // Y coordinate of slice
98 
99  Int_t fNofSlices; // Number of slices along Z for field approximation
100  // Double_t fAcceptanceAngleX; // Acceptance angle for X
101  // Double_t fAcceptanceAngleY; // Acceptance angle for Y
102  Int_t fNofBinsX; // Number of bins for X
103  Int_t fNofBinsY; // Number of bins for Y
104  Double_t fMinZFieldIntegral; // start Z position for field integral
105  Double_t fMaxZFieldIntegral; // end Z position for field integral
106 
107  vector<Double_t> fAlongZAngles; // Polar angles [grad]
108  vector<std::pair<Double_t, Double_t>>
109  fAlongZXY; // XY position for plotting field along Z
110  Double_t fZMin; // Minimum Z position [cm]
111  Double_t fZMax; // Maximum Z position [cm]
112  Double_t fZStep; // Step size [cm]
113 
114  CbmHistManager* fHM; // Histogram manager
115 
116  // Output directory for images
117  string fOutputDir;
118 
121 
123 };
124 
125 #endif /* CBMLITFIELDQA_H_ */
CbmLitFieldQa::fField
FairField * fField
Definition: CbmLitFieldQa.h:88
CbmLitFieldQa::SetNofBinsX
void SetNofBinsX(Int_t nofBinsX)
Definition: CbmLitFieldQa.h:62
CbmLitFieldQa::~CbmLitFieldQa
virtual ~CbmLitFieldQa()
Destructor.
Definition: CbmLitFieldQa.cxx:52
CbmLitFieldQa::fZMin
Double_t fZMin
Definition: CbmLitFieldQa.h:110
CbmLitFieldQa::fNofBinsX
Int_t fNofBinsX
Definition: CbmLitFieldQa.h:102
CbmLitFieldQa::fAlongZAngles
vector< Double_t > fAlongZAngles
Definition: CbmLitFieldQa.h:107
CbmLitFieldQa::fNofBinsY
Int_t fNofBinsY
Definition: CbmLitFieldQa.h:103
CbmLitFieldQa::CbmLitFieldQa
CbmLitFieldQa(const CbmLitFieldQa &)
CbmLitFieldQa::fXSlicePosition
vector< Double_t > fXSlicePosition
Definition: CbmLitFieldQa.h:96
CbmLitFieldQa::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmLitFieldQa.cxx:54
CbmLitFieldQa::SetNofBinsY
void SetNofBinsY(Int_t nofBinsY)
Definition: CbmLitFieldQa.h:63
CbmLitFieldQa::FillBHistos
void FillBHistos()
Fill graphs and histos for field map for each field component (Bx, By, Bz, |B|).
Definition: CbmLitFieldQa.cxx:177
CbmLitFieldQa
Field map QA.
Definition: CbmLitFieldQa.h:29
CbmLitFieldQa::fNofSlices
Int_t fNofSlices
Definition: CbmLitFieldQa.h:99
CbmLitFieldQa::FillRichPmtPlaneBHistos
void FillRichPmtPlaneBHistos()
Fill B-field histograms for RICH PMT plane.
Definition: CbmLitFieldQa.cxx:267
CbmLitFieldQa::fMaxZFieldIntegral
Double_t fMaxZFieldIntegral
Definition: CbmLitFieldQa.h:105
CbmLitFieldQa::fYSlicePosition
vector< Double_t > fYSlicePosition
Definition: CbmLitFieldQa.h:97
CbmLitFieldQa::fZStep
Double_t fZStep
Definition: CbmLitFieldQa.h:112
CbmLitFieldQa::fHM
CbmHistManager * fHM
Definition: CbmLitFieldQa.h:114
CbmLitFieldQa::CbmLitFieldQa
CbmLitFieldQa()
Constructor.
Definition: CbmLitFieldQa.cxx:31
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmLitFieldQa::fZSlicePosition
vector< Double_t > fZSlicePosition
Definition: CbmLitFieldQa.h:95
CbmLitFieldQa::fZMax
Double_t fZMax
Definition: CbmLitFieldQa.h:111
CbmLitFieldQa::Finish
virtual void Finish()
Inherited from FairTask.
Definition: CbmLitFieldQa.cxx:115
CbmLitFieldQa::SetSliceZPosition
void SetSliceZPosition(const vector< Double_t > &zPos)
Definition: CbmLitFieldQa.h:57
CbmLitFieldQa::SetZMax
void SetZMax(Double_t zMax)
Definition: CbmLitFieldQa.h:65
CbmLitFieldQa::SetZStep
void SetZStep(Double_t zStep)
Definition: CbmLitFieldQa.h:66
CbmLitFieldQa::CreateHistos
void CreateHistos()
Create histograms.
Definition: CbmLitFieldQa.cxx:117
CbmLitFieldQa::SetMaxZFieldIntegral
void SetMaxZFieldIntegral(Double_t maxZ)
Definition: CbmLitFieldQa.h:68
CbmLitFieldQa::fAlongZXY
vector< std::pair< Double_t, Double_t > > fAlongZXY
Definition: CbmLitFieldQa.h:109
CbmLitFieldQa::fMinZFieldIntegral
Double_t fMinZFieldIntegral
Definition: CbmLitFieldQa.h:104
CbmLitFieldQa::SetOutputDir
void SetOutputDir(const string &dir)
Definition: CbmLitFieldQa.h:69
CbmLitFieldQa::operator=
CbmLitFieldQa & operator=(const CbmLitFieldQa &)
CbmLitFieldQa::SetZMin
void SetZMin(Double_t zMin)
Definition: CbmLitFieldQa.h:64
CbmLitFieldQa::ClassDef
ClassDef(CbmLitFieldQa, 1)
CbmLitFieldQa::fOutputDir
string fOutputDir
Definition: CbmLitFieldQa.h:117
CbmLitFieldQa::SetMinZFieldIntegral
void SetMinZFieldIntegral(Double_t minZ)
Definition: CbmLitFieldQa.h:67
CbmLitFieldQa::Exec
virtual void Exec(Option_t *opt)
Inherited from FairTask.
Definition: CbmLitFieldQa.cxx:113