|
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 30 of file Geo2G4Builder.h.
◆ Geo2G4Builder()
Geo2G4Builder::Geo2G4Builder |
( |
const std::string & |
detectorName | ) |
|
Definition at line 36 of file Geo2G4Builder.cxx.
41 ISvcLocator* svcLocator = Gaudi::svcLocator();
44 THROW_EXCEPTION(
"ERROR: Geo2G4Builder for detector "<< detectorName <<
" could not access the detector store.");
56 for(
unsigned int i=0;
i<theManager->getNumTreeTops(); ++
i) {
68 if(theMaterialManager) {
83 <<
"\n Use 'DefaultBuilder' property of Geo2G4Svc or"
84 <<
"\n 'GetVolumeBuilder' method of Geo2G4Builder");
◆ ~Geo2G4Builder()
Geo2G4Builder::~Geo2G4Builder |
( |
| ) |
|
|
default |
◆ BuildOpticalSurfaces()
Definition at line 180 of file Geo2G4Builder.cxx.
188 G4OpticalSurface* g4OptSurface = surfaceFactory.
Build(border_surface.getOptSurface());
190 G4VPhysicalVolume* g4PV1 = 0;
191 G4VPhysicalVolume* g4PV2 = 0;
192 OpticalVolumesMap::const_iterator volIt;
195 volIt = optical_volumes->find(border_surface.getPV1());
196 if(volIt == optical_volumes->end())
198 ATH_MSG_WARNING(
"Unable to find " << border_surface.getPV1()->getLogVol()->getName() <<
" in Optical Volumes map");
201 g4PV1 = volIt.operator->()->second;
204 volIt = optical_volumes->find(border_surface.getPV2());
205 if(volIt == optical_volumes->end())
207 ATH_MSG_WARNING(
"Unable to find " << border_surface.getPV2()->getLogVol()->getName() <<
" in Optical Volumes map");
210 g4PV2 = volIt.operator->()->second;
213 G4LogicalBorderSurface* g4BorderSurface
__attribute__((
unused)) =
new G4LogicalBorderSurface(border_surface.getName(),g4PV1,g4PV2,g4OptSurface);
◆ BuildTree()
G4LogicalVolume * Geo2G4Builder::BuildTree |
( |
| ) |
|
Definition at line 88 of file Geo2G4Builder.cxx.
91 G4LogicalVolume*
result =
nullptr;
98 if(
sc.isSuccess() && surface_container->size()>0) {
112 const GeoShape* shResult = &shFirst;
119 GeoPhysVol* pvEnvelope =
new GeoPhysVol(lvEnvelope);
124 PVConstLink world =
m_treeTops[0]->getParent();
130 Query<unsigned int> childIndx = world->indexOf(
pv);
137 Query<int> Qint = world->getIdOfChildVol(childIndx);
138 if(Qint.isValid())
id = Qint;
141 std::string nameTT = world->getNameOfChildVol(childIndx);
142 if (nameTT ==
"ANON") nameTT =
pv->getLogVol()->getName();
146 G4ReflectionFactory::Instance()->Place(theG4Position,
157 if(optical_volumes) {
158 if(optical_volumes->size()>0) {
162 ATH_MSG_WARNING(
"Optical volumes apparently requested, but none found! Deleting temps");
164 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_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
bool contains(const TKEY &key) const
Look up a keyed object in TDS (compare also tryRetrieve) returns false if object not available in TDS...
virtual G4LogicalVolume * Build(PVConstLink pv, OpticalVolumesMap *optical_volumes=0)=0
T * tryRetrieve() const
Variant of the above which doesn't print a warning message.
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)
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
AthMessaging()
Default constructor:
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string GetKey() const
StoreGateSvc * m_pDetStore
const GeoVDetectorManager * getManager(const std::string &name) const
MsgStream & msg() const
The standard message stream.
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
__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