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
PHG4SectorDetector.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4SectorDetector.cc
1
#include "
PHG4SectorDetector.h
"
2
#include "
PHG4SectorDisplayAction.h
"
3
4
#include <
g4main/PHG4Detector.h
>
// for PHG4Detector
5
#include <
g4main/PHG4DisplayAction.h
>
// for PHG4DisplayAction
6
#include <
g4main/PHG4Subsystem.h
>
// for PHG4Subsystem
7
8
#include <Geant4/G4PVPlacement.hh>
9
#include <Geant4/G4String.hh>
// for G4String
10
11
#include <map>
// for _Rb_tree_iterator, _Rb_tree_co...
12
#include <sstream>
13
#include <utility>
// for pair
14
15
class
G4VPhysicalVolume
;
16
class
PHCompositeNode
;
17
18
//_______________________________________________________________
19
//note this inactive thickness is ~1.5% of a radiation length
20
PHG4SectorDetector::PHG4SectorDetector
(
PHG4Subsystem
*subsys,
PHCompositeNode
*Node,
const
std::string
&dnam)
21
:
PHG4Detector
(subsys, Node, dnam)
22
, PHG4SectorConstructor(dnam, subsys)
23
, m_DisplayAction(dynamic_cast<
PHG4SectorDisplayAction
*>(subsys->GetDisplayAction()))
24
{
25
}
26
27
//_______________________________________________________________
28
//_______________________________________________________________
29
bool
PHG4SectorDetector::IsInSectorActive
(
G4VPhysicalVolume
*physvol)
30
{
31
for
(map_phy_vol_t::const_iterator
it
=
map_active_phy_vol
.begin();
32
it
!=
map_active_phy_vol
.end(); ++
it
)
33
{
34
if
(physvol == (*it).second)
35
{
36
return
true
;
37
}
38
}
39
40
return
false
;
41
}
42
43
//_______________________________________________________________
44
void
PHG4SectorDetector::ConstructMe
(G4LogicalVolume *logicWorld)
45
{
46
Construct_Sectors
(logicWorld);
47
48
for
(
auto
&
it
:
map_log_vol
)
49
{
50
if
(
it
.first != G4String(
name_base
+
"_Log"
))
51
{
52
// sub layers
53
m_DisplayAction
->
AddVolume
(
it
.second,
"SectorDetector"
);
54
}
55
}
56
}
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4SectorDetector.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration