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
PHG4MicromegasSurvey.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4MicromegasSurvey.h
1
#ifndef PHG4MICROMEGASSURVEY_H
2
#define PHG4MICROMEGASSURVEY_H
3
16
#include <Geant4/G4Transform3D.hh>
17
18
#include <array>
19
#include <string>
20
#include <unordered_map>
21
22
class
PHG4MicromegasSurvey
23
{
24
public
:
26
PHG4MicromegasSurvey
();
27
29
std::string
get_module_name
(
int
layer
, uint
tile
)
const
;
30
32
G4Transform3D
get_transformation
(
int
layer, uint tile)
const
;
33
34
private
:
36
struct
tile_id_t
37
{
38
tile_id_t
(
int
layer, uint tile)
39
:
m_layer
(layer)
40
,
m_tile
(tile)
41
{
42
}
43
int
m_layer
= 0;
44
uint
m_tile
= 0;
45
46
bool
operator==
(
const
tile_id_t
& other)
const
47
{
48
return
other.
m_layer
==
m_layer
&& other.
m_tile
==
m_tile
;
49
}
50
};
51
52
struct
tile_id_hash_t
53
{
54
std::size_t
operator()
(
const
tile_id_t
&
id
)
const
noexcept
55
{
56
return
id
.m_tile + (
id
.m_layer << 4);
57
}
58
};
59
61
using
tile_map_t
= std::unordered_map<tile_id_t, std::string, tile_id_hash_t>;
62
tile_map_t
m_tile_map
;
63
65
using
rotation_t
= std::array<double, 3>;
66
using
translation_t
= std::array<double, 3>;
67
struct
transformation_t
68
{
69
transformation_t
(
const
rotation_t
& rotation,
const
translation_t
&
translation
)
70
:
m_rotation
(rotation)
71
,
m_translation
(translation)
72
{
73
}
74
76
rotation_t
m_rotation
= {{0}};
77
79
translation_t
m_translation
= {{0}};
80
};
81
83
using
transformation_map_t
= std::unordered_map<std::string, transformation_t>;
84
transformation_map_t
m_transformation_map
;
85
};
86
87
#endif
coresoftware
blob
master
simulation
g4simulation
g4micromegas
PHG4MicromegasSurvey.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:15
using
1.8.2 with
sPHENIX GitHub integration