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
RawTowerZDCGeomv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RawTowerZDCGeomv1.cc
1
#include "
RawTowerZDCGeomv1.h
"
2
3
#include <cmath>
4
#include <iostream>
5
6
RawTowerZDCGeomv1::RawTowerZDCGeomv1
(
RawTowerZDCDefs::keytype
id
)
7
: _towerid(id)
8
{
9
}
10
11
double
RawTowerZDCGeomv1::get_center_radius
()
const
12
{
13
return
std::sqrt(
_center_x
*
_center_x
+
14
_center_y
*
_center_y
);
15
}
16
17
double
RawTowerZDCGeomv1::get_theta
()
const
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
24
double
RawTowerZDCGeomv1::get_eta
()
const
25
{
26
double
theta
=
get_theta
();
27
double
eta
= -log(tan(theta / 2.));
28
return
eta
;
29
}
30
31
double
RawTowerZDCGeomv1::get_phi
()
const
32
{
33
return
atan2(
_center_y
,
_center_x
);
34
}
35
36
37
int
RawTowerZDCGeomv1::get_bineta
()
const
38
{
39
return
RawTowerZDCDefs::decode_index1zdc
(
_towerid
);
40
}
41
42
int
RawTowerZDCGeomv1::get_binphi
()
const
43
{
44
return
RawTowerZDCDefs::decode_index2zdc
(
_towerid
);
45
}
46
47
int
RawTowerZDCGeomv1::get_binl
()
const
48
{
49
return
RawTowerZDCDefs::decode_index3zdc
(
_towerid
);
50
}
51
52
void
RawTowerZDCGeomv1::identify
(std::ostream& os)
const
53
{
54
os <<
"RawTowerZDCGeomv1: 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
()
56
<<
"\n tower_type = "
<<
_tower_type
<< std::endl;
57
}
fun4all_eicdetectors
blob
master
reconstruction
eiczdcbase
RawTowerZDCGeomv1.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:46
using
1.8.2 with
ECCE GitHub integration