ATLAS Offline Software
Loading...
Searching...
No Matches
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>
10using 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
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
145 m_bpVRoute.setNextRoute(&m_bpHRoute);
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());
178 double zpos = m_epHRoute.zMax() + m_c_ServiceDiskThickness/2 + m_c_safetyGap;
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");
184 m_epHRoute.setNextRoute( &m_pixelV2Route);
185 m_pixelV2Route.setNextRoute( &m_pixelH2Route);
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");
222 m_istVRoute.setNextRoute(&m_istHRoute);
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
290bool 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
303void 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
349void 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
553double 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
573{
574 return m_c_halfEosThick;
575}
576
577void 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
586std::string Routing2::nextVolumeName( const Route& route) const
587{
588 ostringstream os;
589 os << route.volumes().size();
590 return route.name() + "Vol" + os.str();
591}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define max(a, b)
Definition cfImp.cxx:41
MsgStream & msg() const
The standard message stream.
bool msgLvl(const MSG::Level lvl) const
Test the output level.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
double radius() const
Definition HRoute.h:25
virtual double position() const
Definition HRoute.h:28
double zExit() const
Definition HRoute.h:26
double zMin() const
Definition HRoute.h:23
virtual void addVolume(ServiceVolume *vol)
Definition HRoute.h:36
double zMax() const
Definition HRoute.h:24
const VolumeContainer & volumes() const
Definition HRoute.h:34
int SupportTubeExists(const std::string &name) const
double SupportTubeZMin(const std::string &name) const
double SupportTubeRMax(const std::string &name) const
double SupportTubeZMax(const std::string &name) const
std::string pixelDiskServiceRoute(int disk) const
double SupportTubeRMin(const std::string &name) const
Definition Route.h:15
virtual double position() const =0
const std::string & name() const
Definition Route.h:42
void setExitVolume(ServiceVolume *vp)
Definition Route.h:50
virtual ServiceVolume * exitVolume(bool ascending, MsgStream &msg) const
Definition Route.cxx:51
virtual double exit() const =0
virtual void addVolume(ServiceVolume *vol)=0
virtual const VolumeContainer & volumes() const =0
HRoute m_epHRoute
Definition Routing2.h:50
void routeBarrelLayer(LayerContainer::const_iterator bl, LayerContainer::const_iterator blend, ServicesTracker &tracker, VRoute &route)
Definition Routing2.cxx:303
VRoute m_bpVRoute
Definition Routing2.h:48
void createRoutesInIST(ServicesTracker &tracker)
Definition Routing2.cxx:189
std::string nextVolumeName(const Route &route) const
Definition Routing2.cxx:586
void routeOuterBarrelPixel(ServicesTracker &tracker)
Definition Routing2.cxx:225
HRoute m_MSTI_HRoute
Definition Routing2.h:65
HRoute m_pixelH2Route
Definition Routing2.h:53
HRoute m_istHRoute
Definition Routing2.h:57
void routeInnerBarrelPixel(ServicesTracker &tracker)
Definition Routing2.cxx:295
HRoute m_bpHRoute
Definition Routing2.h:49
double m_c_bsEosLength
Definition Routing2.h:36
bool m_ISTexists
Definition Routing2.h:30
HRoute m_MSTM_HRouteInner
Definition Routing2.h:64
HRoute m_MSTM_HRoute
Definition Routing2.h:63
ServicesTracker::LayerContainer LayerContainer
Definition Routing2.h:18
double eosHalfThickness(DetType::Type type, DetType::Part part) const
Definition Routing2.cxx:572
void createRoutingVolumes(ServicesTracker &tracker)
Definition Routing2.cxx:36
double m_c_epEosLength
Definition Routing2.h:35
void connect(ServiceVolume *prev, ServiceVolume *newv)
Definition Routing2.cxx:505
VRoute m_istVRoute
Definition Routing2.h:56
double m_c_EosTolerance
Definition Routing2.h:39
double m_c_EosTolerance2
Definition Routing2.h:41
double eosLength(DetType::Type type, DetType::Part part) const
Definition Routing2.cxx:558
VRoute m_bsVRoute
Definition Routing2.h:55
void connectRoutes(Route &in, Route &out)
Definition Routing2.cxx:513
void routeEndcapPixel(ServicesTracker &tracker)
Definition Routing2.cxx:242
bool m_routePixelBarrelOnPST
Definition Routing2.h:28
HRoute m_MSTO_HRoute
Definition Routing2.h:62
double eosTolerance(DetType::Type type, DetType::Part part) const
Definition Routing2.cxx:553
void routeEndcapLayer(LayerContainer::const_iterator bl, LayerContainer::const_iterator blend, ServicesTracker &tracker, HRoute &route)
Definition Routing2.cxx:349
void addVolume(ServiceVolume *v)
Definition Routing2.h:85
double m_c_halfEosThick
Definition Routing2.h:40
void dumpRoute(const Route &route)
Definition Routing2.cxx:577
double m_c_ServiceCylinderThickness
Definition Routing2.h:43
double m_c_bpEosLength
Definition Routing2.h:34
double m_c_safetyGap
Definition Routing2.h:37
bool m_pixelAlongBarrelStrip
Definition Routing2.h:29
void createOuterPixelRoutes(ServicesTracker &tracker)
Definition Routing2.cxx:172
ServiceVolume * createSingleRouteVolume(Route &rt)
Definition Routing2.cxx:532
std::vector< ServiceVolume * > m_volumes
Definition Routing2.h:46
void routeBarrelStrip(ServicesTracker &tracker)
Definition Routing2.cxx:234
int m_c_nInnerPixelLayers
Definition Routing2.h:32
VRoute m_pixelV2Route
Definition Routing2.h:52
double m_c_LayerLengthTolerance
Definition Routing2.h:44
double m_c_ServiceDiskThickness
Definition Routing2.h:42
bool isRoutedOutsideSupportTube(LayerContainer::const_iterator bl, HRoute &route)
Definition Routing2.cxx:290
void createRoutes(ServicesTracker &tracker)
Definition Routing2.cxx:75
void setNext(ServiceVolume *next)
const LayerContainer & layers() const
void addLayer(const ServicesLayer *l)
Add a layer the services of which are routed through this volume.
void addLayers(const LayerContainer &lc)
void addPrevious(ServiceVolume *prev)
void addEosServices(const ServicesLayer *l)
void dump(bool dumpMaterial=true) const
LayerContainer & barrelStripLayers()
LayerContainer & endcapPixelLayers()
LayerContainer & barrelPixelLayers()
void setServiceVolumes(const std::vector< ServiceVolume * > &vc)
const InDetServMatGeometryManager * geoMgr() const
double rMin() const
Definition VRoute.h:23
virtual const VolumeContainer & volumes() const
Definition VRoute.h:34
double rExit() const
Definition VRoute.h:26
virtual double position() const
Definition VRoute.h:28
double zPos() const
Definition VRoute.h:25
double rMax() const
Definition VRoute.h:24
virtual void addVolume(ServiceVolume *vol)
Definition VRoute.h:36
@ Endcap
Definition DetType.h:14
@ Barrel
Definition DetType.h:14
STL namespace.
void reverse(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of reverse for DataVector/List.