forked from xweizhi/SoLIDTracking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSoLIDFieldMap.h
43 lines (35 loc) · 855 Bytes
/
SoLIDFieldMap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef ROOT_SoLID_Field_Map
#define ROOT_SoLID_Field_Map
//c++
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
//ROOT
#include "TVector3.h"
//SoLIDTracking
#include "SoLIDUtility.h"
#define ZSIZE 1201
#define RSIZE 501
#define ZSHIFT 600
#define ZSTEP 1
#define RSTEP 1
using namespace std;
class SoLIDFieldMap
{
public:
~SoLIDFieldMap() {;}
static SoLIDFieldMap * GetInstance() {
if (fInstance == NULL) fInstance = new SoLIDFieldMap();
return fInstance;
}
TVector3 & GetBField(double x, double y, double z);
protected:
SoLIDFieldMap();
static SoLIDFieldMap *fInstance;
void LoadFieldMap();
Double_t Bz[ZSIZE][RSIZE]; //hard coded for now, array to store SoLID B field
Double_t Br[ZSIZE][RSIZE]; //hard coded for now, array to store SoLID B field
TVector3 fField;
};
#endif