ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RawTowerGeomv2.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RawTowerGeomv2.cc
1 #include "RawTowerGeomv2.h"
2 
3 #include <cmath>
4 #include <iostream>
5 
6 using namespace std;
7 
9  : _towerid(~0)
10  , _center_x(0)
11  , _center_y(0)
12  , _center_z(0)
13  , _size_x(0)
14  , _size_y(0)
15  , _size_z(0)
16 {
17 }
19  : _towerid(id)
20  , _center_x(0)
21  , _center_y(0)
22  , _center_z(0)
23  , _size_x(0)
24  , _size_y(0)
25  , _size_z(0)
26 {
27 }
28 
30 {
31  return sqrt(_center_x * _center_x +
33 }
34 
36 {
37  double eta;
38  double radius;
39  double theta;
40  radius = sqrt(_center_x * _center_x + _center_y * _center_y);
41  theta = atan2(radius, _center_z);
42  eta = -log(tan(theta / 2.));
43 
44  return eta;
45 }
46 
48 {
49  return atan2(_center_y, _center_x);
50 }
51 
52 void RawTowerGeomv2::identify(std::ostream& os) const
53 {
54  os << "RawTowerGeomv2: x: " << get_center_x() << " y: " << get_center_y() << " z: " << get_center_z()
55  << "\n dx: " << get_size_x() << " dy: " << get_size_y() << " dz: " << get_size_z() << std::endl;
56 }