Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
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
RawTowerGeomv2::RawTowerGeomv2
(
RawTowerDefs::keytype
id
)
7
: _towerid(id)
8
{
9
}
10
11
double
RawTowerGeomv2::get_center_radius
()
const
12
{
13
return
std::sqrt(
_center_x
*
_center_x
+
14
_center_y
*
_center_y
);
15
}
16
17
double
RawTowerGeomv2::get_eta
()
const
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
29
double
RawTowerGeomv2::get_phi
()
const
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
}
coresoftware
blob
master
offline
packages
CaloBase
RawTowerGeomv2.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:05
using
1.8.2 with
sPHENIX GitHub integration