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
CylinderGeomMicromegas.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CylinderGeomMicromegas.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
4
#ifndef MICROMEGAS_CYLINDERGEOMMICROMEGAS_H
5
#define MICROMEGAS_CYLINDERGEOMMICROMEGAS_H
6
12
#include "
MicromegasDefs.h
"
13
#include "
MicromegasTile.h
"
14
15
#include <
g4detectors/PHG4CylinderGeom.h
>
16
17
#include <TGeoMatrix.h>
18
19
#include <cmath>
20
#include <iostream>
21
22
class
ActsGeometry
;
23
class
TVector2;
24
class
TVector3;
25
class
PHG4Hit
;
26
27
class
CylinderGeomMicromegas
:
public
PHG4CylinderGeom
28
{
29
public
:
30
31
//* empty constructor
32
explicit
CylinderGeomMicromegas
()
33
{}
34
35
//* constructor
36
CylinderGeomMicromegas
(
int
layer
)
37
:
m_layer
( layer )
38
{}
39
41
void
identify
(std::ostream&)
const override
;
42
44
45
int
get_layer
()
const override
{
return
m_layer
;}
46
double
get_radius
()
const override
{
return
m_radius
;}
47
double
get_thickness
()
const override
{
return
m_thickness
;}
48
double
get_zmin
()
const override
{
return
m_zmin
;}
49
double
get_zmax
()
const override
{
return
m_zmax
;}
50
double
get_pitch
()
const
{
return
m_pitch
; }
51
53
MicromegasDefs::SegmentationType
get_segmentation_type
()
const
{
return
m_segmentation_type
;}
54
56
MicromegasDefs::DriftDirection
get_drift_direction
()
const
{
return
m_drift_direction
;}
57
58
// check if hit radius matches this cylinder
59
bool
check_radius
(
const
TVector3& )
const
;
60
62
TVector3
get_local_from_world_coords
( uint tileid,
ActsGeometry
*,
const
TVector3& )
const
;
63
65
TVector3
get_local_from_world_vect
( uint tileid,
ActsGeometry
*,
const
TVector3& )
const
;
66
68
TVector3
get_world_from_local_coords
( uint tileid,
ActsGeometry
*,
const
TVector2& )
const
;
69
71
TVector3
get_world_from_local_coords
( uint tileid,
ActsGeometry
*,
const
TVector3& )
const
;
72
74
TVector3
get_world_from_local_vect
( uint tileid,
ActsGeometry
*,
const
TVector3& )
const
;
75
77
81
int
find_tile_cylindrical
(
const
TVector3& )
const
;
82
84
size_t
get_tiles_count
()
const
{
return
m_tiles
.size(); }
85
87
const
MicromegasTile
&
get_tile
( uint tileid )
const
88
{
89
assert
( tileid <
m_tiles
.size() );
90
return
m_tiles
[tileid];
91
}
92
94
int
find_strip_from_world_coords
( uint tileid,
ActsGeometry
*,
const
TVector3& )
const
;
95
97
int
find_strip_from_local_coords
( uint tileid,
ActsGeometry
*,
const
TVector2& )
const
;
98
100
double
get_strip_length
( uint tileid,
ActsGeometry
* )
const
;
101
103
uint
get_strip_count
( uint tileid,
ActsGeometry
* )
const
;
104
106
TVector2
get_local_coordinates
( uint tileid,
ActsGeometry
*, uint stripnum )
const
;
107
109
TVector3
get_world_coordinates
( uint tileid,
ActsGeometry
*, uint stripnum )
const
;
110
112
static
constexpr
double
reference_radius
= 82;
113
115
117
118
void
set_layer
(
const
int
i
)
override
{
m_layer
=
i
;}
119
void
set_radius
(
const
double
value
)
override
{
m_radius
=
value
;}
120
void
set_thickness
(
const
double
value
)
override
{
m_thickness
=
value
;}
121
void
set_zmin
(
const
double
value
)
override
{
m_zmin
=
value
;}
122
void
set_zmax
(
const
double
value
)
override
{
m_zmax
=
value
;}
123
void
set_pitch
(
double
value
) {
m_pitch
=
value
; }
124
126
void
set_tiles
(
const
MicromegasTile::List
& tiles ) {
m_tiles
= tiles;}
127
129
void
set_segmentation_type
(
MicromegasDefs::SegmentationType
value
) {
m_segmentation_type
=
value
;}
130
132
void
set_drift_direction
(
MicromegasDefs::DriftDirection
value
) {
m_drift_direction
=
value
;}
134
135
private
:
136
138
int
m_layer
= 0;
139
141
MicromegasDefs::SegmentationType
m_segmentation_type
=
MicromegasDefs::SegmentationType::SEGMENTATION_PHI
;
142
144
MicromegasDefs::DriftDirection
m_drift_direction
= MicromegasDefs::DriftDirection::OUTWARD;
145
147
double
m_radius
= 0;
148
150
double
m_thickness
= 0;
151
153
double
m_zmin
= 0;
154
156
double
m_zmax
= 0;
157
159
double
m_pitch
= 0.1;
160
162
166
MicromegasTile::List
m_tiles
;
167
168
ClassDefOverride(
CylinderGeomMicromegas
, 1)
169
};
170
171
#endif
coresoftware
blob
master
offline
packages
micromegas
CylinderGeomMicromegas.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:07
using
1.8.2 with
sPHENIX GitHub integration