EIC Software
Reference for
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
PHG4CrystalCalorimeterDetector.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4CrystalCalorimeterDetector.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef G4DETECTORS_PHG4CRYSTALCALORIMETERDETECTOR_H
4
#define G4DETECTORS_PHG4CRYSTALCALORIMETERDETECTOR_H
5
6
#include "
PHG4CrystalCalorimeterDefs.h
"
7
8
#include <
g4main/PHG4Detector.h
>
9
10
#include <map>
11
#include <set>
12
#include <string>
13
14
class
G4LogicalVolume;
15
class
G4Material;
16
class
G4VPhysicalVolume;
17
class
PHCompositeNode
;
18
class
PHG4CrystalCalorimeterDisplayAction
;
19
class
PHG4Subsystem
;
20
class
PHParameters
;
21
28
class
PHG4CrystalCalorimeterDetector
:
public
PHG4Detector
29
{
30
public
:
32
PHG4CrystalCalorimeterDetector
(
PHG4Subsystem
*subsys,
PHCompositeNode
*Node,
PHParameters
*
parameters
,
const
std::string &dnam);
33
35
virtual
~PHG4CrystalCalorimeterDetector
() {}
36
38
virtual
void
ConstructMe
(G4LogicalVolume *
world
);
39
41
virtual
int
IsInCrystalCalorimeter
(G4VPhysicalVolume *)
const
;
42
43
// ----- accessing member variables: ------------
44
45
void
SuperDetector
(
const
std::string &
name
) {
m_SuperDetector
=
name
; }
46
const
std::string
SuperDetector
()
const
{
return
m_SuperDetector
; }
47
48
int
get_DetectorId
()
const
{
return
m_DetectorId
; }
49
void
DetectorId
(
const
int
i) {
m_DetectorId
= i; }
50
51
// ----- additional accessors used by derived classes: ------------
52
53
PHParameters
*
GetParams
() {
return
m_Params
; }
54
55
protected
:
// for variables also used in PHG4ProjCrystalCalorimeterDetector
56
PHG4CrystalCalorimeterDisplayAction
*
GetDisplayAction
() {
return
m_DisplayAction
; }
57
G4Material *
GetCarbonFiber
();
58
virtual
int
GetCaloType
()
const
{
return
PHG4CrystalCalorimeterDefs::CaloType::nonprojective
; }
59
60
private
:
// private stuff
61
G4LogicalVolume *
ConstructTower
();
62
int
PlaceTower
(G4LogicalVolume *envelope, G4LogicalVolume *tower);
63
int
ParseParametersFromTable
();
64
65
struct
towerposition
66
{
67
G4double
x
;
68
G4double
y
;
69
G4double
z
;
70
int
idx_j
;
71
int
idx_k
;
72
};
73
74
int
m_DetectorId
= 0;
75
76
std::string
m_SuperDetector
;
77
78
PHParameters
*
m_Params
=
nullptr
;
79
80
PHG4CrystalCalorimeterDisplayAction
*
m_DisplayAction
=
nullptr
;
81
82
std::string
_towerlogicnameprefix
;
83
84
std::map<std::string, G4double>
_map_global_parameter
;
85
std::map<std::string, towerposition>
_map_tower
;
86
std::set<G4VPhysicalVolume *>
m_ActiveVolumeSet
;
87
std::set<G4VPhysicalVolume *>
m_PassiveVolumeSet
;
88
// since getting parameters is a map search we do not want to
89
// do this in every step, the parameters used are cached
90
// in the following variables
91
int
m_IsActive
;
92
int
m_AbsorberActive
;
93
};
94
95
#endif
fun4all_eicdetectors
blob
master
simulation
g4simulation
g4eiccalos
PHG4CrystalCalorimeterDetector.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:52
using
1.8.2 with
EIC GitHub integration