ATLAS Offline Software
StagedTrackingGeometryBuilderImpl.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // InDet
9 // Trk Geometry stuff
16 #include "TrkGeometry/Material.h"
17 #include "TrkGeometry/Layer.h"
19 #include "TrkGeometry/DiscLayer.h"
20 #include "TrkSurfaces/DiscBounds.h"
21 //Athena
24 //Gaudi
25 #include "GaudiKernel/SystemOfUnits.h"
26 #include <iterator> //std::advance
27 
28 // constructor
29 InDet::StagedTrackingGeometryBuilderImpl::StagedTrackingGeometryBuilderImpl(const std::string& t, const std::string& n, const IInterface* p) :
30  AthAlgTool(t,n,p),
31  Trk::TrackingVolumeManipulator()
32 {
33 }
34 
35 
36 // Athena standard methods
37 // initialize
39 {
40 
41  // retrieve envelope definition service --------------------------------------------------
43 
44  // Retrieve the tracking volume creator -------------------------------------------------
46  ATH_MSG_DEBUG( "Retrieved tool " << m_trackingVolumeCreator );
47 
48  // Retrieve the layer array creator ----------------------------------------------------
49  ATH_CHECK(m_layerArrayCreator.retrieve());
50  ATH_MSG_INFO( "Retrieved tool " << m_layerArrayCreator );
51 
52  // Dummy MaterialProerties
53  m_materialProperties.set(std::make_unique<Trk::Material>());
54 
55  ATH_MSG_INFO( "initialize() succesful" );
56 
57  return StatusCode::SUCCESS;
58 }
59 
60 
61 // finalize
63 {
64  ATH_MSG_INFO( "finalize() successful" );
65  return StatusCode::SUCCESS;
66 }
67 
68 std::unique_ptr<Trk::TrackingGeometry>
70  std::vector<InDet::LayerSetup>& layerSetups,
71  double maximumLayerExtendZ,
72  double maximumLayerRadius,
73  double envelopeVolumeHalfZ,
74  double envelopeVolumeRadius) const
75 {
76  // create a volume cache for:
77  // - ID volume, i.e. those that can be stacked into the overall container
78  std::vector<Trk::TrackingVolume*> idVolumes;
79  // create a layer setup cache for flushing when necessary
80  std::vector<InDet::LayerSetup> layerSetupCache;
81 
82  // we only need to take care of the last flush radius
83  double lastFlushRadius = 0.;
84 
85  // (I) PARSE THE LAYERS FOR OVERALL DIMENSIONS
86  // -------------------------------------------------------------
88  "[ STEP 2 ] : Looping through the layer setups and flush them into the "
89  "ID detector volume vector.");
90  for (auto& lSetup : layerSetups) {
91  // screen output
92  ATH_MSG_DEBUG("[ Layer setup: '"
93  << lSetup.identification
94  << "' ] being processed, current cache size is "
95  << layerSetupCache.size());
97  " -> estimated dimensions for this layer setup are");
98  ATH_MSG_VERBOSE(" -> central sector rMin / rMax / zMax : "
99  << lSetup.minRadiusCenter << " / "
100  << lSetup.maxRadiusCenter << " / "
101  << lSetup.zExtendCenter);
102  // now check what is in the cache
103  // [a] nothing in the cache or new setup is compatible (in this case
104  // sectorZ are updated in all setups)
105  if (layerSetupCache.empty() || setupFitsCache(lSetup, layerSetupCache)) {
107  " -> cache is empty or new sector fits cache setup - add "
108  "this one to the cache.");
109  } else {
110  // [b] cache is not empty - let's see what is going on:
112  " -> new sector does not fit the current cache specs -> "
113  "flushing the cache.");
114  // create the outer boundary
115  double flushRadius =
116  0.5 *
117  (layerSetupCache[layerSetupCache.size() - 1].rMax + lSetup.rMin);
118  // create a flush volume - clears the cache
120  layerSetupCache, lastFlushRadius, flushRadius, maximumLayerExtendZ);
121  // stuff it into the idVolume
122  idVolumes.push_back(fVolume);
123  // remember the last flush radius
124  lastFlushRadius = flushRadius;
125  }
126  // in any case, this setup needs to go into the cache
127  layerSetupCache.push_back(lSetup);
128  }
129 
130  // check if the cache is empty
131  if (!layerSetupCache.empty()) {
133  "[ STEP 3 ] : Flush the remaining cache into the ID detector volume "
134  "vector.");
135  // set the maximum radius to the last layer radius
136  double flushRadius = 0.5 * (maximumLayerRadius + envelopeVolumeRadius);
138  layerSetupCache, lastFlushRadius, flushRadius, maximumLayerExtendZ);
139  // push it into the vector
140  idVolumes.push_back(fVolume);
141  lastFlushRadius = flushRadius;
142  }
143 
144  ATH_MSG_DEBUG("[ STEP 4 ] : Create the ID detector volumes");
145  // build the central enclosure first
146  Trk::TrackingVolume* centralEnclosure =
147  m_trackingVolumeCreator->createGapTrackingVolume(
148  *m_materialProperties, lastFlushRadius, envelopeVolumeRadius,
149  -maximumLayerExtendZ, maximumLayerExtendZ, 1, true,
150  m_namespace + "Gaps::CentralEnclosure");
151  idVolumes.push_back(centralEnclosure);
152  // now lets create the container
153  std::string volumeName = m_namespace + "Detectors::Container";
154  Trk::TrackingVolume* idContainer =
155  m_trackingVolumeCreator->createContainerTrackingVolume(
156  idVolumes, *m_materialProperties, volumeName, m_buildBoundaryLayers,
158  // finally create the two endplates: negative
159  Trk::TrackingVolume* negativeEnclosure =
160  m_trackingVolumeCreator->createGapTrackingVolume(
161  *m_materialProperties, 0., envelopeVolumeRadius,
162  -envelopeVolumeHalfZ, -maximumLayerExtendZ, 1, false,
163  m_namespace + "Gaps::NegativeEnclosure");
164 
165  // finally create the two endplates: positive
166  Trk::TrackingVolume* positiveEnclosure =
167  m_trackingVolumeCreator->createGapTrackingVolume(
168  *m_materialProperties, 0., envelopeVolumeRadius,
169  maximumLayerExtendZ, envelopeVolumeHalfZ, 1, false,
170  m_namespace + "Gaps::PositiveEnclosure");
171  // and the final tracking volume
172  std::vector<Trk::TrackingVolume*> enclosedVolumes;
173  enclosedVolumes.push_back(negativeEnclosure);
174  enclosedVolumes.push_back(idContainer);
175  enclosedVolumes.push_back(positiveEnclosure);
176 
177  Trk::TrackingVolume* enclosedDetector =
178  m_trackingVolumeCreator->createContainerTrackingVolume(
179  enclosedVolumes, *m_materialProperties, m_exitVolume,
181 
182  // create the TrackingGeometry
183  // ------------------------------------------------------
184  auto trackingGeometry =
185  std::make_unique<Trk::TrackingGeometry>(enclosedDetector);
186 
187  if (m_indexStaticLayers) {
188  ATH_MSG_VERBOSE("Re-index the static layers ...");
189  trackingGeometry->indexStaticLayers(Trk::Global);
190  }
191  return trackingGeometry;
192 }
194 void
196  const std::vector<Trk::Layer*>& layers,
197  double& rMin,
198  double& rMax,
199  double& zMin,
200  double& zMax) const
201 {
202  // parse through the layers and estimate
203  for (auto *const layer : layers){
204  // the thickness of the layer needs to be taken into account
205  double thickness = layer->thickness();
206  // get the center
207  const Amg::Vector3D& center = layer->surfaceRepresentation().center();
208  // check if it is a cylinder layer
209  const Trk::CylinderLayer* cLayer = dynamic_cast<const Trk::CylinderLayer*>(layer);
210  if (cLayer){
211  // now we have access to all the information
212  double rMinC = cLayer->surfaceRepresentation().bounds().r()-0.5*thickness-m_layerEnvelopeCover;
213  double rMaxC = cLayer->surfaceRepresentation().bounds().r()+0.5*thickness+m_layerEnvelopeCover;
214  double hZ = cLayer->surfaceRepresentation().bounds().halflengthZ();
215  takeSmaller(rMin,rMinC);
216  takeBigger(rMax,rMaxC);
217  takeSmaller(zMin,center.z()-hZ);
218  takeBigger(zMax,center.z()+hZ);
219  }
220  // proceed further if it is a Disc layer
221  const Trk::DiscBounds* dBounds = dynamic_cast<const Trk::DiscBounds*>(&(layer->surfaceRepresentation().bounds()));
222  if (dBounds){
223  // now we have access to all the information
224  double rMinD =dBounds->rMin();
225  double rMaxD =dBounds->rMax();
226  double zMinD = center.z()-0.5*thickness-m_layerEnvelopeCover;
227  double zMaxD = center.z()+0.5*thickness+m_layerEnvelopeCover;
228  takeSmaller(rMin,rMinD);
229  takeBigger(rMax,rMaxD);
230  takeSmaller(zMin,zMinD);
231  takeBigger(zMax,zMaxD);
232  }
233  }
234 }
235 
236 
237 bool InDet::StagedTrackingGeometryBuilderImpl::ringLayout(const std::vector<Trk::Layer*>& layers, std::vector<double>& rmins, std::vector<double>& rmaxs) const {
238  // get the maximum extent in z
239  std::vector<std::pair<double,double>> radii;
240  ATH_MSG_DEBUG("Checking for Ring layout ... ");
241  for (auto *const ring : layers) {
242  // Surface
243  const Trk::Surface& ringSurface = ring->surfaceRepresentation();
244  const Trk::DiscBounds* ringBounds = dynamic_cast<const Trk::DiscBounds*>(&(ringSurface.bounds()));
245  if (ringBounds){
246  // get the main parameters
247  double zpos = ringSurface.center().z();
248  double rMin = ringBounds->rMin();
249  double rMax = ringBounds->rMax();
250  // take and check the couple rmin/rmax
251  checkForInsert(rMin, rMax, radii);
252  ATH_MSG_DEBUG(" -> Ring at z-position " << zpos << " - with rMin/rMax = " << rMin << "/" << rMax );
253  }
254  }
255 
256  // you need a post processing of the (rmin,rmax) in order to fit z-overlapping disks in the same ring
257  std::vector<std::pair<double,double>> tmpradii;
258 
259  for (auto& rs: radii) {
260  bool found = false;
261  for (auto& tmprs: tmpradii) {
262  if ((rs.first<tmprs.second and rs.second>tmprs.first) ) {
263  tmprs.first = std::min(tmprs.first ,rs.first );
264  tmprs.second = std::max(tmprs.second,rs.second);
265  found = true;
266  break;
267  }
268  }
269  if (found) continue;
270  tmpradii.push_back(rs);
271  }
272 
273  // now you fill rmin and rmax
274  rmins.clear(); rmaxs.clear();
275  for (auto& r: tmpradii) {
276  rmins.push_back(r.first);
277  rmaxs.push_back(r.second);
278  }
279 
280  //add rmin and rmax
281  return (rmins.size() > 1 );
282 }
283 
286  const std::vector<Trk::Layer*>& layers,
287  double innerRadius,
288  double& outerRadius,
289  double zMin,
290  double zMax,
291  const std::string& volumeName,
292  Trk::BinningType binningType,
293  bool doAdjustOuterRadius) const
294 {
295 
296  // first loop - this is for diagnostics for the radii
297  std::vector<double> ringRmins;
298  std::vector<double> ringRmaxa;
299  if (m_checkForRingLayout && ringLayout(layers,ringRmins, ringRmaxa)){
300  ATH_MSG_INFO("Ring layout is present for volume '" << volumeName << "' dealing with it.");
301  // create the vector for the sub volumes
302  std::vector<Trk::TrackingVolume* > ringVolumes;
303  std::vector<Trk::TrackingVolume* > const_ringVolumes;
304 
305  // now sort the necessary layers --- for the sub volumes
306  std::vector< std::vector<Trk::Layer*> > groupedDiscs(ringRmins.size(), std::vector<Trk::Layer*>() );
307  // second loop over the rings
308  for (auto *ring : layers){
309  // Surface
310  const Trk::Surface& ringSurface = ring->surfaceRepresentation();
311  const Trk::DiscBounds* ringBounds = dynamic_cast<const Trk::DiscBounds*>(&(ringSurface.bounds()));
312  if (ringBounds){
313  // get the main parameters
314  double rMax = ringBounds->rMax();
315  size_t rPos = 0;
316  // fill into the right group
317  for (auto& rm : ringRmaxa){
318  if (rMax < rm+m_ringTolerance) break;
319  ++rPos;
320  }
321  // fill it it
322  Trk::DiscLayer* dring = dynamic_cast<Trk::DiscLayer*>(ring);
323  if (dring) groupedDiscs[rPos].push_back(dring);
324  }
325  }
326  // layer merging may be needed
327  std::vector< std::vector<Trk::Layer*> > mergedLayers;
328  std::vector< float > mergedRmax;
329  std::vector< std::vector< int > > merge;
330  std::vector<int> laySet(1,0); merge.push_back(laySet);
331  double rCurr = ringRmaxa[0];
332  mergedRmax.push_back(rCurr);
333  for (int idset = 1; idset < int(groupedDiscs.size()); idset++){
334  if (ringRmins[idset]<=rCurr + m_ringTolerance) {
335  merge.back().push_back(idset);
336  if (ringRmaxa[idset]>mergedRmax.back()) mergedRmax.back()=ringRmaxa[idset];
337  } else {
338  merge.emplace_back(1,idset);
339  mergedRmax.push_back(ringRmaxa[idset]);
340  }
341  rCurr = ringRmaxa[idset];
342  }
343  for ( const auto& layset : merge ) {
344  std::vector<Trk::Layer*> ringSet;
345  for ( const auto& lay : layset ) {
346  for ( auto *ring : groupedDiscs[lay]) {
347  float zPos = ring->surfaceRepresentation().center().z();
348  if (ringSet.empty() || zPos>ringSet.back()->surfaceRepresentation().center().z()) ringSet.push_back(ring);
349  else {
350  std::vector<Trk::Layer*>::iterator lit = ringSet.begin();
351  while (lit!=ringSet.end() && zPos>(*lit)->surfaceRepresentation().center().z()) ++lit;
352  ringSet.insert(lit,ring);
353  }
354  }
355  }
356  // rings ordered in z : resolve overlap
357  mergedLayers.push_back(checkZoverlap(ringSet));
358  }
359  // we are now grouped in cylinder rings per volume
360  for (int idset = 0; idset < int(mergedLayers.size()); idset++){
361  // always keep the boundaries in mind for the radial extend
362  double crmin = idset ? mergedRmax[idset-1]+m_layerEnvelopeCover : innerRadius;
363  double crmax = mergedRmax[idset]+m_layerEnvelopeCover;
364  if(idset==int(mergedLayers.size())-1 && !doAdjustOuterRadius) crmax = outerRadius;
365  // now create the sub volume
366  std::string ringVolumeName = volumeName+"Ring"+std::to_string(idset);
367  Trk::TrackingVolume* ringVolume =
368  m_trackingVolumeCreator->createTrackingVolume(mergedLayers[idset],
370  crmin,
371  crmax,
372  zMin,
373  zMax,
374  ringVolumeName,
375  binningType);
376  // push back into the vectors
377  ringVolumes.push_back(ringVolume);
378  const_ringVolumes.push_back(ringVolume);
379  }
380  // set the outer radius
381  if(doAdjustOuterRadius) outerRadius = ringRmaxa[ringRmaxa.size()-1]+m_layerEnvelopeCover;
382  //
383  ATH_MSG_INFO(" -> adjusting the outer radius to the last ring at " << outerRadius );
384  ATH_MSG_INFO(" -> created " << ringVolumes.size() << " ring volumes for Volume '" << volumeName << "'.");
385  // create the tiple container
386  if (ringVolumes.size()==1)
387  return ringVolumes.at(0);
388  else
389  return m_trackingVolumeCreator->createContainerTrackingVolume(const_ringVolumes,
391  volumeName,
394  } else
395  return m_trackingVolumeCreator->createTrackingVolume(layers,
397  innerRadius,outerRadius,
398  zMin,zMax,
399  volumeName,
400  binningType);
401 }
402 
403 
405  const std::vector<Trk::TrackingVolume*>& negVolumes,
406  const std::vector<Trk::TrackingVolume*>& centralVolumes,
407  const std::vector<Trk::TrackingVolume*>& posVolumes,
408  const std::string& baseName) const
409 {
410  ATH_MSG_VERBOSE( '\t' << '\t'<< "Pack provided Volumes from '" << baseName << "' triple into a container volume. " );
411 
412  unsigned int negVolSize = negVolumes.size();
413  unsigned int cenVolSize = centralVolumes.size();
414  unsigned int posVolSize = posVolumes.size();
415 
416 
417 
418  // create the strings
419  std::string volumeBase = m_namespace+"Containers::"+baseName;
420 
421  Trk::TrackingVolume* negativeVolume = (negVolSize > 1) ?
422  m_trackingVolumeCreator->createContainerTrackingVolume(negVolumes,
424  volumeBase+"::NegativeSector",
427  (negVolSize ? negVolumes[0] : nullptr);
428  Trk::TrackingVolume* centralVolume = (cenVolSize > 1) ?
429  m_trackingVolumeCreator->createContainerTrackingVolume(centralVolumes,
431  volumeBase+"::CentralSector",
434  (cenVolSize ? centralVolumes[0] : nullptr) ;
435 
436  Trk::TrackingVolume* positiveVolume = ( posVolSize > 1) ?
437  m_trackingVolumeCreator->createContainerTrackingVolume(posVolumes,
439  volumeBase+"::PositiveSector",
442  (posVolSize ? posVolumes[0] : nullptr);
443 
444  if (!negativeVolume && !positiveVolume){
445  ATH_MSG_DEBUG( "No negative/positive sector given - no packing needed, returning central container!" );
446  return centralVolume;
447  }
448  // pack them together
449  std::vector<Trk::TrackingVolume*> tripleVolumes;
450  if (negativeVolume) tripleVolumes.push_back(negativeVolume);
451  if (centralVolume) tripleVolumes.push_back(centralVolume);
452  if (positiveVolume) tripleVolumes.push_back(positiveVolume);
453  // create the tiple container
454  Trk::TrackingVolume* tripleContainer =
455  m_trackingVolumeCreator->createContainerTrackingVolume(tripleVolumes,
457  volumeBase,
460  return tripleContainer;
461 }
462 
463 
466 (InDet::LayerSetup& layerSetup,
467  double rMin,
468  double& rMax,
469  double zMax,
470  double zPosCentral) const
471 {
472 
473  ATH_MSG_VERBOSE( '\t' << '\t'<< "Pack provided Layers from '" << layerSetup.identification << "' triple into a container volume. " );
474 
475  // create the strings
476  std::string volumeBase = m_namespace+"Detectors::"+layerSetup.identification;
477 
478  Trk::TrackingVolume* negativeVolume =
480  rMin,
481  rMax,
482  -zMax,
483  -zPosCentral,
484  volumeBase + "::NegativeEndcap",
485  (Trk::BinningType)layerSetup.binningEndcap,
486  false);
487 
488  Trk::TrackingVolume* centralVolume =
489  m_trackingVolumeCreator->createTrackingVolume(
490  layerSetup.centralLayers,
492  rMin,
493  rMax,
494  -zPosCentral,
495  zPosCentral,
496  volumeBase + "::Barrel",
497  (Trk::BinningType)layerSetup.binningCenter);
498 
499  Trk::TrackingVolume* positiveVolume =
501  rMin,
502  rMax,
503  zPosCentral,
504  zMax,
505  volumeBase + "::PositiveEndcap",
506  (Trk::BinningType)layerSetup.binningEndcap,
507  false);
508 
509  // the base volumes have been created
511  '\t' << '\t' << "Volumes have been created, now pack them into a triple.");
512  // registerColorCode
513  negativeVolume->registerColorCode(layerSetup.colorCode);
514  centralVolume->registerColorCode(layerSetup.colorCode);
515  positiveVolume->registerColorCode(layerSetup.colorCode);
516 
517  // pack them together
518  std::vector<Trk::TrackingVolume*> tripleVolumes;
519  tripleVolumes.push_back(negativeVolume);
520  tripleVolumes.push_back(centralVolume);
521  tripleVolumes.push_back(positiveVolume);
522 
523  // create the tiple container
524  Trk::TrackingVolume* tripleContainer =
525  m_trackingVolumeCreator->createContainerTrackingVolume(
526  tripleVolumes,
528  volumeBase,
531 
532  ATH_MSG_VERBOSE('\t' << '\t' << "Created container volume with bounds: "
533  << tripleContainer->volumeBounds());
534 
535  return tripleContainer;
536 }
537 
538 
542  const std::string& idName,
543  size_t ilS,
544  const std::vector<Trk::Layer*>& negLayers,
545  const std::vector<Trk::Layer*>& cenLayers,
546  const std::vector<Trk::Layer*>& posLayers,
547  double maxR,
548  double maxZ) const
549 {
550  // prepare the dimensions
551  double cenMinR = 10e10;
552  double cenMaxR = 0.;
553  double cenMinZ = 10e10;
554  double cenMaxZ = 0.;
555  double posMinR = 10e10;
556  double posMaxR = 0.;
557  double posMinZ = 10e10;
558  double posMaxZ = 0.;
559  // parse through the central layers first
560  estimateLayerDimensions(cenLayers, cenMinR, cenMaxR, cenMinZ, cenMaxZ);
561  // parse throught the positive layers - we assume a symmetric setup
562  estimateLayerDimensions(posLayers, posMinR, posMaxR, posMinZ, posMaxZ);
563  // reset to maxZ and and maxR if overs
564  if (posMaxZ > maxZ) {
565  ATH_MSG_WARNING("Estimated z extended of central sector bigger than maximal z extened. Resetting - may lose layers though.");
566  cenMaxZ = maxZ;
567  } else if (posMaxZ > maxZ) {
568  ATH_MSG_WARNING("Estimated z extended of endcap sector bigger than maximal z extened. Resetting - may lose layers though.");
569  posMaxZ = maxZ;
570  }
571  // reset the radial wones.
572  if (cenMaxR > maxR) {
573  ATH_MSG_WARNING("Estimated r extended of central sector bigger than maximal r extened. Resetting - may lose layers though.");
574  cenMaxR = maxR;
575  }
576  if (posMaxR > maxR) {
577  ATH_MSG_WARNING("Estimated r extended of endcap sector bigger than maximal r extened. Resetting - may lose layers though.");
578  posMaxR = maxR;
579  }
580  // create the layer setup class
581  return InDet::LayerSetup(idName,
582  m_colorCodesConfig[ilS],
583  negLayers,
584  cenLayers,
585  posLayers,
586  cenMinR,
587  cenMaxR,
588  cenMaxZ,
590  !posLayers.empty(),
591  posMinR,
592  posMaxR,
593  posMinZ,
594  posMaxZ,
596 }
597 
598 
600 bool
602  LayerSetup& layerSetup,
603  std::vector<InDet::LayerSetup>& layerSetupCache) const
604 {
605  // the maximum center and overall extend of the cache
606  double maxCenterCacheZ = 0.;
607  // the maximum endcap extend of the cache
608  double minEndcapCacheZ = 10e10;
609  // chech if he have a fullSectorSetup
610  bool fullSectorSetup = false;
611  //
612  for (const auto& lCacheSetup : layerSetupCache){
613  takeBigger(maxCenterCacheZ, lCacheSetup.zExtendCenter);
614  takeSmaller(minEndcapCacheZ, lCacheSetup.minZextendEndcap);
615  // once true always true - otherwise it would have been flushed
616  fullSectorSetup = lCacheSetup.buildEndcap ? true : fullSectorSetup;
617 
618  }
619  // if we do not have a full sector setup - > flush directly
620  if (!fullSectorSetup) {
621  ATH_MSG_VERBOSE(" -> only central sector being built, flush the cache ... ");
622  return false;
623  }
624  // if the cached minimum z endcap z extend cuts within the new barrel -> flush it
625  if (minEndcapCacheZ < layerSetup.zExtendCenter){
626  ATH_MSG_VERBOSE(" -> cache endcap extend reaches into new central sector, flush the cache ... ");
627  return false;
628  }
629  // the cache center maximumg exceeds the new endcap minimum -> does not fit
630  if (maxCenterCacheZ < layerSetup.minZextendEndcap ) {
631  ATH_MSG_VERBOSE(" -> sector fully fits into cache! Add it and start synchronising ...");
632  // calculate the new sector gap and synchronise
633  double newCenterMaxZ = maxCenterCacheZ > layerSetup.zExtendCenter ? maxCenterCacheZ : layerSetup.zExtendCenter;
634  double newEndcapMinZ = minEndcapCacheZ < layerSetup.minZextendEndcap ? minEndcapCacheZ : layerSetup.minZextendEndcap;
635  double newSectorZ = 0.5*(newCenterMaxZ+newEndcapMinZ);
636  // and syncrhonise the boundaries
637  for (auto& lCacheSetup : layerSetupCache)
638  lCacheSetup.zSector = newSectorZ;
639  layerSetup.zSector = newSectorZ;
640  return true;
641  }
642  // it simply does not fit so return false
643  return false;
644 }
645 
646 
650 (std::vector<InDet::LayerSetup>& layerSetupCache,
651  double innerRadius,
652  double& outerRadius,
653  double extendZ) const
654 {
655  // the return volume
656  Trk::TrackingVolume* flushVolume = nullptr;
657  //
658  if (layerSetupCache.size() == 1 ){
659  ATH_MSG_VERBOSE(" -> single sector setup - synchronising from inner (" << innerRadius << ") to outer (" << outerRadius << ") radius.");
660  ATH_MSG_VERBOSE(" -> setup identification : " << layerSetupCache[0].identification );
661  // create the new tracking volume - either as a triple or as a single
662  flushVolume = layerSetupCache[0].buildEndcap ?
663  packVolumeTriple(layerSetupCache[0],
664  innerRadius, outerRadius,
665  extendZ,layerSetupCache[0].zSector) :
666  m_trackingVolumeCreator->createTrackingVolume(layerSetupCache[0].centralLayers,
668  innerRadius,outerRadius,
669  -extendZ,extendZ,
670  layerSetupCache[0].identification,
671  (Trk::BinningType)layerSetupCache[0].binningCenter);
672 
673  } else {
674  ATH_MSG_VERBOSE(" -> setup with " << layerSetupCache.size() << " entries - synchronising from inner (" << innerRadius << ") to outer (" << outerRadius << ") radius.");
675  // prepare the volume vectors & name identification
676  std::vector<Trk::TrackingVolume*> negVolumes;
677  std::vector<Trk::TrackingVolume*> centralVolumes;
678  std::vector<Trk::TrackingVolume*> posVolumes;
679  std::string combinedName;
680  for (size_t ilS = 0; ilS < layerSetupCache.size(); ++ilS){
681  // take the given inner radius for the first one - median otherwise
682  double irE = ilS ? 0.5*(layerSetupCache[ilS].minRadiusEndcap+layerSetupCache[ilS-1].maxRadiusEndcap) : innerRadius;
683  double irC = ilS ? 0.5*(layerSetupCache[ilS].minRadiusCenter+layerSetupCache[ilS-1].maxRadiusCenter) : innerRadius;
684  // take the given outer radius for the last one - median otherwise
685  double orE = ((ilS+1)==layerSetupCache.size()) ? outerRadius : 0.5*(layerSetupCache[ilS+1].minRadiusEndcap+layerSetupCache[ilS].maxRadiusEndcap);
686  double orC = ((ilS+1)==layerSetupCache.size()) ? outerRadius : 0.5*(layerSetupCache[ilS+1].minRadiusCenter+layerSetupCache[ilS].maxRadiusCenter);
687  // Adjust last volumes in R to the same maximal radial extends!
688  if(ilS==layerSetupCache.size()-1) {
689  ATH_MSG_VERBOSE("Processing last volume");
690  ATH_MSG_VERBOSE(" --> adjust volumes to same extends: orE=" << orE << " orC=" << orC);
691  if(orE>orC) orC=orE; else orE=orC;
692  }
693  // create the three volumes
695  layerSetupCache[ilS].negativeLayers,
696  irE,
697  orE,
698  -extendZ,
699  -layerSetupCache[ilS].zSector,
700  layerSetupCache[ilS].identification + "::NegativeEndcap",
701  (Trk::BinningType)layerSetupCache[ilS].binningEndcap,
702  false);
703  Trk::TrackingVolume* cVolume =
704  m_trackingVolumeCreator->createTrackingVolume(
705  layerSetupCache[ilS].centralLayers,
707  irC,
708  orC,
709  -layerSetupCache[ilS].zSector,
710  layerSetupCache[ilS].zSector,
711  layerSetupCache[ilS].identification + "::Barrel",
712  (Trk::BinningType)layerSetupCache[ilS].binningCenter);
714  layerSetupCache[ilS].positiveLayers,
715  irE,
716  orE,
717  layerSetupCache[ilS].zSector,
718  extendZ,
719  layerSetupCache[ilS].identification + "::PositiveEndcap",
720  (Trk::BinningType)layerSetupCache[ilS].binningEndcap,
721  false);
722  // register the right color code
723  nVolume->registerColorCode(layerSetupCache[ilS].colorCode);
724  cVolume->registerColorCode(layerSetupCache[ilS].colorCode);
725  pVolume->registerColorCode(layerSetupCache[ilS].colorCode);
726  // push them into the volume containers
727  negVolumes.push_back(nVolume);
728  centralVolumes.push_back(cVolume);
729  posVolumes.push_back(pVolume);
730  // combined name
731  combinedName += "_"+layerSetupCache[ilS].identification;
732  }
733  ATH_MSG_VERBOSE(" -> setup identification : " << combinedName );
734  flushVolume = packVolumeTriple(negVolumes,centralVolumes,posVolumes,combinedName);
735  }
736  // clear the cache
737  layerSetupCache.clear();
738  // return the volume
739  return flushVolume;
740 
741 }
742 
743 std::vector<Trk::Layer*> InDet::StagedTrackingGeometryBuilderImpl::checkZoverlap(std::vector<Trk::Layer*>& lays) const
744 {
745  // look for layers to merge if they overlap in z
746 
747  // caching the layers with locations in z
748  std::map < float , std::vector<Trk::Layer*> > locationAndLayers;
749 
750  // loop on the layers and save the location:
751  // if one layer location is compatible with
752  // another one (considering the layer thickness)
753  // then the two layers have to be merged
754  for (auto *lay : lays) {
755  float zpos= lay->surfaceRepresentation().center().z();
756  float thick = 0.5*lay->thickness();
757 
758  bool foundZoverlap = false;
759  for (auto& singlePosLayer : locationAndLayers) {
760  if (abs(zpos - singlePosLayer.first) < thick) {
761  singlePosLayer.second.push_back(lay);
762  foundZoverlap = true;
763  break;
764  }
765  }
766 
767  // if no overlap is found, a new location (with corresponding layer)
768  // has to be added to the map
769  if (not foundZoverlap) {
770  locationAndLayers[zpos] = std::vector<Trk::Layer*>();
771  locationAndLayers[zpos].push_back(lay);
772  }
773  }
774 
775  // If the number of final layers decreases,
776  // merging is detected and discs need to be merged.
777  // The new merged layers are returned instead of the initial ones.
778  if (lays.size()>locationAndLayers.size()) {
779  std::vector<Trk::Layer*> mergedDiscLayers;
780  for (auto& singlePosLayer : locationAndLayers) {
781  Trk::Layer* nd = mergeDiscLayers(singlePosLayer.second);
782  if (nd) mergedDiscLayers.push_back(nd);
783  else {
784  ATH_MSG_WARNING("radial merge of rings failed, return the input layer set");
785  return lays;
786  }
787  }
788  return mergedDiscLayers;
789  }
790 
791  return lays;
792 
793 }
794 
795 Trk::Layer* InDet::StagedTrackingGeometryBuilderImpl::mergeDiscLayers (std::vector<Trk::Layer*>& inputDiscs) const {
796  // if a single layer is input, no need for merging.
797  // Returning the layer
798  if (inputDiscs.size()==1)
799  return inputDiscs.at(0);
800 
801  // on the input, disc layers overlapping in thickness : merge to a new DiscLayer
802  std::pair<float,float> zb(1.e5,-1.e5);
803  // order discs in radius
804  std::vector< std::pair<float,float> > rbounds;
805  std::vector<size_t> discOrder;
806  size_t id=0;
807  for ( const auto * lay : inputDiscs ) {
808  zb.first = fmin( zb.first, lay->surfaceRepresentation().center().z()-0.5*lay->thickness());
809  zb.second = fmax( zb.second, lay->surfaceRepresentation().center().z()+0.5*lay->thickness());
810  const Trk::DiscBounds* db = dynamic_cast<const Trk::DiscBounds*>(&(lay->surfaceRepresentation().bounds()));
811  if (!db) {
812  ATH_MSG_WARNING("attempt to merge non-disc layers, bailing out");
813  return nullptr;
814  }
815  float r = db->rMin();
816  if (rbounds.empty() || r>rbounds.back().first) {
817  rbounds.emplace_back(r,db->rMax());
818  discOrder.push_back(id);
819  } else {
820  int ir=rbounds.size()-1;
821  while (ir>=0) {
822  if ( r>rbounds[ir].first ) break;
823  ir--;
824  }
825  auto rboundsInsertionPt(rbounds.begin());
826  std::advance(rboundsInsertionPt, ir+1);
827  rbounds.insert(rboundsInsertionPt,std::pair<float,float> (r,db->rMax()));
828  auto discOrderInsertionPt(discOrder.begin());
829  std::advance(discOrderInsertionPt, ir+1);
830  discOrder.insert(discOrderInsertionPt,id);
831  }
832  id++;
833  }
834 
835  std::vector<float> rsteps;
836  std::vector<Trk::Surface*> surfs;
837  std::vector<Trk::BinUtility*>* binUtils=new std::vector<Trk::BinUtility*>();
838  rsteps.push_back(rbounds[0].first);
839  for (unsigned int id=0; id<discOrder.size(); id++) {
840  unsigned int index=discOrder[id];
841  Trk::SurfaceArray* surfArray = inputDiscs[index]->surfaceArray();
842  if (surfArray) {
843  if (surfArray->binUtility()->binningValue()!=Trk::binPhi) {
844  ATH_MSG_WARNING("attempt to merge 2D disc arrays, bailing out");
845  return nullptr;
846  }
847  binUtils->push_back(surfArray->binUtility()->clone());
848  if (id+1<discOrder.size()) rsteps.push_back( 0.5*(rbounds[id].second+rbounds[id+1].first));
850  surfs.insert(surfs.end(),ringSurf.begin(),ringSurf.end());
851 
852  }
853  }
854  rsteps.push_back(rbounds.back().second);
855 
856  std::vector< std::pair< Trk::SharedObject<Trk::Surface>, Amg::Vector3D > > surfaces;
857  for ( auto * sf : surfs ) {
858  Trk::SharedObject<Trk::Surface> sharedSurface(sf,Trk::do_not_delete<Trk::Surface>);
859  std::pair< Trk::SharedObject<Trk::Surface>, Amg::Vector3D > surfaceOrder(sharedSurface, sf->center());
860  surfaces.push_back(surfaceOrder);
861  }
862 
863  // create merged binned array
864  // a two-dimensional BinnedArray is needed ; takes possession of binUtils and
865  // will delete it on destruction.
866  auto mergeBA = std::make_unique<Trk::BinnedArray1D1D<Trk::Surface>>(
867  surfaces, new Trk::BinUtility(rsteps, Trk::open, Trk::binR), binUtils);
868 
869  // DiscOverlapDescriptor takes possession of clonedBinUtils, will delete it on
870  // destruction.
871  // but *does not* manage mergeBA.
872  std::vector<Trk::BinUtility*>* clonedBinUtils = new std::vector<Trk::BinUtility*>();
873  for (auto *bu : *binUtils) clonedBinUtils->push_back(bu->clone());
874  auto olDescriptor = std::make_unique<InDet::DiscOverlapDescriptor>(mergeBA.get(),clonedBinUtils,true);
875 
876  // position & bounds of the disc layer
877  double disc_thickness = std::fabs(zb.second-zb.first);
878  double disc_pos = (zb.first+zb.second)*0.5;
879 
880  Amg::Transform3D transf;
881  transf = Amg::Translation3D(0.,0.,disc_pos);
882  Trk::BinnedArraySpan<Trk::Surface * const> layerSurfaces = mergeBA->arrayObjects();
883  // create disc layer
884  // layer creation; deletes mergeBA in baseclass 'Layer' upon destruction
886  new Trk::DiscLayer(transf,
887  new Trk::DiscBounds(rsteps.front(), rsteps.back()),
888  std::move(mergeBA),
889  // get the layer material from the first merged layer
890  *(inputDiscs[0]->layerMaterialProperties()),
891  disc_thickness,
892  std::move(olDescriptor));
893 
894  // register the layer to the surfaces
895  for (const auto *sf : layerSurfaces) {
896  const InDetDD::SiDetectorElement* detElement = dynamic_cast<const InDetDD::SiDetectorElement*>(sf->associatedDetectorElement());
897  const std::vector<const Trk::Surface*>& allSurfacesVector = detElement->surfaces();
898  for (const auto *subsf : allSurfacesVector){
899  const_cast<Trk::Surface&>(*subsf).associateLayer(*layer);
900  }
901  }
902 
903  for (const auto *disc : inputDiscs) {
904  delete disc; // cleanup
905  }
906 
907  return layer;
908 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
beamspotman.r
def r
Definition: beamspotman.py:676
InDet::StagedTrackingGeometryBuilderImpl::m_layerBinningTypeCenter
IntegerArrayProperty m_layerBinningTypeCenter
binning type for the provided layers
Definition: StagedTrackingGeometryBuilderImpl.h:232
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
InDet::StagedTrackingGeometryBuilderImpl::m_enclosingEnvelopeSvc
ServiceHandle< IEnvelopeDefSvc > m_enclosingEnvelopeSvc
the service to provide the ID envelope size
Definition: StagedTrackingGeometryBuilderImpl.h:244
InDet::LayerSetup::zSector
double zSector
Definition: StagedTrackingGeometryBuilderImpl.h:67
InDet::LayerSetup
Definition: StagedTrackingGeometryBuilderImpl.h:45
InDet::StagedTrackingGeometryBuilderImpl::createTrackingVolume
Trk::TrackingVolume * createTrackingVolume(const std::vector< Trk::Layer * > &layers, double innerRadius, double &outerRadius, double zMin, double zMax, const std::string &volumeName, Trk::BinningType btype, bool doAdjustOuterRadius=true) const
Private helper method, creates a TrackingVolume - and checks if configured - for Ring Layout.
Definition: StagedTrackingGeometryBuilderImpl.cxx:285
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::BinnedArray::binUtility
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
max
#define max(a, b)
Definition: cfImp.cxx:41
DiscBounds.h
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
StagedTrackingGeometryBuilderImpl.h
index
Definition: index.py:1
InDetDD::SiDetectorElement::surfaces
const std::vector< const Trk::Surface * > & surfaces() const
Returns the full list of surfaces associated to this detector element.
Definition: SiDetectorElement.cxx:157
BinnedArray.h
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:43
InDet::StagedTrackingGeometryBuilderImpl::estimateLayerSetup
LayerSetup estimateLayerSetup(const std::string &idName, size_t ils, const std::vector< Trk::Layer * > &negLayers, const std::vector< Trk::Layer * > &centralLayers, const std::vector< Trk::Layer * > &posLayers, double maxR, double maxZ) const
Private helper method, estimates the overal dimensions.
Definition: StagedTrackingGeometryBuilderImpl.cxx:541
Trk::CylinderLayer::surfaceRepresentation
virtual const CylinderSurface & surfaceRepresentation() const override final
Transforms the layer into a Surface representation for extrapolation.
Definition: CylinderLayer.cxx:154
InDet::StagedTrackingGeometryBuilderImpl::packVolumeTriple
Trk::TrackingVolume * packVolumeTriple(const std::vector< Trk::TrackingVolume * > &negVolumes, const std::vector< Trk::TrackingVolume * > &centralVolumes, const std::vector< Trk::TrackingVolume * > &posVolumes, const std::string &baseName="UndefinedVolume") const
Private helper method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap volumes.
Definition: StagedTrackingGeometryBuilderImpl.cxx:404
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
InDet::StagedTrackingGeometryBuilderImpl::m_layerArrayCreator
PublicToolHandle< Trk::ILayerArrayCreator > m_layerArrayCreator
Helper Tool to create BinnedArrays.
Definition: StagedTrackingGeometryBuilderImpl.h:227
DiscLayer.h
DiscOverlapDescriptor.h
VolumeBounds.h
BinnedArray1D1D.h
Trk::CylinderSurface::bounds
virtual const CylinderBounds & bounds() const override final
This method returns the CylinderBounds by reference (NoBounds is not possible for cylinder)
Layer.h
CxxUtils::CachedUniquePtrT::set
T * set(std::unique_ptr< T > elt) const
Atomically set the element.
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::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Trk::TrackingVolume::registerColorCode
void registerColorCode(unsigned int icolor)
Register the color code.
Trk::DiscBounds::rMax
double rMax() const
This method returns outer radius.
takeBigger
#define takeBigger(current, test)
Definition: RobustTrackingGeometryBuilderImpl.h:44
InDet::StagedTrackingGeometryBuilderImpl::m_ringTolerance
DoubleProperty m_ringTolerance
the ring tolerance
Definition: StagedTrackingGeometryBuilderImpl.h:274
InDet::LayerSetup::zExtendCenter
double zExtendCenter
Definition: StagedTrackingGeometryBuilderImpl.h:55
CylinderVolumeBounds.h
Trk::DiscBounds::rMin
double rMin() const
This method returns inner radius.
InDet::StagedTrackingGeometryBuilderImpl::finalize
virtual StatusCode finalize() override
AlgTool finalize method.
Definition: StagedTrackingGeometryBuilderImpl.cxx:62
InDet::StagedTrackingGeometryBuilderImpl::m_layerEnvelopeCover
DoubleProperty m_layerEnvelopeCover
innermost - outermost
Definition: StagedTrackingGeometryBuilderImpl.h:256
InDet::StagedTrackingGeometryBuilderImpl::m_checkForRingLayout
BooleanProperty m_checkForRingLayout
this is to check for the endcap ring layout
Definition: StagedTrackingGeometryBuilderImpl.h:271
beamspotman.n
n
Definition: beamspotman.py:731
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
InDet::StagedTrackingGeometryBuilderImpl::m_exitVolume
StringProperty m_exitVolume
the final ID container
Definition: StagedTrackingGeometryBuilderImpl.h:282
InDet::StagedTrackingGeometryBuilderImpl::StagedTrackingGeometryBuilderImpl
StagedTrackingGeometryBuilderImpl(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition: StagedTrackingGeometryBuilderImpl.cxx:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
InDet::LayerSetup::minZextendEndcap
double minZextendEndcap
Definition: StagedTrackingGeometryBuilderImpl.h:62
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CylinderLayer.h
InDet::StagedTrackingGeometryBuilderImpl::checkForInsert
void checkForInsert(std::vector< double > &radii, double radius) const
helper method needed for the Ring layout
Definition: StagedTrackingGeometryBuilderImpl.h:293
InDet::StagedTrackingGeometryBuilderImpl::setupFitsCache
bool setupFitsCache(LayerSetup &layerSetup, std::vector< InDet::LayerSetup > &layerSetupCache) const
Private helper method to check if a sector is compatible with the cache.
Definition: StagedTrackingGeometryBuilderImpl.cxx:601
Trk::DiscLayer
Definition: DiscLayer.h:45
InDet::StagedTrackingGeometryBuilderImpl::initialize
virtual StatusCode initialize() override
AlgTool initialize method.
Definition: StagedTrackingGeometryBuilderImpl.cxx:38
Trk::BinUtility::binningValue
BinningValue binningValue(size_t ba=0) const
The type/value of the binning.
Definition: BinUtility.h:231
min
#define min(a, b)
Definition: cfImp.cxx:40
InDet::StagedTrackingGeometryBuilderImpl::checkZoverlap
std::vector< Trk::Layer * > checkZoverlap(std::vector< Trk::Layer * > &lays) const
Private helper method for merging of rings with z-overlap.
Definition: StagedTrackingGeometryBuilderImpl.cxx:743
InDet::StagedTrackingGeometryBuilderImpl::trackingGeometryImpl
std::unique_ptr< Trk::TrackingGeometry > trackingGeometryImpl(std::vector< InDet::LayerSetup > &layerSetups, double maximumLayerExtendZ, double maximumLayerRadius, double envelopeVolumeHalfZ, double envelopeVolumeRadius) const
Definition: StagedTrackingGeometryBuilderImpl.cxx:69
Trk::BinUtility
Definition: BinUtility.h:39
Trk::Global
@ Global
Definition: GeometrySignature.h:25
Trk::CylinderLayer
Definition: CylinderLayer.h:43
InDet::StagedTrackingGeometryBuilderImpl::m_materialProperties
CxxUtils::CachedUniquePtrT< Trk::Material > m_materialProperties
overal material properties of the ID
Definition: StagedTrackingGeometryBuilderImpl.h:220
IOVInfiniteRange.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
Trk::Surface::bounds
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
Trk::Surface::associateLayer
void associateLayer(const Layer &lay)
method to associate the associated Trk::Layer which is alreay owned
InDet::LayerSetup::colorCode
int colorCode
Definition: StagedTrackingGeometryBuilderImpl.h:73
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
Trk::BinnedArray::arrayObjects
virtual BinnedArraySpan< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
takeSmaller
#define takeSmaller(current, test)
Definition: RobustTrackingGeometryBuilderImpl.h:43
InDet::StagedTrackingGeometryBuilderImpl::m_namespace
StringProperty m_namespace
identificaton namespace
Definition: StagedTrackingGeometryBuilderImpl.h:279
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::StagedTrackingGeometryBuilderImpl::estimateLayerDimensions
void estimateLayerDimensions(const std::vector< Trk::Layer * > &layers, double &rMin, double &rMax, double &zMin, double &zMax) const
Private helper method to estimate the layer dimensions.
Definition: StagedTrackingGeometryBuilderImpl.cxx:195
SiDetectorElement.h
InDet::LayerSetup::binningEndcap
int binningEndcap
Definition: StagedTrackingGeometryBuilderImpl.h:64
Trk::open
@ open
Definition: BinningType.h:40
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
InDet::StagedTrackingGeometryBuilderImpl::m_trackingVolumeCreator
PublicToolHandle< Trk::ITrackingVolumeCreator > m_trackingVolumeCreator
< Helper Tool to create TrackingVolumes
Definition: StagedTrackingGeometryBuilderImpl.h:224
Trk::binR
@ binR
Definition: BinningType.h:50
DeMoScan.index
string index
Definition: DeMoScan.py:362
TrackingVolume.h
Trk::SharedObject
std::shared_ptr< T > SharedObject
Definition: SharedObject.h:24
InDet::StagedTrackingGeometryBuilderImpl::m_layerBinningTypeEndcap
IntegerArrayProperty m_layerBinningTypeEndcap
binning type for the provided layers
Definition: StagedTrackingGeometryBuilderImpl.h:236
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDet::StagedTrackingGeometryBuilderImpl::ringLayout
bool ringLayout(const std::vector< Trk::Layer * > &layers, std::vector< double > &rmins, std::vector< double > &rmaxs) const
Private helper method for detection of Ring layout.
Definition: StagedTrackingGeometryBuilderImpl.cxx:237
InDet::LayerSetup::binningCenter
int binningCenter
Definition: StagedTrackingGeometryBuilderImpl.h:56
DeMoScan.first
bool first
Definition: DeMoScan.py:534
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
InDet::LayerSetup::positiveLayers
std::vector< Trk::Layer * > positiveLayers
Definition: StagedTrackingGeometryBuilderImpl.h:50
Trk::Volume::volumeBounds
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition: Volume.h:97
Trk::BinUtility::clone
BinUtility * clone() const
Implizit Constructor.
Definition: BinUtility.h:130
python.utility.LHE.merge
def merge(input_file_pattern, output_file)
Merge many input LHE files into a single output file.
Definition: LHE.py:17
InDet::LayerSetup::negativeLayers
std::vector< Trk::Layer * > negativeLayers
Definition: StagedTrackingGeometryBuilderImpl.h:48
InDet::StagedTrackingGeometryBuilderImpl::mergeDiscLayers
Trk::Layer * mergeDiscLayers(std::vector< Trk::Layer * > &dlays) const
Definition: StagedTrackingGeometryBuilderImpl.cxx:795
InDet::StagedTrackingGeometryBuilderImpl::m_replaceJointBoundaries
BooleanProperty m_replaceJointBoundaries
run with replacement of all joint boundaries
Definition: StagedTrackingGeometryBuilderImpl.h:261
TrackingGeometry.h
InDet::StagedTrackingGeometryBuilderImpl::m_indexStaticLayers
BooleanProperty m_indexStaticLayers
forces robust indexing for layers
Definition: StagedTrackingGeometryBuilderImpl.h:266
InDet::LayerSetup::centralLayers
std::vector< Trk::Layer * > centralLayers
Definition: StagedTrackingGeometryBuilderImpl.h:49
InDet::StagedTrackingGeometryBuilderImpl::m_buildBoundaryLayers
BooleanProperty m_buildBoundaryLayers
create boundary layers
Definition: StagedTrackingGeometryBuilderImpl.h:259
Trk::BinnedArray
Definition: BinnedArray.h:38
AthAlgTool
Definition: AthAlgTool.h:26
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
checker_macros.h
Define macros for attributes used to control the static checker.
Trk::TrackingVolume
Definition: TrackingVolume.h:121
InDet::StagedTrackingGeometryBuilderImpl::m_colorCodesConfig
IntegerArrayProperty m_colorCodesConfig
Color codes.
Definition: StagedTrackingGeometryBuilderImpl.h:240
Trk::BinnedArraySpan
std::span< T > BinnedArraySpan
Definition: BinnedArray.h:34
InDet::LayerSetup::identification
std::string identification
Definition: StagedTrackingGeometryBuilderImpl.h:72
InDet::StagedTrackingGeometryBuilderImpl::createFlushVolume
Trk::TrackingVolume * createFlushVolume(std::vector< InDet::LayerSetup > &layerSetupCache, double innerRadius, double &outerRadius, double extendZ) const
Private helper method to flush the cache into the id volumes - return volume is the one to be provide...
Definition: StagedTrackingGeometryBuilderImpl.cxx:650
Material.h
merge
Definition: merge.py:1
Trk::DiscBounds
Definition: DiscBounds.h:44
Trk::CylinderBounds::halflengthZ
double halflengthZ() const
This method returns the halflengthZ.
Trk::CylinderBounds::r
virtual double r() const override final
This method returns the radius.
Trk::Layer
Definition: Layer.h:73
Trk::binPhi
@ binPhi
Definition: BinningType.h:51