18 #include "GaudiKernel/SystemOfUnits.h"
60 const std::string&
t,
const std::string&
n,
const IInterface*
p)
78 return StatusCode::SUCCESS;
81 std::unique_ptr<Trk::TrackingGeometry>
86 bool hasStations = !inertObjs.empty() || !stations.empty();
100 ATH_MSG_INFO(
" diluted inert material hardcoded for 3D "
101 "volume frame, adjusting setup");
130 for (
unsigned int i = 0;
i < envelopeDefsIn.size();
i++) {
133 else if (envelopeDefsIn[
i].
second == envelopeDefsIn[ii].
second &&
134 envelopeDefsIn[
i].
first > envelopeDefsIn[ii].
first)
140 unsigned int inext = ii + 1;
141 if (inext == envelopeDefsIn.size())
143 if (envelopeDefsIn[inext].
second != envelopeDefsIn[ii].
second) {
145 inext = ii > 0 ? ii - 1 : envelopeDefsIn.size() - 1;
150 for (
unsigned int i = inext;
i < envelopeDefsIn.size();
i++)
151 envelopeDefs.push_back(envelopeDefsIn[
i]);
153 for (
unsigned int i = 0;
i <= inext - 1;
i++)
154 envelopeDefs.push_back(envelopeDefsIn[
i]);
158 envelopeDefs.push_back(envelopeDefsIn[
i]);
161 inext = envelopeDefsIn.size() - 1;
162 while (inext >= ii) {
163 envelopeDefs.push_back(envelopeDefsIn[inext]);
170 for (
auto& envelopeDef : envelopeDefs) {
171 if (envelopeDef.first > maxR)
172 maxR = envelopeDef.first;
184 for (
unsigned int i = 0;
i < envelopeDefs.size();
i++) {
186 <<
"," << envelopeDefs[
i].
second);
194 auto topVolume = std::make_unique<Trk::TrackingVolume>(
nullptr, std::move(globalBounds), aLVC.
m_muonMaterial,
195 nullptr,
nullptr,
"GlobalVolume");
196 return std::make_unique<Trk::TrackingGeometry>(topVolume.release());
205 std::vector<TrackingVolumePtr> volumeGarbage{};
208 negativeMuonBigWheel{}, negativeMuonOuterBuffer{},
209 positiveMuonOuterWheel{}, negativeMuonSmallWheel{},
210 positiveMuonSmallWheel{}, negativeECT{}, positiveECT{},
211 positiveMuonBigWheel{}, positiveMuonOuterBuffer{};
213 TrackingVolumePtr negBeamPipe{}, posBeamPipe{}, negDiskShield{}, posDiskShield{},
214 negInnerShield{}, posInnerShield{}, negOuterShield{}, posOuterShield{};
216 std::shared_ptr<Trk::CylinderVolumeBounds> enclosedBounds{};
220 negativeMuonInnerEndcap{}, positiveMuonInnerEndcap{},
221 negNavOEndcap{}, posNavOEndcap{}, negativeMuonOuterEndcap{},
222 positiveMuonOuterEndcap{}, barrel{}, negOuterEndcap{},
223 posOuterEndcap{}, negInnerEndcap{}, posInnerEndcap{}, negNavEndcap{},
229 bool msEntryDefined =
false;
231 msEntryDefined =
true;
235 if (!enclosedDetectorBounds) {
236 ATH_MSG_ERROR(
" dynamic cast of enclosed volume to the cylinder bounds failed, aborting MTG build-up ");
239 double enclosedDetectorHalfZ = enclosedDetectorBounds->halflengthZ();
240 double enclosedDetectorOuterRadius =
241 enclosedDetectorBounds->outerRadius();
247 if (!enclosedCentralFaceVolumes.empty()) {
249 if (cylR && cylR->outerRadius() != enclosedDetectorOuterRadius) {
252 "correspond to radius of glue volumes : adjusted ");
255 if (!enclosedNegativeFaceVolumes.empty() &&
256 !enclosedPositiveFaceVolumes.empty()) {
257 double negZ = -enclosedDetectorHalfZ;
258 double posZ = enclosedDetectorHalfZ;
261 negZ = enclosedNegativeFaceVolumes[0]->center().z() - cylN->halflengthZ();
265 posZ = enclosedPositiveFaceVolumes[0]->center().z() +
268 if (std::abs(negZ + enclosedDetectorHalfZ) > 0.001 ||
269 std::abs(
posZ - enclosedDetectorHalfZ) > 0.001) {
270 ATH_MSG_WARNING(
" enclosed volume envelope z dimension does not correspond to that of glue volumes ");
271 if (std::abs(negZ +
posZ) < 0.001) {
272 enclosedDetectorHalfZ =
posZ;
275 ATH_MSG_ERROR(
"assymetric Z dimensions - cannot recover " << negZ <<
"," <<
posZ);
283 ATH_MSG_DEBUG(
" dimensions of enclosed detectors (halfZ,outerR):"
284 << enclosedDetectorHalfZ <<
","<< enclosedDetectorOuterRadius);
289 "muon envelope, abandon :R:"
290 << enclosedDetectorOuterRadius);
298 <<
"muon envelope, abandon :Z:"<< enclosedDetectorHalfZ);
302 auto barrelZPBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.
m_innerBarrelRadius,
303 0.5 * (
m_barrelZ - enclosedDetectorHalfZ));
304 auto barrelZMBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.
m_innerBarrelRadius,
305 0.5 * (
m_barrelZ - enclosedDetectorHalfZ));
306 double zbShift = 0.5 * (
m_barrelZ + enclosedDetectorHalfZ);
310 nullptr,
"BarrelRZPosBuffer");
313 nullptr,
"BarrelRZNegBuffer");
318 std::move(barrelZPBuffer),
321 std::string nameEncl = msEntryDefined ?
"All::Gaps::Barrel" :
m_entryVolume.value();
325 std::move(barrelZMBuffer),
341 <<
" m_enclosingEnvelopeSvc "
345 for (
const auto& envelopeDef : envelopeDefs) {
346 rmax =
std::max(envelopeDef.first, rmax);
349 if (!envelopeDefs.empty()) {
352 enclosedBounds = std::make_unique<Trk::CylinderVolumeBounds>(rmax,
zmax);
355 <<
") clashes with MS material, switch to default values (R,Z:"
361 if (!enclosedBounds) {
365 enclosed = std::make_unique<Trk::TrackingVolume>(
nullptr, std::move(enclosedBounds),
375 for (
auto& envelopeDef : envelopeDefs) {
383 std::abs(envelopeDef.second) >
m_barrelZ)
401 for (;
il < envelopeDefs.size();
il++)
424 auto negDiskShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.
m_innerBarrelRadius,
427 std::move(negDiskShieldBounds));
428 negDiskShield =
processShield(negDiskVol, 2,
"Muons::Detectors::NegativeDiskShield",
431 auto posDiskShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.
m_innerBarrelRadius,
434 std::move(posDiskShieldBounds));
435 posDiskShield =
processShield(posDiskVol, 2,
"Muons::Detectors::PositiveDiskShield",
441 std::move(posDiskShield),
443 "Container::CentralP");
446 std::move(negDiskShield),
448 "Container::Central");
459 Trk::Volume barrelVol(
nullptr, std::move(barrelBounds));
463 muonBarrel =
processVolume(barrelVol, 0,
"Detectors::Barrel",
466 muonBarrel =
processVolume(barrelVol, -1,
"Detectors::Barrel",
470 "Detectors::Barrel", aLVC, hasStations);
475 auto negativeSmallWheelBounds = std::make_shared<Trk::CylinderVolumeBounds>(
m_innerShieldRadius,
477 smallWheelZHalfSize);
480 std::move(negativeSmallWheelBounds));
482 negativeMuonSmallWheel =
processVolume(negSWVol, 1,
"Detectors::NegativeSmallWheel",
485 negativeMuonSmallWheel =
processVolume(negSWVol, -1,
"Detectors::NegativeSmallWheel",
491 "Detectors::NegativeSmallWheel",
497 positiveMuonSmallWheel =
processVolume(posSWVol, 1,
"Detectors::PositiveSmallWheel",
500 positiveMuonSmallWheel =
processVolume(posSWVol, -1,
"Detectors::PositiveSmallWheel",
516 std::move(negativeECTBounds));
518 negativeECT =
processVolume(negECTVol, 2,
"Detectors::NegativeECT",
521 negativeECT =
processVolume(negECTVol, -1,
"Detectors::NegativeECT",
525 "Detectors::NegativeECT", aLVC, hasStations);
532 positiveECT =
processVolume(posECTVol, 2,
"Detectors::PositiveECT",
535 positiveECT =
processVolume(posECTVol, -1,
"Detectors::PositiveECT",
546 std::move(negativeMuonSmallWheel),
548 "Container::NegInnerEndcap"));
549 positiveMuonInnerEndcap = (
m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(positiveMuonSmallWheel),
551 std::move(positiveECT),
553 "Container::PosInnerEndcap"));
557 auto negInnerShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
559 innerEndcapZHalfSize);
561 std::move(negInnerShieldBounds)};
562 negInnerShield =
processShield(negisVol, 1,
"Muons::Detectors::NegativeInnerShield",
565 auto posInnerShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
567 innerEndcapZHalfSize);
569 std::move(posInnerShieldBounds));
570 posInnerShield =
processShield(posisVol, 1,
"Muons::Detectors::PositiveInnerShield",
577 auto negativeOuterWheelBounds = std::make_shared<Trk::CylinderVolumeBounds>(
m_outerShieldRadius,
579 outerWheelZHalfSize);
581 outerWheelZHalfSize)),
582 std::move(negativeOuterWheelBounds));
584 negativeMuonOuterWheel =
processVolume(negOWVol, 3,
"Detectors::NegativeOuterWheel",
587 negativeMuonOuterWheel =
processVolume(negOWVol, -1,
"Detectors::NegativeOuterWheel",
599 positiveMuonOuterWheel =
processVolume(posOWVol, 3,
"Detectors::PositiveOuterWheel",
602 positiveMuonOuterWheel =
processVolume(posOWVol, -1,
"Detectors::PositiveOuterWheel",
611 auto negativeOuterBufferBounds = std::make_shared<Trk::CylinderVolumeBounds>(
m_outerShieldRadius,
613 outerBufferZHalfSize);
616 outerBufferZHalfSize)),
617 std::move(negativeOuterBufferBounds));
619 negativeMuonOuterBuffer =
processVolume(negBuffVol, 3,
"Detectors::NegativeOuterBuffer",
622 negativeMuonOuterBuffer =
processVolume(negBuffVol, -1,
"Detectors::NegativeOuterBuffer",
632 positiveMuonOuterBuffer =
processVolume(posBuffVol, 3,
"Detectors::PositiveOuterBuffer",
635 positiveMuonOuterBuffer =
processVolume(posBuffVol, -1,
"Detectors::PositiveOuterBuffer",
644 auto negativeBigWheelBounds = std::make_shared<Trk::CylinderVolumeBounds>(
m_outerShieldRadius,
650 std::move(negativeBigWheelBounds));
652 negativeMuonBigWheel =
processVolume(negBWVol, 3,
"Detectors::NegativeBigWheel",
655 negativeMuonBigWheel =
processVolume(negBWVol, -1,
"Detectors::NegativeBigWheel",
666 positiveMuonBigWheel =
processVolume(posBWVol, 3,
"Detectors::PositiveBigWheel",
669 positiveMuonBigWheel =
processVolume(posBWVol, -1,
"Detectors::PositiveBigWheel",
679 std::move(negativeMuonOuterBuffer),
681 "Container::NegOEndcap");
685 std::move(positiveMuonOuterWheel),
687 "Container::PosOEndcap");
692 std::move(negativeMuonBigWheel),
694 "Container::NegOuterEndcap");
696 positiveMuonOuterEndcap =
m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(positiveMuonBigWheel),
698 std::move(posNavOEndcap),
700 "Container::PosOuterEndcap");
705 auto negOuterShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
707 outerEndcapZHalfSize);
709 std::move(negOuterShieldBounds));
710 negOuterShield =
processShield(negosVol, 0,
"Muons::Detectors::NegativeOuterShield",
713 auto posOuterShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(
716 std::move(posOuterShieldBounds));
717 posOuterShield =
processShield(pososVol, 0,
"Muons::Detectors::PositiveOuterShield",
721 auto negBeamPipeBounds = std::make_shared<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
722 outerEndcapZHalfSize + innerEndcapZHalfSize);
723 auto posBeamPipeBounds = std::make_shared<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
724 outerEndcapZHalfSize + innerEndcapZHalfSize);
726 std::move(negBeamPipeBounds));
727 negBeamPipe =
processVolume(negbpVol, 1, 1,
"Muons::Gaps::NegativeBeamPipe",
730 std::move(posBeamPipeBounds));
731 posBeamPipe =
processVolume(posbpVol, 1, 1,
"Muons::Gaps::PositiveBeamPipe",
734 negBeamPipe->registerColorCode(0);
735 posBeamPipe->registerColorCode(0);
747 "All::Container::Barrel");
752 std::move(negOuterShield),
754 "Container::NegativeOuterEndcap");
758 std::move(posOuterShield),
760 "Container::PositiveOuterEndcap");
766 std::move(negInnerShield),
768 "Container::NegativeInnerEndcap");
772 std::move(posInnerShield),
774 "Container::PositiveInnerEndcap");
780 std::move(negInnerEndcap),
782 "Container::NegativeEndcap");
786 std::move(posOuterEndcap),
788 "Container::PositiveEndcap");
794 std::move(negBeamPipe),
796 "All::Container::NegativeEndcap"));
799 std::move(posBeamPipe),
801 "All::Container::PositiveEndcap"));
811 "All::Container::NegDet");
825 trackingGeometry->addToGarbage(std::move(stations));
826 trackingGeometry->addToGarbage(std::move(inertObjs));
828 volumeGarbage.push_back(std::move(negativeMuonOuterWheel));
829 volumeGarbage.push_back(std::move(negativeMuonBigWheel));
830 volumeGarbage.push_back(std::move(negativeMuonOuterBuffer));
831 volumeGarbage.push_back(std::move(positiveMuonOuterWheel));
833 volumeGarbage.push_back(std::move(negativeMuonSmallWheel));
834 volumeGarbage.push_back(std::move(positiveMuonSmallWheel));
835 volumeGarbage.push_back(std::move(negativeECT));
836 volumeGarbage.push_back(std::move(positiveECT));
837 volumeGarbage.push_back(std::move(positiveMuonBigWheel));
839 volumeGarbage.push_back(std::move(positiveMuonOuterBuffer));
840 volumeGarbage.push_back(std::move(negDiskShield));
841 volumeGarbage.push_back(std::move(posDiskShield));
843 trackingGeometry->addToGarbage(std::move(volumeGarbage));
847 return trackingGeometry;
863 obj->trackingVolume()->transform(), zTol, phiTol)};
864 double x0 =
obj->trackingVolume()->X0;
865 double intX0 = std::abs(
span->zMin -
span->zMax) / (x0 + 0.000000001);
866 double l0 =
obj->trackingVolume()->L0;
868 <<
span->zMax <<
"," <<
span->phiMin <<
","
869 <<
span->phiMax <<
"," <<
span->rMin <<
","
870 <<
span->rMax <<
" X0 " << x0 <<
" L0 " <<
l0
871 <<
" intX0 for span0 span1 " << intX0);
876 spans[0].emplace_back(
obj.get(),
span);
881 spans[1].emplace_back(
obj.get(),
span);
886 spans[2].emplace_back(
obj.get(),
span);
891 spans[3].emplace_back(
obj.get(),
span);
896 spans[4].emplace_back(
obj.get(),
span);
901 spans[5].emplace_back(
obj.get(),
span);
906 spans[6].emplace_back(
obj.get(),
span);
911 spans[7].emplace_back(
obj.get(),
span);
916 spans[8].emplace_back(
obj.get(),
span);
933 const std::string& volumeName,
935 bool hasStations)
const {
940 std::vector<Trk::DetachedTrackingVolume*> blendVols;
943 if (etaN < 1 || phiN < 1) {
948 if (etaN * phiN > 1) {
951 ATH_MSG_ERROR(
" process volume: volume cylinder boundaries not retrieved, return 0 ");
954 double phiSect =
M_PI / phiN;
955 double etaSect = (cyl->halflengthZ()) / etaN;
957 auto subBds = std::make_shared<Trk::CylinderVolumeBounds>(cyl->innerRadius(), cyl->outerRadius(), phiSect, etaSect);
958 auto protVol = std::make_unique<Trk::Volume>(
nullptr, std::move(subBds));
961 std::vector<Trk::TrackingVolumeOrderPosition> subVolumes;
962 std::vector<Trk::TrackingVolume*> sVols;
963 std::vector<Trk::TrackingVolume*> sVolsNeg;
964 std::vector<Trk::TrackingVolume*> sVolsPos;
967 colorCode = 26 - colorCode;
969 double posZ = vol.
center().z() + etaSect * (2. *
eta + 1. - etaN);
970 double posR = 0.5 * (cyl->innerRadius() + cyl->outerRadius());
971 int geoSignature = 4;
973 for (
unsigned int in = 1; in < aLVC.
m_msCutoutsIn.size(); in++) {
981 if (geoSignature == 4) {
995 colorCode = 26 - colorCode;
999 auto subVol = std::make_unique<Trk::Volume>(*protVol, transf);
1004 std::vector<Trk::DetachedTrackingVolume*> detVols{};
1008 auto detVolVecPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1009 auto sVol = std::make_unique<Trk::TrackingVolume>(*subVol, aLVC.
m_muonMaterial,
1010 std::move(detVolVecPtr), volName);
1016 for (
auto& blendVol : blendVols) {
1017 aLVC.
m_blendMap[blendVol].push_back(sVol.get());
1021 if (geoSignature == 2) {
1024 if (geoSignature == 5) {
1027 sVol->registerColorCode(colorCode);
1030 Amg::Vector3D::UnitX();;
1032 sVols.push_back(sVol.get());
1034 sVolsNeg.push_back(sVol.get());
1035 if (
eta == etaN - 1)
1036 sVolsPos.push_back(sVol.get());
1038 if (phiN > 1 &&
phi > 0) {
1041 *sVols[
eta * phiN +
phi - 1],
1043 if (
phi == phiN - 1)
1050 if (etaN > 1 &&
eta > 0)
1053 *sVols[(
eta - 1) * phiN +
phi],
1056 subVolumes.emplace_back(std::move(sVol), transf * gp);
1063 volCenter.z() - cyl->halflengthZ(),
1064 volCenter.z() + cyl->halflengthZ(),
1069 auto subVols = std::make_unique<Trk::BinnedArray2D<Trk::TrackingVolume>>(std::move(subVolumes),
1072 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
nullptr,
1073 std::move(subVols), volumeName);
1084 std::vector<Trk::DetachedTrackingVolume*> muonObjs{};
1088 auto muonObjsPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(muonObjs);
1090 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial, std::move(muonObjsPtr),
1097 for (
auto& blendVol : blendVols) {
1098 aLVC.
m_blendMap[blendVol].push_back(tVol.get());
1108 const std::string& volumeName,
1110 bool hasStations)
const {
1122 std::vector<Trk::DetachedTrackingVolume*> blendVols;
1129 ATH_MSG_ERROR(
" process volume: volume cylinder boundaries not retrieved, return 0 ");
1133 std::vector<float> zSteps;
1134 std::vector<int> zTypes;
1135 double zPos = vol.
center().z();
1136 double hz = cyl->halflengthZ();
1137 double z1 = zPos -
hz;
1138 double z2 = zPos +
hz;
1139 zSteps.push_back(z1);
1140 for (
unsigned int iz = 0; iz < aLVC.
m_zPartitions.size(); iz++) {
1145 if (zTypes.empty()) {
1147 zTypes.push_back(0);
1155 zSteps.push_back(z2);
1157 for (
unsigned int iz = 0; iz < zSteps.size(); iz++)
1158 ATH_MSG_DEBUG(
"z partition in volume:" << volumeName <<
":" << iz <<
":"
1165 else if (std::abs(zPos) <=
m_ectZ)
1180 unsigned int etaN = zSteps.size() - 1;
1189 std::vector<std::vector<Trk::BinUtility>> hBinUtil{};
1190 for (
unsigned iz = 0; iz < zSteps.size() - 1; iz++) {
1191 std::vector<Trk::BinUtility> phBinUtil{};
1202 for (std::pair<int, float>
i :
1206 <<
" zTypes[iz] " << zTypes[iz]
1207 <<
" m_adjustedPhiType[ip] "
1209 <<
" hPartitions " <<
i.second);
1211 phBinUtil.emplace_back(phiRef,
1214 hBinUtil.push_back(std::move(phBinUtil));
1218 std::vector<Trk::TrackingVolumeOrderPosition> subVolumesVect;
1219 std::vector<std::vector<std::vector<Trk::TrackingVolume*>>> subVolumes;
1220 std::vector<std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume> > > >
1222 std::vector<Trk::TrackingVolume*> sVolsInn;
1223 std::vector<Trk::TrackingVolume*> sVolsOut;
1224 std::vector<Trk::TrackingVolume*> sVolsNeg;
1225 std::vector<Trk::TrackingVolume*> sVolsPos;
1226 for (
unsigned int eta = 0;
eta < zSteps.size() - 1;
eta++) {
1227 if (colorCode > 0) {
1228 colorCode = 6 - colorCode;
1230 double posZ = 0.5 * (zSteps[
eta] + zSteps[
eta + 1]);
1231 double hZ = 0.5 * std::abs(zSteps[
eta + 1] - zSteps[
eta]);
1232 std::vector<std::vector<Trk::TrackingVolume*> > phiSubs;
1233 std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume>>> phBins;
1234 std::vector<int> phiType(phiTypeMax + 1, -1);
1235 std::vector<std::vector<Trk::Volume*> > garbVol(phiTypeMax + 1);
1236 unsigned int pCode = 1;
1237 for (
unsigned int phi = 0;
phi < phiN;
phi++) {
1238 pCode = (colorCode > 0) ? 3 - pCode : 0;
1240 double phiSect = 0.;
1241 if (
phi < phiN - 1) {
1250 std::vector<std::pair<int, float> > hSteps =
1253 std::vector<Trk::TrackingVolume*> hSubs;
1254 std::vector<Trk::TrackingVolumeOrderPosition> hSubsTr;
1257 unsigned int hCode = 1;
1258 for (
unsigned int h = 0;
h < hSteps.size() - 1;
h++) {
1259 hCode = colorCode > 0 ? 1 - hCode : 0;
1261 std::unique_ptr<Trk::Volume> subVol{};
1273 subVol = std::make_unique<Trk::Volume>(*phiSubs[phiP][
h],
1274 transf *phiSubs[phiP][
h]->
transform().inverse());
1275 }
else if (phiSect < 0.5 *
M_PI) {
1276 auto subBds = std::make_shared<Trk::BevelledCylinderVolumeBounds>(hSteps[
h].
second,
1280 subVol = std::make_unique<Trk::Volume>(
makeTransform(transf), std::move(subBds));
1282 auto subBds = std::make_shared<Trk::CylinderVolumeBounds>(hSteps[
h].
second,
1285 subVol = std::make_unique<Trk::Volume>(
makeTransform(transf), std::move(subBds));
1290 std::string volName = volumeName +
1295 std::vector<Trk::DetachedTrackingVolume*> detVols{};
1299 auto detVolsPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1300 auto sVol = std::make_unique<Trk::TrackingVolume>(*subVol,
1302 std::move(detVolsPtr),
1310 for (
auto& blendVol : blendVols) {
1311 aLVC.
m_blendMap[blendVol].push_back(sVol.get());
1315 double posR = 0.5 * (hSteps[
h].second + hSteps[
h + 1].second);
1317 for (
unsigned int in = 1; in < aLVC.
m_msCutoutsIn.size(); ++in) {
1327 for (
unsigned int io = 1; io < aLVC.
m_msCutoutsOut.size(); ++io) {
1337 sVol->registerColorCode(colorCode + pCode + hCode);
1340 0.5 * (hSteps[
h].second + hSteps[
h + 1].second) * Amg::Vector3D::UnitX();
1341 hSubs.push_back(sVol.get());
1345 sVolsInn.push_back(sVol.get());
1346 if (
h == hSteps.size() - 2)
1347 sVolsOut.push_back(sVol.get());
1349 sVolsNeg.push_back(sVol.get());
1350 if (
eta == etaN - 1)
1351 sVolsPos.push_back(sVol.get());
1354 if (volType == 1 || volType == 3) {
1371 if (phiN > 1 &&
phi > 0) {
1375 if (
phi == phiN - 1){
1382 if (etaN > 1 &&
eta > 0) {
1391 subVolumesVect.emplace_back(std::move(sVol), transf * gp);
1394 auto& back = subVolumesVect.back();
1395 auto ptrNoDelete = std::shared_ptr<Trk::TrackingVolume>(
1397 Trk::do_not_delete<Trk::TrackingVolume>);
1398 hSubsTr.push_back({ptrNoDelete,back.second});
1400 phiSubs.push_back(hSubs);
1401 auto volBinArray = std::make_unique<Trk::BinnedArray1D<Trk::TrackingVolume>>(hSubsTr,
1403 phBins.emplace_back(std::move(volBinArray));
1409 if (phiN > 1 &&
phi > 0) {
1410 for (
auto& j : phiSubs[
phi - 1]) {
1416 if (phiN > 1 &&
phi == phiN - 1) {
1417 for (
auto& j : phiSubs[0]) {
1424 if (etaN > 1 &&
eta > 0) {
1425 for (
auto& j: subVolumes[
eta - 1][
phi]) {
1431 subVolumes.push_back(phiSubs);
1432 hBins.push_back(phBins);
1435 auto hBinVecPtr = hBinUtil;
1436 auto subVols = std::make_unique<Trk::BinnedArray1D1D1D<Trk::TrackingVolume>>(subVolumesVect,
1441 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
nullptr,
1442 std::move(subVols), volumeName);
1462 if (etaN * phiN > 1) {
1466 std::vector<Trk::TrackingVolumeOrderPosition> subVolumes(etaN * phiN);
1467 std::vector<Trk::TrackingVolume*> sVols(etaN * phiN);
1468 std::vector<Trk::TrackingVolume*> sVolsNeg(phiN);
1469 std::vector<Trk::TrackingVolume*> sVolsPos(phiN);
1470 for (
unsigned int eta = 0;
eta < zSteps.size() - 1; ++
eta) {
1471 double posZ = 0.5 * (zSteps[
eta] + zSteps[
eta + 1]);
1472 double hZ = 0.5 * std::abs(zSteps[
eta + 1] - zSteps[
eta]);
1473 colorCode = 26 - colorCode;
1474 for (
unsigned int phi = 0;
phi < phiN;
phi++) {
1475 colorCode = 26 - colorCode;
1477 double phiSect = 0.;
1478 if (
phi < phiN - 1) {
1488 auto subBds = std::make_shared<Trk::CylinderVolumeBounds>(cyl->innerRadius(), cyl->outerRadius(), phiSect, hZ);
1498 std::vector<Trk::DetachedTrackingVolume*> detVols{} ;
1502 auto detVolPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1503 auto sVol = std::make_unique<Trk::TrackingVolume>(subVol, aLVC.
m_muonMaterial,
1504 std::move(detVolPtr),
1511 for (
auto& blendVol : blendVols) {
1512 aLVC.
m_blendMap[blendVol].push_back(sVol.get());
1516 double posR = 0.5 * (cyl->innerRadius() + cyl->outerRadius());
1518 for (
unsigned int in = 1; in < aLVC.
m_msCutoutsIn.size(); ++in) {
1527 for (
unsigned int io = 1; io < aLVC.
m_msCutoutsOut.size(); ++io) {
1535 sVol->registerColorCode(colorCode);
1537 const Amg::Vector3D gp = cyl->outerRadius() * Amg::Vector3D::UnitX();
1540 sVols[phiN *
eta +
phi] = sVol.get();
1542 sVolsNeg[
phi] = sVol.get();
1544 if (
eta == etaN - 1) {
1545 sVolsPos[
phi] = sVol.get();
1548 if (phiN > 1 &&
phi > 0) {
1551 *sVols[
eta * phiN +
phi - 1],
1553 if (
phi == phiN - 1) {
1561 if (etaN > 1 &&
eta > 0) {
1564 *sVols[(
eta - 1) * phiN +
phi],
1568 subVolumes[
phi * etaN +
eta] = std::make_pair(std::move(sVol), transf * gp);
1582 zBinUtil += pBinUtil;
1586 auto subVols = std::make_unique<Trk::BinnedArray2D<Trk::TrackingVolume>>(subVolumes,
1589 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
nullptr,
1590 std::move(subVols), volumeName);
1601 std::vector<Trk::DetachedTrackingVolume*> muonObjs{};
1605 auto muonObjPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(muonObjs);
1606 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
1607 std::move(muonObjPtr),
1614 for (
auto& blendVol : blendVols) {
1615 aLVC.
m_blendMap[blendVol].push_back(tVol.get());
1625 const std::string& volumeName,
1627 bool hasStations)
const {
1629 <<
" in mode:" <<
type);
1635 std::vector<Trk::DetachedTrackingVolume*> blendVols;
1642 ATH_MSG_ERROR(
" process volume: volume cylinder boundaries not retrieved, return 0 ");
1646 std::vector<float> zSteps;
1648 double zPos = vol.
center().z();
1649 double hz = cyl->halflengthZ();
1650 double z1 = zPos -
hz;
1651 double z2 = zPos +
hz;
1652 zSteps.push_back(z1);
1654 if (iz > z1 && iz < z2) {
1655 zSteps.push_back(iz);
1659 zSteps.push_back(z2);
1665 unsigned int etaN = zSteps.size() - 1;
1672 std::vector<std::vector<Trk::BinUtility>> hBinUtil{};
1674 for (
unsigned iz = 0; iz < zSteps.size() - 1; iz++) {
1675 std::vector<Trk::BinUtility> phBinUtil;
1677 hBinUtil.push_back(std::move(phBinUtil));
1682 std::vector<Trk::TrackingVolumeOrderPosition> subVolumesVect;
1683 std::vector<std::vector<std::vector<Trk::TrackingVolume*>>> subVolumes;
1684 std::vector<std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume>>>> hBins;
1685 std::vector<Trk::TrackingVolume*> sVolsInn;
1686 std::vector<Trk::TrackingVolume*> sVolsOut;
1687 std::vector<Trk::TrackingVolume*> sVolsNeg;
1688 std::vector<Trk::TrackingVolume*> sVolsPos;
1689 for (
unsigned int eta = 0;
eta < zSteps.size() - 1;
eta++) {
1691 colorCode = 26 - colorCode;
1692 double posZ = 0.5 * (zSteps[
eta] + zSteps[
eta + 1]);
1693 double hZ = 0.5 * std::abs(zSteps[
eta + 1] - zSteps[
eta]);
1694 std::vector<std::vector<Trk::TrackingVolume*> > phiSubs;
1695 std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume>>> phBins{};
1698 double phiSect =
M_PI;
1700 std::vector<Trk::TrackingVolume*> hSubs;
1701 std::vector<Trk::TrackingVolumeOrderPosition> hSubsTr;
1702 unsigned int hCode = 1;
1703 for (
unsigned int h = 0;
h < hSteps.size() - 1;
h++) {
1704 hCode = (colorCode > 0) ? 1 - hCode : 0;
1706 auto subBds = std::make_shared<Trk::CylinderVolumeBounds>(hSteps[
h].
second, hSteps[
h + 1].
second, phiSect, hZ);
1707 const double mediumRadius = subBds->mediumRadius();
1717 std::vector<Trk::DetachedTrackingVolume*> detVols{};
1721 auto detVolPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1722 auto sVol = std::make_unique<Trk::TrackingVolume>(subVol, aLVC.
m_muonMaterial,
1723 std::move(detVolPtr), volName);
1730 for (
auto& blendVol : blendVols) {
1731 aLVC.
m_blendMap[blendVol].push_back(sVol.get());
1735 double posR = 0.5 * (hSteps[
h].second + hSteps[
h + 1].second);
1737 for (
unsigned int in = 1; in < aLVC.
m_msCutoutsIn.size(); in++) {
1746 sVol->registerColorCode(colorCode + hCode);
1748 const Amg::Vector3D gp = mediumRadius * Amg::Vector3D::UnitX();
1749 hSubs.push_back(sVol.get());
1753 sVolsInn.push_back(sVol.get());
1754 if (
h == hSteps.size() - 2)
1755 sVolsOut.push_back(sVol.get());
1757 sVolsNeg.push_back(sVol.get());
1758 if (
eta == etaN - 1)
1759 sVolsPos.push_back(sVol.get());
1770 if (etaN > 1 &&
eta > 0)
1778 subVolumesVect.emplace_back(std::move(sVol), transf * gp);
1781 auto& back = subVolumesVect.back();
1782 auto ptrNoDelete = std::shared_ptr<Trk::TrackingVolume>(
1783 back.first.get(), Trk::do_not_delete<Trk::TrackingVolume>);
1784 hSubsTr.push_back({ptrNoDelete, back.second});
1786 phiSubs.push_back(hSubs);
1788 auto volBinArray = std::make_unique<Trk::BinnedArray1D<Trk::TrackingVolume>>(hSubsTr, hBinUtil[
eta][
phi]);
1789 phBins.push_back(std::move(volBinArray));
1792 if (etaN > 1 &&
eta > 0) {
1793 for (
auto& j : subVolumes[
eta - 1][
phi]) {
1799 subVolumes.push_back(phiSubs);
1800 hBins.push_back(phBins);
1803 auto hBinVecPtr = hBinUtil;
1804 auto subVols = std::make_unique<Trk::BinnedArray1D1D1D<Trk::TrackingVolume>>(subVolumesVect,
1809 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
nullptr,
1810 std::move(subVols), volumeName);
1821 std::vector<Trk::DetachedTrackingVolume*>
1823 std::vector<Trk::DetachedTrackingVolume*>& blendVols,
1828 std::vector<Trk::DetachedTrackingVolume*> detTVs{};
1835 double rmed{0.}, dphi{0.},
hz{0.}, rMin{0.}, rMax{0.}, rMaxc{0.};
1838 rmed = cyl->mediumRadius();
1839 dphi = cyl->halfPhiSector();
1840 hz = cyl->halflengthZ();
1841 rMin = cyl->innerRadius();
1842 rMax = cyl->outerRadius();
1845 rmed = bcyl->mediumRadius();
1846 dphi = bcyl->halfPhiSector();
1847 hz = bcyl->halflengthZ();
1848 rMin = bcyl->innerRadius();
1849 rMax = bcyl->outerRadius();
1851 type = bcyl->type();
1853 rMaxc *= 1. /
cos(dphi);
1859 double zMin = center[2] -
hz;
1860 double zMax = center[2] +
hz;
1862 double pMax = +2 *
M_PI;
1863 bool phiLim =
false;
1865 pMin = center.phi() - dphi +
M_PI;
1866 pMax = center.phi() + dphi +
M_PI;
1870 ATH_MSG_VERBOSE(
" zMin " << zMin <<
" zMax " << zMax <<
" rMin " << rMin
1871 <<
" rMax " << rMax <<
" rMaxc " << rMaxc
1872 <<
" phi limits " << pMin <<
" phiMax " << pMax
1873 <<
" phiLim " << phiLim);
1887 else if (zMin >= -
m_ectZ)
1896 else if (zMax <= -
m_ectZ)
1911 for (
int gMode = gMin; gMode <= gMax; gMode++) {
1913 bool rLimit = !aLVC.
m_static3d || (
s->rMin <= rMaxc &&
s->rMax >= rMin);
1915 bool meanZOK =
false;
1916 if (station->name() ==
"BME1_Station" ||
1917 station->name() ==
"BME2_Station") {
1918 if ((
s->zMin +
s->zMax) / 2. < zMax &&
1919 (
s->zMin +
s->zMax) / 2. > zMin)
1921 if ((
s->phiMin +
s->phiMax) / 2 < pMin && phiLim)
1927 ((
s->zMin < zMax &&
s->zMax > zMin) || meanZOK)) {
1928 bool accepted =
false;
1930 if (pMin >= 0 && pMax <= 2 *
M_PI) {
1931 if (
s->phiMin <=
s->phiMax &&
1932 s->phiMin <= pMax &&
s->phiMax >= pMin)
1934 if (
s->phiMin >
s->phiMax &&
1935 (
s->phiMin <= pMax ||
s->phiMax >= pMin))
1937 }
else if (pMin < 0) {
1938 if (
s->phiMin <=
s->phiMax &&
1939 (
s->phiMin <= pMax ||
1940 s->phiMax >= pMin + 2 *
M_PI))
1942 if (
s->phiMin >
s->phiMax)
1944 }
else if (pMax > 2 *
M_PI) {
1945 if (
s->phiMin <=
s->phiMax &&
1946 (
s->phiMin <= pMax - 2 *
M_PI ||
1949 if (
s->phiMin >
s->phiMax)
1957 detTVs.push_back(station);
1959 << station->name() <<
" zMin " << zMin
1960 <<
" zMax " << zMax <<
" rMin " << rMin
1961 <<
" rMax " << rMax <<
" PhiMin "
1962 << pMin <<
" PhiMax " << pMax);
1970 for (
int gMode = gMin; gMode <= gMax; gMode++) {
1971 for (
const auto& [inert,
s]: (aLVC.
m_inertSpan)[gMode]) {
1973 (
s->rMin <= rMaxc &&
s->rMax >= rMin));
1974 if (rLimit &&
s->zMin < zMax &&
s->zMax > zMin) {
1975 bool accepted =
false;
1977 if (pMin >= 0 && pMax <= 2 *
M_PI) {
1978 if (
s->phiMin <=
s->phiMax &&
1979 s->phiMin <= pMax &&
s->phiMax >= pMin)
1981 if (
s->phiMin >
s->phiMax &&
1982 (
s->phiMin <= pMax ||
s->phiMax >= pMin))
1984 }
else if (pMin < 0) {
1985 if (
s->phiMin <=
s->phiMax &&
1986 (
s->phiMin <= pMax ||
1987 s->phiMax >= pMin + 2 *
M_PI))
1989 if (
s->phiMin >
s->phiMax)
1991 }
else if (pMax > 2 *
M_PI) {
1992 if (
s->phiMin <=
s->phiMax &&
1993 (
s->phiMin <= pMax - 2 *
M_PI ||
1996 if (
s->phiMin >
s->phiMax)
2003 inert->name().compare(inert->name().size() - 4, 4,
2006 detTVs.push_back(inert);
2008 blendVols.push_back(inert);
2010 << inert->name() <<
" zMin " << zMin
2011 <<
" zMax " << zMax <<
" rMin " << rMin
2012 <<
" rMax " << rMax <<
" PhiMin "
2013 << pMin <<
" PhiMax " << pMax);
2026 constexpr
double tol = 1.;
2027 constexpr
double ptol = 0.11;
2034 double rmed{0.}, dphi{0.},
hz{0.}, rMin{0.}, rMax{0.};
2036 rmed = cyl->mediumRadius();
2037 dphi = cyl->halfPhiSector();
2038 hz = cyl->halflengthZ();
2039 rMin = cyl->innerRadius();
2040 rMax = cyl->outerRadius();
2042 rmed = bcyl->mediumRadius();
2043 dphi = bcyl->halfPhiSector();
2044 hz = bcyl->halflengthZ();
2045 rMin = bcyl->innerRadius();
2046 rMax = bcyl->outerRadius();
2052 double zMin = center[2] -
hz;
2053 double zMax = center[2] +
hz;
2055 double pMax = +2 *
M_PI;
2056 bool phiLim =
false;
2058 pMin = center.phi() - dphi +
M_PI;
2059 pMax = center.phi() + dphi +
M_PI;
2064 <<
":r:" << rMin <<
"," << rMax
2065 <<
":phi:" << pMin <<
"," << pMax);
2068 (
span.rMin < rMax - tol &&
span.rMax > rMin + tol));
2069 if (rLimit &&
span.zMin < zMax - tol &&
span.zMax > zMin + tol) {
2071 if (pMin >= 0 && pMax <= 2 *
M_PI) {
2072 if (
span.phiMin <=
span.phiMax &&
span.phiMin < pMax + ptol &&
2073 span.phiMax > pMin - ptol)
2076 (
span.phiMin < pMax - ptol ||
span.phiMax > pMin + ptol))
2078 }
else if (pMin < 0) {
2080 (
span.phiMin < pMax + ptol ||
2081 span.phiMax > pMin - ptol + 2 *
M_PI))
2085 }
else if (pMax > 2 *
M_PI) {
2087 (
span.phiMin < pMax + ptol - 2 *
M_PI ||
2088 span.phiMax > pMin - ptol))
2327 for (
unsigned int i = 0;
i < zSiz;
i++) {
2343 }
else if (
mode == 1) {
2352 while (
ic < phiNum - 1) {
2359 }
else if (
mode == 2) {
2365 phiSect[0] = (
M_PI / 8 - 0.105);
2381 }
else if (
mode == 3) {
2389 phiSect[1] = 0.5 * (
M_PI / 8. - phiSect[0] - phiSect[2]);
2419 std::vector<std::pair<int, float> > barrelZ0F0;
2422 barrelZ0F0.emplace_back(0, 4450.);
2423 barrelZ0F0.emplace_back(0, 6500.);
2424 barrelZ0F0.emplace_back(0, 8900.);
2425 barrelZ0F0.emplace_back(0, 13000.);
2429 std::vector<std::pair<int, float> > barrelZ0F1;
2432 barrelZ0F1.emplace_back(1, 4500.);
2433 barrelZ0F1.emplace_back(1, 5900.);
2435 barrelZ0F1.emplace_back(0, 4450.);
2437 barrelZ0F1.emplace_back(0, 6500.);
2439 barrelZ0F1.emplace_back(1, 8900.);
2441 barrelZ0F1.emplace_back(0, 8900.);
2443 barrelZ0F1.emplace_back(1, 10100.);
2444 barrelZ0F1.emplace_back(0, 13000.);
2448 std::vector<std::pair<int, float> > barrelZ1F0;
2453 barrelZ1F0.emplace_back(0, 4450.);
2455 barrelZ1F0.emplace_back(1, 5800.);
2456 barrelZ1F0.emplace_back(1, 6500.);
2458 barrelZ1F0.emplace_back(0, 6500.);
2460 barrelZ1F0.emplace_back(1, 6750.);
2461 barrelZ1F0.emplace_back(1, 8400.);
2464 barrelZ1F0.emplace_back(0, 8770.);
2466 barrelZ1F0.emplace_back(1, 9850.);
2467 barrelZ1F0.emplace_back(0, 13000.);
2470 std::vector<std::pair<int, float> > barrelZ1F1;
2473 barrelZ1F1.emplace_back(1, 4500.);
2474 barrelZ1F1.emplace_back(1, 6000.);
2476 barrelZ1F1.emplace_back(0, 4450.);
2478 barrelZ1F1.emplace_back(0, 6500.);
2480 barrelZ1F1.emplace_back(1, 6800.);
2482 barrelZ1F1.emplace_back(1, 8900.);
2483 barrelZ1F1.emplace_back(1, 10100.);
2485 barrelZ1F1.emplace_back(0, 8900.);
2486 barrelZ1F1.emplace_back(0, 13000.);
2489 std::vector<std::vector<std::vector<std::pair<int, float> > > > barrelZF(2);
2490 barrelZF[0].push_back(barrelZ0F0);
2491 barrelZF[0].push_back(barrelZ0F1);
2492 barrelZF[1].push_back(barrelZ1F0);
2493 barrelZF[1].push_back(barrelZ1F1);
2497 std::vector<std::pair<int, float> > swZ0F0;
2500 swZ0F0.emplace_back(0, 2700.);
2505 swZ0F0.emplace_back(0, 4450.);
2507 swZ0F0.emplace_back(0, 6560.);
2508 swZ0F0.emplace_back(0, 8900.);
2513 std::vector<std::pair<int, float> > swZ0F1;
2516 swZ0F1.emplace_back(0, 2700.);
2520 swZ0F1.emplace_back(0, 4450.);
2522 swZ0F1.emplace_back(1, 5900.);
2524 swZ0F1.emplace_back(0, 6560.);
2526 swZ0F1.emplace_back(1, 8900.);
2527 swZ0F1.emplace_back(1, 10100.);
2529 swZ0F1.emplace_back(0, 8900.);
2532 std::vector<std::vector<std::vector<std::pair<int, float> > > > swZF(1);
2533 swZF[0].push_back(swZ0F0);
2534 swZF[0].push_back(swZ0F1);
2538 std::vector<std::pair<int, float> > innerZ0F0;
2541 innerZ0F0.emplace_back(0, 1100.);
2543 innerZ0F0.emplace_back(1, 5150.);
2545 innerZ0F0.emplace_back(1, 5300.);
2547 innerZ0F0.emplace_back(0, 6500.);
2548 innerZ0F0.emplace_back(0, 8900.);
2553 std::vector<std::pair<int, float> > innerZ0F1;
2556 innerZ0F1.emplace_back(0, 1100.);
2558 innerZ0F1.emplace_back(1, 1400.);
2559 innerZ0F1.emplace_back(1, 1685.);
2562 innerZ0F1.emplace_back(1, 4700.);
2563 innerZ0F1.emplace_back(1, 5900.);
2566 innerZ0F1.emplace_back(0, 6500.);
2567 innerZ0F1.emplace_back(0, 8900.);
2572 std::vector<std::pair<int, float> > innerZ0F2;
2575 innerZ0F2.emplace_back(0, 1100.);
2577 innerZ0F2.emplace_back(1, 1400.);
2578 innerZ0F2.emplace_back(1, 1685.);
2581 innerZ0F2.emplace_back(1, 4450.);
2582 innerZ0F2.emplace_back(1, 5900.);
2585 innerZ0F2.emplace_back(0, 6500.);
2587 innerZ0F2.emplace_back(1, 8900.);
2588 innerZ0F2.emplace_back(1, 10100.);
2590 innerZ0F2.emplace_back(0, 8900.);
2594 std::vector<std::pair<int, float> > innerZ1F0;
2597 innerZ1F0.emplace_back(0, 1100.);
2599 innerZ1F0.emplace_back(1, 5150.);
2601 innerZ1F0.emplace_back(1, 5300.);
2603 innerZ1F0.emplace_back(1, 5800.);
2605 innerZ1F0.emplace_back(1, 6750.);
2607 innerZ1F0.emplace_back(0, 6500.);
2609 innerZ1F0.emplace_back(1, 8400.);
2610 innerZ1F0.emplace_back(1, 9600.);
2612 innerZ1F0.emplace_back(0, 8900.);
2616 std::vector<std::pair<int, float> > innerZ1F1;
2619 innerZ1F1.emplace_back(0, 1100.);
2621 innerZ1F1.emplace_back(1, 1400.);
2622 innerZ1F1.emplace_back(1, 1685.);
2625 innerZ1F1.emplace_back(1, 4700.);
2626 innerZ1F1.emplace_back(1, 5800.);
2627 innerZ1F1.emplace_back(1, 6750.);
2629 innerZ1F1.emplace_back(0, 6500.);
2631 innerZ1F1.emplace_back(1, 8400.);
2632 innerZ1F1.emplace_back(1, 9600.);
2634 innerZ1F1.emplace_back(0, 8900.);
2638 std::vector<std::pair<int, float> > innerZ1F2;
2641 innerZ1F2.emplace_back(0, 1100.);
2643 innerZ1F2.emplace_back(1, 1400.);
2644 innerZ1F2.emplace_back(1, 1685.);
2646 innerZ1F2.emplace_back(0, 4150.);
2648 innerZ1F2.emplace_back(1, 4700.);
2649 innerZ1F2.emplace_back(1, 5900.);
2650 innerZ1F2.emplace_back(1, 6800.);
2652 innerZ1F2.emplace_back(0, 6500.);
2654 innerZ1F2.emplace_back(1, 8900.);
2655 innerZ1F2.emplace_back(1, 10100.);
2657 innerZ1F2.emplace_back(0, 8900.);
2660 std::vector<std::vector<std::vector<std::pair<int, float> > > > innerZF(2);
2661 innerZF[0].push_back(innerZ0F0);
2662 innerZF[0].push_back(innerZ0F1);
2663 innerZF[0].push_back(innerZ0F2);
2664 innerZF[1].push_back(innerZ1F0);
2665 innerZF[1].push_back(innerZ1F1);
2666 innerZF[1].push_back(innerZ1F2);
2669 std::vector<std::pair<int, float> > outerZ0F0;
2671 outerZ0F0.emplace_back(0, 2750.);
2672 outerZ0F0.emplace_back(0, 12650.);
2673 outerZ0F0.emplace_back(0, 13400.);
2676 std::vector<std::pair<int, float> > outerZ0F1;
2678 outerZ0F1.emplace_back(0, 2750.);
2680 outerZ0F1.emplace_back(0, 3600.);
2681 outerZ0F1.emplace_back(0, 5300.);
2682 outerZ0F1.emplace_back(0, 7000.);
2683 outerZ0F1.emplace_back(0, 8500.);
2684 outerZ0F1.emplace_back(0, 10000.);
2685 outerZ0F1.emplace_back(0, 12000.);
2687 outerZ0F1.emplace_back(0, 12650.);
2688 outerZ0F1.emplace_back(0, 13400.);
2691 std::vector<std::vector<std::vector<std::pair<int, float> > > > outerZF(2);
2692 outerZF[0].push_back(outerZ0F0);
2693 outerZF[0].push_back(outerZ0F0);
2694 outerZF[0].push_back(outerZ0F0);
2695 outerZF[1].push_back(outerZ0F1);
2696 outerZF[1].push_back(outerZ0F1);
2697 outerZF[1].push_back(outerZ0F1);
2719 for (
unsigned int i = 9;
i < 18;
i++)
2724 std::vector<std::pair<int, float> > outerShield;
2726 outerShield.emplace_back(0, 279.);
2727 outerShield.emplace_back(0, 436.7);
2728 outerShield.emplace_back(0, 1050.);
2732 std::vector<std::pair<int, float> > innerShield;
2734 innerShield.emplace_back(0, 530.);
2738 std::vector<std::pair<int, float> > diskShield;
2739 diskShield.emplace_back(0, 0.);
2740 diskShield.emplace_back(0, 540.);
2741 diskShield.emplace_back(0, 750.);
2742 diskShield.emplace_back(0, 2700.);
2743 diskShield.emplace_back(0, 4255.);
2757 viter->trackingVolume()->transform(), 0., 0.)};
2758 if (
span && csVol > 0) {
2761 std::vector<bool> fEncl;
2764 for (
auto *
const fIter :
vv) {
2770 double dil = enVol > 0. ? csVol / enVol : 0.;
2772 for (
auto fIter =
vv.begin(); fIter !=
vv.end(); ++fIter) {
2773 if (fEncl[fIter -
vv.begin()]) {
2780 <<
" acquires material from "
2791 <<
", not blended ");