ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Utilities
Geo2G4
src
SingleLogicalVolumeFactory.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
SingleLogicalVolumeFactory.h
"
6
#include "
Geo2G4SolidFactory.h
"
7
#include "
GeoMaterial2G4/Geo2G4MaterialFactory.h
"
8
#include "GeoModelKernel/GeoLogVol.h"
9
#include "
SimHelpers/ServiceAccessor.h
"
10
#include "
AthenaBaseComps/AthMsgStreamMacros.h
"
11
#include "G4LogicalVolume.hh"
12
#include "G4Material.hh"
13
14
SingleLogicalVolumeFactory::SingleLogicalVolumeFactory
():
AthMessaging
(
"SingleLogicalVolumeFactory"
)
15
{
16
}
17
18
typedef
std::map<std::string, G4LogicalVolume*, std::less<std::string> >
vMap
;
19
20
G4LogicalVolume *SingleLogicalVolumeFactory::Build
ATLAS_NOT_THREAD_SAFE
(
const
GeoLogVol* theLog)
21
{
22
static
Geo2G4SolidFactory
theSolidFactory;
23
static
Geo2G4MaterialFactory
theMaterialFactory;
24
static
vMap
volumeList
;
25
//
26
// Get Material from GeoModel
27
//
28
const
std::string& n= theLog->getName();
29
if
(
volumeList
.find(n) ==
volumeList
.end()) {
30
G4LogicalVolume *theG4Log=0;
31
G4Material* theG4Mat=theMaterialFactory.
Build
(theLog->getMaterial());
32
33
G4VSolid * theG4Solid = theSolidFactory.Build(theLog->getShape());
34
35
ATH_MSG_DEBUG
(
"Building logical volume (single) "
<<theLog->getName()<<
" "
<< theG4Mat);
36
theG4Log =
new
G4LogicalVolume(theG4Solid,
37
theG4Mat,
38
theLog->getName(),
39
0,0,0);
40
volumeList
[n] = theG4Log;
41
return
theG4Log;
42
}
43
return
volumeList
[n];
44
}
volumeList
std::map< std::string, AGDDVolume * > volumeList
Definition
AGDDSection.h:14
AthMsgStreamMacros.h
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x,...)
Definition
AthMsgStreamMacros.h:43
Geo2G4MaterialFactory.h
Geo2G4SolidFactory.h
ServiceAccessor.h
vMap
std::map< std::string, G4LogicalVolume *, std::less< std::string > > vMap
Definition
SingleLogicalVolumeFactory.cxx:18
SingleLogicalVolumeFactory.h
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition
checker_macros.h:212
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
Geo2G4MaterialFactory
Definition
Geo2G4MaterialFactory.h:15
Geo2G4MaterialFactory::Build
G4Material * Build(const GeoMaterial *)
Definition
Geo2G4MaterialFactory.cxx:29
Geo2G4SolidFactory
Definition
Geo2G4SolidFactory.h:23
SingleLogicalVolumeFactory::SingleLogicalVolumeFactory
SingleLogicalVolumeFactory()
Definition
SingleLogicalVolumeFactory.cxx:14
Generated on
for ATLAS Offline Software by
1.17.0