|
ATLAS Offline Software
|
Main builder to create/position all volumes described in a GeoModel Tree.
More...
#include <Geo2G4Builder.h>
Main builder to create/position all volumes described in a GeoModel Tree.
Definition at line 33 of file Geo2G4Builder.h.
◆ Geo2G4Builder()
Geo2G4Builder::Geo2G4Builder |
( |
const std::string & |
detectorName | ) |
|
Definition at line 32 of file Geo2G4Builder.cxx.
38 THROW_EXCEPTION(
"ERROR: Geo2G4Builder for detector "<< detectorName <<
" could not access the detector store.");
50 for(
unsigned int i=0;
i<theManager->getNumTreeTops(); ++
i) {
62 if(theMaterialManager) {
70 if (
m_g2gSvc.retrieve().isFailure()) {
79 <<
"\n Use 'DefaultBuilder' property of Geo2G4Svc or"
80 <<
"\n 'GetVolumeBuilder' method of Geo2G4Builder");
◆ ~Geo2G4Builder()
Geo2G4Builder::~Geo2G4Builder |
( |
| ) |
|
|
default |
◆ BuildOpticalSurfaces()
Definition at line 173 of file Geo2G4Builder.cxx.
181 G4OpticalSurface* g4OptSurface = surfaceFactory.
Build(border_surface.getOptSurface());
183 G4VPhysicalVolume* g4PV1 = 0;
184 G4VPhysicalVolume* g4PV2 = 0;
185 OpticalVolumesMap::const_iterator volIt;
188 volIt = optical_volumes->find(border_surface.getPV1());
189 if(volIt == optical_volumes->end())
191 ATH_MSG_WARNING(
"Unable to find " << border_surface.getPV1()->getLogVol()->getName() <<
" in Optical Volumes map");
194 g4PV1 = volIt.operator->()->second;
197 volIt = optical_volumes->find(border_surface.getPV2());
198 if(volIt == optical_volumes->end())
200 ATH_MSG_WARNING(
"Unable to find " << border_surface.getPV2()->getLogVol()->getName() <<
" in Optical Volumes map");
203 g4PV2 = volIt.operator->()->second;
206 G4LogicalBorderSurface* g4BorderSurface
__attribute__((
unused)) =
new G4LogicalBorderSurface(border_surface.getName(),g4PV1,g4PV2,g4OptSurface);
◆ BuildTree()
G4LogicalVolume * Geo2G4Builder::BuildTree |
( |
| ) |
|
Definition at line 84 of file Geo2G4Builder.cxx.
87 G4LogicalVolume*
result =
nullptr;
94 if(
sc.isSuccess() && surface_container->size()>0) {
108 const GeoShape* shResult = &shFirst;
115 GeoPhysVol* pvEnvelope =
new GeoPhysVol(lvEnvelope);
120 PVConstLink world =
m_treeTops[0]->getParent();
126 Query<unsigned int> childIndx = world->indexOf(
pv);
133 Query<int> Qint = world->getIdOfChildVol(childIndx);
134 if(Qint.isValid())
id = Qint;
137 std::string nameTT = world->getNameOfChildVol(childIndx);
138 if (nameTT ==
"ANON") nameTT =
pv->getLogVol()->getName();
142 G4ReflectionFactory::Instance()->Place(theG4Position,
153 if(optical_volumes) {
154 if(optical_volumes->size()>0) {
158 ATH_MSG_WARNING(
"Optical volumes apparently requested, but none found! Deleting temps");
160 delete optical_volumes;
◆ GetDetectorTransform()
HepGeom::Transform3D Geo2G4Builder::GetDetectorTransform |
( |
| ) |
|
|
inline |
◆ GetVolumeBuilder()
VolumeBuilder * Geo2G4Builder::GetVolumeBuilder |
( |
std::string |
bname | ) |
|
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_detectorName
std::string Geo2G4Builder::m_detectorName |
|
private |
◆ m_g2gSvc
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_matAir
const GeoMaterial* Geo2G4Builder::m_matAir {nullptr} |
|
private |
◆ m_motherTransform
GeoTrf::Transform3D Geo2G4Builder::m_motherTransform |
|
private |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_pDetStore
◆ m_theBuilder
◆ m_theExpt
◆ m_treeTops
std::vector<PVConstLink> Geo2G4Builder::m_treeTops |
|
private |
The documentation for this class was generated from the following files:
std::vector< PVConstLink > m_treeTops
std::atomic< MSG::Level > m_lvl
Current logging level.
const GeoMaterial * m_matAir
const std::string & GetKey() const
virtual G4LogicalVolume * Build(PVConstLink pv, OpticalVolumesMap *optical_volumes=0)=0
ServiceHandle< IGeo2G4Svc > m_g2gSvc
std::map< const GeoOpticalPhysVol *, G4VPhysicalVolume *, std::less< const GeoOpticalPhysVol * > > OpticalVolumesMap
#define THROW_EXCEPTION(MSG)
void BuildOpticalSurfaces(const GeoBorderSurfaceContainer *surface_container, const OpticalVolumesMap *optical_volumes)
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
GeoTrf::Transform3D m_motherTransform
void addTmpVolume(PVConstLink volume)
AthMessaging()
Default constructor:
::StatusCode StatusCode
StatusCode definition for legacy code.
const GeoVDetectorManager * getManager(const std::string &name) const
MsgStream & msg() const
The standard message stream.
ServiceHandle< StoreGateSvc > m_pDetStore
__attribute__((always_inline)) inline uint16_t TileCalibDrawerBase
#define ATH_MSG_WARNING(x)
std::vector< GeoBorderSurface > GeoBorderSurfaceContainer
std::string m_nm
Message source name.
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
virtual const GeoMaterial * getMaterial(const std::string &name)=0
This class holds one or more material managers and makes them storeable, under StoreGate.
void initMessaging() const
Initialize our message level and MessageSvc.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
GeoModelExperiment * m_theExpt
VolumeBuilder * m_theBuilder
G4OpticalSurface * Build(const GeoOpticalSurface *)
std::string m_detectorName