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
PHG4CylinderSubsystem.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4CylinderSubsystem.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef G4DETECTORS_PHG4CYLINDERSUBSYSTEM_H
4
#define G4DETECTORS_PHG4CYLINDERSUBSYSTEM_H
5
6
#include "
PHG4DetectorSubsystem.h
"
7
8
#include <array>
// for array
9
#include <string>
// for string
10
11
class
PHCompositeNode
;
12
class
PHG4CylinderDetector
;
13
class
PHG4Detector
;
14
class
PHG4DisplayAction
;
15
class
PHG4SteppingAction
;
16
17
class
PHG4CylinderSubsystem
:
public
PHG4DetectorSubsystem
18
{
19
public
:
21
PHG4CylinderSubsystem
(
const
std::string&
name
=
"CYLINDER"
,
const
int
layer
= 0);
22
24
~PHG4CylinderSubsystem
(
void
)
override
;
25
27
32
int
InitRunSubsystem
(
PHCompositeNode
*)
override
;
33
35
39
int
process_event
(
PHCompositeNode
*)
override
;
40
42
void
Print
(
const
std::string& what =
"ALL"
)
const override
;
43
45
PHG4Detector
*
GetDetector
(
void
)
const override
;
46
PHG4SteppingAction
*
GetSteppingAction
(
void
)
const override
{
return
m_SteppingAction
; }
47
48
PHG4DisplayAction
*
GetDisplayAction
()
const override
{
return
m_DisplayAction
; }
49
void
set_color
(
const
double
red,
const
double
green,
const
double
blue,
const
double
alpha
= 1.)
50
{
51
m_ColorArray
[0] = red;
52
m_ColorArray
[1] = green;
53
m_ColorArray
[2] = blue;
54
m_ColorArray
[3] =
alpha
;
55
}
56
// this method is used to check if it can be used as mothervolume
57
// Subsystems which can be mothervolume need to implement this
58
// and return true
59
bool
CanBeMotherSubsystem
()
const override
{
return
true
; }
60
61
// this is just needed for use as reference plane for projections
62
// this is the only detector using this - there is no need to add
63
// this to our parameters
64
void
SaveAllHits
(
bool
i =
true
) {
m_SaveAllHitsFlag
= i; }
65
66
private
:
67
void
SetDefaultParameters
()
override
;
68
70
71
PHG4CylinderDetector
*
m_Detector
=
nullptr
;
72
74
75
PHG4SteppingAction
*
m_SteppingAction
=
nullptr
;
76
78
79
PHG4DisplayAction
*
m_DisplayAction
=
nullptr
;
80
81
bool
m_SaveAllHitsFlag
=
false
;
83
std::array<double, 4>
m_ColorArray
;
84
};
85
86
#endif // G4DETECTORS_PHG4CYLINDERSUBSYSTEM_H
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4CylinderSubsystem.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:41
using
1.8.2 with
ECCE GitHub integration