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.
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

Gaudi::Property< bool > m_createWorld
Gaudi::Property< int > m_navigationLevel {this, "NavigationLevel", 2}
Gaudi::Property< std::vector< double > > m_worldDimension
Gaudi::Property< std::vector< double > > m_worldMaterialProperties
Material m_worldMaterial {}
 the world material
ToolHandle< ITrackingVolumeArrayCreatorm_trackingVolumeArrayCreator
ToolHandle< ITrackingVolumeHelperm_trackingVolumeHelper
ToolHandle< IGeometryBuilderm_inDetGeometryBuilder
ToolHandle< IGeometryBuilderm_caloGeometryBuilder
ToolHandle< IGeometryBuilderm_muonGeometryBuilder
Gaudi::Property< bool > m_compactify
Gaudi::Property< bool > m_synchronizeLayers
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 46 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 30 of file GeometryBuilder.cxx.

31: AthAlgTool(t,n,p),
33{
34 declareInterface<IGeometryBuilder>(this);
35}
AthAlgTool()
Default constructor:

Member Function Documentation

◆ atlasTrackingGeometry()

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

TrackingGeometry for ATLAS setup.

Definition at line 113 of file GeometryBuilder.cxx.

114{
115 // the return geometry
116 std::unique_ptr<Trk::TrackingGeometry> atlasTrackingGeometry = nullptr;
117
118 // A ------------- INNER DETECTOR SECTION --------------------------------------------------------------------------------
119 // get the Inner Detector and/or Calorimeter trackingGeometry
120 std::unique_ptr<Trk::TrackingGeometry> inDetTrackingGeometry = nullptr;
121 std::unique_ptr<Trk::TrackingGeometry> caloTrackingGeometry = nullptr;
122
123 // the volumes to be given to higher level tracking geometry builders
124 Trk::TrackingVolume* inDetVolume = nullptr;
125 Trk::TrackingVolume* caloVolume = nullptr;
126
127 // mark the highest volume
128 Trk::TrackingVolume* highestVolume = nullptr;
129
130#ifdef TRKDETDESCR_MEMUSAGE
131 m_memoryLogger.refresh(getpid());
132 ATH_MSG_INFO( "[ memory usage ] Start of TrackingGeometry building: " );
133 ATH_MSG_INFO( m_memoryLogger );
134#endif
135
136 // ========================== INNER DETECTOR PART =================================================
137 if (!m_inDetGeometryBuilder.empty()) {
138 // debug output
139 ATH_MSG_VERBOSE( "ID Tracking Geometry is going to be built." );
140 // build the geometry
141 inDetTrackingGeometry = m_inDetGeometryBuilder->trackingGeometry();
142 // check
143 if (inDetTrackingGeometry) {
144 // sign it
145 inDetTrackingGeometry->sign(m_inDetGeometryBuilder->geometrySignature());
146 // check whether the world has to be created or not
147 if (m_createWorld) {
148 // checkout the highest InDet volume
149 inDetVolume = inDetTrackingGeometry->checkoutHighestTrackingVolume();
150 // assign it as the highest volume
151 highestVolume = inDetVolume;
152 } else // -> Take the exit and return ID stand alone
153 atlasTrackingGeometry = std::move(inDetTrackingGeometry);
154 }
155
156#ifdef TRKDETDESCR_MEMUSAGE
157 m_memoryLogger.refresh(getpid());
158 ATH_MSG_INFO( "[ memory usage ] After InDet TrackingGeometry building: " );
159 ATH_MSG_INFO( m_memoryLogger );
160#endif
161
162 }
163
164 // ========================== CALORIMETER PART =================================================
165 // if a Calo Geometry Builder is present -> wrap it around the ID
166 if (!m_caloGeometryBuilder.empty()) {
167 if (inDetVolume)
168 ATH_MSG_VERBOSE( "Calorimeter Tracking Geometry is going to be built with enclosed ID." );
169 else
170 ATH_MSG_VERBOSE( "Calorimeter Tracking Geometry is going to be built stand-alone." );
171 // get the InnerDetector TrackingGeometry
172 caloTrackingGeometry = m_caloGeometryBuilder->trackingGeometry(inDetVolume);
173 // if you have to create world or there is a Muon geometry builder ...
174 if (caloTrackingGeometry) {
175 // sign it
176 caloTrackingGeometry->sign(m_caloGeometryBuilder->geometrySignature());
177 if (m_createWorld){
178 // check out the highest Calo volume
179 caloVolume = caloTrackingGeometry->checkoutHighestTrackingVolume();
180 // assign it as the highest volume (overwrite ID)
181 highestVolume = caloVolume;
182 } else // -> Take the exit and return Calo back
183 atlasTrackingGeometry = std::move(caloTrackingGeometry);
184 }
185
186#ifdef TRKDETDESCR_MEMUSAGE
187 m_memoryLogger.refresh(getpid());
188 ATH_MSG_INFO( "[ memory usage ] After Calo TrackingGeometry building: " );
189 ATH_MSG_INFO( m_memoryLogger );
190#endif
191
192 }
193
194 // ========================== MUON SYSTEM PART =================================================
195 // if Muon Geometry Builder is present -> wrap either ID or Calo
196 if (!m_muonGeometryBuilder.empty()) {
197
198 std::string enclosed = "stand-alone.";
199 if (inDetVolume && caloVolume)
200 enclosed = "with encloded ID/Calo.";
201 else if (inDetVolume || caloVolume)
202 enclosed = (inDetVolume) ? "with encloded ID." : "with encloded Calo.";
203 ATH_MSG_VERBOSE( "Muon System Tracking Geometry is going to be built "<< enclosed );
204 // there's nothing outside the muons -- wrap the calo if it exists
205 if (inDetVolume && !caloVolume)
206 atlasTrackingGeometry = m_muonGeometryBuilder->trackingGeometry( inDetVolume );
207 else
208 atlasTrackingGeometry = m_muonGeometryBuilder->trackingGeometry( caloVolume );
209
210 // sign it
212 atlasTrackingGeometry->sign(m_muonGeometryBuilder->geometrySignature());
213
214#ifdef TRKDETDESCR_MEMUSAGE
215 m_memoryLogger.refresh(getpid());
216 ATH_MSG_INFO( "[ memory usage ] After Muon TrackingGeometry building: " );
217 ATH_MSG_INFO( m_memoryLogger );
218#endif
219
220 // ========================== WRAPPING SECTION FOR ID/CALO ====================================
221 } else if (m_createWorld && highestVolume) {
222 // wrapping and world creation has been switched on
223 ATH_MSG_VERBOSE( "Enclosing world is going to be built for: " << highestVolume->volumeName() );
224 // get the glue volumes
225 Trk::GlueVolumesDescriptor& innerGlueVolumes = highestVolume->glueVolumesDescriptor();
226 // some screen output
227 ATH_MSG_VERBOSE( "Retrieved with following glue volumes: " << innerGlueVolumes );
228 // at negative face
229 const std::vector<Trk::TrackingVolume*>& innerNegativeFaceVolumes = innerGlueVolumes.glueVolumes(Trk::negativeFaceXY);
230 // at cylinder cover
231 const std::vector<Trk::TrackingVolume*>& innerCentralFaceVolumes = innerGlueVolumes.glueVolumes(Trk::cylinderCover);
232 // at positive face
233 const std::vector<Trk::TrackingVolume*>& innerPositiveFaceVolumes = innerGlueVolumes.glueVolumes(Trk::positiveFaceXY);
234
235 // get the dimensions
236 // cast them to CylinderVolumeBounds
237 const Trk::CylinderVolumeBounds* innerVolumeBounds = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(highestVolume->volumeBounds()));
238 if (!innerVolumeBounds) ATH_MSG_WARNING( "atlasTrackingGeometry() ... dynamic cast to innerVolumeBounds failed!" );
239 double innerVolumeOuterR = innerVolumeBounds ? innerVolumeBounds->outerRadius() : 0;
240 double innerVolumeHalflengthZ = innerVolumeBounds ? innerVolumeBounds->halflengthZ() : 0;
241 // Hierarchy after enclosing
242 //
243 // AtlasWorldVolume:
244 // AtlasInnerCylinder
245 // AtlasInnerNegativeSector
246 // InnerEnclosedVolume (can be ID/Calo)
247 // AtlasOuterNegativeSector
248 // AtlasOuterTube
249 // B -------------- BUILD WORLD AROUND for ID stand alone applications
250
251 double innerCylinderSectorHalflengthZ = 0.5*(m_worldDimension[2] - innerVolumeHalflengthZ);
252 auto innerCylinderSectorBounds =
253 std::make_shared<Trk::CylinderVolumeBounds>(0., innerVolumeOuterR, innerCylinderSectorHalflengthZ);
254
255 double innerCylinderSectorPositionZ = fabs(m_worldDimension[2]-innerCylinderSectorHalflengthZ);
256
257 // the AtlasInnerNegativeSector
258 auto atlasInnerNegativeSectorTransf = std::make_unique<Amg::Transform3D>(Amg::Translation3D(0.,0.,-innerCylinderSectorPositionZ));
259 Trk::TrackingVolume* atlasInnerNegativeSector = new Trk::TrackingVolume(
260 std::move(atlasInnerNegativeSectorTransf),
261 std::make_shared<Trk::CylinderVolumeBounds>(*innerCylinderSectorBounds),
263 nullptr,
264 nullptr,
265 "AtlasInnerNegativeSector");
266
267 // the AtlasInnerPositiveSector
268 auto atlasInnerPositiveSectorTransf = std::make_unique<Amg::Transform3D>(Amg::Translation3D(0.,0.,innerCylinderSectorPositionZ));
269 Trk::TrackingVolume* atlasInnerPositiveSector = new Trk::TrackingVolume(
270 std::move(atlasInnerPositiveSectorTransf),
271 std::move(innerCylinderSectorBounds),
273 nullptr,
274 nullptr,
275 "AtlasInnerPositiveSector");
276
277 ATH_MSG_VERBOSE( "Inner Negative/Positive Sectors built successfully." );
278
279 // create the subvolume Array
280 auto atlasInnerSectorVolumes = std::vector<Trk::TrackingVolume*>{atlasInnerNegativeSector,highestVolume,atlasInnerPositiveSector};
281
282 ATH_MSG_VERBOSE( "Create the Atlas Inner Sector volumes. " );
283 std::unique_ptr<Trk::BinnedArray<Trk::TrackingVolume>>
284 atlasInnerSectorVolumeArray =
286 ? m_trackingVolumeArrayCreator->cylinderVolumesArrayInZ(atlasInnerSectorVolumes)
287 : nullptr;
288
289 // Atlas inner Sector bounds
290 auto innerSectorBounds =
291 std::make_shared<Trk::CylinderVolumeBounds>(0., innerVolumeOuterR, m_worldDimension[2]);
292 // build the Tracking volumes
293 Trk::TrackingVolume* atlasInnerSector = new Trk::TrackingVolume(nullptr,
294 std::move(innerSectorBounds),
296 nullptr,
297 std::move(atlasInnerSectorVolumeArray),
298 "AtlasInnerSector");
299
300 // Atlas outer Sector
301 auto outerSectorBounds =
302 std::make_shared<Trk::CylinderVolumeBounds>(innerVolumeOuterR, m_worldDimension[1], m_worldDimension[2]);
303 Trk::TrackingVolume* atlasOuterSector = new Trk::TrackingVolume(nullptr,
304 std::move(outerSectorBounds),
306 nullptr,
307 nullptr,
308 "AtlasOuterSector");
309
310 ATH_MSG_VERBOSE( "Atlas Inner/Outer Sectors built successfully." );
311
312 // create the array of Inner and Outer sector
313 auto atlasVolumes = std::vector<Trk::TrackingVolume*>{atlasInnerSector, atlasOuterSector};
314
315 std::unique_ptr<Trk::BinnedArray<Trk::TrackingVolume>>
316 atlasVolumeArray =
318 ? m_trackingVolumeArrayCreator->cylinderVolumesArrayInR(atlasVolumes)
319 : nullptr;
320
321 // create the Atlas volume bounds
322 auto atlasBounds = std::make_shared<Trk::CylinderVolumeBounds>(0., m_worldDimension[1], m_worldDimension[2]);
323
324 // create the Atlas TrackingVolume
325 Trk::TrackingVolume* atlasVolume = new Trk::TrackingVolume(nullptr,
326 std::move(atlasBounds),
328 nullptr,
329 std::move(atlasVolumeArray),
330 "Atlas");
331
332 ATH_MSG_VERBOSE( "Atlas Tracking World volume built successfully." );
333
334
335 // glue the inner sector to be complete
336 m_trackingVolumeHelper->glueTrackingVolumes( *atlasInnerNegativeSector, Trk::positiveFaceXY,
337 innerNegativeFaceVolumes, Trk::negativeFaceXY );
338
339 m_trackingVolumeHelper->glueTrackingVolumes( *atlasInnerPositiveSector, Trk::negativeFaceXY,
340 innerPositiveFaceVolumes, Trk::positiveFaceXY );
341
342 ATH_MSG_VERBOSE( "Atlas Inner Sector glued successfully together." );
343
344 // iterators to the face volumes
345 auto volIter = innerCentralFaceVolumes.begin();
346 auto volIterEnd = innerCentralFaceVolumes.end();
347
348 // glue outer and inner sector together
349 std::vector<Trk::TrackingVolume*> atlasInnerOuterVolumes;
350 atlasInnerOuterVolumes.push_back(atlasInnerNegativeSector);
351 for (; volIter != volIterEnd; ++volIter) {
352 if (*volIter) {
353 atlasInnerOuterVolumes.push_back(*volIter);
354 }
355 }
356 atlasInnerOuterVolumes.push_back(atlasInnerPositiveSector);
357
358 m_trackingVolumeHelper->glueTrackingVolumes(*atlasOuterSector, Trk::tubeInnerCover,
359 atlasInnerOuterVolumes, Trk::tubeOuterCover);
360
361 ATH_MSG_VERBOSE( "Atlas Inner/Outer Sector glued successfully together." );
362
363 // job done -> create the TrackingGeometry
364 atlasTrackingGeometry = std::make_unique<Trk::TrackingGeometry>(atlasVolume);
365
366 // detailed information about this tracking geometry
367 ATH_MSG_VERBOSE( "Atlas TrackingGeometry built with following parameters : ");
368 //ATH_MSG_VERBOSE( " - TrackingVolume containers : " << atlasTrackingGeometry->numberOfContainerVolumes() );
369 //ATH_MSG_VERBOSE( " - TrackingVolume at navigation level : " << atlasTrackingGeometry->numberOfContainerVolumes() );
370 //ATH_MSG_VERBOSE( " - Contained static layers : " << atlasTrackingGeometry->boundaryLayers().size());
371 ATH_MSG_VERBOSE( " - Unique material layers on boundaries : " << atlasTrackingGeometry->boundaryLayers().size());
372
373#ifdef TRKDETDESCR_MEMUSAGE
374 m_memoryLogger.refresh(getpid());
375 ATH_MSG_INFO( "[ memory usage ] After Outer Sector TrackingGeometry building: " );
376 ATH_MSG_INFO( m_memoryLogger );
377#endif
378
379 }
380
382 if (m_navigationLevel < 3)
383 atlasTrackingGeometry->registerNavigationLevel( Trk::NavigationLevel(m_navigationLevel.value()));
384 }
385 else ATH_MSG_WARNING( "atlasTrackingGeometry() ... atlasTrackingGeometry = 0, could not call registerNavigationLevel and propagateMagneticFieldProperties" );
386
387#ifdef TRKDETDESCR_MEMUSAGE
388 m_memoryLogger.refresh(getpid());
389 ATH_MSG_INFO( "[ memory usage ] End of TrackingGeometry building: " );
390 ATH_MSG_INFO( m_memoryLogger );
391#endif
392
393 // synchronize the layers
395 if (m_synchronizeLayers) atlasTrackingGeometry->synchronizeLayers(msg());
396
397 // compactify if configured to do so
398 if (m_compactify) atlasTrackingGeometry->compactify(msg());
399 }
401}
#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.
ToolHandle< ITrackingVolumeHelper > m_trackingVolumeHelper
ToolHandle< IGeometryBuilder > m_muonGeometryBuilder
Gaudi::Property< std::vector< double > > m_worldDimension
ToolHandle< IGeometryBuilder > m_inDetGeometryBuilder
Gaudi::Property< bool > m_createWorld
Gaudi::Property< int > m_navigationLevel
ToolHandle< IGeometryBuilder > m_caloGeometryBuilder
Gaudi::Property< bool > m_synchronizeLayers
Gaudi::Property< bool > m_compactify
std::unique_ptr< TrackingGeometry > atlasTrackingGeometry() const
TrackingGeometry for ATLAS setup.
ToolHandle< ITrackingVolumeArrayCreator > m_trackingVolumeArrayCreator
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 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ 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 63 of file GeometryBuilder.h.

63{ 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 40 of file GeometryBuilder.cxx.

41{
42
43 // Retrieve the volume array creator ----------------------------------------------------
45
46 // Retrieve the tracking volume helper --------------------------------------------------
48 // Geometries =============================================================================
49 // (I) Inner Detector ---------------------------------------------------------------------
50 if (!m_inDetGeometryBuilder.empty()) {
52 }
53 // (C) Calorimeter --------------------------------------------------------------------------
54 if (!m_caloGeometryBuilder.empty()) {
56 }
57 // (M) Muon System -------------------------------------------------------------------------
58 if (!m_muonGeometryBuilder.empty()) {
60 }
61
62 // if no world dimensions are declared, take default ones
63 if (m_worldDimension.empty())
64 m_worldDimension = std::vector<double>{0.*Gaudi::Units::meter, 10.*Gaudi::Units::meter, 15.*Gaudi::Units::meter};
65
66 // if no world materials are declared, take default ones - set vacuum
67 if (m_worldMaterialProperties.size() < 5)
68 m_worldMaterialProperties = std::vector<double>{10.e10,10.e10,0., 0., 0.};
69
75
76 ATH_MSG_DEBUG( " initialize() successful" );
77
78 return StatusCode::SUCCESS;
79}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Gaudi::Property< std::vector< double > > m_worldMaterialProperties

◆ 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 >, and AthCheckedComponent<::AthAlgTool >.

◆ 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 82 of file GeometryBuilder.cxx.

83{
84
85 // the geometry to be constructed
86 std::unique_ptr<Trk::TrackingGeometry> tGeometry = nullptr;
87 if ( m_inDetGeometryBuilder.empty() && m_caloGeometryBuilder.empty() && m_muonGeometryBuilder.empty() ) {
88
89 ATH_MSG_VERBOSE( "Configured to only create world TrackingVolume." );
90
91 auto worldBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_worldDimension[0],
94
95 Trk::TrackingVolume* worldVolume = new Trk::TrackingVolume(nullptr,
96 std::move(worldBounds),
98 nullptr,
99 nullptr,
100 "EmptyWorldVolume");
101
102 // create a new geometry
103 tGeometry = std::make_unique<Trk::TrackingGeometry>(worldVolume);
104 } else
105 tGeometry = atlasTrackingGeometry();
106 // sign it before you return anything
107 tGeometry->sign(geometrySignature());
108 return tGeometry;
109
110}
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_caloGeometryBuilder

ToolHandle<IGeometryBuilder> Trk::GeometryBuilder::m_caloGeometryBuilder
private
Initial value:
{this, "CaloTrackingGeometryBuilder", "",
"GeometryBuilder for the Calorimeters"}

Definition at line 102 of file GeometryBuilder.h.

103 {this, "CaloTrackingGeometryBuilder", "",
104 "GeometryBuilder for the Calorimeters"};

◆ m_compactify

Gaudi::Property<bool> Trk::GeometryBuilder::m_compactify
private
Initial value:
{this, "Compactify", true,
"optimize event memory usage: register all surfaces with TG"}

Definition at line 110 of file GeometryBuilder.h.

110 {this, "Compactify", true,
111 "optimize event memory usage: register all surfaces with TG"};

◆ m_createWorld

Gaudi::Property<bool> Trk::GeometryBuilder::m_createWorld
private
Initial value:
{this, "CreateWorldManually", true,
"Boolean Switch to create World manually"}

Definition at line 74 of file GeometryBuilder.h.

74 {this, "CreateWorldManually", true,
75 "Boolean Switch to create World manually"};

◆ 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
Initial value:
{this, "InDetTrackingGeometryBuilder", "",
"GeometryBuilder for the InnerDetector"}

Definition at line 98 of file GeometryBuilder.h.

99 {this, "InDetTrackingGeometryBuilder", "",
100 "GeometryBuilder for the InnerDetector"};

◆ m_muonGeometryBuilder

ToolHandle<IGeometryBuilder> Trk::GeometryBuilder::m_muonGeometryBuilder
private
Initial value:
{this, "MuonTrackingGeometryBuilder", "",
"GeometryBuilder for the Muon System"}

Definition at line 106 of file GeometryBuilder.h.

107 {this, "MuonTrackingGeometryBuilder", "",
108 "GeometryBuilder for the Muon System"};

◆ m_navigationLevel

Gaudi::Property<int> Trk::GeometryBuilder::m_navigationLevel {this, "NavigationLevel", 2}
private

Definition at line 76 of file GeometryBuilder.h.

76{this, "NavigationLevel", 2};

◆ m_synchronizeLayers

Gaudi::Property<bool> Trk::GeometryBuilder::m_synchronizeLayers
private
Initial value:
{this, "SynchronizeLayers", true,
"synchronize contained layer dimensions to volumes"}

Definition at line 112 of file GeometryBuilder.h.

113 {this, "SynchronizeLayers", true,
114 "synchronize contained layer dimensions to volumes"};

◆ m_trackingVolumeArrayCreator

ToolHandle<ITrackingVolumeArrayCreator> Trk::GeometryBuilder::m_trackingVolumeArrayCreator
private
Initial value:
{this, "TrackingVolumeArrayCreator",
"Trk::TrackingVolumeArrayCreator/TrackingVolumeArrayCreator",
"Helper Tool to create TrackingVolume Arrays"}

Definition at line 88 of file GeometryBuilder.h.

89 {this, "TrackingVolumeArrayCreator",
90 "Trk::TrackingVolumeArrayCreator/TrackingVolumeArrayCreator",
91 "Helper Tool to create TrackingVolume Arrays"};

◆ m_trackingVolumeHelper

ToolHandle<ITrackingVolumeHelper> Trk::GeometryBuilder::m_trackingVolumeHelper
private
Initial value:
{this, "TrackingVolumeHelper",
"Trk::TrackingVolumeHelper/TrackingVolumeHelper",
"Helper Tool to create TrackingVolumes"}

Definition at line 93 of file GeometryBuilder.h.

94 {this, "TrackingVolumeHelper",
95 "Trk::TrackingVolumeHelper/TrackingVolumeHelper",
96 "Helper Tool to create TrackingVolumes"};

◆ 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

Gaudi::Property<std::vector<double> > Trk::GeometryBuilder::m_worldDimension
private
Initial value:
{this, "WorldDimension", {},
"The dimensions of the manually created world"}

Definition at line 78 of file GeometryBuilder.h.

79 {this, "WorldDimension", {},
80 "The dimensions of the manually created world"};

◆ m_worldMaterial

Material Trk::GeometryBuilder::m_worldMaterial {}
private

the world material

Definition at line 84 of file GeometryBuilder.h.

84{};

◆ m_worldMaterialProperties

Gaudi::Property<std::vector<double> > Trk::GeometryBuilder::m_worldMaterialProperties
private
Initial value:
{this, "WorldMaterialProperties", {},
"The material properties of the created world"}

Definition at line 81 of file GeometryBuilder.h.

82 {this, "WorldMaterialProperties", {},
83 "The material properties of the created world"};

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