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
PHG4BlockGeomv1.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4BlockGeomv1.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef G4DETECTORS_PHG4BLOCKGEOMV1_H
4
#define G4DETECTORS_PHG4BLOCKGEOMV1_H
5
6
#include "
PHG4BlockGeom.h
"
7
8
#include <iostream>
// for cout, ostream
9
10
class
PHG4BlockGeomv1
:
public
PHG4BlockGeom
11
{
12
public
:
13
PHG4BlockGeomv1
();
14
PHG4BlockGeomv1
(
const
int
layer
,
15
const
double
sizex,
const
double
sizey,
const
double
sizez,
16
const
double
centerx,
const
double
centery,
const
double
centerz,
17
const
double
zrot);
18
19
~PHG4BlockGeomv1
()
override
{}
20
21
// from PHObject
22
void
identify
(std::ostream &
os
= std::cout)
const override
;
23
24
int
get_layer
()
const override
{
return
_layer
; }
25
double
get_width
()
const override
{
return
_size
[0]; }
26
double
get_thickness
()
const override
{
return
_size
[1]; }
27
double
get_length
()
const override
{
return
_size
[2]; }
28
double
get_center_x
()
const override
{
return
_center
[0]; }
29
double
get_center_y
()
const override
{
return
_center
[1]; }
30
double
get_center_z
()
const override
{
return
_center
[2]; }
31
double
get_z_rot
()
const override
{
return
_rotation_z
; }
32
33
double
get_size_x
()
const override
{
return
_size
[0]; }
34
double
get_size_y
()
const override
{
return
_size
[1]; }
35
double
get_size_z
()
const override
{
return
_size
[2]; }
36
37
double
get_rot_matrix
(
const
int
i
,
const
int
j
)
const override
{
return
_rot_matrix
[
i
][
j
]; }
38
39
void
set_layer
(
const
int
i
)
override
{
_layer
=
i
; }
40
41
// size in local coordinates
42
void
set_size
(
const
double
sizex,
const
double
sizey,
const
double
sizez)
override
;
43
44
void
set_z_rot
(
const
double
zrot)
override
45
{
46
_build_rot_matrix
();
47
_rotation_z
= zrot;
48
}
49
50
void
convert_local_to_global
(
double
,
double
,
double
,
51
double
&,
double
&,
double
&)
const override
;
52
53
// our own (not inherited)
54
void
set_center
(
const
double
centerx,
const
double
centery,
const
double
centerz);
55
void
convert_global_x_to_local
(
double
,
double
,
double
,
56
double
&,
double
&,
double
&)
const
;
57
58
protected
:
59
int
_layer
;
60
double
_size
[3];
61
double
_center
[3];
62
double
_rotation_z
;
63
64
void
_build_rot_matrix
();
65
double
_rot_matrix
[3][3];
// global -> local coordinates rotation matrix
66
67
ClassDefOverride(
PHG4BlockGeomv1
, 1)
68
};
69
70
#endif
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4BlockGeomv1.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:12
using
1.8.2 with
sPHENIX GitHub integration