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