ATLAS Offline Software
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Trk::TrackingVolumeHelper Class Reference

#include <TrackingVolumeHelper.h>

Inheritance diagram for Trk::TrackingVolumeHelper:
Collaboration diagram for Trk::TrackingVolumeHelper:

Public Member Functions

 TrackingVolumeHelper (const std::string &, const std::string &, const IInterface *)
 Constructor. More...
 
virtual ~TrackingVolumeHelper ()
 Destructor. More...
 
StatusCode initialize () override
 AlgTool initialize method. More...
 
void glueTrackingVolumes (TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace, bool buildBoundaryLayer=false) const override
 Method to glue two Volumes together input: More...
 
void glueTrackingVolumes (TrackingVolume &firstVol, BoundarySurfaceFace firstFace, const std::vector< TrackingVolume * > &secondVolumes, BoundarySurfaceFace secondFace, bool buildBoundaryLayer=false, bool boundaryFaceExchange=false) const override
 Method to glue two Volumes together input: More...
 
void glueTrackingVolumes (const std::vector< TrackingVolume * > &firstVolumes, BoundarySurfaceFace firstFace, const std::vector< TrackingVolume * > &secondVolumes, BoundarySurfaceFace secondFace, bool buildBoundaryLayer=false, bool boundaryFaceExchange=false) const override
 Method to glue two VolumeArrays together (at navigation level) - without output. More...
 
std::unique_ptr< Trk::TrackingVolumeglueTrackingVolumeArrays (std::shared_ptr< TrackingVolume > firstVol, BoundarySurfaceFace firstFace, std::shared_ptr< TrackingVolume > secondVol, BoundarySurfaceFace secondFace, const std::string &name) const override
 Method to glue two VolumeArrays together (at navigation level) More...
 
void setInsideTrackingVolume (TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol) const override
 protected method to set inside Volume of a BoundarySurface: input: More...
 
void setInsideTrackingVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, std::shared_ptr< BinnedArray< TrackingVolume >> insidevolarray) const override
 protected method to set inside VolumeArray of a BoundarySurface: input: More...
 
void setOutsideTrackingVolume (TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol) const override
 protected method to set outside Volume of a BoundarySurface: input: More...
 
void setOutsideTrackingVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, std::shared_ptr< BinnedArray< TrackingVolume >> outsidevolarray) const override
 protected method to set outside VolumeArray of a BoundarySurface: input: More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
 DeclareInterfaceID (ITrackingVolumeHelper, 1, 0)
 Creates the InterfaceID and interfaceID() method. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 
void glueVolumes (TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace) const
 protected method to glue two Volumes together input: More...
 
void associateLayer (const Layer &lay, Surface &sf) const
 Protected method to register the Layer to the Surface. More...
 

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 More...
 
static void setInsideVolume (TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol)
 protected method to set inside Volume of a BoundarySurface: input: More...
 
static void setInsideVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume >> &insidevolarray)
 protected method to set inside VolumeArray of a BoundarySurface: input: More...
 
static void setOutsideVolume (TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol)
 protected method to set outside Volume of a BoundarySurface: input: More...
 
static void setOutsideVolumeArray (TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume >> &outsidevolarray)
 protected method to set outside VolumeArray of a BoundarySurface: input: More...
 
static void confineVolume (TrackingVolume &tvol, TrackingVolume *outsidevol)
 protected method to confine (dense) volumes: input: More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::unique_ptr< Trk::LayerMaterialPropertieslayerMaterialProperties (const Trk::Surface &sf) const
 < helper method to construct barrel material More...
 
void glueTrackingVolumes (const std::vector< std::shared_ptr< TrackingVolume >> &glueVols, BoundarySurfaceFace glueFace, BoundarySurfaceFace secondFace) const
 Execute the glueing - the input volumes are all on navigation level. More...
 
void glueTrackingVolumes (const std::vector< TrackingVolume * > &glueVols, BoundarySurfaceFace glueFace, BoundarySurfaceFace secondFace) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Static Private Member Functions

static void fillGlueVolumes (const std::vector< TrackingVolume * > &topLevelVolumes, const std::vector< TrackingVolume * > &envelopeFaceVolumes, BoundarySurfaceFace glueFace, std::vector< Trk::TrackingVolume * > &glueVols)
 Private method - it takes the full vector of given volumes to create the supervolume,. More...
 
static void fillGlueVolumes (const std::vector< std::shared_ptr< TrackingVolume >> &topLevelVolumes, const std::vector< std::shared_ptr< TrackingVolume >> &envelopeFaceVolumes, BoundarySurfaceFace glueFace, std::vector< Trk::TrackingVolume * > &glueVols)
 

Private Attributes

PublicToolHandle< ILayerArrayCreatorm_layerArrayCreator {this, "LayerArrayCreator", "Trk::LayerArrayCreator/LayerArrayCreator"}
 A Tool for coherent LayerArray creation. More...
 
ToolHandle< ITrackingVolumeArrayCreatorm_trackingVolumeArrayCreator {this, "TrackingVolumeArrayCreator", "Trk::TrackingVolumeArrayCreator/TrackingVolumeArrayCreator"}
 Helper Tool to create TrackingVolume. More...
 
Gaudi::Property< int > m_barrelLayerBinsZ {this, "BarrelLayerBinsZ", 1}
 material bins in Z More...
 
Gaudi::Property< int > m_barrelLayerBinsPhi {this, "BarrelLayerBinsPhi", 1}
 material bins in Phi More...
 
Gaudi::Property< int > m_endcapLayerBinsR {this, "EndcapLayerBinsR", 1}
 material bins in R More...
 
Gaudi::Property< int > m_endcapLayerBinsPhi {this, "EndcapLayerBinsPhi", 1}
 material bins in Phi More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static constexpr double s_layerThickness
 standard layer thickness More...
 

Detailed Description

The TrackingVolumeHelper is a simple Tool that helps to construct volumes mainly for gap regions in the fully connective geometry.

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

Definition at line 53 of file TrackingVolumeHelper.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

◆ TrackingVolumeHelper()

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

Constructor.

Definition at line 50 of file TrackingVolumeHelper.cxx.

51 : AthAlgTool(t,n,p),
53  declareInterface<ITrackingVolumeHelper>(this);
54 }

◆ ~TrackingVolumeHelper()

Trk::TrackingVolumeHelper::~TrackingVolumeHelper ( )
virtualdefault

Destructor.

Member Function Documentation

◆ associateLayer()

void Trk::ITrackingVolumeHelper::associateLayer ( const Layer lay,
Surface sf 
) const
inlineprotectedinherited

Protected method to register the Layer to the Surface.

Definition at line 127 of file ITrackingVolumeHelper.h.

128  {
129  sf.associateLayer(lay);
130  }

◆ 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() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

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

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ DeclareInterfaceID()

Trk::ITrackingVolumeHelper::DeclareInterfaceID ( ITrackingVolumeHelper  ,
,
 
)
inherited

Creates the InterfaceID and interfaceID() method.

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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  }

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

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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

◆ fillGlueVolumes() [1/2]

void Trk::TrackingVolumeHelper::fillGlueVolumes ( const std::vector< std::shared_ptr< TrackingVolume >> &  topLevelVolumes,
const std::vector< std::shared_ptr< TrackingVolume >> &  envelopeFaceVolumes,
BoundarySurfaceFace  glueFace,
std::vector< Trk::TrackingVolume * > &  glueVols 
)
staticprivate

Definition at line 556 of file TrackingVolumeHelper.cxx.

559  {
560  std::vector<std::shared_ptr<TrackingVolume>> sharedTops{};
561  std::vector<std::shared_ptr<TrackingVolume>> sharedFaces{};
562  return fillGlueVolumes(::toRawVec(topLevelVolumes),
563  ::toRawVec(envelopeFaceVolumes),
564  glueFace, glueVols);
565 
566 }

◆ fillGlueVolumes() [2/2]

void Trk::TrackingVolumeHelper::fillGlueVolumes ( const std::vector< TrackingVolume * > &  topLevelVolumes,
const std::vector< TrackingVolume * > &  envelopeFaceVolumes,
BoundarySurfaceFace  glueFace,
std::vector< Trk::TrackingVolume * > &  glueVols 
)
staticprivate

Private method - it takes the full vector of given volumes to create the supervolume,.

  • it compares the volumes with the ones scheduled to build the face (could probably be done at once)
  • it checks whether there is a sub-structure (i.e. GlueVolumeDescriptor exists) and adds either the volume itself or the associated subvolume
  • volumes on glueVols level are all on navigation level

Definition at line 567 of file TrackingVolumeHelper.cxx.

570  {
571  // loop over the topLevel Volumes
572  auto refVolIter = topLevelVolumes.begin();
573  for ( ; refVolIter != topLevelVolumes.end(); ++refVolIter ) {
574  // loop over the faceVolumes
575  for (auto *envelopeFaceVolume : envelopeFaceVolumes){
576  // check whether this volume was assigned to on this face
577  if (envelopeFaceVolume==(*refVolIter)) {
578  // get the GlueVolumesDescriptor
579  GlueVolumesDescriptor& glueVolDescriptor = (*refVolIter)->glueVolumesDescriptor();
580  // if the size of glue volumes is 0 -> the referenceVolume is at navigation level
581  if ( (glueVolDescriptor.glueVolumes(glueFace)).empty()) {
582  glueVols.push_back(*refVolIter);
583  } else {
584  // fill all the sub-volumes described by the glueVolumeDescriptor
585  for (auto *isubNavVol : glueVolDescriptor.glueVolumes(glueFace))
586  glueVols.push_back( isubNavVol );
587  }
588  }
589  }// loop over envelopeFaceVolumes
590  } // loop over reference Volumes
591 }

◆ glueTrackingVolumeArrays()

std::unique_ptr< TrackingVolume > Trk::TrackingVolumeHelper::glueTrackingVolumeArrays ( std::shared_ptr< TrackingVolume firstVol,
BoundarySurfaceFace  firstFace,
std::shared_ptr< TrackingVolume secondVol,
BoundarySurfaceFace  secondFace,
const std::string &  name 
) const
overridevirtual

Method to glue two VolumeArrays together (at navigation level)

  • relies on information from glueDescriptor input:
  • first TrackingVolume
  • face of the BoundarySurface of the first volume
  • second volume that gets glued to the first volume
  • face of the BoundarySurface of the second volume output:
    • returns enveloping TrackingVolume with glueDescription set for consequent gluing

— Necessary as friendship cannot be inherited: your father's friend isn't necessary yours —

Implements Trk::ITrackingVolumeHelper.

Definition at line 408 of file TrackingVolumeHelper.cxx.

412  {
413  std::unique_ptr<TrackingVolume> enclosingVolume{};
414 
415  const auto *cyl1 = dynamic_cast<const CylinderVolumeBounds*>(&(firstVol->volumeBounds()));
416  const auto *cyl2 = dynamic_cast<const CylinderVolumeBounds*>(&(secondVol->volumeBounds()));
417 
418  if (!cyl1 || !cyl2) {
419  ATH_MSG_ERROR( "TrackingVolumeHelper::glueTrackingVolumeArrays: input volumes not cylinders, return 0" );
420  return enclosingVolume;
421  }
422  if (cyl1->halfPhiSector()!= M_PI || cyl2->halfPhiSector()!= M_PI ) {
423  ATH_MSG_ERROR( "TrackingVolumeHelper::glueTrackingVolumeArrays: not coded for cylinder Phi sectors yet, return 0" );
424  return enclosingVolume;
425  }
426 
427  // if the swap is required
428  BoundarySurfaceFace firstFaceCorr = firstFace;
429  BoundarySurfaceFace secondFaceCorr = secondFace;
430 
431 
432  // build volume envelope
433  std::vector<std::shared_ptr<TrackingVolume>> vols;
434  std::shared_ptr<CylinderVolumeBounds> envBounds{};
435  std::unique_ptr<Amg::Transform3D> envTransf{};
436  std::unique_ptr<BinnedArray<TrackingVolume>> subVols{};
437  vols.push_back(firstVol);
438  vols.push_back(secondVol);
439  std::vector<std::shared_ptr<TrackingVolume>> envGlueNegXY{};
440  std::vector<std::shared_ptr<TrackingVolume>> envGluePosXY{};
441  std::vector<std::shared_ptr<TrackingVolume>> envGlueOuter;
442  std::vector<std::shared_ptr<TrackingVolume>> envGlueInner{};
443 
444  if (firstFace==positiveFaceXY) {
445  envBounds = std::make_shared<CylinderVolumeBounds>(cyl1->innerRadius(),
446  cyl1->outerRadius(),
447  cyl1->halflengthZ() + cyl2->halflengthZ());
448 
449  const Amg::Vector3D center{firstVol->center()};
450  envTransf = std::make_unique<Amg::Transform3D>(Amg::getTranslate3D(center.x(),
451  center.y(),
452  center.z() + cyl2->halflengthZ()));
453 
454  subVols = m_trackingVolumeArrayCreator->cylinderVolumesArrayInZ(vols, false);
455  envGlueNegXY.push_back(firstVol);
456  envGluePosXY.push_back(secondVol);
457  envGlueOuter = vols;
458  envGlueInner = vols;
459  } else if (firstFace==negativeFaceXY) {
460  envBounds = std::make_shared<CylinderVolumeBounds>(cyl1->innerRadius(),
461  cyl1->outerRadius(),
462  cyl1->halflengthZ()+cyl2->halflengthZ());
463  const Amg::Vector3D center{firstVol->center()};
464  envTransf = std::make_unique<Amg::Transform3D>(Amg::getTranslate3D(center.x(),
465  center.y(),
466  center.z() - cyl2->halflengthZ()));
467  envGlueNegXY.push_back(secondVol);
468  envGluePosXY.push_back(firstVol);
469  // revert vols
470  vols.clear();
471  vols.push_back(secondVol);
472  vols.push_back(firstVol);
473  // --- account for the swapping
474  firstFaceCorr = secondFace;
475  secondFaceCorr = firstFace;
476  //
477  subVols = m_trackingVolumeArrayCreator->cylinderVolumesArrayInZ(vols,false);
478  envGlueOuter = vols;
479  envGlueInner = vols;
480  } else if (firstFace==tubeInnerCover) {
481  if (secondFace==tubeOuterCover){
482  envBounds = std::make_shared<CylinderVolumeBounds>(cyl2->innerRadius(),
483  cyl1->outerRadius(),
484  cyl1->halflengthZ());
485  } else {
486  envBounds = std::make_shared<CylinderVolumeBounds>(cyl1->outerRadius(),
487  cyl1->halflengthZ());
488  }
489  if (!firstVol->transform().isApprox(Amg::Transform3D::Identity())) {
490  envTransf = std::make_unique<Amg::Transform3D>(Amg::getTranslate3D(firstVol->center()));
491  }
492  // revert vols
493  vols.clear();
494  vols.push_back(secondVol);
495  vols.push_back(firstVol);
496  // account for the swapping
497  firstFaceCorr = secondFace;
498  secondFaceCorr = firstFace;
499  //
500  subVols = m_trackingVolumeArrayCreator->cylinderVolumesArrayInR(vols,false);
501  envGlueNegXY = vols;
502  envGluePosXY = vols;
503  envGlueOuter.push_back(firstVol);
504  envGlueInner.push_back(secondVol);
505  } else {
506  envBounds = std::make_shared<CylinderVolumeBounds>(cyl1->innerRadius(),
507  cyl2->outerRadius(),
508  cyl1->halflengthZ());
509  if(!firstVol->transform().isApprox(Amg::Transform3D::Identity())){
510  envTransf = std::make_unique<Amg::Transform3D>(Amg::getTranslate3D(firstVol->center()));
511  }
512  subVols = m_trackingVolumeArrayCreator->cylinderVolumesArrayInR(vols, false);
513  envGlueNegXY = vols;
514  envGluePosXY = vols;
515  envGlueOuter.push_back(secondVol);
516  envGlueInner.push_back(firstVol);
517  // account for the swapping
518  firstFaceCorr = secondFace;
519  secondFaceCorr = firstFace;
520  }
521 
522  // create the enveloping volume
523  enclosingVolume = std::make_unique<TrackingVolume>(std::move(envTransf),
524  envBounds,
525  *firstVol,
526  nullptr, std::move(subVols), name);
527 
528  // ENVELOPE GLUE DESCRIPTION -----------------------------------------------------------------
529  // glue descriptors ---- they jump to the first one
530  GlueVolumesDescriptor& glueDescr = enclosingVolume->glueVolumesDescriptor();
531 
532  // for the outside volumes, could be done in a loop as well, but will only save 4 lines
533  std::vector<TrackingVolume*> glueNegXY{};
534  std::vector<TrackingVolume*> gluePosXY{};
535  std::vector<TrackingVolume*> glueInner{};
536  std::vector<TrackingVolume*> glueOuter{};
537  fillGlueVolumes(vols, envGlueNegXY, negativeFaceXY,glueNegXY);
538  fillGlueVolumes(vols, envGluePosXY, positiveFaceXY,gluePosXY);
539  fillGlueVolumes(vols, envGlueInner, tubeInnerCover,glueInner);
540  fillGlueVolumes(vols, envGlueOuter, tubeOuterCover,glueOuter);
541  // set them to the envelopGlueDescriptor
542  glueDescr.registerGlueVolumes(negativeFaceXY, glueNegXY);
543  glueDescr.registerGlueVolumes(positiveFaceXY, gluePosXY);
544  glueDescr.registerGlueVolumes(tubeInnerCover, glueInner);
545  glueDescr.registerGlueVolumes(tubeOuterCover, glueOuter);
546  glueDescr.registerGlueVolumes(cylinderCover, glueOuter);
547 
548  // INTERNAL GLUEING ---------------------------------------------------------------------------
549  glueTrackingVolumes(vols, firstFaceCorr, secondFaceCorr);
550 
551  return enclosingVolume;
552 }

◆ glueTrackingVolumes() [1/5]

void Trk::TrackingVolumeHelper::glueTrackingVolumes ( const std::vector< std::shared_ptr< TrackingVolume >> &  glueVols,
BoundarySurfaceFace  glueFace,
BoundarySurfaceFace  secondFace 
) const
private

Execute the glueing - the input volumes are all on navigation level.

Definition at line 595 of file TrackingVolumeHelper.cxx.

597  {
598  glueTrackingVolumes(::toRawVec(glueVols), firstFace, secondFace);
599 
600 }

◆ glueTrackingVolumes() [2/5]

void Trk::TrackingVolumeHelper::glueTrackingVolumes ( const std::vector< TrackingVolume * > &  firstVolumes,
BoundarySurfaceFace  firstFace,
const std::vector< TrackingVolume * > &  secondVolumes,
BoundarySurfaceFace  secondFace,
bool  buildBoundaryLayer = false,
bool  boundaryFaceExchange = false 
) const
overridevirtual

Method to glue two VolumeArrays together (at navigation level) - without output.

Simply forward to base class method to enhance friendship relation.

— Necessary as friendship cannot be inherited: your father's friend isn't necessary yours —

Implements Trk::ITrackingVolumeHelper.

Definition at line 190 of file TrackingVolumeHelper.cxx.

196 {
197 
198 
199  std::unique_ptr<BinnedArray<TrackingVolume>> navArrayOne = nullptr;
200  std::unique_ptr<BinnedArray<TrackingVolume>> navArrayTwo = nullptr;
201 
202  std::unique_ptr<Surface> mLayerSurface;
203  std::shared_ptr<MaterialLayer> mLayer;
204 
205  ATH_MSG_VERBOSE("Glue configuration firstFace | secondFace = " << firstFace << " | " << secondFace );
206 
207  // create the Arrays - assuming cylindrical TrackingVolumes
208  if (firstFace < 2 && secondFace < 2 ) {
209  ATH_MSG_VERBOSE( "The glueing is done along z axis" );
210  navArrayOne = m_trackingVolumeArrayCreator->cylinderVolumesArrayInR(firstVolumes, true);
211  navArrayTwo = m_trackingVolumeArrayCreator->cylinderVolumesArrayInR(secondVolumes, true);
212  // build a disc to separate the two
213  if (buildBoundaryLayer || boundaryFaceExchange){
214  double rmin = 10e10; double rmax = 0; double boundaryz = 0.; double centerzOne = 0.;
215  for (const auto & volIter : firstVolumes ){
216  const CylinderVolumeBounds* cb = dynamic_cast<const CylinderVolumeBounds*>(&(volIter->volumeBounds()));
217  if (cb) {
218  takeSmaller(rmin,cb->innerRadius());
219  takeBigger(rmax,cb->outerRadius());
220  // get the z of the surface
221  boundaryz = volIter->boundarySurfaces()[firstFace]->surfaceRepresentation().center().z();
222  }
223  centerzOne = volIter->center().z();
224  }
225  if (buildBoundaryLayer){
226  Amg::Transform3D mLayerTransform =
227  Amg::Transform3D(Amg::Translation3D(0., 0., boundaryz));
228  // layer surface
229  mLayerSurface = std::make_unique<DiscSurface>(mLayerTransform, rmin, rmax);
230  // create a MaterialLayer
231  std::unique_ptr<LayerMaterialProperties> lmps = layerMaterialProperties(*mLayerSurface);
232  // MaterialLayer clones the LayerMaterialPropteries.
233 
234  if (lmps) {
235  mLayer = std::make_shared<MaterialLayerOwnSurf>(std::move(mLayerSurface), std::move(lmps));
236  }
237  }
238  if (boundaryFaceExchange){
239  // creating only one boundary surface
240  ATH_MSG_VERBOSE("Creating a joint boundary surface for n-to-n glueing case.");
241  // check if the seconf volumes have a bigger z value or a smaller one
242  double centerzTwo = secondVolumes[secondVolumes.size()-1]->center().z();
243  // thi sboundary surface is having a z-axix along the global z-axis
244  Amg::Transform3D boundaryTransform = Amg::getTranslateZ3D(boundaryz);
245  // disc surfaces
246  DiscSurface dSurface(boundaryTransform, rmin, rmax);
247  // swap if needed
248  if (centerzTwo < centerzOne){
249  std::swap(navArrayTwo, navArrayOne);
250  }
251  // create the new boudnary surface which spans over the entire volume border
252  std::shared_ptr< BinnedArray<TrackingVolume> > navArrayInside(std::move(navArrayOne));
253  std::shared_ptr< BinnedArray<TrackingVolume> > navArrayOutside(std::move(navArrayTwo));
254  BoundaryDiscSurface<TrackingVolume>* boundarySurface = new BoundaryDiscSurface<TrackingVolume>(navArrayInside,navArrayOutside,dSurface);
255  std::shared_ptr<BoundarySurface<TrackingVolume> > sharedBoundarySurface(boundarySurface);
256  // attach the material layer to the shared boundary if existing
257  if (mLayer) {
258  ATH_MSG_VERBOSE( "Set MaterialLayer to the BoundarySurface of volume from second array." );
259  boundarySurface->surfaceRepresentation().setMaterialLayer(mLayer);
260  }
261  // set the boundary surface to the volumes of both sides
262  for (const auto & volIter : firstVolumes){
263  ATH_MSG_VERBOSE(" -> first array : setting a newly created boundary surface to " << volIter->volumeName());
264  setBoundarySurface(*volIter,sharedBoundarySurface,firstFace);
265  }
266  for (const auto & volIter : secondVolumes){
267  ATH_MSG_VERBOSE(" -> second array : setting a newly created boundary surface to " << volIter->volumeName());
268  setBoundarySurface(*volIter,sharedBoundarySurface,secondFace);
269  }
270  // we are done here
271  return;
272  }
273  }
274  } else {
275  ATH_MSG_VERBOSE( "The glueing is done along the radius." );
276  navArrayOne = m_trackingVolumeArrayCreator->cylinderVolumesArrayInZ(firstVolumes, true);
277  navArrayTwo = m_trackingVolumeArrayCreator->cylinderVolumesArrayInZ(secondVolumes, true);
278  // check if the boundary layer was configured to be built
279  if (buildBoundaryLayer || boundaryFaceExchange){
280  // build a cylinder to separate the two
281  double zmin = 10e10; double zmax = -10e10; double boundaryr = 0.; double volumerOne = 0.; double volumerTwo = 10e10;
282  for (const auto & volIter : firstVolumes ){
283  const CylinderVolumeBounds* cb = dynamic_cast<const CylinderVolumeBounds*>(&(volIter->volumeBounds()));
284  if (cb) {
285  takeSmaller(zmin,volIter->center().z()-cb->halflengthZ());
286  takeBigger(zmax,volIter->center().z()+cb->halflengthZ());
287  // get the z of the surface
288  boundaryr = volIter->boundarySurfaces()[firstFace]->surfaceRepresentation().bounds().r();
289  // get the volume radius
290  volumerOne = cb->outerRadius();
291  }
292  }
293  // check if boundary layer should be built
294  if (buildBoundaryLayer){
295  std::unique_ptr<Amg::Transform3D> mLayerTransform =
296  ((zmin + zmax) * (zmin + zmax) < 10e-4)
297  ? nullptr
298  : std::make_unique < Amg::Transform3D>();
299 
300  if (mLayerTransform) (*mLayerTransform) = Amg::Translation3D(0.,0.,0.5*(zmin+zmax));
301  mLayerSurface.reset( mLayerTransform ? new CylinderSurface(*mLayerTransform,boundaryr,0.5*(zmax-zmin)) :
302  new CylinderSurface(boundaryr,0.5*(zmax-zmin)) );
303  // create a MaterialLayer
304  std::unique_ptr<LayerMaterialProperties> lmps = layerMaterialProperties(*mLayerSurface);
305  // LayerMaterialProperties will be cloned in MaterialLayer
306  if (lmps) mLayer = std::make_shared<MaterialLayerOwnSurf>(
307  std::move(mLayerSurface),
308  std::move(lmps) );
309  }
310  // check if boundary face should be exchanged
311  if (boundaryFaceExchange) {
312  // creating only one boundary surface
313  ATH_MSG_VERBOSE("Creating a joint boundary surface for n-to-n glueing case.");
314  // the boundary transform can be 0 for cylinder surfaces
315  std::unique_ptr<Amg::Transform3D> boundaryTransform =
316  ((zmin + zmax) * (zmin + zmax) < 10e-4)
317  ? nullptr
318  : std::make_unique<Amg::Transform3D>();
319 
320  if (boundaryTransform) (*boundaryTransform) = Amg::getTranslateZ3D(0.5*(zmin+zmax));
321  // create the cylinder surface for the shared boundary
322  CylinderSurface cSurface = boundaryTransform ? CylinderSurface(*boundaryTransform,boundaryr,0.5*(zmax-zmin)) :
323  CylinderSurface(boundaryr,0.5*(zmax-zmin));
324  // get the volume outer radius of the sconf volumes
325  const CylinderVolumeBounds* cbTwo = dynamic_cast<const CylinderVolumeBounds*>(&(secondVolumes[secondVolumes.size()-1]->volumeBounds()));
326  if (cbTwo){
327  volumerTwo = cbTwo->outerRadius();
328  }
329  // swap if needed
330  if (volumerTwo < volumerOne){
331  std::swap(navArrayTwo, navArrayOne);
332  }
333  // create the new boudnary surface which spans over the entire volume border
334  std::shared_ptr< BinnedArray<TrackingVolume> > navArrayInside(std::move(navArrayOne));
335  std::shared_ptr< BinnedArray<TrackingVolume> > navArrayOutside(std::move(navArrayTwo));
336  BoundaryCylinderSurface<TrackingVolume>* boundarySurface = new BoundaryCylinderSurface<TrackingVolume>(navArrayInside,navArrayOutside,cSurface);
337  std::shared_ptr<BoundarySurface<TrackingVolume> > sharedBoundarySurface(boundarySurface);
338  // attach the material layer to the shared boundary if existing
339  if (mLayer) {
340  ATH_MSG_VERBOSE("Set MaterialLayer to the BoundarySurface of volume from second array.");
341  // assume that now the mlayer onwership goes over to the TrackingVolume
342  boundarySurface->surfaceRepresentation().setMaterialLayer(mLayer);
343  }
344  // set the boundary surface to the volumes of both sides
345  for (const auto & volIter : firstVolumes){
346  ATH_MSG_VERBOSE(" -> first array : setting a newly created boundary surface to " << volIter->volumeName());
347  setBoundarySurface(*volIter,sharedBoundarySurface,firstFace);
348  }
349  for (const auto & volIter : secondVolumes){
350  ATH_MSG_VERBOSE(" -> second array : setting a newly created boundary surface to " << volIter->volumeName());
351  setBoundarySurface(*volIter,sharedBoundarySurface,secondFace);
352  }
353  // we are done here
354  return;
355  }
356  } // build either boundary layer or exchange the face
357  } // radial glueing
358 
359 
360  // create the boundary faces - not creating a joint one
361  ATH_MSG_VERBOSE("Leaving individual boundary surfaces for n-to-n glueing case.");
362 
363  // assign the navigation arrays
364  std::shared_ptr< BinnedArray< TrackingVolume> > navArrayOneShared(std::move(navArrayOne));
365  std::shared_ptr< BinnedArray< TrackingVolume> > navArrayTwoShared(std::move(navArrayTwo));
366 
367  // (a) to the first set of volumes
368  for (const auto & tVolIter: firstVolumes) {
369  // take care of the orientation of the normal vector
370  if (firstFace != tubeInnerCover) {
371  setOutsideTrackingVolumeArray(*tVolIter,firstFace,navArrayTwoShared);
372  ATH_MSG_VERBOSE( "Set outsideTrackingVolumeArray at face " << firstFace << " to " << (*tVolIter).volumeName() );
373  } else {
374  setInsideTrackingVolumeArray(*tVolIter,firstFace,navArrayTwoShared);
375  ATH_MSG_VERBOSE( "Set insideTrackingVolumeArray at face " << firstFace << " to " << (*tVolIter).volumeName() );
376  }
377  // set the boundary layer if it exists
378  if (mLayer) {
379  ATH_MSG_VERBOSE( "Set MaterialLayer to the BoundarySurface of volume from first array." );
380  Surface& firstFaceSurface = tVolIter->boundarySurfaces()[firstFace]->surfaceRepresentation();
381  // assume that now the mlayer onwership goes over to the TrackingVolume
382  //cppcheck-suppress ignoredReturnValue
383  firstFaceSurface.setMaterialLayer(mLayer);
384  }
385 
386  }
387  // (b) to the second set of volumes
388  for (const auto & tVolIter : secondVolumes) {
389  // take care of the orientation of the normal vector
390  if (secondFace != tubeInnerCover) {
391  ATH_MSG_VERBOSE( "Set outsideTrackingVolumeArray at face " << secondFace << " to " << (*tVolIter).volumeName() );
392  setOutsideTrackingVolumeArray(*tVolIter,secondFace,navArrayOneShared);
393  } else {
394  ATH_MSG_VERBOSE( "Set insideTrackingVolumeArray at face " << secondFace << " to " << (*tVolIter).volumeName() );
395  setInsideTrackingVolumeArray(*tVolIter,secondFace,navArrayOneShared);
396  }
397  if (mLayer) {
398  ATH_MSG_VERBOSE( "Set MaterialLayer to the BoundarySurface of volume from second array." );
399  Surface& secondFaceSurface = tVolIter->boundarySurfaces()[secondFace]->surfaceRepresentation();
400  // assume that now the mlayer onwership goes over to the TrackingVolume
401  //cppcheck-suppress ignoredReturnValue
402  secondFaceSurface.setMaterialLayer(mLayer);
403  }
404  }
405  // coverity will report a bug here for mLayer running out of scope, but the memory management is done later in the TrackingVolume
406 }

◆ glueTrackingVolumes() [3/5]

void Trk::TrackingVolumeHelper::glueTrackingVolumes ( const std::vector< TrackingVolume * > &  glueVols,
BoundarySurfaceFace  glueFace,
BoundarySurfaceFace  secondFace 
) const
private

Definition at line 601 of file TrackingVolumeHelper.cxx.

603  {
604 
605  if (glueVols.size()<2) {
606  ATH_MSG_VERBOSE( "Nothing to do in glueVolumes() " );
607  return;
608  }
609 
610 
611  ATH_MSG_VERBOSE( " glueTrackingVolumes() called with boundary faces " << static_cast<int>(firstFace)
612  << " and " << static_cast<int>(secondFace) << "." );
613 
614  // the iterators through the volumes
615  std::vector<TrackingVolume*>::const_iterator firstVol = glueVols.begin();
616  std::vector<TrackingVolume*>::const_iterator secondVol = firstVol + 1;
617  for ( ; secondVol != glueVols.end(); ++firstVol, ++secondVol) {
618 
619  if (msgLvl(MSG::VERBOSE))
620  ATH_MSG_VERBOSE( "Processing '" << (*firstVol)->volumeName() << "' and '" << (*secondVol)->volumeName() << "'." );
621 
622  // get the glue volume descriptors to see that we have all subvolumes
623  GlueVolumesDescriptor& glueDescr1 = (*firstVol)->glueVolumesDescriptor();
624  GlueVolumesDescriptor& glueDescr2 = (*secondVol)->glueVolumesDescriptor();
625 
626  // glue volumes at navigation level
627  std::vector<TrackingVolume*> glueVols1{};
628  std::vector<TrackingVolume*> glueVols2{};
629  glueVols1 = glueDescr1.glueVolumes(firstFace);
630  glueVols2 = glueDescr2.glueVolumes(secondFace);
631 
632  // trivial cases
633  // (glue one to the other)
634  if (glueVols1.empty() && glueVols2.empty()) {
635  glueTrackingVolumes(**firstVol,firstFace,**secondVol,secondFace);
636  continue;
637  // (glue one to many)
638  } else if (glueVols1.empty() && !glueVols2.empty()) {
639  glueVols1.push_back(*firstVol);
640  // (glue the other one to many)
641  } else if (!glueVols1.empty() && glueVols2.empty()) {
642  glueVols2.push_back(*secondVol);
643  }
644 
645  // non-trivial case :: array against array
646  // in Z : assume 2dim R/Phi
647  if (firstFace==negativeFaceXY || firstFace==positiveFaceXY ) {
648  // turn both vectors into R/Phi 2dim binnedArrays; assume equidistant binning in Phi
649  std::shared_ptr<BinnedArray<TrackingVolume>> sgv1{m_trackingVolumeArrayCreator->cylinderVolumesArrayInPhiR(glueVols1,true)};
650  std::shared_ptr<BinnedArray<TrackingVolume>> sgv2{m_trackingVolumeArrayCreator->cylinderVolumesArrayInPhiR(glueVols2,true)};
651 
652  // array vs. array in Z
653  if (glueVols2.size()>1)
654  for (auto & vol : glueVols1) setOutsideTrackingVolumeArray( *vol, firstFace, sgv2 );
655  else
656  for (auto & vol : glueVols1) setOutsideTrackingVolume( *vol, firstFace, glueVols2[0] );
657 
658  if (glueVols1.size()>1)
659  for (auto & vol : glueVols2) setOutsideTrackingVolumeArray( *vol, secondFace, sgv1 );
660  else
661  for (auto & vol : glueVols2) setOutsideTrackingVolume( *vol, secondFace, glueVols1[0] );
662 
663 
664  } else {
665  // turn both vectors into Z/Phi 2dim binnedArrays; assume equidistant binning in Phi
666  std::shared_ptr<BinnedArray<TrackingVolume>> sgv1{m_trackingVolumeArrayCreator->cylinderVolumesArrayInPhiZ(glueVols1,true)};
667  std::shared_ptr<BinnedArray<TrackingVolume>> sgv2{m_trackingVolumeArrayCreator->cylinderVolumesArrayInPhiZ(glueVols2,true)};
668 
669  // the glue cases -----------------------------------------------------------------------------------
670  // handle the tube with care !
671  // first vol
672  for (auto & vol : glueVols1) {
673  // set the array as the outside array of the firstVol
674  if (firstFace != tubeInnerCover) {
675  if (glueVols2.size()>1)
676  setOutsideTrackingVolumeArray( *vol, firstFace, sgv2 );
677  else
678  setOutsideTrackingVolume( *vol, firstFace, glueVols2[0] );
679  } else {
680  if (glueVols2.size()>1){
681  setInsideTrackingVolumeArray( *vol, firstFace, sgv2 );
682  setOutsideTrackingVolume( *vol, firstFace, vol );
683  } else {
684  setInsideTrackingVolume( *vol, firstFace, glueVols2[0] );
685  setOutsideTrackingVolume( *vol, firstFace, vol );
686  }
687  }
688  }
689  // second
690  for (auto & vol : glueVols2) {
691  // set the array as the outside array of the secondVol
692  if (secondFace != tubeInnerCover)
693  setOutsideTrackingVolumeArray( *vol, secondFace, sgv1 );
694  else {
695  setInsideTrackingVolumeArray( *vol, secondFace, sgv1 );
696  setOutsideTrackingVolume( *vol, secondFace, vol );
697  }
698  }
699  }
700  }
701 }

◆ glueTrackingVolumes() [4/5]

void Trk::TrackingVolumeHelper::glueTrackingVolumes ( TrackingVolume firstVol,
BoundarySurfaceFace  firstFace,
const std::vector< TrackingVolume * > &  secondVolumes,
BoundarySurfaceFace  secondFace,
bool  buildBoundaryLayer = false,
bool  boundaryFaceExchange = false 
) const
overridevirtual

Method to glue two Volumes together input:

Simply forward to base class method to enhance friendship relation.

— Necessary as friendship cannot be inherited: your father's friend isn't necessary yours —

Implements Trk::ITrackingVolumeHelper.

Definition at line 102 of file TrackingVolumeHelper.cxx.

108 {
109 
110  if (msgLvl(MSG::VERBOSE)) {
111  ATH_MSG_VERBOSE( "Glue Volume '" << firstVol.volumeName() << "' to " << secondVolumes.size() << " volume(s): " );
112  for (const auto & volIter : secondVolumes)
113  ATH_MSG_VERBOSE( " -> " << (volIter)->volumeName() );
114  }
115  // prepare the material layer if needed
116  std::shared_ptr<MaterialLayer> mLayer{};
117  // ----------------------------------------------------------------------------------------
118  // create a MaterialLayer as a boundary
119  if (buildBoundaryLayer){
120  // the first face surface
121  Surface& firstFaceSurface = firstVol.boundarySurfaces()[firstFace]->surfaceRepresentation();
122  std::unique_ptr<LayerMaterialProperties> lmps = layerMaterialProperties(firstFaceSurface);
123  // LayerMaterialProperties are cloned by MaterialLayer
124 
125  // the material layer is ready - it can be assigned
126  mLayer = std::make_shared<MaterialLayerNoOwnSurf>(&firstFaceSurface, std::move(lmps));
127  ATH_MSG_VERBOSE( "Set MaterialLayer to the BoundarySurface of first volume (may be shared with second volume)." );
128  firstFaceSurface.setMaterialLayer(mLayer);
129  }
130  // if only one volume was given in the vector call the standard one-to-one glueing
131  // 1-to-1 case
132  if (secondVolumes.size() == 1) {
133  // self call for one-on-one
134  glueTrackingVolumes(firstVol, firstFace, *(secondVolumes[0]), secondFace);
135  } else {
136  // create the navigation bin array
137  std::unique_ptr<BinnedArray<TrackingVolume>> navArray = nullptr;
138  // create the Array - either r-binned or z-binned
139  if (firstFace == negativeFaceXY || firstFace == positiveFaceXY )
140  navArray = m_trackingVolumeArrayCreator->cylinderVolumesArrayInR(secondVolumes, true);
141  else
142  navArray = m_trackingVolumeArrayCreator->cylinderVolumesArrayInZ(secondVolumes, true);
143 
144  // set the volume array to the first boundary surface - this must always happen
145  if (firstFace != tubeInnerCover){
146  setOutsideTrackingVolumeArray( firstVol, firstFace, std::move(navArray) );
147  }
148  else{
149  setInsideTrackingVolumeArray( firstVol, firstFace, std::move(navArray) );
150  }
151  // the navigation arrays are completed now - check if the boundary face should be exchanged
152  // [1] the boundary face exchange ----------------------------------------------------------------------------------------
153  if (boundaryFaceExchange){
154  // creating only one boundary surface
155  ATH_MSG_VERBOSE("Creating a joint boundary surface for 1-to-n glueing case.");
156  // get the dimension of boundary surface of the first volume
157  std::shared_ptr<BoundarySurface<TrackingVolume> > bSurface = firstVol.boundarySurfaces()[firstFace];
158  // replace the boundary surface
159  for ( const auto & volIter: secondVolumes )
160  setBoundarySurface(*volIter, bSurface, secondFace);
161  } else {
162  // [2] the traditional way, keeping two boundary surfaces
163  // now set the face to the volume array -------------------------------------------------------------------------------
164  for ( const auto & volIter: secondVolumes ) {
165  // the secondGlueFace
166  BoundarySurfaceFace secondGlueFace = secondFace;
167  if (secondFace == tubeOuterCover) {
168  //check for cylinder case
169  const CylinderVolumeBounds* currentVolBounds = dynamic_cast<const CylinderVolumeBounds*>(&((volIter)->volumeBounds()));
170  // protection : there may be a cylinder within the tube vector
171  if (currentVolBounds && currentVolBounds->innerRadius() < 10e-3)
172  secondGlueFace = cylinderCover;
173  setOutsideTrackingVolume(*volIter, secondGlueFace, (&(firstVol)));
174  } // for all surfaces except the tunbeInnerCover outside of the surface is identical to outside of the volume
175  else if (secondGlueFace != tubeInnerCover)
176  setOutsideTrackingVolume(*volIter, secondGlueFace, (&(firstVol)));
177  else
178  setInsideTrackingVolume(*volIter, secondGlueFace, (&(firstVol)));
179  // if existing, set the material Layer
180  // get the second face surface and set the new MaterialLayer
181  Surface& secondFaceSurface = volIter->boundarySurfaces()[secondFace]->surfaceRepresentation();
182  secondFaceSurface.setMaterialLayer(mLayer);
183  }
184  }
185  } // 1-to-n case
186 }

◆ glueTrackingVolumes() [5/5]

void Trk::TrackingVolumeHelper::glueTrackingVolumes ( TrackingVolume firstVol,
BoundarySurfaceFace  firstFace,
TrackingVolume secondVol,
BoundarySurfaceFace  secondFace,
bool  buildBoundaryLayer = false 
) const
overridevirtual

Method to glue two Volumes together input:

Simply forward to base class method to enhance friendship relation.

— Necessary as friendship cannot be inherited: your father's friend isn't necessary yours —

Implements Trk::ITrackingVolumeHelper.

Definition at line 70 of file TrackingVolumeHelper.cxx.

75 {
76  TrackingVolumeManipulator::glueVolumes( firstVol, firstFace, secondVol, secondFace );
77 
78  // ----------------------------------------------------------------------------------------
79  // create a MaterialLayer as a boundary
80  if (buildBoundaryLayer){
81  auto& bSurfacesFirst = firstVol.boundarySurfaces();
82  auto& bSurfacesSecond = secondVol.boundarySurfaces();
83  // get the boundary surfaces
84  Surface& firstFaceSurface = bSurfacesFirst[firstFace]->surfaceRepresentation();
85  Surface& secondFaceSurface = bSurfacesSecond[secondFace]->surfaceRepresentation();
86  // dynamic_cast to the right type
87  std::unique_ptr<LayerMaterialProperties> lmps = layerMaterialProperties(firstFaceSurface);
88  // LayerMaterialProperties will be cloned in MaterialLayer
89 
90  // set the layer to the two surfaces
91  if (lmps){
92  auto mLayer = std::make_shared<MaterialLayerNoOwnSurf>(&firstFaceSurface, std::move(lmps));
93  ATH_MSG_VERBOSE( "Set MaterialLayer to the BoundarySurface of first volume." );
94  firstFaceSurface.setMaterialLayer(mLayer);
95  ATH_MSG_VERBOSE("Set MaterialLayer to the BoundarySurface of second volume.");
96  secondFaceSurface.setMaterialLayer(mLayer);
97  }
98  }
99 }

◆ 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 }

◆ initialize()

StatusCode Trk::TrackingVolumeHelper::initialize ( )
override

AlgTool initialize method.

Definition at line 60 of file TrackingVolumeHelper.cxx.

60  {
61 
62  ATH_MSG_DEBUG( "initialize() " );
63  ATH_CHECK(m_layerArrayCreator.retrieve());
65  return StatusCode::SUCCESS;
66 }

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

◆ layerMaterialProperties()

std::unique_ptr< LayerMaterialProperties > Trk::TrackingVolumeHelper::layerMaterialProperties ( const Trk::Surface sf) const
private

< helper method to construct barrel material

Definition at line 704 of file TrackingVolumeHelper.cxx.

704  {
705 
706  std::unique_ptr<LayerMaterialProperties> layerMaterial{};
707 
708  if (boundarySurface.type() == SurfaceType::Cylinder){
709  const CylinderBounds* cb = dynamic_cast<const CylinderBounds*>(&boundarySurface.bounds());
710  if (!cb) throw std::logic_error("Not CylinderBounds");
711  // --------------- material estimation ----------------------------------------------------------------
712  // -- material with 1D binning
713  double hz = cb->halflengthZ();
714  double r = cb->r();
715  BinUtility layerBinUtilityZ(m_barrelLayerBinsZ, -hz, hz, open, binZ);
716  if (m_barrelLayerBinsPhi==1){
717  layerMaterial = std::make_unique<BinnedLayerMaterial>(layerBinUtilityZ);
718  } else { // -- material with 2D binning
719  BinUtility layerBinUtilityRPhiZ(m_barrelLayerBinsPhi, -r*M_PI, r*M_PI, closed,binRPhi);
720  layerBinUtilityRPhiZ += layerBinUtilityZ;
721  layerMaterial = std::make_unique<BinnedLayerMaterial>(layerBinUtilityRPhiZ);
722  }
723  // --------------- material estimation ----------------------------------------------------------------
724  }
725  if (boundarySurface.type() == SurfaceType::Disc){
726  // --------------- material estimation ----------------------------------------------------------------
727  const DiscBounds* db = dynamic_cast<const DiscBounds*>(&boundarySurface.bounds());
728  if (!db) throw std::logic_error("Not DiscBounds");
729  double rMin = db->rMin();
730  double rMax = db->rMax();
731  BinUtility layerBinUtilityR(m_endcapLayerBinsR,rMin,rMax,open, binR);
732  // -- material with 1D binning
733  if (m_endcapLayerBinsPhi==1){
734  layerMaterial = std::make_unique<BinnedLayerMaterial>(layerBinUtilityR);
735  } else { // -- material with 2D binning
736  BinUtility layerBinUtilityPhi(m_endcapLayerBinsPhi,-M_PI,M_PI,closed,binPhi);
737  layerBinUtilityR += layerBinUtilityPhi;
738  layerMaterial = std::make_unique<BinnedLayerMaterial>(layerBinUtilityR);
739  }
740  // --------------- material estimation ----------------------------------------------------------------
741  }
742  // return what you have
743  return layerMaterial;
744 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
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 }

◆ setInsideTrackingVolume()

void Trk::TrackingVolumeHelper::setInsideTrackingVolume ( TrackingVolume tvol,
BoundarySurfaceFace  face,
TrackingVolume insidevol 
) const
overridevirtual

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

Simply forward to base class method to enhance friendship relation.

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

— Necessary as friendship cannot be inherited: your father's friend isn't necessary yours —

Implements Trk::ITrackingVolumeHelper.

Definition at line 749 of file TrackingVolumeHelper.cxx.

751  {
752  TrackingVolumeManipulator::setInsideVolume( tvol, face, insidevol );
753 }

◆ setInsideTrackingVolumeArray()

void Trk::TrackingVolumeHelper::setInsideTrackingVolumeArray ( TrackingVolume tvol,
BoundarySurfaceFace  face,
std::shared_ptr< BinnedArray< TrackingVolume >>  insidevolarray 
) const
overridevirtual

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

Simply forward to base class method to enhance friendship relation.

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

— Necessary as friendship cannot be inherited: your father's friend isn't necessary yours —

Implements Trk::ITrackingVolumeHelper.

Definition at line 757 of file TrackingVolumeHelper.cxx.

759  {
760  TrackingVolumeManipulator::setInsideVolumeArray(tvol,face,insidevolarray);
761 }

◆ 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 }

◆ setOutsideTrackingVolume()

void Trk::TrackingVolumeHelper::setOutsideTrackingVolume ( TrackingVolume tvol,
BoundarySurfaceFace  face,
TrackingVolume outsidevol 
) const
overridevirtual

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

Simply forward to base class method to enhance friendship relation.

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

— Necessary as friendship cannot be inherited: your father's friend isn't necessary yours —

Implements Trk::ITrackingVolumeHelper.

Definition at line 765 of file TrackingVolumeHelper.cxx.

767  {
768  ATH_MSG_VERBOSE( " -> Glue '" << outsidevol->volumeName() << "' at face " << face << " to '" << tvol.volumeName() << "'.");
769  TrackingVolumeManipulator::setOutsideVolume( tvol, face, outsidevol );
770 }

◆ setOutsideTrackingVolumeArray()

void Trk::TrackingVolumeHelper::setOutsideTrackingVolumeArray ( TrackingVolume tvol,
BoundarySurfaceFace  face,
std::shared_ptr< BinnedArray< TrackingVolume >>  outsidevolarray 
) const
overridevirtual

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

Simply forward to base class method to enhance friendship relation.

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

Implements Trk::ITrackingVolumeHelper.

Definition at line 774 of file TrackingVolumeHelper.cxx.

776  {
777  unsigned int numVols = outsidevolarray.get()->arrayObjects().size() ;
778  ATH_MSG_VERBOSE( " -> Glue " << numVols << " volumes at face " << face << " to '" << tvol.volumeName() );
779  TrackingVolumeManipulator::setOutsideVolumeArray( tvol, face, outsidevolarray );
780 }

◆ 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 }

◆ 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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

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

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_barrelLayerBinsPhi

Gaudi::Property<int> Trk::TrackingVolumeHelper::m_barrelLayerBinsPhi {this, "BarrelLayerBinsPhi", 1}
private

material bins in Phi

Definition at line 232 of file TrackingVolumeHelper.h.

◆ m_barrelLayerBinsZ

Gaudi::Property<int> Trk::TrackingVolumeHelper::m_barrelLayerBinsZ {this, "BarrelLayerBinsZ", 1}
private

material bins in Z

Definition at line 231 of file TrackingVolumeHelper.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_endcapLayerBinsPhi

Gaudi::Property<int> Trk::TrackingVolumeHelper::m_endcapLayerBinsPhi {this, "EndcapLayerBinsPhi", 1}
private

material bins in Phi

Definition at line 234 of file TrackingVolumeHelper.h.

◆ m_endcapLayerBinsR

Gaudi::Property<int> Trk::TrackingVolumeHelper::m_endcapLayerBinsR {this, "EndcapLayerBinsR", 1}
private

material bins in R

Definition at line 233 of file TrackingVolumeHelper.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_layerArrayCreator

PublicToolHandle<ILayerArrayCreator> Trk::TrackingVolumeHelper::m_layerArrayCreator {this, "LayerArrayCreator", "Trk::LayerArrayCreator/LayerArrayCreator"}
private

A Tool for coherent LayerArray creation.

Definition at line 226 of file TrackingVolumeHelper.h.

◆ m_trackingVolumeArrayCreator

ToolHandle<ITrackingVolumeArrayCreator> Trk::TrackingVolumeHelper::m_trackingVolumeArrayCreator {this, "TrackingVolumeArrayCreator", "Trk::TrackingVolumeArrayCreator/TrackingVolumeArrayCreator"}
private

Helper Tool to create TrackingVolume.

Arrays

Definition at line 228 of file TrackingVolumeHelper.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.

◆ s_layerThickness

constexpr double Trk::TrackingVolumeHelper::s_layerThickness
staticconstexprprivate
Initial value:

standard layer thickness

Definition at line 236 of file TrackingVolumeHelper.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:674
python.SystemOfUnits.mm
float mm
Definition: SystemOfUnits.py:98
Trk::binZ
@ binZ
Definition: BinningType.h:49
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:169
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:42
Trk::TrackingVolumeHelper::m_barrelLayerBinsPhi
Gaudi::Property< int > m_barrelLayerBinsPhi
material bins in Phi
Definition: TrackingVolumeHelper.h:232
Amg::getTranslateZ3D
Amg::Transform3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis
Definition: GeoPrimitivesHelpers.h:285
Trk::TrackingVolumeHelper::m_barrelLayerBinsZ
Gaudi::Property< int > m_barrelLayerBinsZ
material bins in Z
Definition: TrackingVolumeHelper.h:231
Trk::TrackingVolumeHelper::setOutsideTrackingVolume
void setOutsideTrackingVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol) const override
protected method to set outside Volume of a BoundarySurface: input:
Definition: TrackingVolumeHelper.cxx:765
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
M_PI
#define M_PI
Definition: ActiveFraction.h:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::TrackingVolume::m_boundarySurfaces
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > m_boundarySurfaces
Definition: TrackingVolume.h:438
Trk::closed
@ closed
Definition: BinningType.h:41
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::positiveFaceXY
@ positiveFaceXY
Definition: BoundarySurfaceFace.h:33
Trk::TrackingVolumeHelper::m_layerArrayCreator
PublicToolHandle< ILayerArrayCreator > m_layerArrayCreator
A Tool for coherent LayerArray creation.
Definition: TrackingVolumeHelper.h:226
Trk::TrackingVolumeManipulator::setOutsideVolume
static void setOutsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol)
protected method to set outside Volume of a BoundarySurface: input:
Definition: TrackingVolumeManipulator.cxx:71
Trk::TrackingVolumeHelper::setInsideTrackingVolumeArray
void setInsideTrackingVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, std::shared_ptr< BinnedArray< TrackingVolume >> insidevolarray) const override
protected method to set inside VolumeArray of a BoundarySurface: input:
Definition: TrackingVolumeHelper.cxx:757
Trk::TrackingVolumeHelper::m_endcapLayerBinsPhi
Gaudi::Property< int > m_endcapLayerBinsPhi
material bins in Phi
Definition: TrackingVolumeHelper.h:234
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::TrackingVolumeHelper::fillGlueVolumes
static void fillGlueVolumes(const std::vector< TrackingVolume * > &topLevelVolumes, const std::vector< TrackingVolume * > &envelopeFaceVolumes, BoundarySurfaceFace glueFace, std::vector< Trk::TrackingVolume * > &glueVols)
Private method - it takes the full vector of given volumes to create the supervolume,...
Definition: TrackingVolumeHelper.cxx:567
Trk::BoundarySurfaceFace
BoundarySurfaceFace
Definition: BoundarySurfaceFace.h:31
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
takeBigger
#define takeBigger(current, test)
Definition: RobustTrackingGeometryBuilderImpl.h:44
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::TrackingVolumeHelper::setInsideTrackingVolume
void setInsideTrackingVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol) const override
protected method to set inside Volume of a BoundarySurface: input:
Definition: TrackingVolumeHelper.cxx:749
beamspotman.n
n
Definition: beamspotman.py:729
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
Trk::TrackingVolumeManipulator::setInsideVolumeArray
static void setInsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume >> &insidevolarray)
protected method to set inside VolumeArray of a BoundarySurface: input:
Definition: TrackingVolumeManipulator.cxx:61
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:169
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::negativeFaceXY
@ negativeFaceXY
Definition: BoundarySurfaceFace.h:32
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::CylinderVolumeBounds
Definition: CylinderVolumeBounds.h:70
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
takeSmaller
#define takeSmaller(current, test)
Definition: RobustTrackingGeometryBuilderImpl.h:43
Trk::TrackingVolumeManipulator::setBoundarySurface
static void setBoundarySurface(TrackingVolume &tvol, std::shared_ptr< BoundarySurface< TrackingVolume >> bsurf, BoundarySurfaceFace face)
protected method to set the boundary surface of a tracking volume
Definition: TrackingVolumeManipulator.cxx:43
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::TrackingVolumeManipulator::setInsideVolume
static void setInsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol)
protected method to set inside Volume of a BoundarySurface: input:
Definition: TrackingVolumeManipulator.cxx:52
Trk::open
@ open
Definition: BinningType.h:40
Trk::TrackingVolumeHelper::layerMaterialProperties
std::unique_ptr< Trk::LayerMaterialProperties > layerMaterialProperties(const Trk::Surface &sf) const
< helper method to construct barrel material
Definition: TrackingVolumeHelper.cxx:704
Trk::binR
@ binR
Definition: BinningType.h:50
a
TList * a
Definition: liststreamerinfos.cxx:10
h
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Trk::binRPhi
@ binRPhi
Definition: BinningType.h:52
Trk::TrackingVolumeManipulator::setOutsideVolumeArray
static void setOutsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume >> &outsidevolarray)
protected method to set outside VolumeArray of a BoundarySurface: input:
Definition: TrackingVolumeManipulator.cxx:80
Trk::TrackingVolumeManipulator::glueVolumes
void glueVolumes(TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace) const
protected method to glue two Volumes together input:
Definition: TrackingVolumeManipulator.cxx:17
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
Trk::Volume::volumeBounds
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition: Volume.h:96
Trk::SurfaceType::Disc
@ Disc
Trk::cylinderCover
@ cylinderCover
Definition: BoundarySurfaceFace.h:38
Trk::SurfaceType::Cylinder
@ Cylinder
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
Trk::tubeOuterCover
@ tubeOuterCover
Definition: BoundarySurfaceFace.h:40
Trk::TrackingVolumeHelper::m_endcapLayerBinsR
Gaudi::Property< int > m_endcapLayerBinsR
material bins in R
Definition: TrackingVolumeHelper.h:233
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
Trk::tubeInnerCover
@ tubeInnerCover
Definition: BoundarySurfaceFace.h:39
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
fitman.hz
def hz
Definition: fitman.py:516
Trk::TrackingVolumeHelper::glueTrackingVolumes
void glueTrackingVolumes(TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace, bool buildBoundaryLayer=false) const override
Method to glue two Volumes together input:
Definition: TrackingVolumeHelper.cxx:70
Trk::TrackingVolumeHelper::setOutsideTrackingVolumeArray
void setOutsideTrackingVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, std::shared_ptr< BinnedArray< TrackingVolume >> outsidevolarray) const override
protected method to set outside VolumeArray of a BoundarySurface: input:
Definition: TrackingVolumeHelper.cxx:774
Trk::TrackingVolumeHelper::m_trackingVolumeArrayCreator
ToolHandle< ITrackingVolumeArrayCreator > m_trackingVolumeArrayCreator
Helper Tool to create TrackingVolume.
Definition: TrackingVolumeHelper.h:228
Trk::TrackingVolumeManipulator::TrackingVolumeManipulator
TrackingVolumeManipulator()
constructor
Definition: TrackingVolumeManipulator.h:35
fitman.k
k
Definition: fitman.py:528
Amg::getTranslate3D
Amg::Transform3D getTranslate3D(const double X, const double Y, const double Z)
: Returns a shift transformation along an arbitrary axis
Definition: GeoPrimitivesHelpers.h:289
Trk::binPhi
@ binPhi
Definition: BinningType.h:51