ATLAS Offline Software
Routing2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "Routing2.h"
6 #include "ServicesLayer.h"
8 #include <algorithm>
9 #include <iostream>
10 using namespace std;
11 
13  AthMessaging("Routing2")
14 {
18 
19  m_c_bpEosLength = 40; // mm
20  m_c_epEosLength = 30;
21  m_c_bsEosLength = 50;
22  m_c_safetyGap = 0.001;
23 
24  // all units in cm
25  m_c_EosTolerance = 1.; // mm
26  m_c_halfEosThick = 3;
27  m_c_EosTolerance2 = 0.1;
31 
32  m_ISTexists = false;
33 
34 }
35 
37 {
38  m_ISTexists = (tracker.geoMgr()->SupportTubeRMin("IST") > 0.1);
39 
40  createRoutes(tracker);
41 
42  routeOuterBarrelPixel(tracker);
43  routeEndcapPixel( tracker);
44 
45  // Link routes
50  }
51 
52  // Create Strip layer routes
53  routeBarrelStrip( tracker);
55 
56  // Create pixel layer routes
57  routeInnerBarrelPixel(tracker);
59 
60  // Output route details in debug mode
61  if(msgLvl(MSG::DEBUG)){
70  }
71  }
73 }
74 
76 {
77  // barrel pixel vertical route
78  const LayerContainer& bplc = tracker.barrelPixelLayers();
79  const LayerContainer& eplc = tracker.endcapPixelLayers();
80  const LayerContainer& bslc = tracker.barrelStripLayers();
81 
82  double bpZmax = 0;
83  for (LayerContainer::const_iterator bl=bplc.begin()+m_c_nInnerPixelLayers; bl!=bplc.end(); ++bl)
84  bpZmax = std::max( bpZmax, (**bl).zPos() + (**bl).halfLength());
85 
86  double bpVertRouteZpos = bpZmax+m_c_EosTolerance+m_c_bpEosLength + 0.5*m_c_ServiceDiskThickness + m_c_safetyGap;
87  double bpVertRouteRmin = bplc[m_c_nInnerPixelLayers]->radius(); // change if along PST
88 
89  // Find max endcap pixel layer radius
90  double epRmax = 0;
91  for (LayerContainer::const_iterator i=eplc.begin(); i!=eplc.end(); ++i)
92  epRmax = std::max( epRmax, (**i).rMax());
93 
94  // Find max radius for vertical route
95  double bpVertRouteRmax;
96  if (!m_ISTexists) {
97  bpVertRouteRmax = 0.5*(epRmax + m_c_epEosLength + tracker.geoMgr()->sctInnerSupport());
98  // Pixel horizontal route in the middle between pixel disks and first strip layer
100  ATH_MSG_WARNING("No space for services between pixel diskd and sct support");
101  }
102  else {
103  // services along PST, as close as they can get
104  bpVertRouteRmax = tracker.geoMgr()->SupportTubeRMin("PST") - m_c_safetyGap - 0.5*m_c_ServiceCylinderThickness;
105  }
106 
107  double bpHorRouteR = bpVertRouteRmax;
108  double bpHRouteZmin = bpVertRouteZpos + 0.5*m_c_ServiceDiskThickness + m_c_safetyGap;
109  double bpHRouteZmax = eplc.back()->zPos(); // prolong if along PST ?
110  ATH_MSG_INFO("Route2: setting bpHRouteZmax to " << bpHRouteZmax);
111 
114  double bsZmax = 0;
115  for (LayerContainer::const_iterator i=bslc.begin(); i!=bslc.end(); ++i)
116  bsZmax = std::max( bsZmax, (**i).zPos() + (**i).halfLength());
117 
118  double bsVertRouteZpos = bsZmax+m_c_EosTolerance+m_c_bsEosLength + 0.5*m_c_ServiceDiskThickness + m_c_safetyGap;
119 
120  bpHRouteZmax = tracker.geoMgr()->SupportTubeZMax("PST");
121 
122  double bpHRouteZmax_mode = tracker.geoMgr()->SupportTubeZMin("mode");
123 
124  bool bMSTI = tracker.geoMgr()->SupportTubeExists("MSTI");
125  bool bMSTM = tracker.geoMgr()->SupportTubeExists("MSTM");
126  bool bMSTO = tracker.geoMgr()->SupportTubeExists("MSTO");
127  if(bMSTI||bMSTM||bMSTO)
128  if(bpHRouteZmax_mode>0.1&&bpHRouteZmax_mode<bpHRouteZmax) bpHRouteZmax = bpHRouteZmax_mode-0.001;
129 
130  ATH_MSG_INFO("Changing bpHRouteZmax to " << bpHRouteZmax);
131 
132  double bsVertRouteRmin = bpHorRouteR + 0.5*m_c_ServiceCylinderThickness + m_c_safetyGap;
133  double bsVertRouteRmax = bslc.back()->radius() + m_c_ServiceCylinderThickness; // approx
134 
135  m_bpVRoute = VRoute( bpVertRouteZpos, bpVertRouteRmin, bpVertRouteRmax, bpVertRouteRmax, "OuterPixelRPath");
136 
138  m_bpHRoute = HRoute( bpHorRouteR, bpHRouteZmin, bpHRouteZmax, bsVertRouteZpos,"OuterPixelZPath"); // different if along PST
139  else
140  m_bpHRoute = HRoute( bpHorRouteR, bpHRouteZmin, bpHRouteZmax, bpHRouteZmax,"OuterPixelZPath");
141 
142  m_epHRoute = m_bpHRoute; // different if along PST
143  m_bsVRoute = VRoute( bsVertRouteZpos, bsVertRouteRmin, bsVertRouteRmax, bsVertRouteRmax,"BarrelStripRPath");
144 
147 
148  // Additional Routes:
149  // Outside MSTOuter
150  double bpMSTO_R = tracker.geoMgr()->SupportTubeRMax("MSTO") + m_c_safetyGap + 0.5*m_c_ServiceCylinderThickness;
151  m_MSTO_HRoute = HRoute( bpMSTO_R, bpHRouteZmin, bpHRouteZmax, bpHRouteZmax, "MSTOPixelZPath");
152 
153  // Outside MSTMiddle
154  double bpMSTM_R = tracker.geoMgr()->SupportTubeRMax("MSTM") + m_c_safetyGap + 0.5*m_c_ServiceCylinderThickness;
155  m_MSTM_HRoute = HRoute( bpMSTM_R, bpHRouteZmin, bpHRouteZmax, bpHRouteZmax, "MSTMPixelZPath");
156 
157  // Outside MSTInner
158  double bpMSTI_R = tracker.geoMgr()->SupportTubeRMax("MSTI") + m_c_safetyGap + 0.5*m_c_ServiceCylinderThickness;
159  m_MSTI_HRoute = HRoute( bpMSTI_R, bpHRouteZmin, bpHRouteZmax, bpHRouteZmax, "MSTIPixelZPath");
160 
161  // Inside MSTMiddle
162  double bpMSTM_RI = tracker.geoMgr()->SupportTubeRMin("MSTM") - m_c_safetyGap - 0.5*m_c_ServiceCylinderThickness;
163  m_MSTM_HRouteInner = HRoute( bpMSTM_RI, bpHRouteZmin, bpHRouteZmax, bpHRouteZmax, "MSTMPixelZPathInner");
164 
165  // Exit route for pixel
167 
168  // route inside PST
169  createRoutesInIST(tracker);
170 }
171 
173 {
174  if (!m_ISTexists) { // PST is actually IST, and there is no PST
175  // we need to reduce the route radius after the pixel disks to avoid conflict with SCT disks
176  double routeRadius = tracker.geoMgr()->pixelEnvelopeRMax() - m_c_safetyGap - m_c_ServiceCylinderThickness/2;
177  //double zpos = 0.5 * (tracker.endcapPixelLayers().back()->zPos() + tracker.endcapStripLayers().front()->zPos());
179 
180  m_pixelV2Route = VRoute( zpos, routeRadius, m_bpHRoute.radius(), routeRadius, "OuterPixelRPath2");
181 
182  double pstLen = tracker.geoMgr()->SupportTubeZMax("PST");
183  m_pixelH2Route = HRoute( routeRadius, zpos + m_c_ServiceDiskThickness/2 + m_c_safetyGap, pstLen, pstLen,"OuterPixelZPath2");
186  }
187 }
188 
190 {
191  const LayerContainer& bplc = tracker.barrelPixelLayers();
192  double bpZmax = 0;
193  for (LayerContainer::const_iterator bl=bplc.begin(); bl!=bplc.begin()+m_c_nInnerPixelLayers; ++bl) {
194  bpZmax = std::max( bpZmax, (**bl).zPos() + (**bl).halfLength());
195  }
196 
197  double istVRouteZpos = bpZmax+m_c_EosTolerance+m_c_bpEosLength +
199  double istVRouteRmin = bplc.front()->radius();
200 
201  double istRmin;
202  double istZmax;
203  if (m_ISTexists) {
204  // use IST if it exists
205  // use IST if it exists
206  istRmin = tracker.geoMgr()->SupportTubeRMin("IST");
207  istZmax = tracker.geoMgr()->SupportTubeZMax("IST");
208  }
209  else {
210  // use PST as IST for backward compatibility
211  // use PST as IST for backward compatibility
212  istRmin = tracker.geoMgr()->SupportTubeRMin("PST");
213  istZmax = tracker.geoMgr()->SupportTubeZMax("PST");
214  }
215 
216  double istVRouteRmax = istRmin - 0.5*m_c_ServiceCylinderThickness - m_c_safetyGap;
217  m_istVRoute = VRoute( istVRouteZpos, istVRouteRmin, istVRouteRmax, istVRouteRmax, "InnerPixelRPath");
218 
219  double istHRouteZmin = istVRouteZpos + 0.5*m_c_ServiceDiskThickness + m_c_safetyGap;
220  double istHRouteZmax = istZmax;
221  m_istHRoute = HRoute( istVRouteRmax, istHRouteZmin, istHRouteZmax, istHRouteZmax, "InnerPixelZPath");
223 }
224 
226 {
227 
228  const LayerContainer& bls = tracker.barrelPixelLayers();
229  for (LayerContainer::const_iterator bl=bls.begin()+m_c_nInnerPixelLayers; bl!=bls.end(); ++bl) {
230  routeBarrelLayer( bl, bls.end(), tracker, m_bpVRoute);
231  }
232 }
233 
235 {
236  const LayerContainer& bls = tracker.barrelStripLayers();
237  for (LayerContainer::const_iterator bl=bls.begin(); bl!=bls.end(); ++bl) {
238  routeBarrelLayer( bl, bls.end(), tracker, m_bsVRoute);
239  }
240 }
241 
243 {
244 
245 // const LayerContainer& lc = tracker.endcapPixelLayers();
246 // for (LayerContainer::const_iterator bl=lc.begin(); bl!=lc.end(); ++bl) {
247 // routeEndcapLayer( bl, lc.end(), tracker, m_epHRoute);
248 // }
249 
250  const LayerContainer& lc = tracker.endcapPixelLayers();
251  bool bMSTI = tracker.geoMgr()->SupportTubeExists("MSTI");
252  bool bMSTM = tracker.geoMgr()->SupportTubeExists("MSTM");
253  bool bMSTO = tracker.geoMgr()->SupportTubeExists("MSTO");
254 
255  for (LayerContainer::const_iterator bl=lc.begin(); bl!=lc.end(); ++bl)
256  {
257 
258  if (bMSTI)
259  {
260  if (tracker.geoMgr()->pixelDiskServiceRoute( (*bl)->number() ) == "MSTI")
261  routeEndcapLayer( bl, lc.end(), tracker, m_MSTI_HRoute);
262  }
263 
264  // MSTM can have service on inside or outside
265  if (bMSTM)
266  {
267  if (tracker.geoMgr()->pixelDiskServiceRoute( (*bl)->number() ) == "MSTM")
268  {
270  routeEndcapLayer( bl, lc.end(), tracker, m_MSTM_HRoute);
271  else
272  routeEndcapLayer( bl, lc.end(), tracker, m_MSTM_HRouteInner);
273  }
274  }
275 
276  if (bMSTO)
277  {
278  if (tracker.geoMgr()->pixelDiskServiceRoute( (*bl)->number() ) == "MSTO")
279  routeEndcapLayer( bl, lc.end(), tracker, m_MSTO_HRoute);
280  }
281  }
282 
283  if(!bMSTI&&!bMSTM&&!bMSTO)
284  for (LayerContainer::const_iterator bl=lc.begin(); bl!=lc.end(); ++bl)
285  routeEndcapLayer( bl, lc.end(), tracker, m_epHRoute);
286 
287 }
288 
289 
290 bool Routing2::isRoutedOutsideSupportTube(LayerContainer::const_iterator bl, HRoute& route)
291 {
292  return (**bl).rMax() > route.radius();
293 }
294 
296 {
297  const LayerContainer& bls = tracker.barrelPixelLayers();
298  for (LayerContainer::const_iterator bl=bls.begin(); bl!=bls.begin()+m_c_nInnerPixelLayers; ++bl) {
299  routeBarrelLayer( bl, bls.begin()+m_c_nInnerPixelLayers, tracker, m_istVRoute);
300  }
301 }
302 
303 void Routing2::routeBarrelLayer(LayerContainer::const_iterator bl,
304  LayerContainer::const_iterator blend,
305  ServicesTracker& /*tracker*/, VRoute& route)
306 {
307  // 1. construct end-of-stave volume
308  double zEosMin = (*bl)->halfLength() + eosTolerance( (*bl)->type(), DetType::Barrel);
309  double zEosMax = zEosMin + eosLength( (*bl)->type(), DetType::Barrel);
310 
311  if (zEosMax < route.position() - 0.5*m_c_ServiceDiskThickness) {
312  zEosMax = route.position() - 0.5*m_c_ServiceDiskThickness - m_c_safetyGap;
313  }
314  else {
315  ATH_MSG_WARNING("not enough space for end of stave of barrel layer at radius "
316  << (**bl).radius());
317  }
318  double halfEosThick = eosHalfThickness( (*bl)->type(), DetType::Barrel);
320  (*bl)->radius()-halfEosThick,
321  (*bl)->radius()+halfEosThick,
322  zEosMin, zEosMax, (**bl).name() + "EOS");
323  eosCylinder->addLayer(*bl);
324  addVolume( eosCylinder);
325  eosCylinder->addEosServices(*bl); // add all the stave EOS stuff
326 
327  // 2. Connect to route
328  double rMin, rMax;
329  if (route.volumes().empty()) rMin = route.rMin();
330  else rMin = route.volumes().back()->rMax() + m_c_safetyGap;
331 
332  if (bl+1 != blend) {
333  rMax = std::min((**(bl+1)).radius(), route.rExit());
334  }
335  else rMax = route.rExit();
336 
337  ServiceVolume* newDisk = new ServiceVolume( ServiceVolume::Disk, rMin, rMax,
338  route.zPos()-0.5*m_c_ServiceDiskThickness,
339  route.zPos()+0.5*m_c_ServiceDiskThickness,
340  nextVolumeName(route));
341  newDisk->dump(true);
342  // newDisk->addLayer(*bl); // done by connect()
343  connect( eosCylinder, newDisk);
344  if (!route.volumes().empty()) connect( route.volumes().back(), newDisk);
345  route.addVolume( newDisk);
346  addVolume( newDisk);
347 }
348 
349 void Routing2::routeEndcapLayer(LayerContainer::const_iterator bl,
350  LayerContainer::const_iterator blend,
351  ServicesTracker& tracker, HRoute& route)
352 {
353  // 1. construct end-of-stave volume
354 // double rEosMin = (*bl)->rMax() + eosTolerance( (*bl)->type(), DetType::Endcap);
355 // double rEosMax = rEosMin + eosLength( (*bl)->type(), DetType::Endcap);
356 // if (rEosMax > route.position() - 0.5*m_c_ServiceCylinderThickness) {
357 // msg(MSG::WARNING) << "not enough space for end of stave of endcap layer at Z = "
358 // << (**bl).zPos() << endmsg;
359 // }
360 // rEosMax = route.position() - 0.5*m_c_ServiceCylinderThickness - m_c_safetyGap;
361 // if (rEosMax < rEosMin) {
362 // msg(MSG::WARNING) << "no space for routing of endcap layer at Z = "
363 // << (**bl).zPos() << endmsg;
364 // }
365 
366  double rEosMin = 0.0;
367  double rEosMax = 0.0;
368  std::string SupportName = tracker.geoMgr()->pixelDiskServiceRoute( (*bl)->number() );
369  double EOSZOffset = 0.0;
370 
371  bool bRoutedOutsideSupport = isRoutedOutsideSupportTube(bl, route);
372 
373  if (SupportName == "PST")
374  {
375  rEosMin = (*bl)->rMax() + eosTolerance( (*bl)->type(), DetType::Endcap); // Disk outer edge + safety
376  rEosMax = route.position() - 0.5*m_c_ServiceCylinderThickness - m_c_safetyGap; // support tube - safety
377  EOSZOffset = tracker.geoMgr()->pixelDiskEOSZOffset( (*bl)->number() );
378  if (rEosMax < rEosMin) ATH_MSG_WARNING("No space for routing of endcap layer at Z = " << (**bl).zPos());
379  }
380  else if (SupportName == "MST")
381  {
382  rEosMin = (*bl)->rMin() + eosTolerance( (*bl)->type(), DetType::Endcap); // EOS same size as Disk supports
383  rEosMax = (*bl)->rMax() + eosTolerance( (*bl)->type(), DetType::Endcap);
384  EOSZOffset = tracker.geoMgr()->pixelDiskEOSZOffset( (*bl)->number() );
385  }
386  else if (SupportName == "IST")
387  {
388  rEosMin = route.position() + 0.5*m_c_ServiceCylinderThickness + m_c_safetyGap; // support tube + safety
389  rEosMax = (*bl)->rMin() - eosTolerance( (*bl)->type(), DetType::Endcap); // Disk outer edge - safety
390  EOSZOffset = tracker.geoMgr()->pixelDiskEOSZOffset( (*bl)->number() );
391  if (rEosMax < rEosMin) ATH_MSG_WARNING("No space for routing of endcap layer at Z = " << (**bl).zPos());
392  }
393  else if (SupportName == "MSTO" || SupportName == "MSTM" || SupportName == "MSTI" )
394  {
395  // rEosMin/Max are different if disk runs inside or outside the support tube
396  if (bRoutedOutsideSupport)
397  {
398  rEosMin = route.position() + 0.5*m_c_ServiceCylinderThickness + m_c_safetyGap;
399  rEosMax = (*bl)->rMax() - eosTolerance( (*bl)->type(), DetType::Endcap);
400  }
401  else
402  {
403  rEosMax = route.position() - 0.5*m_c_ServiceCylinderThickness - m_c_safetyGap;
404  rEosMin = (**bl).rMin() - eosTolerance( (**bl).type(), DetType::Endcap);
405  }
406  EOSZOffset = tracker.geoMgr()->pixelDiskEOSZOffset( (*bl)->number() );
407  }
408  else if (SupportName=="StdRoute")
409  {
410  rEosMin = (*bl)->rMax() + eosTolerance( (*bl)->type(), DetType::Endcap);
411  rEosMax = rEosMin + eosLength( (*bl)->type(), DetType::Endcap);
412  EOSZOffset = 0;
413  if (rEosMax > route.position() - 0.5*m_c_ServiceCylinderThickness) {
414  ATH_MSG_WARNING("not enough space for end of stave of endcap layer at Z = " << (**bl).zPos());
415  }
416  rEosMax = route.position() - 0.5*m_c_ServiceCylinderThickness - m_c_safetyGap;
417  if (rEosMax < rEosMin) {
418  ATH_MSG_WARNING("no space for routing of endcap layer at Z = " << (**bl).zPos());
419  }
420  }
421  else
422  {
423  ATH_MSG_ERROR("Specified support name (" << SupportName<< ") not recognised - EOS not created!");
424  return;
425  }
426 
427  double halfEosThick = eosHalfThickness( (*bl)->type(), DetType::Endcap);
428  ServiceVolume* eosVol = new ServiceVolume( ServiceVolume::Disk, rEosMin, rEosMax,
429  (*bl)->zPos()-halfEosThick+ EOSZOffset,
430  (*bl)->zPos()+halfEosThick+ EOSZOffset,
431  (**bl).name() + "EOS");
432  eosVol->addLayer(*bl);
433  addVolume( eosVol);
434  eosVol->addEosServices(*bl); // add all the stave EOS stuff
435 
436  // 2. Connect to route
437  double zMin, zMax;
438  if (route.volumes().empty()) {
439  zMin = (*bl)->zPos() + EOSZOffset;
440  if ( zMin - route.zMin() > m_c_EosTolerance) { // FIXME use specific tolerance
444  route.zMin(), zMin - m_c_safetyGap,
445  nextVolumeName(route));
446  route.addVolume( beg); // beg has no services at this time
447  addVolume( beg);
448  }
449  }
450  else zMin = route.volumes().back()->zMax() + m_c_safetyGap;
451 
452  // Assume no further elements to link on the route then find next potential link
453  // Make sure next one is on the same support tube, and on the same side (inside or outside)
454  zMax = route.zExit();
455  for (LayerContainer::const_iterator blnext = bl+1; blnext != blend; ++blnext)
456  {
457  if ( tracker.geoMgr()->pixelDiskServiceRoute((*blnext)->number()) == SupportName && isRoutedOutsideSupportTube(blnext, route) == bRoutedOutsideSupport )
458  {
459  zMax = std::min((**blnext).zPos() + EOSZOffset, route.zExit());
460  break;
461  }
462  }
463 
464 // LayerContainer::const_iterator blnext = bl+1;
465 // if (blnext != blend) {
466 // zMax = std::min((**blnext).zPos(), route.zExit());
467 // }
468 // else zMax = route.zExit();
469 
470  bool reverse = false;
471  // if (route.zExit() < (**bl).zPos()) {
472  if (route.zExit() < zMin) {
473  // create a dedicated exit volume with zero length
477  route.zExit(), route.zExit(),
478  route.name()+"ExitVol");
479  // connect the last volume to the exit
480  connect( route.volumes().back(), exitVol);
481  route.setExitVolume( exitVol);
482  zMin = max( route.zExit(), route.volumes().back()->zMax());
483  zMax = (**bl).zPos();
484  reverse = true;
485  }
486 
490  zMin, zMax, nextVolumeName(route));
491  newCyl->dump();
492  connect( eosVol, newCyl);
493  if (! reverse) {
494  if (!route.volumes().empty()) connect( route.volumes().back(), newCyl);
495  }
496  else {
497  // FIXME: the services of the new layer will not propagate thru all volumes
498  if (!route.volumes().empty()) connect( newCyl, route.volumes().back());
499  }
500  route.addVolume( newCyl);
501  addVolume( newCyl);
502 
503 }
504 
506 {
507  // checks on geometrical compatibility should be done by the caller
508  newv->addPrevious(prev);
509  prev->setNext(newv);
510  newv->addLayers(prev->layers());
511 }
512 
514 {
515  // choose volume to connect to
516  ServiceVolume* entryVol = out.entryVolume(in.position(),true,msg());
517  if (entryVol == nullptr) entryVol = createSingleRouteVolume( out);
518  ServiceVolume* exitVol = in.exitVolume(true,msg());
519  // maybe check volumes are connectable?
520  entryVol->addPrevious(exitVol);
521  exitVol->setNext(entryVol);
522 
523  // add the services of the in route to all volumes of out route, up to it's exit
524  ServiceVolume* nextVol = entryVol;
525  while (true) {
526  nextVol->addLayers( exitVol->layers());
527  nextVol = nextVol->next();
528  if (nextVol == nullptr) break;
529  }
530 }
531 
533 {
534  ServiceVolume* vol(nullptr);
535  HRoute* hrt = dynamic_cast<HRoute*>(&rt);
536  if (hrt != nullptr) {
540  hrt->zMin(), hrt->zMax(), rt.name());
541  }
542  else {
543  VRoute* vrt = dynamic_cast<VRoute*>(&rt);
544  if(vrt) vol = new ServiceVolume( ServiceVolume::Disk, vrt->rMin(), vrt->rMax(),
546  rt.position()+0.5*m_c_ServiceDiskThickness, rt.name());
547  }
548  rt.addVolume( vol);
549  addVolume(vol);
550  return vol;
551 }
552 
553 double Routing2::eosTolerance( DetType::Type /*type*/, DetType::Part /*part*/) const
554 {
555  return m_c_EosTolerance;
556 }
557 
559 {
560  using namespace DetType;
561  if (type == Pixel) {
562  if (part == Barrel) return m_c_bpEosLength;
563  else return m_c_epEosLength;
564  }
565  else {
566  return m_c_bsEosLength;
567  // FIXME add part for endcap strip
568  }
569 }
570 
571 
572 double Routing2::eosHalfThickness( DetType::Type /*type*/, DetType::Part /*part*/) const
573 {
574  return m_c_halfEosThick;
575 }
576 
577 void Routing2::dumpRoute( const Route& route)
578 {
579  ATH_MSG_INFO("Dumping route at pos " << route.position() << " with exit at " << route.exit());
580  for ( Route::VolumeContainer::const_iterator iv = route.volumes().begin();
581  iv != route.volumes().end(); ++iv) {
582  (**iv).dump(false);
583  }
584 }
585 
586 std::string Routing2::nextVolumeName( const Route& route) const
587 {
588  ostringstream os;
589  os << route.volumes().size();
590  return route.name() + "Vol" + os.str();
591 }
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
Routing2::routeBarrelLayer
void routeBarrelLayer(LayerContainer::const_iterator bl, LayerContainer::const_iterator blend, ServicesTracker &tracker, VRoute &route)
Definition: Routing2.cxx:303
HRoute::position
virtual double position() const
Definition: HRoute.h:28
Routing2::m_c_EosTolerance
double m_c_EosTolerance
Definition: Routing2.h:39
InDetServMatGeometryManager.h
ServiceVolume
Definition: InDetServMatGeoModel/src/ServiceVolume.h:14
ServicesTracker::barrelPixelLayers
LayerContainer & barrelPixelLayers()
Definition: ServicesTracker.h:36
Routing2::createSingleRouteVolume
ServiceVolume * createSingleRouteVolume(Route &rt)
Definition: Routing2.cxx:532
VRoute::rMax
double rMax() const
Definition: VRoute.h:24
Routing2::routeInnerBarrelPixel
void routeInnerBarrelPixel(ServicesTracker &tracker)
Definition: Routing2.cxx:295
ServicesTracker::endcapPixelLayers
LayerContainer & endcapPixelLayers()
Definition: ServicesTracker.h:37
Routing2::m_bpHRoute
HRoute m_bpHRoute
Definition: Routing2.h:49
HRoute::zMin
double zMin() const
Definition: HRoute.h:23
HRoute::volumes
const VolumeContainer & volumes() const
Definition: HRoute.h:34
Routing2::m_MSTI_HRoute
HRoute m_MSTI_HRoute
Definition: Routing2.h:65
Routing2::createRoutesInIST
void createRoutesInIST(ServicesTracker &tracker)
Definition: Routing2.cxx:189
Routing2::m_bpVRoute
VRoute m_bpVRoute
Definition: Routing2.h:48
DetType::Endcap
@ Endcap
Definition: DetType.h:14
max
#define max(a, b)
Definition: cfImp.cxx:41
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
VRoute::rExit
double rExit() const
Definition: VRoute.h:26
Pixel
Definition: PixelFEUtils.h:16
ServiceVolume::addEosServices
void addEosServices(const ServicesLayer *l)
Definition: InDetServMatGeoModel/src/ServiceVolume.cxx:35
Routing2::eosHalfThickness
double eosHalfThickness(DetType::Type type, DetType::Part part) const
Definition: Routing2.cxx:572
Routing2::m_c_halfEosThick
double m_c_halfEosThick
Definition: Routing2.h:40
Routing2::m_c_ServiceCylinderThickness
double m_c_ServiceCylinderThickness
Definition: Routing2.h:43
VRoute
Definition: VRoute.h:13
ServicesTracker::geoMgr
const InDetServMatGeometryManager * geoMgr() const
Definition: ServicesTracker.h:54
InDetServMatGeometryManager::SupportTubeRMax
double SupportTubeRMax(const std::string &name) const
Definition: InDetServMatGeometryManager.cxx:124
Routing2::eosLength
double eosLength(DetType::Type type, DetType::Part part) const
Definition: Routing2.cxx:558
VRoute::setNextRoute
virtual void setNextRoute(Route *nr)
Definition: VRoute.h:38
Routing2::m_pixelAlongBarrelStrip
bool m_pixelAlongBarrelStrip
Definition: Routing2.h:29
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Routing2::m_c_ServiceDiskThickness
double m_c_ServiceDiskThickness
Definition: Routing2.h:42
Routing2::m_c_EosTolerance2
double m_c_EosTolerance2
Definition: Routing2.h:41
Routing2::m_routePixelBarrelOnPST
bool m_routePixelBarrelOnPST
Definition: Routing2.h:28
Route::exitVolume
virtual ServiceVolume * exitVolume(bool ascending, MsgStream &msg) const
Definition: Route.cxx:51
HRoute::setNextRoute
virtual void setNextRoute(Route *nr)
Definition: HRoute.h:38
Route::name
const std::string & name() const
Definition: Route.h:42
Routing2::createRoutingVolumes
void createRoutingVolumes(ServicesTracker &tracker)
Definition: Routing2.cxx:36
VRoute::zPos
double zPos() const
Definition: VRoute.h:25
Routing2::createOuterPixelRoutes
void createOuterPixelRoutes(ServicesTracker &tracker)
Definition: Routing2.cxx:172
python.LumiCalcHtml.lc
lc
Definition: LumiCalcHtml.py:579
Routing2::m_c_safetyGap
double m_c_safetyGap
Definition: Routing2.h:37
Routing2::nextVolumeName
std::string nextVolumeName(const Route &route) const
Definition: Routing2.cxx:586
InDetServMatGeometryManager::SupportTubeExists
int SupportTubeExists(const std::string &name) const
Definition: InDetServMatGeometryManager.cxx:145
Routing2::Routing2
Routing2()
Definition: Routing2.cxx:12
Routing2::m_bsVRoute
VRoute m_bsVRoute
Definition: Routing2.h:55
ServicesTracker::setServiceVolumes
void setServiceVolumes(const std::vector< ServiceVolume * > &vc)
Definition: ServicesTracker.h:44
DetType::Barrel
@ Barrel
Definition: DetType.h:14
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
ServiceVolume::Cylinder
@ Cylinder
Definition: InDetServMatGeoModel/src/ServiceVolume.h:17
VRoute::addVolume
virtual void addVolume(ServiceVolume *vol)
Definition: VRoute.h:36
InDetServMatGeometryManager::pixelEnvelopeRMax
double pixelEnvelopeRMax() const
Definition: InDetServMatGeometryManager.cxx:311
Routing2::routeEndcapPixel
void routeEndcapPixel(ServicesTracker &tracker)
Definition: Routing2.cxx:242
Routing2::m_c_epEosLength
double m_c_epEosLength
Definition: Routing2.h:35
ServicesLayer.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Routing2::m_pixelH2Route
HRoute m_pixelH2Route
Definition: Routing2.h:53
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
Routing2::m_ISTexists
bool m_ISTexists
Definition: Routing2.h:30
ServiceVolume::setNext
void setNext(ServiceVolume *next)
Definition: InDetServMatGeoModel/src/ServiceVolume.h:75
ServiceVolume::layers
LayerContainer layers() const
Definition: InDetServMatGeoModel/src/ServiceVolume.h:69
lumiFormat.i
int i
Definition: lumiFormat.py:92
Routing2::m_c_nInnerPixelLayers
int m_c_nInnerPixelLayers
Definition: Routing2.h:32
Routing2::dumpRoute
void dumpRoute(const Route &route)
Definition: Routing2.cxx:577
Routing2.h
Routing2::m_c_LayerLengthTolerance
double m_c_LayerLengthTolerance
Definition: Routing2.h:44
Routing2::m_MSTM_HRoute
HRoute m_MSTM_HRoute
Definition: Routing2.h:63
Routing2::routeBarrelStrip
void routeBarrelStrip(ServicesTracker &tracker)
Definition: Routing2.cxx:234
ServiceVolume::addPrevious
void addPrevious(ServiceVolume *prev)
Definition: InDetServMatGeoModel/src/ServiceVolume.h:73
InDetServMatGeometryManager::sctInnerSupport
double sctInnerSupport() const
Definition: InDetServMatGeometryManager.cxx:407
Routing2::m_istVRoute
VRoute m_istVRoute
Definition: Routing2.h:56
Routing2::routeOuterBarrelPixel
void routeOuterBarrelPixel(ServicesTracker &tracker)
Definition: Routing2.cxx:225
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
Routing2::m_MSTO_HRoute
HRoute m_MSTO_HRoute
Definition: Routing2.h:62
ServicesTracker::barrelStripLayers
LayerContainer & barrelStripLayers()
Definition: ServicesTracker.h:38
Routing2::m_pixelV2Route
VRoute m_pixelV2Route
Definition: Routing2.h:52
HRoute::zMax
double zMax() const
Definition: HRoute.h:24
InDetServMatGeometryManager::pixelDiskServiceRoute
std::string pixelDiskServiceRoute(int disk) const
Definition: InDetServMatGeometryManager.cxx:304
HRoute::addVolume
virtual void addVolume(ServiceVolume *vol)
Definition: HRoute.h:36
VRoute::rMin
double rMin() const
Definition: VRoute.h:23
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
ServiceVolume::addLayer
void addLayer(const ServicesLayer *l)
Add a layer the services of which are routed through this volume.
Definition: InDetServMatGeoModel/src/ServiceVolume.h:26
Routing2::m_MSTM_HRouteInner
HRoute m_MSTM_HRouteInner
Definition: Routing2.h:64
min
#define min(a, b)
Definition: cfImp.cxx:40
Routing2::addVolume
void addVolume(ServiceVolume *v)
Definition: Routing2.h:85
InDetServMatGeometryManager::pixelDiskEOSZOffset
double pixelDiskEOSZOffset(int disk) const
Definition: InDetServMatGeometryManager.cxx:295
DetType::Type
Type
Definition: DetType.h:13
Routing2::connect
void connect(ServiceVolume *prev, ServiceVolume *newv)
Definition: Routing2.cxx:505
Routing2::m_c_bsEosLength
double m_c_bsEosLength
Definition: Routing2.h:36
ServiceVolume::Disk
@ Disk
Definition: InDetServMatGeoModel/src/ServiceVolume.h:17
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
HRoute::radius
double radius() const
Definition: HRoute.h:25
InDetServMatGeometryManager::SupportTubeZMax
double SupportTubeZMax(const std::string &name) const
Definition: InDetServMatGeometryManager.cxx:138
Route
Definition: Route.h:15
Routing2::eosTolerance
double eosTolerance(DetType::Type type, DetType::Part part) const
Definition: Routing2.cxx:553
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
Routing2::isRoutedOutsideSupportTube
bool isRoutedOutsideSupportTube(LayerContainer::const_iterator bl, HRoute &route)
Definition: Routing2.cxx:290
Routing2::routeEndcapLayer
void routeEndcapLayer(LayerContainer::const_iterator bl, LayerContainer::const_iterator blend, ServicesTracker &tracker, HRoute &route)
Definition: Routing2.cxx:349
VRoute::position
virtual double position() const
Definition: VRoute.h:28
InDetServMatGeometryManager::SupportTubeRMin
double SupportTubeRMin(const std::string &name) const
Definition: InDetServMatGeometryManager.cxx:117
HRoute::zExit
double zExit() const
Definition: HRoute.h:26
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ServicesTracker
Definition: ServicesTracker.h:19
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Routing2::m_c_bpEosLength
double m_c_bpEosLength
Definition: Routing2.h:34
Route::setExitVolume
void setExitVolume(ServiceVolume *vp)
Definition: Route.h:50
DEBUG
#define DEBUG
Definition: page_access.h:11
VRoute::volumes
virtual const VolumeContainer & volumes() const
Definition: VRoute.h:34
DetType::Part
Part
Definition: DetType.h:14
Routing2::m_epHRoute
HRoute m_epHRoute
Definition: Routing2.h:50
Routing2::m_istHRoute
HRoute m_istHRoute
Definition: Routing2.h:57
Routing2::createRoutes
void createRoutes(ServicesTracker &tracker)
Definition: Routing2.cxx:75
DetType
Definition: DetType.h:10
ServiceVolume::next
ServiceVolume * next()
Definition: InDetServMatGeoModel/src/ServiceVolume.h:71
Routing2::connectRoutes
void connectRoutes(Route &in, Route &out)
Definition: Routing2.cxx:513
Route::volumes
virtual const VolumeContainer & volumes() const =0
ServiceVolume::dump
void dump(bool dumpMaterial=true) const
Definition: InDetServMatGeoModel/src/ServiceVolume.cxx:10
Routing2::LayerContainer
ServicesTracker::LayerContainer LayerContainer
Definition: Routing2.h:18
Route::position
virtual double position() const =0
InDetServMatGeometryManager::SupportTubeZMin
double SupportTubeZMin(const std::string &name) const
Definition: InDetServMatGeometryManager.cxx:131
ServiceVolume::addLayers
void addLayers(const LayerContainer &lc)
Definition: InDetServMatGeoModel/src/ServiceVolume.h:30
HRoute
Definition: HRoute.h:13
Route::addVolume
virtual void addVolume(ServiceVolume *vol)=0
Route::exit
virtual double exit() const =0
Routing2::m_volumes
std::vector< ServiceVolume * > m_volumes
Definition: Routing2.h:46