-
Notifications
You must be signed in to change notification settings - Fork 0
/
HistContainer.h
183 lines (161 loc) · 3.85 KB
/
HistContainer.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
#include <vector>
#include <string>
#include "TString.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TVector3.h"
#include "TFile.h"
#include "TTree.h"
class HistContainer{
public:
HistContainer(std::string outfile, TVector3 sourcepos);
~HistContainer();
void SetPromptClassifierData(double bipolike212, double bipolike214,
double bipocumulat, double alphabeta212,
double alphabeta214);
void SetDelayedClassifierData(double bipolike212, double bipolike214,
double bipocumulat, double alphabeta212,
double alphabeta214);
bool IsEventGood(int fitValid);
void SetPromptData(int fitValid, double meanTime,
double utime, int nhit, double energy, double beta14,
double thetaij, double itr, TVector3 pos, TVector3 dir,
ULong64_t dcApplied,
ULong64_t dcFlagged, double mcke1, double mcke2,
double mcEdep, int pdg1, int pdg2);
void SetDelayedData(int fitValid, double meanTime,
double utime, int nhit, double energy, double beta14,
double thetaij, double itr, TVector3 pos,
TVector3 dir, ULong64_t dcApplied,
ULong64_t dcFlagged, double mcke1, double mcke2,
double mcEdep, int pdg1, int pdg2);
void FillHistograms(bool fillclassifier);
void FillAntiHistograms();
void WriteHistograms();
private:
TVector3 sourcepos;
TVector3 _pos;
TVector3 _dir;
int _fitValid;
ULong64_t _dcApplied;
ULong64_t _dcFlagged;
double _mcke1;
double _mcke2;
double _mcEdep;
int _pdg1;
int _pdg2;
ULong64_t _DdcApplied;
ULong64_t _DdcFlagged;
double _Dmcke1;
double _Dmcke2;
double _DmcEdep;
int _Dpdg1;
int _Dpdg2;
double _posx;
double _posy;
double _posz;
double _itr;
double _mtime;
int _nhit;
double _utime;
double _energy;
double _beta14;
double _thetaij;
bool _GoodPEvent;
bool _GoodDEvent;
int _Pnhit;
double _Putime;
double _Penergy;
double _Pbeta14;
double _Pthetaij;
double _Pitr;
TVector3 _Ppos;
double _Pposx;
double _Pposy;
double _Pposz;
TVector3 _Pdir;
int _DfitValid;
int _Dnhit;
double _Dutime;
double _Denergy;
double _Dbeta14;
double _Dthetaij;
double _Ditr;
TVector3 _Dpos;
double _Dposx;
double _Dposy;
double _Dposz;
TVector3 _Ddir;
double _TimeDiff;
double _PosDiff;
double _bipolike212;
double _bipolike214;
double _bipocumulat;
double _alphabeta212;
double _alphabeta214;
double d_bipolike212;
double d_bipolike214;
double d_bipocumulat;
double d_alphabeta212;
double d_alphabeta214;
TFile* ofile;
TTree* promptT;
TTree* delayedT;
TTree* unmatchT;
TH1D* TimeDiff;
TH2D* TimeDiffZD;
TH1D* PromptNhit;
TH1D* DelayedNhit;
TH1D* PromptEnergy;
TH1D* DelayedEnergy;
TH1D* PromptBeta14;
TH1D* DelayedBeta14;
TH1D* PromptThetaij;
TH1D* DelayedThetaij;
TH1D* PromptUdotR;
TH1D* DelayedUdotR;
TH1D* STimeDiff;
TH2D* STimeDiffZD;
TH1D* SPromptNhit;
TH1D* SDelayedNhit;
TH1D* SPromptEnergy;
TH1D* SDelayedEnergy;
TH1D* SPromptBeta14;
TH1D* SDelayedBeta14;
TH1D* SPromptThetaij;
TH1D* SDelayedThetaij;
TH1D* SPromptUdotR;
TH1D* SDelayedUdotR;
TH1D* NPromptNhit;
TH1D* NPromptEnergy;
TH1D* NPromptBeta14;
TH1D* NPromptThetaij;
TH1D* NPromptUdotR;
TH1D* Nhit;
TH1D* Energy;
TH1D* Beta14;
TH1D* Thetaij;
TH1D* HUdotR;
TH1D* BiPoLike212;
TH2D* EBiPoLike212;
TH1D* BiPoLike214;
TH2D* EBiPoLike214;
TH1D* BiPoCumulat;
TH2D* EBiPoCumulat;
TH1D* AlphaBeta212;
TH2D* EAlphaBeta212;
TH1D* AlphaBeta214;
TH2D* EAlphaBeta214;
TH1D* BiPoLike212_N;
TH2D* EBiPoLike212_N;
TH1D* BiPoLike214_N;
TH2D* EBiPoLike214_N;
TH1D* BiPoCumulat_N;
TH2D* EBiPoCumulat_N;
TH1D* AlphaBeta212_N;
TH2D* EAlphaBeta212_N;
TH1D* AlphaBeta214_N;
TH2D* EAlphaBeta214_N;
double UdotR(bool isPrompt){
return isPrompt ? _Pdir.Angle(_Ppos - sourcepos): _Ddir.Dot(_Dpos - sourcepos);}
};