ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RawTowerGeomv3.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RawTowerGeomv3.cc
1 #include "RawTowerGeomv3.h"
2 
3 #include <cmath>
4 #include <iostream>
5 
7  : _towerid(id)
8 {
9 }
10 
12 {
13  return std::sqrt(_center_x * _center_x +
15 }
16 
18 {
19  double radius = sqrt(_center_x * _center_x + _center_y * _center_y);
20  double theta = atan2(radius, _center_z);
21  return theta;
22 }
23 
25 {
26  double theta = get_theta();
27  double eta = -log(tan(theta / 2.));
28  return eta;
29 }
30 
32 {
33  return atan2(_center_y, _center_x);
34 }
35 
36 
38 {
40  switch(caloid)
41  {
44  default:
46  }
47  return -1;
48 }
49 
51 {
53  switch(caloid)
54  {
57  default:
59  }
60  return -1;
61 }
62 
63 
64 void RawTowerGeomv3::identify(std::ostream& os) const
65 {
66  os << "RawTowerGeomv3: x: " << get_center_x() << " y: " << get_center_y() << " z: " << get_center_z()
67  << "\n dx: " << get_size_x() << " dy: " << get_size_y() << " dz: " << get_size_z()
68  << "\n tower_type = " << _tower_type << std::endl;
69 }