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
PHG4Detector.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4Detector.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef G4MAIN_PHG4DETECTOR_H
4
#define G4MAIN_PHG4DETECTOR_H
5
6
#include <Geant4/G4RotationMatrix.hh>
7
8
#include <iostream>
9
#include <string>
10
11
class
G4LogicalVolume;
12
class
G4Material;
13
class
G4Element;
14
class
G4UserSteppingAction;
15
class
G4VSolid;
16
class
PHCompositeNode
;
17
class
PHG4Subsystem
;
18
20
21
class
PHG4Detector
22
{
23
public
:
25
// delete default ctor, nobody should use it
26
PHG4Detector
() =
delete
;
27
// this is the ctor we use
28
explicit
PHG4Detector
(
PHG4Subsystem
*subsys,
PHCompositeNode
*Node,
const
std::string
&nam);
29
31
virtual
~PHG4Detector
(
void
)
32
{
33
}
34
36
40
virtual
void
Construct
(G4LogicalVolume *world)
final
;
41
42
virtual
void
ConstructMe
(G4LogicalVolume *mothervolume) = 0;
43
45
virtual
void
PostConstruction
() {};
46
47
virtual
void
Verbosity
(
const
int
v
) {
m_Verbosity
=
v
; }
48
49
virtual
int
Verbosity
()
const
{
return
m_Verbosity
; }
50
virtual
G4UserSteppingAction *
GetSteppingAction
() {
return
nullptr
; }
51
virtual
std::string
GetName
()
const
{
return
m_Name
; }
52
virtual
void
OverlapCheck
(
const
bool
chk) {
m_OverlapCheck
= chk; }
53
virtual
bool
OverlapCheck
()
const
{
return
m_OverlapCheck
; }
54
virtual
void
Print
(
const
std::string
&
/*what*/
=
"ALL"
)
const
55
{
56
std::cout <<
GetName
() <<
": Print method not implemented"
<< std::endl;
57
}
58
virtual
int
DisplayVolume
(G4VSolid *volume, G4LogicalVolume *logvol, G4RotationMatrix *rotm =
nullptr
);
59
virtual
int
DisplayVolume
(G4LogicalVolume *checksolid, G4LogicalVolume *logvol, G4RotationMatrix *rotm =
nullptr
);
60
virtual
PHCompositeNode
*
topNode
() {
return
m_topNode
; }
61
virtual
PHG4Subsystem
*
GetMySubsystem
() {
return
m_MySubsystem
;}
62
static
G4Material *
GetDetectorMaterial
(
const
std::string
&
name
,
const
bool
quit =
true
);
63
static
G4Element *
GetDetectorElement
(
const
std::string
&
name
,
const
bool
quit =
true
);
64
65
private
:
66
PHCompositeNode
*
m_topNode
=
nullptr
;
67
PHG4Subsystem
*
m_MySubsystem
=
nullptr
;
68
int
m_Verbosity
= 0;
69
bool
m_OverlapCheck
=
false
;
70
int
m_ColorIndex
= 0;
71
std::string
m_Name
;
72
};
73
74
#endif // G4MAIN_PHG4DETECTOR_H
coresoftware
blob
master
simulation
g4simulation
g4main
PHG4Detector.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:15
using
1.8.2 with
sPHENIX GitHub integration