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
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
using namespace
std;
19
using namespace
PHG4Sector;
20
21
//_______________________________________________________________
22
//note this inactive thickness is ~1.5% of a radiation length
23
PHG4SectorDetector::PHG4SectorDetector
(
PHG4Subsystem
*subsys,
PHCompositeNode
*Node,
const
std::string &dnam)
24
:
PHG4Detector
(subsys, Node, dnam)
25
,
PHG4SectorConstructor
(dnam, subsys)
26
, m_DisplayAction(dynamic_cast<
PHG4SectorDisplayAction
*>(subsys->GetDisplayAction()))
27
{
28
}
29
30
//_______________________________________________________________
31
//_______________________________________________________________
32
bool
PHG4SectorDetector::IsInSectorActive
(
G4VPhysicalVolume
*physvol)
33
{
34
for
(map_phy_vol_t::const_iterator
it
=
map_active_phy_vol
.begin();
35
it
!=
map_active_phy_vol
.end(); ++
it
)
36
{
37
if
(physvol == (*it).second)
38
{
39
return
true
;
40
}
41
}
42
43
return
false
;
44
}
45
46
//_______________________________________________________________
47
void
PHG4SectorDetector::ConstructMe
(
G4LogicalVolume
*logicWorld)
48
{
49
Construct_Sectors
(logicWorld);
50
51
for
(map_log_vol_t::iterator
it
=
map_log_vol
.begin();
it
!=
map_log_vol
.end();
52
++
it
)
53
{
54
if
((*it).first !=
G4String
(
name_base
+
"_Log"
))
55
{
56
// sub layers
57
m_DisplayAction
->
AddVolume
((*it).second,
"SectorDetector"
);
58
}
59
}
60
}
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4SectorDetector.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:41
using
1.8.2 with
ECCE GitHub integration