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
PHG4InnerHcalDisplayAction.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4InnerHcalDisplayAction.cc
1
#include "
PHG4InnerHcalDisplayAction.h
"
2
3
#include <
g4main/PHG4DisplayAction.h
>
// for PHG4DisplayAction
4
5
#include <Geant4/G4Colour.hh>
6
#include <Geant4/G4LogicalVolume.hh>
7
#include <Geant4/G4VisAttributes.hh>
8
9
#include <string>
10
11
PHG4InnerHcalDisplayAction::PHG4InnerHcalDisplayAction
(
const
std::string &
name
)
12
:
PHG4DisplayAction
(name)
13
, m_MyTopVolume(nullptr)
14
, m_SteelVol(nullptr)
15
{
16
}
17
18
PHG4InnerHcalDisplayAction::~PHG4InnerHcalDisplayAction
()
19
{
20
for
(
auto
&
it
:
m_VisAttVec
)
21
{
22
delete
it
;
23
}
24
m_VisAttVec.clear();
25
m_ScintiLogVolSet
.clear();
26
}
27
28
void
PHG4InnerHcalDisplayAction::ApplyDisplayAction
(
G4VPhysicalVolume
*
/*physvol*/
)
29
{
30
for
(
auto
&
it
:
m_ScintiLogVolSet
)
31
{
32
if
(
it
->GetVisAttributes())
33
{
34
return
;
35
}
36
G4VisAttributes
*m_VisAtt =
new
G4VisAttributes
();
37
m_VisAtt->
SetVisibility
(
true
);
38
m_VisAtt->
SetForceSolid
(
true
);
39
m_VisAtt->
SetColor
(
G4Colour::Green
());
40
it
->SetVisAttributes(m_VisAtt);
41
m_VisAttVec
.push_back(m_VisAtt);
42
}
43
if
(
m_SteelVol
->
GetVisAttributes
())
44
{
45
return
;
46
}
47
G4VisAttributes
*m_VisAtt =
new
G4VisAttributes
();
48
m_VisAtt->
SetVisibility
(
true
);
49
m_VisAtt->
SetForceSolid
(
true
);
50
m_VisAtt->
SetColor
(
G4Colour::Grey
());
51
m_SteelVol
->
SetVisAttributes
(m_VisAtt);
52
m_VisAttVec
.push_back(m_VisAtt);
53
}
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4InnerHcalDisplayAction.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:41
using
1.8.2 with
ECCE GitHub integration