-
Notifications
You must be signed in to change notification settings - Fork 3
/
library_access.h
41 lines (28 loc) · 1.22 KB
/
library_access.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
#ifndef LIBRARY_ACCESS_H
#define LIBRARY_ACCESS_H
#include <string>
#include <vector>
//This file is designed to access the visibility parameters from the
//optical libraries, which are needed to calculate the number of photoelectrons
//incident on each PMT.
class LibraryAccess{
public:
void LoadLibraryFromFile(std::string libraryfile, bool reflected, bool reflT0);
const float* GetReflT0(size_t Voxel, int no_pmt);
const float* GetReflCounts(size_t Voxel, int no_pmt, bool is_reflT0);
const float* GetCounts(size_t Voxel, int no_pmt);
const float* GetLibraryEntries(int VoxID, bool wantReflected, int no_pmt);
std::vector<int> GetVoxelCoords(int id, double position[3]);
std::vector<double> PhotonLibraryAnalyzer(double _energy, const int _scint_yield, const double _quantum_efficiency, int _pmt_number, int _rand_voxel);
LibraryAccess();
private:
std::vector<std::vector<float> > table_;
std::vector<std::vector<float> > reflected_table_;
std::vector<std::vector<float> > reflT_table_;
const double gLowerCorner[3] = {2.5, -200, 0};
const double gUpperCorner[3] = {202.5, 200, 500};
const int gxSteps = 40;
const int gySteps = 80;
const int gzSteps = 100;
};
#endif