ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
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
using namespace
std;
7
8
RawTowerGeomv2::RawTowerGeomv2
()
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
}
18
RawTowerGeomv2::RawTowerGeomv2
(
RawTowerDefs::keytype
id
)
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
29
double
RawTowerGeomv2::get_center_radius
()
const
30
{
31
return
sqrt(
_center_x
*
_center_x
+
32
_center_y
*
_center_y
);
33
}
34
35
double
RawTowerGeomv2::get_eta
()
const
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
47
double
RawTowerGeomv2::get_phi
()
const
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
}
coresoftware
blob
master
offline
packages
CaloBase
RawTowerGeomv2.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:34
using
1.8.2 with
ECCE GitHub integration