ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
HGTD_TrackingGeometryBuilderCond Class Reference

#include <HGTD_TrackingGeometryBuilderCond.h>

Inheritance diagram for HGTD_TrackingGeometryBuilderCond:
Collaboration diagram for HGTD_TrackingGeometryBuilderCond:

Public Member Functions

 HGTD_TrackingGeometryBuilderCond (const std::string &, const std::string &, const IInterface *)
 Constructor. More...
 
virtual ~HGTD_TrackingGeometryBuilderCond ()
 Destructor. More...
 
virtual StatusCode initialize () override
 AlgTool initailize method. More...
 
virtual StatusCode finalize () override
 AlgTool finalize method. More...
 
virtual std::unique_ptr< Trk::TrackingGeometrytrackingGeometry (const EventContext &ctx, Trk::TrackingVolume *innerVol, SG::WriteCondHandle< Trk::TrackingGeometry > &whandle) const override
 TrackingGeometry Interface method. More...
 
virtual Trk::GeometrySignature geometrySignature () const override
 The unique signature. 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 > &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 (IGeometryBuilderCond, 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...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< IEnvelopeDefSvcm_enclosingEnvelopeSvc
 Service to handle the envelope definition. More...
 
ToolHandle< Trk::ILayerBuilderCondm_layerBuilder
 Helper tools for the geometry building. More...
 
ToolHandle< Trk::ITrackingVolumeCreatorm_trackingVolumeCreator
 Helper Tool to create TrackingVolumes. More...
 
bool m_indexStaticLayers
 configurations for the layer builder More...
 
bool m_buildBoundaryLayers
 create boundary layers More...
 
bool m_replaceJointBoundaries
 run with replacement of all joint boundaries
More...
 
int m_layerBinningType
 binning type for layers More...
 
unsigned int m_colorCodeConfig
 Color code for layers. 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
 

Detailed Description

Definition at line 31 of file HGTD_TrackingGeometryBuilderCond.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

◆ HGTD_TrackingGeometryBuilderCond()

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

Constructor.

Definition at line 31 of file HGTD_TrackingGeometryBuilderCond.cxx.

31  :
32  AthAlgTool(t,n,p),
33  m_enclosingEnvelopeSvc("AtlasEnvelopeDefSvc", n),
34  m_trackingVolumeCreator("Trk::CylinderVolumeCreator/CylinderVolumeCreator"),
35  m_indexStaticLayers(true),
40 {
41  declareInterface<Trk::IGeometryBuilderCond>(this);
42  // envelope definition service
43  declareProperty("EnvelopeDefinitionSvc", m_enclosingEnvelopeSvc );
44  declareProperty("LayerBuilder", m_layerBuilder);
45  declareProperty("TrackingVolumeCreator", m_trackingVolumeCreator);
46 
47  declareProperty("IndexStaticLayers", m_indexStaticLayers);
48  declareProperty("BuildBoundaryLayers", m_buildBoundaryLayers);
49  declareProperty("ReplaceAllJointBoundaries", m_replaceJointBoundaries);
50  declareProperty("LayerBinningType", m_layerBinningType);
51  declareProperty("ColorCode", m_colorCodeConfig);
52 
53 }

◆ ~HGTD_TrackingGeometryBuilderCond()

HGTD_TrackingGeometryBuilderCond::~HGTD_TrackingGeometryBuilderCond ( )
virtualdefault

Destructor.

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  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 > &  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 > &  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 > &  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::IGeometryBuilderCond::DeclareInterfaceID ( IGeometryBuilderCond  ,
,
 
)
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 > &  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

◆ finalize()

StatusCode HGTD_TrackingGeometryBuilderCond::finalize ( )
overridevirtual

AlgTool finalize method.

Definition at line 77 of file HGTD_TrackingGeometryBuilderCond.cxx.

78 {
79  ATH_MSG_INFO( "finalize() successful" );
80  return StatusCode::SUCCESS;
81 }

◆ geometrySignature()

virtual Trk::GeometrySignature HGTD_TrackingGeometryBuilderCond::geometrySignature ( ) const
inlineoverridevirtual

The unique signature.

Implements Trk::IGeometryBuilderCond.

Definition at line 57 of file HGTD_TrackingGeometryBuilderCond.h.

57 { return Trk::HGTD; }

◆ initialize()

StatusCode HGTD_TrackingGeometryBuilderCond::initialize ( )
overridevirtual

AlgTool initailize method.

Definition at line 61 of file HGTD_TrackingGeometryBuilderCond.cxx.

62 {
63  // retrieve envelope definition service
65 
66  // retrieve the layer provider
67  ATH_CHECK(m_layerBuilder.retrieve());
68 
69  // retrieve the volume creator
71 
72  ATH_MSG_INFO( "initialize() succesful" );
73  return StatusCode::SUCCESS;
74 }

◆ 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() [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  }

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

◆ trackingGeometry()

std::unique_ptr< Trk::TrackingGeometry > HGTD_TrackingGeometryBuilderCond::trackingGeometry ( const EventContext &  ctx,
Trk::TrackingVolume innerVol,
SG::WriteCondHandle< Trk::TrackingGeometry > &  whandle 
) const
overridevirtual

TrackingGeometry Interface method.

Implements Trk::IGeometryBuilderCond.

Definition at line 84 of file HGTD_TrackingGeometryBuilderCond.cxx.

89 {
90 
91  ATH_MSG_VERBOSE( "Starting to build HGTD_TrackingGeometry ..." );
92 
93  // the enclosed input volume (ID)
94  double enclosedInnerSectorHalflength = std::numeric_limits<float>::max();
95  double enclosedOuterRadius = 0.;
96  double enclosedInnerRadius = 0.;
97 
98  if (innerVol) {
99  ATH_MSG_VERBOSE( "Got Inner Detector Volume: " << innerVol->volumeName() );
100  innerVol->screenDump(msg(MSG::VERBOSE));
101 
102  // retrieve dimensions
103  const Trk::CylinderVolumeBounds* innerDetectorBounds
104  = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(innerVol->volumeBounds()));
105  if (!innerDetectorBounds) std::abort();
106 
107  enclosedInnerSectorHalflength = innerDetectorBounds->halflengthZ();
108  enclosedOuterRadius = innerDetectorBounds->outerRadius();
109  enclosedInnerRadius = innerDetectorBounds->innerRadius();
110  }
111 
112  float enclosedOuterSectorHalflength = std::numeric_limits<float>::max();
113  // for the HGTD we only need the first envelope definition
114  for (const auto & bounds : m_enclosingEnvelopeSvc->getCaloRZBoundary()) {
115  if (std::abs(bounds.second) < enclosedOuterSectorHalflength) {
116  enclosedOuterSectorHalflength = std::abs(bounds.second);
117  }
118  }
119 
120  // in case you have no inner volume you need to find the
121  // envelope extensions --> beampipe and HGTD
122  if (not innerVol) {
123  // from the beampipe envelope you get the inner z extension
124  for (const auto & bounds : m_enclosingEnvelopeSvc->getBeamPipeRZBoundary()) {
125  if (std::abs(bounds.second) < enclosedInnerSectorHalflength) {
126  enclosedInnerSectorHalflength = std::abs(bounds.second);
127  }
128  }
129  // from the calo envelope you get the outer radius
130  for (const auto & bounds : m_enclosingEnvelopeSvc->getCaloRZBoundary()) {
131  if (std::abs(bounds.second) == enclosedOuterSectorHalflength) {
132  if (bounds.first>enclosedOuterRadius)
133  enclosedOuterRadius=bounds.first;
134  }
135  }
136  }
137 
138  ATH_MSG_VERBOSE("Got Dimensions Zmin/Rmin - Zmax/Rmax: "
139  << enclosedInnerSectorHalflength << "/" << enclosedInnerRadius
140  << " - " << enclosedOuterSectorHalflength << "/"
141  << enclosedOuterRadius);
142 
143  // prepare the layers
144  std::vector<Trk::Layer*> negativeLayers;
145  std::vector<Trk::Layer*> positiveLayers;
146 
147  std::unique_ptr<const std::vector<Trk::DiscLayer*> > discLayers = m_layerBuilder->discLayers(ctx, whandle);
148 
149  float maxZ = -9999.;
150  float minZ = 9999.;
151  float thickness = -9999;
152 
153  // loop and fill positive and negative Layers
154  if (discLayers && !discLayers->empty()){
155  // loop over and push into the return/cache vector
156  for (const auto & discLayer : (*discLayers) ){
157  // get the center posituion
158  float zpos = discLayer->surfaceRepresentation().center().z();
159  if (zpos > 0) {
160  positiveLayers.push_back(discLayer);
161  // only saving layer info for positive side
162  // as the detector is simmetric
163  maxZ = std::max(maxZ, zpos);
164  minZ = std::min(minZ, zpos);
165  thickness = std::max(thickness, float(discLayer->thickness()));
166  }
167  else {
168  negativeLayers.push_back(discLayer);
169  }
170  }
171  }
172 
173  float envelope = thickness*0.5;
174  float minZ_HGTD = minZ-envelope;
175  float maxZ_HGTD = maxZ+envelope;
176  float maxZ_HGTDEnclosure = enclosedOuterSectorHalflength;
177 
178  // dummy material property
179  auto materialProperties = std::make_unique<Trk::Material>();
180 
181  float zGapPos = 0.5*(minZ_HGTD+enclosedInnerSectorHalflength);
182  float gapHalfLengthZ = 0.5*(minZ_HGTD-enclosedInnerSectorHalflength);
183 
184  // create the gap between the ID and the HGTD endcap volumes
185  Amg::Transform3D* negativeInnerGapTrans = new Amg::Transform3D(Amg::Translation3D(Amg::Vector3D(0.,0.,-zGapPos)));
186  Trk::CylinderVolumeBounds* negativeInnerGapBounds = new Trk::CylinderVolumeBounds(enclosedInnerRadius,enclosedOuterRadius,gapHalfLengthZ);
187 
188  Trk::TrackingVolume * negativeInnerGapVolume =
189  new Trk::TrackingVolume(negativeInnerGapTrans,
190  negativeInnerGapBounds,
191  *materialProperties,
192  nullptr, nullptr,
193  m_layerBuilder->identification()+"::NegativeInnerGap");
194 
195  Amg::Transform3D* positiveInnerGapTrans = new Amg::Transform3D(Amg::Translation3D(Amg::Vector3D(0.,0.,zGapPos)));
196  Trk::CylinderVolumeBounds* positiveInnerGapBounds = new Trk::CylinderVolumeBounds(enclosedInnerRadius,enclosedOuterRadius,gapHalfLengthZ);
197 
198  Trk::TrackingVolume * positiveInnerGapVolume =
199  new Trk::TrackingVolume(positiveInnerGapTrans,
200  positiveInnerGapBounds,
201  *materialProperties,
202  nullptr, nullptr,
203  m_layerBuilder->identification()+"::PositiveInnerGap");
204 
205  // create dummy inner volume if not built already
206  if (not innerVol) {
207  Trk::CylinderVolumeBounds* idBounds = new Trk::CylinderVolumeBounds(enclosedInnerRadius,
208  enclosedInnerSectorHalflength);
209  Amg::Transform3D* idTr = new Amg::Transform3D(Trk::s_idTransform);
210  // dummy objects
211  Trk::LayerArray* dummyLayers = nullptr;
212  Trk::TrackingVolumeArray* dummyVolumes = nullptr;
213 
214  innerVol = new Trk::TrackingVolume(idTr, idBounds, *materialProperties,
215  dummyLayers, dummyVolumes,
216  "HGTD::GapVolumes::DummyID");
217  }
218 
219  std::vector<Trk::TrackingVolume*> inBufferVolumes;
220  inBufferVolumes.push_back(negativeInnerGapVolume);
221  inBufferVolumes.push_back(innerVol);
222  inBufferVolumes.push_back(positiveInnerGapVolume);
223 
224  Trk::TrackingVolume* inDetEnclosed =
225  m_trackingVolumeCreator->createContainerTrackingVolume(inBufferVolumes,
226  *materialProperties,
227  "HGTD::Container::EnclosedInnerDetector");
228 
229  // create the tracking volumes
230  // create the three volumes
231  Trk::TrackingVolume* negativeVolume =
232  m_trackingVolumeCreator->createTrackingVolume(negativeLayers,
233  *materialProperties,
234  enclosedInnerRadius, enclosedOuterRadius,
235  -maxZ_HGTD, -minZ_HGTD,
236  m_layerBuilder->identification()+"::NegativeEndcap",
238 
239 
240  Trk::TrackingVolume* positiveVolume =
241  m_trackingVolumeCreator->createTrackingVolume(positiveLayers,
242  *materialProperties,
243  enclosedInnerRadius, enclosedOuterRadius,
244  minZ_HGTD, maxZ_HGTD,
245  m_layerBuilder->identification()+"::PositiveEndcap",
247 
248  // the base volumes have been created
249  ATH_MSG_VERBOSE('\t' << '\t'<< "Volumes have been created, now pack them into a triple.");
250  negativeVolume->registerColorCode(m_colorCodeConfig);
251  inDetEnclosed->registerColorCode(m_colorCodeConfig);
252  positiveVolume->registerColorCode(m_colorCodeConfig);
253 
254  // pack them together
255  std::vector<Trk::TrackingVolume*> tripleVolumes;
256  tripleVolumes.push_back(negativeVolume);
257  tripleVolumes.push_back(inDetEnclosed);
258  tripleVolumes.push_back(positiveVolume);
259 
260  // create the tiple container
261  Trk::TrackingVolume* tripleContainer =
262  m_trackingVolumeCreator->createContainerTrackingVolume(tripleVolumes,
263  *materialProperties,
264  "HGTD::Containers::" + m_layerBuilder->identification(),
267 
268  ATH_MSG_VERBOSE( '\t' << '\t'<< "Created container volume with bounds: " << tripleContainer->volumeBounds() );
269 
270  // finally create the two endplates: negative
271  Trk::TrackingVolume* negativeEnclosure = m_trackingVolumeCreator->createGapTrackingVolume(
272  *materialProperties,
273  enclosedInnerRadius,
274  enclosedOuterRadius,
275  -maxZ_HGTDEnclosure,
276  -maxZ_HGTD,
277  1,
278  false,
279  "HGTD::Gaps::NegativeEnclosure" + m_layerBuilder->identification());
280 
281  // finally create the two endplates: positive
282  Trk::TrackingVolume* positiveEnclosure = m_trackingVolumeCreator->createGapTrackingVolume(
283  *materialProperties,
284  enclosedInnerRadius,
285  enclosedOuterRadius,
286  maxZ_HGTD,
287  maxZ_HGTDEnclosure,
288  1,
289  false,
290  "HGTD::Gaps::PositiveEnclosure" + m_layerBuilder->identification());
291  // and the final tracking volume
292  std::vector<Trk::TrackingVolume*> enclosedVolumes;
293  enclosedVolumes.push_back(negativeEnclosure);
294  enclosedVolumes.push_back(tripleContainer);
295  enclosedVolumes.push_back(positiveEnclosure);
296 
297  Trk::TrackingVolume* enclosedDetector =
298  m_trackingVolumeCreator->createContainerTrackingVolume(enclosedVolumes,
299  *materialProperties,
300  "HGTD::Detectors::"+m_layerBuilder->identification(),
303 
304  ATH_MSG_VERBOSE( '\t' << '\t'<< "Created enclosed HGTD volume with bounds: " << enclosedDetector->volumeBounds() );
305 
306  // create the TrackingGeometry ------------------------------------------------------
307  auto hgtdTrackingGeometry = std::make_unique<Trk::TrackingGeometry>(enclosedDetector);
308 
309  if (m_indexStaticLayers and hgtdTrackingGeometry)
310  hgtdTrackingGeometry->indexStaticLayers( geometrySignature() );
311  if (msgLvl(MSG::VERBOSE) && hgtdTrackingGeometry)
312  hgtdTrackingGeometry->printVolumeHierarchy(msg(MSG::VERBOSE));
313 
314  return hgtdTrackingGeometry;
315 }

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

bool HGTD_TrackingGeometryBuilderCond::m_buildBoundaryLayers
private

create boundary layers

Definition at line 71 of file HGTD_TrackingGeometryBuilderCond.h.

◆ m_colorCodeConfig

unsigned int HGTD_TrackingGeometryBuilderCond::m_colorCodeConfig
private

Color code for layers.

Definition at line 77 of file HGTD_TrackingGeometryBuilderCond.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_enclosingEnvelopeSvc

ServiceHandle<IEnvelopeDefSvc> HGTD_TrackingGeometryBuilderCond::m_enclosingEnvelopeSvc
private

Service to handle the envelope definition.

Definition at line 61 of file HGTD_TrackingGeometryBuilderCond.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_indexStaticLayers

bool HGTD_TrackingGeometryBuilderCond::m_indexStaticLayers
private

configurations for the layer builder

forces robust indexing for layers

Definition at line 69 of file HGTD_TrackingGeometryBuilderCond.h.

◆ m_layerBinningType

int HGTD_TrackingGeometryBuilderCond::m_layerBinningType
private

binning type for layers

Definition at line 75 of file HGTD_TrackingGeometryBuilderCond.h.

◆ m_layerBuilder

ToolHandle<Trk::ILayerBuilderCond> HGTD_TrackingGeometryBuilderCond::m_layerBuilder
private

Helper tools for the geometry building.

Definition at line 63 of file HGTD_TrackingGeometryBuilderCond.h.

◆ m_replaceJointBoundaries

bool HGTD_TrackingGeometryBuilderCond::m_replaceJointBoundaries
private

run with replacement of all joint boundaries

Definition at line 73 of file HGTD_TrackingGeometryBuilderCond.h.

◆ m_trackingVolumeCreator

ToolHandle<Trk::ITrackingVolumeCreator> HGTD_TrackingGeometryBuilderCond::m_trackingVolumeCreator
private

Helper Tool to create TrackingVolumes.

Definition at line 65 of file HGTD_TrackingGeometryBuilderCond.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.


The documentation for this class was generated from the following files:
HGTD_TrackingGeometryBuilderCond::m_colorCodeConfig
unsigned int m_colorCodeConfig
Color code for layers.
Definition: HGTD_TrackingGeometryBuilderCond.h:77
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
HGTD_TrackingGeometryBuilderCond::m_replaceJointBoundaries
bool m_replaceJointBoundaries
run with replacement of all joint boundaries
Definition: HGTD_TrackingGeometryBuilderCond.h:73
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
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
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::BinningType
BinningType
Definition: BinningType.h:31
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::TrackingVolume::registerColorCode
void registerColorCode(unsigned int icolor)
Register the color code.
HGTD_TrackingGeometryBuilderCond::m_indexStaticLayers
bool m_indexStaticLayers
configurations for the layer builder
Definition: HGTD_TrackingGeometryBuilderCond.h:69
HGTD_TrackingGeometryBuilderCond::m_buildBoundaryLayers
bool m_buildBoundaryLayers
create boundary layers
Definition: HGTD_TrackingGeometryBuilderCond.h:71
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
beamspotman.n
n
Definition: beamspotman.py:731
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::CylinderVolumeBounds::halflengthZ
double halflengthZ() const
This method returns the halflengthZ.
Definition: CylinderVolumeBounds.h:207
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
HGTD_TrackingGeometryBuilderCond::m_layerBinningType
int m_layerBinningType
binning type for layers
Definition: HGTD_TrackingGeometryBuilderCond.h:75
Trk::HGTD
@ HGTD
Definition: GeometrySignature.h:31
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
HGTD_TrackingGeometryBuilderCond::m_trackingVolumeCreator
ToolHandle< Trk::ITrackingVolumeCreator > m_trackingVolumeCreator
Helper Tool to create TrackingVolumes.
Definition: HGTD_TrackingGeometryBuilderCond.h:65
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
HGTD_TrackingGeometryBuilderCond::m_enclosingEnvelopeSvc
ServiceHandle< IEnvelopeDefSvc > m_enclosingEnvelopeSvc
Service to handle the envelope definition.
Definition: HGTD_TrackingGeometryBuilderCond.h:61
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
HGTD_TrackingGeometryBuilderCond::geometrySignature
virtual Trk::GeometrySignature geometrySignature() const override
The unique signature.
Definition: HGTD_TrackingGeometryBuilderCond.h:57
Trk::CylinderVolumeBounds
Definition: CylinderVolumeBounds.h:70
Trk::TrackingVolume::volumeName
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::CylinderVolumeBounds::outerRadius
double outerRadius() const
This method returns the outer radius.
Definition: CylinderVolumeBounds.h:191
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Trk::CylinderVolumeBounds::innerRadius
double innerRadius() const
This method returns the inner radius.
Definition: CylinderVolumeBounds.h:187
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Trk::Volume::volumeBounds
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition: Volume.h:97
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Trk::BinnedArray
Definition: BinnedArray.h:38
Trk::TrackingVolume
Definition: TrackingVolume.h:121
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
HGTD_TrackingGeometryBuilderCond::m_layerBuilder
ToolHandle< Trk::ILayerBuilderCond > m_layerBuilder
Helper tools for the geometry building.
Definition: HGTD_TrackingGeometryBuilderCond.h:63
fitman.k
k
Definition: fitman.py:528
Trk::TrackingVolume::screenDump
void screenDump(MsgStream &msg) const
Definition: TrackingVolume.cxx:1506