-
Notifications
You must be signed in to change notification settings - Fork 3
/
SoLIDFieldMap.h
54 lines (47 loc) · 1.18 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
#ifndef ROOT_SoLID_Field_Map
#define ROOT_SoLID_Field_Map
//c++
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
//ROOT
#include "TVector3.h"
#include "TRandom3.h"
//SoLIDTracking
#include "SoLIDUtility.h"
#define ZSIZE 1201
#define RSIZE 501
#define ZSHIFT 600
#define ZSTEP 1
#define RSTEP 1
#define ZSIZE_TARGET 401
#define RSIZE_TARGET 200
#define ZSTEP_TARGET 1
#define RSTEP_TARGET 1
#define ZSHIFT_TARGET 200
#define FIELD_PRECISION 0.0
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);
void LoadTargetFieldMap();
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
Double_t Bz_target[ZSIZE_TARGET][RSIZE_TARGET];
Double_t Br_target[ZSIZE_TARGET][RSIZE_TARGET];
TVector3 fField;
bool targetFieldFlag;
TRandom3 fFieldRNG;
};
#endif