aboutsummaryrefslogtreecommitdiff
path: root/src/pmt.h
blob: 3bccedbab3c0f2ee43989b22c60bfe1e3e571cec (plain)
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
/* Copyright (c) 2019, Anthony Latorre <tlatorre at uchicago>
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option)
 * any later version.

 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.

 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef PMT_H
#define PMT_H

/* FIXME: The OWL PMTs normal vector isn't defined in pmt.txt!
 *
 * I'm not sure why, but for now we shouldn't use the OWL tubes in the
 * likelihood calculation. */

#define MAX_PMTS 10000
/* Radius of the PMT concentrator (cm). */
#define PMT_RADIUS 13.5

/* PMT types from snoman.ratdb. */
#define PMT_NORMAL      1
#define PMT_OWL         2
#define PMT_LG          3
#define PMT_BUTT        4
#define PMT_NECK        5
#define PMT_CALIBRATION 6
#define PMT_SPARE       10
#define PMT_INVALID     11

typedef struct pmt {
    /* PMT position (cm). */
    double pos[3];
    /* PMT normal vector (points from the center of the PMT towards the
     * photocathode). */
    double normal[3];
    int pmt_type;
} pmt;

extern pmt pmts[MAX_PMTS];

void get_pmt_type_string(int pmt_type, char *s);
int load_pmt_info();

#endif