SND@LHC Software
Loading...
Searching...
No Matches
ShipGoliathField.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- ShipGoliathField header file -----
3// ----- Created 12/03/18 by E. van Herwijnen -----
4// -------------------------------------------------------------------------
5
6
12#ifndef ShipGoliathField_H
13#define ShipGoliathField_H 1
14
15
16#include "FairField.h"
17#include "TFile.h"
18#include "TH3D.h"
19#include "TVector3.h"
20
21class ShipGoliathField : public FairField
22{
23
24 public:
25
28
29
33 ShipGoliathField(const char* name);
34
35
37 virtual ~ShipGoliathField();
38
39 void Init(const char* fieldfile);
40
41 Double_t coords[13][6];
42
44 //TVector3 get(const TVector3& pos) const;
45 //void get(const double& posX, const double& posY, const double& posZ, double& Bx, double& By, double& Bz) const;
46 void getpos(TString vol, TVector3 &bot, TVector3 &top) const;
47
48 void close();
49
53 virtual Double_t GetBx(Double_t x, Double_t y, Double_t z);
54 virtual Double_t GetBy(Double_t x, Double_t y, Double_t z);
55 virtual Double_t GetBz(Double_t x, Double_t y, Double_t z);
56
58 virtual void Print();
59
60 TFile* fieldmap = NULL;
61
62 void sethistbxyz(TH3D* histbx, TH3D* histby,TH3D* histbz ) {
63 fhistbx=histbx;
64 fhistby=histby;
65 fhistbz=histbz;
66 };
67
68 TH3D* gethistbx() const { return fhistbx;};
69 TH3D* gethistby() const { return fhistby;};
70 TH3D* gethistbz() const { return fhistbz;};
71
72 Float_t kilogauss = 1.;
73 Float_t tesla = 10*kilogauss;
74
75 Float_t cm = 1; // cm
76 Float_t m = 100*cm; // m
77 Float_t mm = 0.1*cm; // mm
78
79 private:
80 double fMiddle;
81 double fPeak;
83
84 TH3D* fhistbx;
85 TH3D* fhistby;
86 TH3D* fhistbz;
87
88 Double_t xmin, xmax, ymin, ymax, zmin, zmax;
89
90
91
93
94};
95
96
97#endif
Double_t coords[13][6]
TH3D * gethistby() const
TH3D * gethistbx() const
virtual Double_t GetBx(Double_t x, Double_t y, Double_t z)
void Init(const char *fieldfile)
virtual Double_t GetBz(Double_t x, Double_t y, Double_t z)
ClassDef(ShipGoliathField, 2)
void sethistbxyz(TH3D *histbx, TH3D *histby, TH3D *histbz)
TH3D * gethistbz() const
virtual Double_t GetBy(Double_t x, Double_t y, Double_t z)
void getpos(TString vol, TVector3 &bot, TVector3 &top) const
return value at position