ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::GeometryBuilder Class Reference

The Trk::TrackingGeometry Builder for ATLAS Geometry. More...

#include <GeometryBuilder.h>

Inheritance diagram for Trk::GeometryBuilder:
Collaboration diagram for Trk::GeometryBuilder:

Public Member Functions

 GeometryBuilder (const std::string &, const std::string &, const IInterface *)
 Constructor.
virtual ~GeometryBuilder ()
 Destructor.
StatusCode initialize ()
 AlgTool initialize method.
std::unique_ptr< TrackingGeometrytrackingGeometry (TrackingVolume *tvol=0) const
 TrackingGeometry Interface method - optionally a pointer to Bounds.
GeometrySignature geometrySignature () const
 The unique signature.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
 DeclareInterfaceID (IGeometryBuilder, 1, 0)
 Creates the InterfaceID and interfaceID() method.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.
void glueVolumes (TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace) const
 protected method to glue two Volumes together input:

Static Protected Member Functions

static void setBoundarySurface (TrackingVolume &tvol, std::shared_ptr< BoundarySurface< TrackingVolume > > bsurf, BoundarySurfaceFace face)
 protected method to set the boundary surface of a tracking volume
static void setInsideVolume (TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol)
 protected method to set inside Volume of a BoundarySurface: input:
static void setInsideVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume > > &insidevolarray)
 protected method to set inside VolumeArray of a BoundarySurface: input:
static void setOutsideVolume (TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol)
 protected method to set outside Volume of a BoundarySurface: input:
static void setOutsideVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume > > &outsidevolarray)
 protected method to set outside VolumeArray of a BoundarySurface: input:
static void confineVolume (TrackingVolume &tvol, TrackingVolume *outsidevol)
 protected method to confine (dense) volumes: input:

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

std::unique_ptr< TrackingGeometryatlasTrackingGeometry () const
 TrackingGeometry for ATLAS setup.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_createWorld
 Boolean Switch to create World manually.
int m_navigationLevel
 NavigationLevel.
std::vector< double > m_worldDimension
 The dimensions of the manually created world.
std::vector< double > m_worldMaterialProperties
 The material properties of the created world.
Material m_worldMaterial
 the world material
ToolHandle< ITrackingVolumeArrayCreatorm_trackingVolumeArrayCreator
 Helper Tool to create TrackingVolume Arrays.
ToolHandle< ITrackingVolumeHelperm_trackingVolumeHelper
 Helper Tool to create TrackingVolumes.
ToolHandle< IGeometryBuilderm_inDetGeometryBuilder
 GeometryBuilder for the InnerDetector.
bool m_caloGeometry
 switch on TrackingGeometry for the Calorimeters
ToolHandle< IGeometryBuilderm_caloGeometryBuilder
 GeometryBuilder for the Calorimeters.
bool m_muonGeometry
 GeometryBuilder for the Muon System.
ToolHandle< IGeometryBuilderm_muonGeometryBuilder
 GeometryBuilder for the Muon System.
bool m_compactify
 optimize event memory usage: register all surfaces with TG
bool m_synchronizeLayers
 synchronize contained layer dimensions to volumes
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

The Trk::TrackingGeometry Builder for ATLAS Geometry.

It retrieves Trk::TrackingGeometry builders for the subdetectors and joins them together to a single Trk::TrackingGeometry.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 47 of file GeometryBuilder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ GeometryBuilder()

Trk::GeometryBuilder::GeometryBuilder ( const std::string & t,
const std::string & n,
const IInterface * p )

Constructor.

Definition at line 34 of file GeometryBuilder.cxx.

35: AthAlgTool(t,n,p),
37#ifdef TRKDETDESCR_MEMUSAGE
38 m_memoryLogger(),
39#endif
40 m_createWorld(true),
44 m_trackingVolumeArrayCreator("Trk::TrackingVolumeArrayCreator/TrackingVolumeArrayCreator"),
45 m_trackingVolumeHelper("Trk::TrackingVolumeHelper/TrackingVolumeHelper"),
46 m_inDetGeometryBuilder("", this),
48 m_caloGeometryBuilder("", this),
50 m_muonGeometryBuilder("", this),
51 m_compactify(true),
53{
54 declareInterface<IGeometryBuilder>(this);
55 // by hand declarations
56 declareProperty("CreateWorldManually", m_createWorld);
57 declareProperty("NavigationLevel", m_navigationLevel);
58 // (1) dimension & material
59 declareProperty("WorldDimension", m_worldDimension);
60 declareProperty("WorldMaterialProperties", m_worldMaterialProperties);
61 // tool declarations ----------------------------------------------------------------
62 declareProperty("TrackingVolumeArrayCreator", m_trackingVolumeArrayCreator);
63 declareProperty("TrackingVolumeHelper", m_trackingVolumeHelper);
64 declareProperty("InDetTrackingGeometryBuilder", m_inDetGeometryBuilder);
65 declareProperty("CaloTrackingGeometryBuilder", m_caloGeometryBuilder);
66 declareProperty("MuonTrackingGeometryBuilder", m_muonGeometryBuilder);
67 // optimize layer dimension & memory usage -------------------------------
68 declareProperty("Compactify", m_compactify );
69 declareProperty("SynchronizeLayers", m_synchronizeLayers );
70}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool m_compactify
optimize event memory usage: register all surfaces with TG
std::vector< double > m_worldDimension
The dimensions of the manually created world.
std::vector< double > m_worldMaterialProperties
The material properties of the created world.
int m_navigationLevel
NavigationLevel.
ToolHandle< ITrackingVolumeHelper > m_trackingVolumeHelper
Helper Tool to create TrackingVolumes.
bool m_caloGeometry
switch on TrackingGeometry for the Calorimeters
ToolHandle< IGeometryBuilder > m_muonGeometryBuilder
GeometryBuilder for the Muon System.
ToolHandle< IGeometryBuilder > m_inDetGeometryBuilder
GeometryBuilder for the InnerDetector.
bool m_muonGeometry
GeometryBuilder for the Muon System.
ToolHandle< IGeometryBuilder > m_caloGeometryBuilder
GeometryBuilder for the Calorimeters.
bool m_synchronizeLayers
synchronize contained layer dimensions to volumes
ToolHandle< ITrackingVolumeArrayCreator > m_trackingVolumeArrayCreator
Helper Tool to create TrackingVolume Arrays.
bool m_createWorld
Boolean Switch to create World manually.

◆ ~GeometryBuilder()

Trk::GeometryBuilder::~GeometryBuilder ( )
virtualdefault

Destructor.

Member Function Documentation

◆ atlasTrackingGeometry()

std::unique_ptr< Trk::TrackingGeometry > Trk::GeometryBuilder::atlasTrackingGeometry ( ) const
private

TrackingGeometry for ATLAS setup.

Definition at line 152 of file GeometryBuilder.cxx.

153{
154 // the return geometry
155 std::unique_ptr<Trk::TrackingGeometry> atlasTrackingGeometry = nullptr;
156
157 // A ------------- INNER DETECTOR SECTION --------------------------------------------------------------------------------
158 // get the Inner Detector and/or Calorimeter trackingGeometry
159 std::unique_ptr<Trk::TrackingGeometry> inDetTrackingGeometry = nullptr;
160 std::unique_ptr<Trk::TrackingGeometry> caloTrackingGeometry = nullptr;
161
162 // the volumes to be given to higher level tracking geometry builders
163 Trk::TrackingVolume* inDetVolume = nullptr;
164 Trk::TrackingVolume* caloVolume = nullptr;
165
166 // mark the highest volume
167 Trk::TrackingVolume* highestVolume = nullptr;
168
169#ifdef TRKDETDESCR_MEMUSAGE
170 m_memoryLogger.refresh(getpid());
171 ATH_MSG_INFO( "[ memory usage ] Start of TrackingGeometry building: " );
172 ATH_MSG_INFO( m_memoryLogger );
173#endif
174
175 // ========================== INNER DETECTOR PART =================================================
176 if (!m_inDetGeometryBuilder.empty()) {
177 // debug output
178 ATH_MSG_VERBOSE( "ID Tracking Geometry is going to be built." );
179 // build the geometry
180 inDetTrackingGeometry = m_inDetGeometryBuilder->trackingGeometry();
181 // check
182 if (inDetTrackingGeometry) {
183 // sign it
184 inDetTrackingGeometry->sign(m_inDetGeometryBuilder->geometrySignature());
185 // check whether the world has to be created or not
187 // checkout the highest InDet volume
188 inDetVolume = inDetTrackingGeometry->checkoutHighestTrackingVolume();
189 // assign it as the highest volume
190 highestVolume = inDetVolume;
191 } else // -> Take the exit and return ID stand alone
192 atlasTrackingGeometry = std::move(inDetTrackingGeometry);
193 }
194
195#ifdef TRKDETDESCR_MEMUSAGE
196 m_memoryLogger.refresh(getpid());
197 ATH_MSG_INFO( "[ memory usage ] After InDet TrackingGeometry building: " );
198 ATH_MSG_INFO( m_memoryLogger );
199#endif
200
201 }
202
203 // ========================== CALORIMETER PART =================================================
204 // if a Calo Geometry Builder is present -> wrap it around the ID
205 if (!m_caloGeometryBuilder.empty()) {
206 if (inDetVolume)
207 ATH_MSG_VERBOSE( "Calorimeter Tracking Geometry is going to be built with enclosed ID." );
208 else
209 ATH_MSG_VERBOSE( "Calorimeter Tracking Geometry is going to be built stand-alone." );
210 // get the InnerDetector TrackingGeometry
211 caloTrackingGeometry = m_caloGeometryBuilder->trackingGeometry(inDetVolume);
212 // if you have to create world or there is a Muon geometry builder ...
213 if (caloTrackingGeometry) {
214 // sign it
215 caloTrackingGeometry->sign(m_caloGeometryBuilder->geometrySignature());
217 // check out the highest Calo volume
218 caloVolume = caloTrackingGeometry->checkoutHighestTrackingVolume();
219 // assign it as the highest volume (overwrite ID)
220 highestVolume = caloVolume;
221 } else // -> Take the exit and return Calo back
222 atlasTrackingGeometry = std::move(caloTrackingGeometry);
223 }
224
225#ifdef TRKDETDESCR_MEMUSAGE
226 m_memoryLogger.refresh(getpid());
227 ATH_MSG_INFO( "[ memory usage ] After Calo TrackingGeometry building: " );
228 ATH_MSG_INFO( m_memoryLogger );
229#endif
230
231 }
232
233 // ========================== MUON SYSTEM PART =================================================
234 // if Muon Geometry Builder is present -> wrap either ID or Calo
235 if (!m_muonGeometryBuilder.empty()) {
236
237 std::string enclosed = "stand-alone.";
238 if (inDetVolume && caloVolume)
239 enclosed = "with encloded ID/Calo.";
240 else if (inDetVolume || caloVolume)
241 enclosed = (inDetVolume) ? "with encloded ID." : "with encloded Calo.";
242 ATH_MSG_VERBOSE( "Muon System Tracking Geometry is going to be built "<< enclosed );
243 // there's nothing outside the muons -- wrap the calo if it exists
244 if (inDetVolume && !caloVolume)
245 atlasTrackingGeometry = m_muonGeometryBuilder->trackingGeometry( inDetVolume );
246 else
247 atlasTrackingGeometry = m_muonGeometryBuilder->trackingGeometry( caloVolume );
248
249 // sign it
251 atlasTrackingGeometry->sign(m_muonGeometryBuilder->geometrySignature());
252
253#ifdef TRKDETDESCR_MEMUSAGE
254 m_memoryLogger.refresh(getpid());
255 ATH_MSG_INFO( "[ memory usage ] After Muon TrackingGeometry building: " );
256 ATH_MSG_INFO( m_memoryLogger );
257#endif
258
259 // ========================== WRAPPING SECTION FOR ID/CALO ====================================
260 } else if (m_createWorld && highestVolume) {
261 // wrapping and world creation has been switched on
262 ATH_MSG_VERBOSE( "Enclosing world is going to be built for: " << highestVolume->volumeName() );
263 // get the glue volumes
264 Trk::GlueVolumesDescriptor& innerGlueVolumes = highestVolume->glueVolumesDescriptor();
265 // some screen output
266 ATH_MSG_VERBOSE( "Retrieved with following glue volumes: " << innerGlueVolumes );
267 // at negative face
268 const std::vector<Trk::TrackingVolume*>& innerNegativeFaceVolumes = innerGlueVolumes.glueVolumes(Trk::negativeFaceXY);
269 // at cylinder cover
270 const std::vector<Trk::TrackingVolume*>& innerCentralFaceVolumes = innerGlueVolumes.glueVolumes(Trk::cylinderCover);
271 // at positive face
272 const std::vector<Trk::TrackingVolume*>& innerPositiveFaceVolumes = innerGlueVolumes.glueVolumes(Trk::positiveFaceXY);
273
274 // get the dimensions
275 // cast them to CylinderVolumeBounds
276 const Trk::CylinderVolumeBounds* innerVolumeBounds = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(highestVolume->volumeBounds()));
277 if (!innerVolumeBounds) ATH_MSG_WARNING( "atlasTrackingGeometry() ... dynamic cast to innerVolumeBounds failed!" );
278 double innerVolumeOuterR = innerVolumeBounds ? innerVolumeBounds->outerRadius() : 0;
279 double innerVolumeHalflengthZ = innerVolumeBounds ? innerVolumeBounds->halflengthZ() : 0;
280 // Hierarchy after enclosing
281 //
282 // AtlasWorldVolume:
283 // AtlasInnerCylinder
284 // AtlasInnerNegativeSector
285 // InnerEnclosedVolume (can be ID/Calo)
286 // AtlasOuterNegativeSector
287 // AtlasOuterTube
288 // B -------------- BUILD WORLD AROUND for ID stand alone applications
289
290 double innerCylinderSectorHalflengthZ = 0.5*(m_worldDimension[2] - innerVolumeHalflengthZ);
291 auto innerCylinderSectorBounds =
292 std::make_shared<Trk::CylinderVolumeBounds>(0., innerVolumeOuterR, innerCylinderSectorHalflengthZ);
293
294 double innerCylinderSectorPositionZ = fabs(m_worldDimension[2]-innerCylinderSectorHalflengthZ);
295
296 // the AtlasInnerNegativeSector
297 auto atlasInnerNegativeSectorTransf = std::make_unique<Amg::Transform3D>(Amg::Translation3D(0.,0.,-innerCylinderSectorPositionZ));
298 Trk::TrackingVolume* atlasInnerNegativeSector = new Trk::TrackingVolume(
299 std::move(atlasInnerNegativeSectorTransf),
300 std::make_shared<Trk::CylinderVolumeBounds>(*innerCylinderSectorBounds),
302 nullptr,
303 nullptr,
304 "AtlasInnerNegativeSector");
305
306 // the AtlasInnerPositiveSector
307 auto atlasInnerPositiveSectorTransf = std::make_unique<Amg::Transform3D>(Amg::Translation3D(0.,0.,innerCylinderSectorPositionZ));
308 Trk::TrackingVolume* atlasInnerPositiveSector = new Trk::TrackingVolume(
309 std::move(atlasInnerPositiveSectorTransf),
310 std::move(innerCylinderSectorBounds),
312 nullptr,
313 nullptr,
314 "AtlasInnerPositiveSector");
315
316 ATH_MSG_VERBOSE( "Inner Negative/Positive Sectors built successfully." );
317
318 // create the subvolume Array
319 auto atlasInnerSectorVolumes = std::vector<Trk::TrackingVolume*>{atlasInnerNegativeSector,highestVolume,atlasInnerPositiveSector};
320
321 ATH_MSG_VERBOSE( "Create the Atlas Inner Sector volumes. " );
322 std::unique_ptr<Trk::BinnedArray<Trk::TrackingVolume>>
323 atlasInnerSectorVolumeArray =
325 ? m_trackingVolumeArrayCreator->cylinderVolumesArrayInZ(atlasInnerSectorVolumes)
326 : nullptr;
327
328 // Atlas inner Sector bounds
329 auto innerSectorBounds =
330 std::make_shared<Trk::CylinderVolumeBounds>(0., innerVolumeOuterR, m_worldDimension[2]);
331 // build the Tracking volumes
332 Trk::TrackingVolume* atlasInnerSector = new Trk::TrackingVolume(nullptr,
333 std::move(innerSectorBounds),
335 nullptr,
336 std::move(atlasInnerSectorVolumeArray),
337 "AtlasInnerSector");
338
339 // Atlas outer Sector
340 auto outerSectorBounds =
341 std::make_shared<Trk::CylinderVolumeBounds>(innerVolumeOuterR, m_worldDimension[1], m_worldDimension[2]);
342 Trk::TrackingVolume* atlasOuterSector = new Trk::TrackingVolume(nullptr,
343 std::move(outerSectorBounds),
345 nullptr,
346 nullptr,
347 "AtlasOuterSector");
348
349 ATH_MSG_VERBOSE( "Atlas Inner/Outer Sectors built successfully." );
350
351 // create the array of Inner and Outer sector
352 auto atlasVolumes = std::vector<Trk::TrackingVolume*>{atlasInnerSector, atlasOuterSector};
353
354 std::unique_ptr<Trk::BinnedArray<Trk::TrackingVolume>>
355 atlasVolumeArray =
357 ? m_trackingVolumeArrayCreator->cylinderVolumesArrayInR(atlasVolumes)
358 : nullptr;
359
360 // create the Atlas volume bounds
361 auto atlasBounds = std::make_shared<Trk::CylinderVolumeBounds>(0., m_worldDimension[1], m_worldDimension[2]);
362
363 // create the Atlas TrackingVolume
364 Trk::TrackingVolume* atlasVolume = new Trk::TrackingVolume(nullptr,
365 std::move(atlasBounds),
367 nullptr,
368 std::move(atlasVolumeArray),
369 "Atlas");
370
371 ATH_MSG_VERBOSE( "Atlas Tracking World volume built successfully." );
372
373
374 // glue the inner sector to be complete
375 m_trackingVolumeHelper->glueTrackingVolumes( *atlasInnerNegativeSector, Trk::positiveFaceXY,
376 innerNegativeFaceVolumes, Trk::negativeFaceXY );
377
378 m_trackingVolumeHelper->glueTrackingVolumes( *atlasInnerPositiveSector, Trk::negativeFaceXY,
379 innerPositiveFaceVolumes, Trk::positiveFaceXY );
380
381 ATH_MSG_VERBOSE( "Atlas Inner Sector glued successfully together." );
382
383 // iterators to the face volumes
384 auto volIter = innerCentralFaceVolumes.begin();
385 auto volIterEnd = innerCentralFaceVolumes.end();
386
387 // glue outer and inner sector together
388 std::vector<Trk::TrackingVolume*> atlasInnerOuterVolumes;
389 atlasInnerOuterVolumes.push_back(atlasInnerNegativeSector);
390 for (; volIter != volIterEnd; ++volIter) {
391 if (*volIter) {
392 atlasInnerOuterVolumes.push_back(*volIter);
393 }
394 }
395 atlasInnerOuterVolumes.push_back(atlasInnerPositiveSector);
396
397 m_trackingVolumeHelper->glueTrackingVolumes(*atlasOuterSector, Trk::tubeInnerCover,
398 atlasInnerOuterVolumes, Trk::tubeOuterCover);
399
400 ATH_MSG_VERBOSE( "Atlas Inner/Outer Sector glued successfully together." );
401
402 // job done -> create the TrackingGeometry
403 atlasTrackingGeometry = std::make_unique<Trk::TrackingGeometry>(atlasVolume);
404
405 // detailed information about this tracking geometry
406 ATH_MSG_VERBOSE( "Atlas TrackingGeometry built with following parameters : ");
407 //ATH_MSG_VERBOSE( " - TrackingVolume containers : " << atlasTrackingGeometry->numberOfContainerVolumes() );
408 //ATH_MSG_VERBOSE( " - TrackingVolume at navigation level : " << atlasTrackingGeometry->numberOfContainerVolumes() );
409 //ATH_MSG_VERBOSE( " - Contained static layers : " << atlasTrackingGeometry->boundaryLayers().size());
410 ATH_MSG_VERBOSE( " - Unique material layers on boundaries : " << atlasTrackingGeometry->boundaryLayers().size());
411
412#ifdef TRKDETDESCR_MEMUSAGE
413 m_memoryLogger.refresh(getpid());
414 ATH_MSG_INFO( "[ memory usage ] After Outer Sector TrackingGeometry building: " );
415 ATH_MSG_INFO( m_memoryLogger );
416#endif
417
418 }
419
421 if (m_navigationLevel < 3)
423 }
424 else ATH_MSG_WARNING( "atlasTrackingGeometry() ... atlasTrackingGeometry = 0, could not call registerNavigationLevel and propagateMagneticFieldProperties" );
425
426#ifdef TRKDETDESCR_MEMUSAGE
427 m_memoryLogger.refresh(getpid());
428 ATH_MSG_INFO( "[ memory usage ] End of TrackingGeometry building: " );
429 ATH_MSG_INFO( m_memoryLogger );
430#endif
431
432 // synchronize the layers
434 if (m_synchronizeLayers) atlasTrackingGeometry->synchronizeLayers(msg());
435
436 // compactify if configured to do so
437 if (m_compactify) atlasTrackingGeometry->compactify(msg());
438 }
440}
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
MsgStream & msg() const
double halflengthZ() const
This method returns the halflengthZ.
double outerRadius() const
This method returns the outer radius.
std::unique_ptr< TrackingGeometry > atlasTrackingGeometry() const
TrackingGeometry for ATLAS setup.
Material m_worldMaterial
the world material
const std::vector< TrackingVolume * > & glueVolumes(BoundarySurfaceFace)
retrieve them again
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
GlueVolumesDescriptor & glueVolumesDescriptor()
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition Volume.h:96
Eigen::Translation< double, 3 > Translation3D
NavigationLevel
destinguishes an association TrackingGeometry with one for global search

◆ confineVolume()

void Trk::TrackingVolumeManipulator::confineVolume ( TrackingVolume & tvol,
TrackingVolume * outsidevol )
staticprotectedinherited

protected method to confine (dense) volumes: input:

  • the volume that holdes the BoundarySurfaces (embedded)
  • the volume to be set as outside volume

Definition at line 90 of file TrackingVolumeManipulator.cxx.

92{
93
94 const auto& bounds = tvol.boundarySurfaces();
95 for (const auto & bound : bounds) {
96 if (bound->outsideVolume() == nullptr) {
97 bound->setOutsideVolume(outsideVol);
98 }
99 if (bound->insideVolume() == nullptr) {
100 bound->setInsideVolume(outsideVol);
101 }
102 }
103}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ DeclareInterfaceID()

Trk::IGeometryBuilder::DeclareInterfaceID ( IGeometryBuilder ,
1 ,
0  )
inherited

Creates the InterfaceID and interfaceID() method.

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ geometrySignature()

GeometrySignature Trk::GeometryBuilder::geometrySignature ( ) const
inlinevirtual

The unique signature.

Implements Trk::IGeometryBuilder.

Definition at line 67 of file GeometryBuilder.h.

67{ return Trk::Global; }

◆ glueVolumes()

void Trk::TrackingVolumeManipulator::glueVolumes ( Trk::TrackingVolume & firstVol,
Trk::BoundarySurfaceFace firstFace,
Trk::TrackingVolume & secondVol,
Trk::BoundarySurfaceFace secondFace ) const
protectedinherited

protected method to glue two Volumes together input:

Definition at line 17 of file TrackingVolumeManipulator.cxx.

22{
23 // check if it is a cylinder volume
24 const Trk::CylinderVolumeBounds* cylBounds =
25 dynamic_cast<const Trk::CylinderVolumeBounds*>(&(firstVol.volumeBounds()));
26
27 if (firstFace == Trk::tubeOuterCover && secondFace == Trk::tubeInnerCover)
28 return glueVolumes(secondVol, secondFace, firstVol, firstFace);
29
30 // the second volume gets the face of the first volume assigned
31 (secondVol.m_boundarySurfaces)[secondFace] =
32 (firstVol.m_boundarySurfaces)[firstFace];
33 // the face of the first volume has been an inner tube
34 if (cylBounds && firstFace == Trk::tubeInnerCover &&
35 secondFace == Trk::tubeOuterCover) {
36 (secondVol.m_boundarySurfaces)[secondFace]->setInsideVolume(&secondVol);
37 } else {
38 (secondVol.m_boundarySurfaces)[secondFace]->setOutsideVolume(&secondVol);
39 }
40}
void glueVolumes(TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace) const
protected method to glue two Volumes together input:
static void setOutsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol)
protected method to set outside Volume of a BoundarySurface: input:
static void setInsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol)
protected method to set inside Volume of a BoundarySurface: input:
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > m_boundarySurfaces

◆ initialize()

StatusCode Trk::GeometryBuilder::initialize ( )

AlgTool initialize method.

Definition at line 79 of file GeometryBuilder.cxx.

80{
81
82 // Retrieve the volume array creator ----------------------------------------------------
84
85 // Retrieve the tracking volume helper --------------------------------------------------
87 // Geometries =============================================================================
88 // (I) Inner Detector ---------------------------------------------------------------------
89 if (!m_inDetGeometryBuilder.empty()) {
91 }
92 // (C) Calorimeter --------------------------------------------------------------------------
93 if (!m_caloGeometryBuilder.empty()) {
95 }
96 // (M) Muon System -------------------------------------------------------------------------
97 if (!m_muonGeometryBuilder.empty()) {
99 }
100
101 // if no world dimensions are declared, take default ones
102 if (m_worldDimension.empty())
103 m_worldDimension = std::vector<double>{0.*Gaudi::Units::meter, 10.*Gaudi::Units::meter, 15.*Gaudi::Units::meter};
104
105 // if no world materials are declared, take default ones - set vacuum
106 if (m_worldMaterialProperties.size() < 5)
107 m_worldMaterialProperties = std::vector<double>{10.e10,10.e10,0., 0., 0.};
108
114
115 ATH_MSG_DEBUG( " initialize() successful" );
116
117 return StatusCode::SUCCESS;
118}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setBoundarySurface()

void Trk::TrackingVolumeManipulator::setBoundarySurface ( Trk::TrackingVolume & tvol,
std::shared_ptr< BoundarySurface< TrackingVolume > > bsurf,
Trk::BoundarySurfaceFace face )
staticprotectedinherited

protected method to set the boundary surface of a tracking volume

Definition at line 43 of file TrackingVolumeManipulator.cxx.

47{
48 (tvol.m_boundarySurfaces)[face] = std::move(bsurf);
49}

◆ setInsideVolume()

void Trk::TrackingVolumeManipulator::setInsideVolume ( Trk::TrackingVolume & tvol,
Trk::BoundarySurfaceFace face,
Trk::TrackingVolume * insidevol )
staticprotectedinherited

protected method to set inside Volume of a BoundarySurface: input:

  • the volume that holdes the BoundarySurface
  • the face type of the boundary to be set
  • the volume to be set as inside volume

Definition at line 52 of file TrackingVolumeManipulator.cxx.

55{
56
57 (tvol.m_boundarySurfaces)[face]->setInsideVolume(insidevol);
58}

◆ setInsideVolumeArray()

void Trk::TrackingVolumeManipulator::setInsideVolumeArray ( Trk::TrackingVolume & tvol,
Trk::BoundarySurfaceFace face,
const std::shared_ptr< BinnedArray< TrackingVolume > > & insidevolarray )
staticprotectedinherited

protected method to set inside VolumeArray of a BoundarySurface: input:

  • ithe volume that holdes the BoundarySurface
  • the face type of the boundary to be set
  • the volume array to be set as inside volume array

Definition at line 61 of file TrackingVolumeManipulator.cxx.

66{
67 (tvol.m_boundarySurfaces)[face]->setInsideVolumeArray(insidevolarray);
68}
static void setInsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume > > &insidevolarray)
protected method to set inside VolumeArray of a BoundarySurface: input:

◆ setOutsideVolume()

void Trk::TrackingVolumeManipulator::setOutsideVolume ( Trk::TrackingVolume & tvol,
Trk::BoundarySurfaceFace face,
Trk::TrackingVolume * outsidevol )
staticprotectedinherited

protected method to set outside Volume of a BoundarySurface: input:

  • the volume that holdes the BoundarySurface
  • the face type of the boundary to be set
  • the volume to be set as outside volume

Definition at line 71 of file TrackingVolumeManipulator.cxx.

75{
76 (tvol.m_boundarySurfaces)[face]->setOutsideVolume(outsidevol);
77}

◆ setOutsideVolumeArray()

void Trk::TrackingVolumeManipulator::setOutsideVolumeArray ( Trk::TrackingVolume & tvol,
Trk::BoundarySurfaceFace face,
const std::shared_ptr< BinnedArray< TrackingVolume > > & outsidevolarray )
staticprotectedinherited

protected method to set outside VolumeArray of a BoundarySurface: input:

  • the volume that holdes the BoundarySurface
  • the face type of the boundary to be set
  • the volume array to be set as outside volume array

Definition at line 80 of file TrackingVolumeManipulator.cxx.

85{
86 (tvol.m_boundarySurfaces)[face]->setOutsideVolumeArray(outsidevolarray);
87}
static void setOutsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume > > &outsidevolarray)
protected method to set outside VolumeArray of a BoundarySurface: input:

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ trackingGeometry()

std::unique_ptr< Trk::TrackingGeometry > Trk::GeometryBuilder::trackingGeometry ( Trk::TrackingVolume * tvol = 0) const
virtual

TrackingGeometry Interface method - optionally a pointer to Bounds.

Implements Trk::IGeometryBuilder.

Definition at line 121 of file GeometryBuilder.cxx.

122{
123
124 // the geometry to be constructed
125 std::unique_ptr<Trk::TrackingGeometry> tGeometry = nullptr;
126 if ( m_inDetGeometryBuilder.empty() && m_caloGeometryBuilder.empty() && m_muonGeometryBuilder.empty() ) {
127
128 ATH_MSG_VERBOSE( "Configured to only create world TrackingVolume." );
129
130 auto worldBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_worldDimension[0],
133
134 Trk::TrackingVolume* worldVolume = new Trk::TrackingVolume(nullptr,
135 std::move(worldBounds),
137 nullptr,
138 nullptr,
139 "EmptyWorldVolume");
140
141 // create a new geometry
142 tGeometry = std::make_unique<Trk::TrackingGeometry>(worldVolume);
143 } else
144 tGeometry = atlasTrackingGeometry();
145 // sign it before you return anything
146 tGeometry->sign(geometrySignature());
147 return tGeometry;
148
149}
GeometrySignature geometrySignature() const
The unique signature.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_caloGeometry

bool Trk::GeometryBuilder::m_caloGeometry
private

switch on TrackingGeometry for the Calorimeters

Definition at line 94 of file GeometryBuilder.h.

◆ m_caloGeometryBuilder

ToolHandle<IGeometryBuilder> Trk::GeometryBuilder::m_caloGeometryBuilder
private

GeometryBuilder for the Calorimeters.

Definition at line 95 of file GeometryBuilder.h.

◆ m_compactify

bool Trk::GeometryBuilder::m_compactify
private

optimize event memory usage: register all surfaces with TG

Definition at line 100 of file GeometryBuilder.h.

◆ m_createWorld

bool Trk::GeometryBuilder::m_createWorld
private

Boolean Switch to create World manually.

Definition at line 78 of file GeometryBuilder.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_inDetGeometryBuilder

ToolHandle<IGeometryBuilder> Trk::GeometryBuilder::m_inDetGeometryBuilder
private

GeometryBuilder for the InnerDetector.

Definition at line 92 of file GeometryBuilder.h.

◆ m_muonGeometry

bool Trk::GeometryBuilder::m_muonGeometry
private

GeometryBuilder for the Muon System.

Definition at line 97 of file GeometryBuilder.h.

◆ m_muonGeometryBuilder

ToolHandle<IGeometryBuilder> Trk::GeometryBuilder::m_muonGeometryBuilder
private

GeometryBuilder for the Muon System.

Definition at line 98 of file GeometryBuilder.h.

◆ m_navigationLevel

int Trk::GeometryBuilder::m_navigationLevel
private

NavigationLevel.

Definition at line 79 of file GeometryBuilder.h.

◆ m_synchronizeLayers

bool Trk::GeometryBuilder::m_synchronizeLayers
private

synchronize contained layer dimensions to volumes

Definition at line 101 of file GeometryBuilder.h.

◆ m_trackingVolumeArrayCreator

ToolHandle<ITrackingVolumeArrayCreator> Trk::GeometryBuilder::m_trackingVolumeArrayCreator
private

Helper Tool to create TrackingVolume Arrays.

Definition at line 87 of file GeometryBuilder.h.

◆ m_trackingVolumeHelper

ToolHandle<ITrackingVolumeHelper> Trk::GeometryBuilder::m_trackingVolumeHelper
private

Helper Tool to create TrackingVolumes.

Definition at line 89 of file GeometryBuilder.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_worldDimension

std::vector< double > Trk::GeometryBuilder::m_worldDimension
private

The dimensions of the manually created world.

Definition at line 81 of file GeometryBuilder.h.

◆ m_worldMaterial

Material Trk::GeometryBuilder::m_worldMaterial
private

the world material

Definition at line 83 of file GeometryBuilder.h.

◆ m_worldMaterialProperties

std::vector< double > Trk::GeometryBuilder::m_worldMaterialProperties
private

The material properties of the created world.

Definition at line 82 of file GeometryBuilder.h.


The documentation for this class was generated from the following files: