ATLAS Offline Software
TrackingVolumeHelper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrackingVolumeHelper.cxx, (c) ATLAS Detector software
8 
9 // Trk include
15 #include "TrkSurfaces/Surface.h"
18 #include "TrkSurfaces/DiscBounds.h"
23 #include "TrkGeometry/DiscLayer.h"
29 // Amg
31 
32 #include <memory>
33 #include <stdexcept>
34 
35 namespace {
36  template <class Obj>
37  std::vector<Obj*> toRawVec(const std::vector<std::shared_ptr<Obj>>& in) {
38 
39  std::vector<Obj*> out{};
40  out.reserve(in.size());
41  for (const std::shared_ptr<Obj>& obj : in) {
42  out.emplace_back(obj.get());
43  }
44  return out;
45  }
46 }
47 
48 namespace Trk {
49 // constructor
50 TrackingVolumeHelper::TrackingVolumeHelper(const std::string& t, const std::string& n, const IInterface* p)
51 : AthAlgTool(t,n,p),
53  declareInterface<ITrackingVolumeHelper>(this);
54 }
55 // destructor
57 
58 
59 // the interface methods
61 
62  ATH_MSG_DEBUG( "initialize() " );
63  ATH_CHECK(m_layerArrayCreator.retrieve());
65  return StatusCode::SUCCESS;
66 }
67 
68 
71  BoundarySurfaceFace firstFace,
72  TrackingVolume& secondVol,
73  BoundarySurfaceFace secondFace,
74  bool buildBoundaryLayer) const
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 }
100 
103  BoundarySurfaceFace firstFace,
104  const std::vector<TrackingVolume*>& secondVolumes,
105  BoundarySurfaceFace secondFace,
106  bool buildBoundaryLayer,
107  bool boundaryFaceExchange) const
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 }
187 
188 
190 void TrackingVolumeHelper::glueTrackingVolumes(const std::vector<TrackingVolume*>& firstVolumes,
191  BoundarySurfaceFace firstFace,
192  const std::vector<TrackingVolume*>& secondVolumes,
193  BoundarySurfaceFace secondFace,
194  bool buildBoundaryLayer,
195  bool boundaryFaceExchange) const
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 }
407 
408 std::unique_ptr<TrackingVolume> TrackingVolumeHelper::glueTrackingVolumeArrays(std::shared_ptr<TrackingVolume> firstVol,
409  BoundarySurfaceFace firstFace,
410  std::shared_ptr<TrackingVolume> secondVol,
411  BoundarySurfaceFace secondFace,
412  const std::string& name) const {
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 }
553 
554 
555 
556 void TrackingVolumeHelper::fillGlueVolumes(const std::vector<std::shared_ptr<TrackingVolume>>& topLevelVolumes,
557  const std::vector<std::shared_ptr<TrackingVolume>>& envelopeFaceVolumes,
558  BoundarySurfaceFace glueFace,
559  std::vector<TrackingVolume*>& glueVols){
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 }
567 void TrackingVolumeHelper::fillGlueVolumes(const std::vector<TrackingVolume*>& topLevelVolumes,
568  const std::vector<TrackingVolume*>& envelopeFaceVolumes,
569  BoundarySurfaceFace glueFace,
570  std::vector<TrackingVolume*>& glueVols) {
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 }
592 
593 
595 void TrackingVolumeHelper::glueTrackingVolumes(const std::vector<std::shared_ptr<TrackingVolume>>& glueVols,
596  BoundarySurfaceFace firstFace,
597  BoundarySurfaceFace secondFace) const {
598  glueTrackingVolumes(::toRawVec(glueVols), firstFace, secondFace);
599 
600 }
601 void TrackingVolumeHelper::glueTrackingVolumes(const std::vector<TrackingVolume*>& glueVols,
602  BoundarySurfaceFace firstFace,
603  BoundarySurfaceFace secondFace) const {
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 }
702 
703 std::unique_ptr<LayerMaterialProperties>
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 }
745 
746 
747 
750  BoundarySurfaceFace face,
751  TrackingVolume* insidevol) const {
752  TrackingVolumeManipulator::setInsideVolume( tvol, face, insidevol );
753 }
754 
755 
758  BoundarySurfaceFace face,
759  std::shared_ptr<BinnedArray<TrackingVolume> > insidevolarray) const {
760  TrackingVolumeManipulator::setInsideVolumeArray(tvol,face,insidevolarray);
761 }
762 
763 
766  BoundarySurfaceFace face,
767  TrackingVolume* outsidevol) const {
768  ATH_MSG_VERBOSE( " -> Glue '" << outsidevol->volumeName() << "' at face " << face << " to '" << tvol.volumeName() << "'.");
769  TrackingVolumeManipulator::setOutsideVolume( tvol, face, outsidevol );
770 }
771 
772 
775  BoundarySurfaceFace face,
776  std::shared_ptr<BinnedArray<TrackingVolume> > outsidevolarray) const {
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 }
781 }
Trk::TrackingVolumeManipulator
Definition: TrackingVolumeManipulator.h:32
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:674
Trk::Surface::setMaterialLayer
void setMaterialLayer(std::shared_ptr< Trk::MaterialLayer > mlay)
set material layer
DiscBounds.h
Surface.h
Trk::binZ
@ binZ
Definition: BinningType.h:49
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:169
BinnedArray.h
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
Trk::BoundaryDiscSurface::surfaceRepresentation
virtual const Surface & surfaceRepresentation() const override final
The Surface Representation of this.
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
BinUtility.h
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
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
DiscLayer.h
M_PI
#define M_PI
Definition: ActiveFraction.h:11
Trk::closed
@ closed
Definition: BinningType.h:41
VolumeBounds.h
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
HomogeneousLayerMaterial.h
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::DiscSurface
Definition: DiscSurface.h:54
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
ITrackingVolumeArrayCreator.h
Trk::BoundarySurfaceFace
BoundarySurfaceFace
Definition: BoundarySurfaceFace.h:31
ILayerArrayCreator.h
Trk::TrackingVolumeHelper::glueTrackingVolumeArrays
std::unique_ptr< Trk::TrackingVolume > glueTrackingVolumeArrays(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)
Definition: TrackingVolumeHelper.cxx:408
takeBigger
#define takeBigger(current, test)
Definition: RobustTrackingGeometryBuilderImpl.h:44
CylinderVolumeBounds.h
Trk::BoundaryDiscSurface
Definition: BoundaryDiscSurface.h:39
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
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
TrackingVolumeHelper.h
beamspotman.n
n
Definition: beamspotman.py:729
Trk::GlueVolumesDescriptor::registerGlueVolumes
void registerGlueVolumes(BoundarySurfaceFace, std::vector< TrackingVolume * > &)
register the volumes
Definition: GlueVolumesDescriptor.cxx:28
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trk::CylinderSurface
Definition: CylinderSurface.h:55
Trk::CylinderBounds
Definition: CylinderBounds.h:46
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
Trk::TrackingVolumeHelper::~TrackingVolumeHelper
virtual ~TrackingVolumeHelper()
Destructor.
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
CylinderSurface.h
Trk::CylinderVolumeBounds::halflengthZ
double halflengthZ() const
This method returns the halflengthZ.
Definition: CylinderVolumeBounds.h:207
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:169
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::negativeFaceXY
@ negativeFaceXY
Definition: BoundarySurfaceFace.h:32
CylinderLayer.h
BinnedLayerMaterial.h
Trk::TrackingVolume::boundarySurfaces
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
Definition: TrackingVolume.cxx:809
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
Trk::BinUtility
Definition: BinUtility.h:39
Trk::CylinderVolumeBounds
Definition: CylinderVolumeBounds.h:70
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrackingVolume::volumeName
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
GlueVolumesDescriptor.h
Trk::GlueVolumesDescriptor::glueVolumes
const std::vector< TrackingVolume * > & glueVolumes(BoundarySurfaceFace)
retrieve them again
Definition: GlueVolumesDescriptor.cxx:40
Trk::Surface::bounds
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Trk::CylinderVolumeBounds::outerRadius
double outerRadius() const
This method returns the outer radius.
Definition: CylinderVolumeBounds.h:191
Trk::BoundaryCylinderSurface::surfaceRepresentation
virtual const Surface & surfaceRepresentation() const override final
The Surface Representation of this.
MaterialLayer.h
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::GlueVolumesDescriptor
Definition: GlueVolumesDescriptor.h:40
Trk::BoundaryCylinderSurface
Definition: BoundaryCylinderSurface.h:37
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
CylinderBounds.h
Trk::binR
@ binR
Definition: BinningType.h:50
TrackingVolume.h
Trk::binRPhi
@ binRPhi
Definition: BinningType.h:52
Trk::CylinderVolumeBounds::innerRadius
double innerRadius() const
This method returns the inner radius.
Definition: CylinderVolumeBounds.h:187
GeoPrimitivesHelpers.h
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
Trk::TrackingVolumeHelper::TrackingVolumeHelper
TrackingVolumeHelper(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition: TrackingVolumeHelper.cxx:50
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
Trk::SurfaceType::Disc
@ Disc
Trk::cylinderCover
@ cylinderCover
Definition: BoundarySurfaceFace.h:38
Trk::SurfaceType::Cylinder
@ Cylinder
Trk::tubeOuterCover
@ tubeOuterCover
Definition: BoundarySurfaceFace.h:40
Trk::TrackingVolumeHelper::m_endcapLayerBinsR
Gaudi::Property< int > m_endcapLayerBinsR
material bins in R
Definition: TrackingVolumeHelper.h:233
Trk::TrackingVolumeHelper::initialize
StatusCode initialize() override
AlgTool initialize method.
Definition: TrackingVolumeHelper.cxx:60
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::BinnedArray
Definition: BinnedArray.h:36
AthAlgTool
Definition: AthAlgTool.h:26
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::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:79
python.PyAthena.obj
obj
Definition: PyAthena.py:132
Trk::TrackingVolume
Definition: TrackingVolume.h:119
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::Surface::type
constexpr virtual SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
LayerMaterialProperties.h
Trk::DiscBounds
Definition: DiscBounds.h:44
Trk::CylinderBounds::halflengthZ
double halflengthZ() const
This method returns the halflengthZ.
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::CylinderBounds::r
virtual double r() const override final
This method returns the radius.
Trk::binPhi
@ binPhi
Definition: BinningType.h:51