Analysis Software
Documentation for sPHENIX simulation 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 
7  : _towerid(id)
8 {
9 }
10 
12 {
13  return std::sqrt(_center_x * _center_x +
15 }
16 
18 {
19  double eta;
20  double radius;
21  double theta;
22  radius = std::sqrt(_center_x * _center_x + _center_y * _center_y);
23  theta = std::atan2(radius, _center_z);
24  eta = -std::log(std::tan(theta / 2.));
25 
26  return eta;
27 }
28 
30 {
31  return std::atan2(_center_y, _center_x);
32 }
33 
34 void RawTowerGeomv2::identify(std::ostream& os) const
35 {
36  os << "RawTowerGeomv2: x: " << get_center_x() << " y: " << get_center_y() << " z: " << get_center_z()
37  << "\n dx: " << get_size_x() << " dy: " << get_size_y() << " dz: " << get_size_z() << std::endl;
38 }