clas12root
Loading...
Searching...
No Matches
calorimeter.h
Go to the documentation of this file.
1/*
2 * To change this license header, choose License Headers in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6
7/*
8 * File: detector.h
9 * Author: dglazier
10 *
11 * Created on April 27, 2017, 10:01 AM
12 */
13
14#ifndef CLAS12_CALORIMETER_H
15#define CLAS12_CALORIMETER_H
16
17#include "particle_detector.h"
18#include "calextras.h"
19#include <memory>
20
21
22namespace clas12 {
23
25
26
27 public:
28
29
30 calorimeter()=default;
31
32 calorimeter(hipo::schema __schema);
33 calorimeter(hipo::schema __schema,hipo::schema extras);
34
35 ~calorimeter() override=default;
36
37 int getLayer(int index) const noexcept override{
38 if(index>-1)return getByte(_layer_order,index);
39 return 0;
40 }
41 //getter funtions for items in calorimeter bank
42 double getTime() const noexcept{
43 if(_index>-1)return getFloat(_time_order,_index);
44 return 0;
45 }
46 double getEnergy() const noexcept{
47 if(_index>-1)return getFloat(_energy_order,_index);
48 return 0;
49 }
50 double getPath() const noexcept{
51 if(_index>-1)return getFloat(_path_order,_index);
52 return 0;
53 }
54 double getChi2() const noexcept{
55 if(_index>-1)return getFloat(_chi2_order,_index);
56 return 0;
57 }
58 int getLayer() const noexcept override{
59 if(_index>-1)return getByte(_layer_order,_index);
60 return 0;
61 }
62 int getSector() const noexcept{
63 if(_index>-1)return getByte(_sector_order,_index);
64 return 0;
65 }
66 double getX() const noexcept{
67 if(_index>-1)return getFloat(_x_order,_index);
68 return 0;
69 }
70 double getY() const noexcept{
71 if(_index>-1)return getFloat(_y_order,_index);
72 return 0;
73 }
74 double getZ() const noexcept{
75 if(_index>-1)return getFloat(_z_order,_index);
76 return 0;
77 }
78 double getDu() const noexcept{
79 if(_index>-1)return getFloat(_du_order,_index);
80 return 0;
81 }
82 double getDv() const noexcept{
83 if(_index>-1)return getFloat(_dv_order,_index);
84 return 0;
85 }
86 double getDw() const noexcept{
87 if(_index>-1)return getFloat(_dw_order,_index);
88 return 0;
89 }
90 double getHx() const noexcept{
91 if(_index>-1)return getFloat(_hx_order,_index);
92 return 0;
93 }
94 double getHy() const noexcept{
95 if(_index>-1)return getFloat(_hy_order,_index);
96 return 0;
97 }
98 double getHz() const noexcept{
99 if(_index>-1)return getFloat(_hz_order,_index);
100 return 0;
101 }
102 double getLu() const noexcept{
103 if(_index>-1)return getFloat(_lu_order,_index);
104 return 0;
105 }
106 double getLv() const noexcept{
107 if(_index>-1)return getFloat(_lv_order,_index);
108 return 0;
109 }
110 double getLw() const noexcept{
111 if(_index>-1)return getFloat(_lw_order,_index);
112 return 0;
113 }
114 double getM2u() const noexcept{
115 if(_index>-1)return getFloat(_m2u_order,_index);
116 return 0;
117 }
118 double getM2v() const noexcept{
119 if(_index>-1)return getFloat(_m2v_order,_index);
120 return 0;
121 }
122 double getM2w() const noexcept{
123 if(_index>-1)return getFloat(_m2w_order,_index);
124 return 0;
125 }
126 double getM3u() const noexcept{
127 if(_index>-1)return getFloat(_m3u_order,_index);
128 return 0;
129 }
130 double getM3v() const noexcept{
131 if(_index>-1)return getFloat(_m3v_order,_index);
132 return 0;
133 }
134 double getM3w() const noexcept{
135 if(_index>-1)return getFloat(_m3w_order,_index);
136 return 0;
137 }
138 int getStatus() const noexcept{
139 if(_index>-1)return getShort(_status_order,_index);
140 return 0;
141 }
142
143 //get extras
144
145 int getDbstU() const noexcept{
146 return _extras.get()!=nullptr ? _extras->getDbstU(_index):0;
147 }
148 int getDbstV() const noexcept{
149 return _extras.get()!=nullptr ? _extras->getDbstV(_index):0;
150 }
151 int getDbstW() const noexcept{
152 return _extras.get()!=nullptr ? _extras->getDbstW(_index):0;
153 }
154 double getRawEU() const noexcept{
155 return _extras.get()!=nullptr ? _extras->getRawEU(_index):0;
156 }
157 double getRawEV() const noexcept{
158 return _extras.get()!=nullptr ? _extras->getRawEV(_index):0;
159 }
160 double getRawEW() const noexcept{
161 return _extras.get()!=nullptr ? _extras->getRawEW(_index):0;
162 }
163 double getRecEU() const noexcept{
164 return _extras.get()!=nullptr ? _extras->getRecEU(_index):0;
165 }
166 double getRecEV() const noexcept{
167 return _extras.get()!=nullptr ? _extras->getRecEV(_index):0;
168 }
169 double getRecEW() const noexcept{
170 return _extras.get()!=nullptr ? _extras->getRecEW(_index):0;
171 }
172 double getRecDTU() const noexcept{
173 return _extras.get()!=nullptr ? _extras->getRecDTU(_index):0;
174 }
175 double getRecDTV() const noexcept{
176 return _extras.get()!=nullptr ? _extras->getRecDTV(_index):0;
177 }
178 double getRecDTW() const noexcept{
179 return _extras.get()!=nullptr ? _extras->getRecDTW(_index):0;
180 }
181 double getRecFTU() const noexcept{
182 return _extras.get()!=nullptr ? _extras->getRecFTU(_index):0;
183 }
184 double getRecFTV() const noexcept{
185 return _extras.get()!=nullptr ? _extras->getRecFTV(_index):0;
186 }
187 double getRecFTW() const noexcept{
188 return _extras.get()!=nullptr ? _extras->getRecFTW(_index):0;
189 }
190 calextras* getExtras()const {return _extras.get();}
191
192
193 private:
194
195 int _layer_order=-1;
196 int _energy_order=-1;
197 int _path_order=-1;
198 int _time_order=-1;
199 int _sector_order=-1;
200 int _x_order=-1;
201 int _y_order=-1;
202 int _z_order=-1;
203 int _chi2_order=-1;
204 int _du_order=-1;
205 int _dv_order=-1;
206 int _dw_order=-1;
207 int _hx_order=-1;
208 int _hy_order=-1;
209 int _hz_order=-1;
210 int _lu_order=-1;
211 int _lv_order=-1;
212 int _lw_order=-1;
213 int _m2u_order=-1;
214 int _m2v_order=-1;
215 int _m2w_order=-1;
216 int _m3u_order=-1;
217 int _m3v_order=-1;
218 int _m3w_order=-1;
219 int _status_order=-1;
220
221 calextra_uptr _extras;
222
223 }; //class calorimeter
224
226 using cal_uptr=std::unique_ptr<clas12::calorimeter>;
227
228}//namespace clas12
229
230#endif /* UTILS_H */
Definition calextras.h:20
Definition calorimeter.h:24
double getY() const noexcept
Definition calorimeter.h:70
double getDu() const noexcept
Definition calorimeter.h:78
double getRecDTU() const noexcept
Definition calorimeter.h:172
double getRawEW() const noexcept
Definition calorimeter.h:160
double getDv() const noexcept
Definition calorimeter.h:82
int getLayer(int index) const noexcept override
Definition calorimeter.h:37
double getM2v() const noexcept
Definition calorimeter.h:118
int getLayer() const noexcept override
Definition calorimeter.h:58
double getRawEV() const noexcept
Definition calorimeter.h:157
double getM3u() const noexcept
Definition calorimeter.h:126
double getLu() const noexcept
Definition calorimeter.h:102
double getRecFTV() const noexcept
Definition calorimeter.h:184
double getRawEU() const noexcept
Definition calorimeter.h:154
double getRecFTU() const noexcept
Definition calorimeter.h:181
double getM2u() const noexcept
Definition calorimeter.h:114
double getHz() const noexcept
Definition calorimeter.h:98
double getM3w() const noexcept
Definition calorimeter.h:134
double getZ() const noexcept
Definition calorimeter.h:74
double getTime() const noexcept
Definition calorimeter.h:42
int getStatus() const noexcept
Definition calorimeter.h:138
double getM2w() const noexcept
Definition calorimeter.h:122
int getSector() const noexcept
Definition calorimeter.h:62
int getDbstW() const noexcept
Definition calorimeter.h:151
double getLv() const noexcept
Definition calorimeter.h:106
double getDw() const noexcept
Definition calorimeter.h:86
int getDbstU() const noexcept
Definition calorimeter.h:145
calextras * getExtras() const
Definition calorimeter.h:190
double getRecFTW() const noexcept
Definition calorimeter.h:187
double getX() const noexcept
Definition calorimeter.h:66
int getDbstV() const noexcept
Definition calorimeter.h:148
double getLw() const noexcept
Definition calorimeter.h:110
double getM3v() const noexcept
Definition calorimeter.h:130
double getRecDTW() const noexcept
Definition calorimeter.h:178
double getRecEW() const noexcept
Definition calorimeter.h:169
~calorimeter() override=default
double getEnergy() const noexcept
Definition calorimeter.h:46
double getRecEU() const noexcept
Definition calorimeter.h:163
double getRecEV() const noexcept
Definition calorimeter.h:166
double getHx() const noexcept
Definition calorimeter.h:90
double getRecDTV() const noexcept
Definition calorimeter.h:175
double getHy() const noexcept
Definition calorimeter.h:94
double getPath() const noexcept
Definition calorimeter.h:50
double getChi2() const noexcept
Definition calorimeter.h:54
int _index
Definition particle_detector.h:83
Definition calextras.cpp:10
clas12::calorimeter * cal_ptr
Definition calorimeter.h:225
std::unique_ptr< clas12::calextras > calextra_uptr
Definition calextras.h:188
std::unique_ptr< clas12::calorimeter > cal_uptr
Definition calorimeter.h:226