17 for (
int i = 0; i<2;i++)
38 for (
int i = 0; i<2;i++)
59 std::cout<<
"New Hitv1 0x"<< hex << hitid
60 << dec <<
" on track "<<trackid<<
" EDep "<<edep<<std::endl;
61 std::cout<<
"Location: X "<<x[0]<<
"/"<<x[1]<<
" Y "<<y[0]<<
"/"<<y[1]<<
" Z "<<z[0]<<
"/"<<z[1]<<std::endl;
62 std::cout<<
"Time "<<t[0]<<
"/"<<t[1]<<std::endl;
64 for (prop_map_t::const_iterator i = prop_map.begin(); i!= prop_map.end(); ++i)
67 pair<const string, PROPERTY_TYPE> property_info = get_property_info(prop_id);
68 cout <<
"\t" << prop_id <<
":\t" << property_info.first <<
" = \t";
69 switch(property_info.second)
72 cout << get_property_int(prop_id);
75 cout << get_property_uint(prop_id);
78 cout << get_property_float(prop_id);
81 cout <<
" unknown type ";
90 prop_map_t::const_iterator i = prop_map.find(prop_id);
91 return i!=prop_map.end();
97 if (!check_property(prop_id,type_float))
99 pair<const string,PROPERTY_TYPE> property_info =get_property_info(prop_id);
100 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
101 << prop_id <<
" is of type " << get_property_type(property_info.second)
102 <<
" not " << get_property_type(type_float) << endl;
105 prop_map_t::const_iterator i = prop_map.find(prop_id);
115 if (!check_property(prop_id,type_int))
117 pair<const string,PROPERTY_TYPE> property_info =get_property_info(prop_id);
118 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
119 << prop_id <<
" is of type " << get_property_type(property_info.second)
120 <<
" not " << get_property_type(type_int) << endl;
123 prop_map_t::const_iterator i = prop_map.find(prop_id);
133 if (!check_property(prop_id,type_uint))
135 pair<const string,PROPERTY_TYPE> property_info =get_property_info(prop_id);
136 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
137 << prop_id <<
" is of type " << get_property_type(property_info.second)
138 <<
" not " << get_property_type(type_uint) << endl;
141 prop_map_t::const_iterator i = prop_map.find(prop_id);
151 if (!check_property(prop_id,type_float))
153 pair<const string,PROPERTY_TYPE> property_info = get_property_info(prop_id);
154 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
155 << prop_id <<
" is of type " << get_property_type(property_info.second)
156 <<
" not " << get_property_type(type_float) << endl;
165 if (!check_property(prop_id,type_int))
167 pair<const string,PROPERTY_TYPE> property_info = get_property_info(prop_id);
168 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
169 << prop_id <<
" is of type " << get_property_type(property_info.second)
170 <<
" not " << get_property_type(type_int) << endl;
179 if (!check_property(prop_id,type_uint))
181 pair<const string,PROPERTY_TYPE> property_info = get_property_info(prop_id);
182 cout <<
PHWHERE <<
" Property " << property_info.first <<
" with id "
183 << prop_id <<
" is of type " << get_property_type(property_info.second)
184 <<
" not " << get_property_type(type_uint) << endl;
193 prop_map_t::const_iterator iter = prop_map.find(prop_id);
194 if (iter != prop_map.end())
207 return get_property_float(prop_px_0);
209 return get_property_float(prop_px_1);
211 cout <<
"Invalid index in get_px: " << i << endl;
222 return get_property_float(prop_py_0);
224 return get_property_float(prop_py_1);
226 cout <<
"Invalid index in get_py: " << i << endl;
237 return get_property_float(prop_pz_0);
239 return get_property_float(prop_pz_1);
241 cout <<
"Invalid index in get_pz: " << i << endl;
252 set_property(prop_px_0,f);
255 set_property(prop_px_1,f);
258 cout <<
"Invalid index in set_px: " << i << endl;
269 set_property(prop_py_0,f);
272 set_property(prop_py_1,f);
275 cout <<
"Invalid index in set_py: " << i << endl;
286 set_property(prop_pz_0,f);
289 set_property(prop_pz_1,f);
292 cout <<
"Invalid index in set_pz: " << i << endl;
304 return get_property_float(prop_local_x_0);
306 return get_property_float(prop_local_x_1);
308 cout <<
"Invalid index in get_local_x: " << i << endl;
319 return get_property_float(prop_local_y_0);
321 return get_property_float(prop_local_y_1);
323 cout <<
"Invalid index in get_local_y: " << i << endl;
334 return get_property_float(prop_local_z_0);
336 return get_property_float(prop_local_z_1);
338 cout <<
"Invalid index in get_local_z: " << i << endl;
349 set_property(prop_local_x_0,f);
352 set_property(prop_local_x_1,f);
355 cout <<
"Invalid index in set_local_x: " << i << endl;
366 set_property(prop_local_y_0,f);
369 set_property(prop_local_y_1,f);
372 cout <<
"Invalid index in set_local_y: " << i << endl;
383 set_property(prop_local_z_0,f);
386 set_property(prop_local_z_1,f);
389 cout <<
"Invalid index in set_local_z: " << i << endl;
397 cout <<
"Class " << this->ClassName() << endl;
398 cout <<
"hitid: 0x" << hex << hitid << dec << endl;
399 cout <<
"x0: " << get_x(0)
400 <<
", y0: " << get_y(0)
401 <<
", z0: " << get_z(0)
402 <<
", t0: " << get_t(0) << endl;
403 cout <<
"x1: " << get_x(1)
404 <<
", y1: " << get_y(1)
405 <<
", z1: " << get_z(1)
406 <<
", t1: " << get_t(1) << endl;
407 cout <<
"px0: " << get_px(0)
408 <<
", py0: " << get_py(0)
409 <<
", pz0: " << get_pz(0) << endl;
410 cout <<
"px1: " << get_px(1)
411 <<
", py1: " << get_py(1)
412 <<
", pz1: " << get_pz(1) << endl;
413 cout <<
"trackid: " << trackid <<
", showerid: " << showerid
414 <<
", edep: " << edep << endl;
415 for (prop_map_t::const_iterator i = prop_map.begin(); i!= prop_map.end(); ++i)
418 pair<const string, PROPERTY_TYPE> property_info = get_property_info(prop_id);
419 cout <<
"\t" << prop_id <<
":\t" << property_info.first <<
" = \t";
420 switch(property_info.second)
423 cout << get_property_int(prop_id);
426 cout << get_property_uint(prop_id);
429 cout << get_property_float(prop_id);
432 cout <<
" unknown type ";
virtual void set_local_x(const int i, const float f)
virtual void set_local_y(const int i, const float f)
virtual float get_local_x(const int i) const
prop_storage_t get_storage() const
float get_property_float(const PROPERTY prop_id) const
void set_property(const PROPERTY prop_id, const float value)
virtual float get_local_z(const int i) const
virtual float get_local_y(const int i) const
unsigned int get_property_nocheck(const PROPERTY prop_id) const
virtual void print() const
virtual float get_pz(const int i) const
void identify(std::ostream &os=std::cout) const
virtual void set_py(const int i, const float f)
unsigned int get_property_uint(const PROPERTY prop_id) const
virtual float get_px(const int i) const
virtual float get_py(const int i) const
virtual void set_px(const int i, const float f)
bool has_property(const PROPERTY prop_id) const
convert between 32bit inputs and storage type prop_storage_t
virtual void set_local_z(const int i, const float f)
static const unsigned int hit_idbits
virtual void set_pz(const int i, const float f)
int get_property_int(const PROPERTY prop_id) const