18 #include "GaudiKernel/SystemOfUnits.h"
59 const std::string&
t,
const std::string&
n,
const IInterface*
p)
77 return StatusCode::SUCCESS;
80 std::unique_ptr<Trk::TrackingGeometry>
85 bool hasStations = inertObjs.size() || stations.size();
99 ATH_MSG_INFO(
" diluted inert material hardcoded for 3D "
100 "volume frame, adjusting setup");
129 for (
unsigned int i = 0;
i < envelopeDefsIn.size();
i++) {
132 else if (envelopeDefsIn[
i].
second == envelopeDefsIn[ii].
second &&
133 envelopeDefsIn[
i].
first > envelopeDefsIn[ii].
first)
139 unsigned int inext = ii + 1;
140 if (inext == envelopeDefsIn.size())
142 if (envelopeDefsIn[inext].
second != envelopeDefsIn[ii].
second) {
144 inext = ii > 0 ? ii - 1 : envelopeDefsIn.size() - 1;
149 for (
unsigned int i = inext;
i < envelopeDefsIn.size();
i++)
150 envelopeDefs.push_back(envelopeDefsIn[
i]);
152 for (
unsigned int i = 0;
i <= inext - 1;
i++)
153 envelopeDefs.push_back(envelopeDefsIn[
i]);
157 envelopeDefs.push_back(envelopeDefsIn[
i]);
160 inext = envelopeDefsIn.size() - 1;
161 while (inext >= ii) {
162 envelopeDefs.push_back(envelopeDefsIn[inext]);
169 for (
auto& envelopeDef : envelopeDefs) {
170 if (envelopeDef.first > maxR)
171 maxR = envelopeDef.first;
183 for (
unsigned int i = 0;
i < envelopeDefs.size();
i++) {
185 <<
"," << envelopeDefs[
i].
second);
193 auto topVolume = std::make_unique<Trk::TrackingVolume>(
nullptr, globalBounds.release(), aLVC.
m_muonMaterial,
194 nullptr,
nullptr,
"GlobalVolume");
195 return std::make_unique<Trk::TrackingGeometry>(topVolume.release());
204 std::vector<TrackingVolumePtr> volumeGarbage{};
207 negativeMuonBigWheel{}, negativeMuonOuterBuffer{},
208 positiveMuonOuterWheel{}, negativeMuonSmallWheel{},
209 positiveMuonSmallWheel{}, negativeECT{}, positiveECT{},
210 positiveMuonBigWheel{}, positiveMuonOuterBuffer{};
212 TrackingVolumePtr negBeamPipe{}, posBeamPipe{}, negDiskShield{}, posDiskShield{},
213 negInnerShield{}, posInnerShield{}, negOuterShield{}, posOuterShield{};
215 std::unique_ptr<Trk::CylinderVolumeBounds> enclosedBounds{};
219 negativeMuonInnerEndcap{}, positiveMuonInnerEndcap{},
220 negNavOEndcap{}, posNavOEndcap{}, negativeMuonOuterEndcap{},
221 positiveMuonOuterEndcap{}, barrel{}, negOuterEndcap{},
222 posOuterEndcap{}, negInnerEndcap{}, posInnerEndcap{}, negNavEndcap{},
228 bool msEntryDefined =
false;
230 msEntryDefined =
true;
234 if (!enclosedDetectorBounds) {
235 ATH_MSG_ERROR(
" dynamic cast of enclosed volume to the cylinder bounds failed, aborting MTG build-up ");
238 double enclosedDetectorHalfZ = enclosedDetectorBounds->halflengthZ();
239 double enclosedDetectorOuterRadius =
240 enclosedDetectorBounds->outerRadius();
246 if (!enclosedCentralFaceVolumes.empty()) {
248 if (cylR && cylR->outerRadius() != enclosedDetectorOuterRadius) {
251 "correspond to radius of glue volumes : adjusted ");
254 if (!enclosedNegativeFaceVolumes.empty() &&
255 !enclosedPositiveFaceVolumes.empty()) {
256 double negZ = -enclosedDetectorHalfZ;
257 double posZ = enclosedDetectorHalfZ;
260 negZ = enclosedNegativeFaceVolumes[0]->center().z() - cylN->halflengthZ();
264 posZ = enclosedPositiveFaceVolumes[0]->center().z() +
267 if (std::abs(negZ + enclosedDetectorHalfZ) > 0.001 ||
268 std::abs(
posZ - enclosedDetectorHalfZ) > 0.001) {
269 ATH_MSG_WARNING(
" enclosed volume envelope z dimension does not correspond to that of glue volumes ");
270 if (std::abs(negZ +
posZ) < 0.001) {
271 enclosedDetectorHalfZ =
posZ;
274 ATH_MSG_ERROR(
"assymetric Z dimensions - cannot recover " << negZ <<
"," <<
posZ);
282 ATH_MSG_DEBUG(
" dimensions of enclosed detectors (halfZ,outerR):"
283 << enclosedDetectorHalfZ <<
","<< enclosedDetectorOuterRadius);
288 "muon envelope, abandon :R:"
289 << enclosedDetectorOuterRadius);
297 <<
"muon envelope, abandon :Z:"<< enclosedDetectorHalfZ);
301 auto barrelZPBounds = std::make_unique<Trk::CylinderVolumeBounds>(aLVC.
m_innerBarrelRadius,
302 0.5 * (
m_barrelZ - enclosedDetectorHalfZ));
303 auto barrelZMBounds = std::make_unique<Trk::CylinderVolumeBounds>(aLVC.
m_innerBarrelRadius,
304 0.5 * (
m_barrelZ - enclosedDetectorHalfZ));
305 double zbShift = 0.5 * (
m_barrelZ + enclosedDetectorHalfZ);
309 nullptr,
"BarrelRZPosBuffer");
312 nullptr,
"BarrelRZNegBuffer");
317 std::move(barrelZPBuffer),
320 std::string nameEncl = msEntryDefined ?
"All::Gaps::Barrel" :
m_entryVolume;
324 std::move(barrelZMBuffer),
340 <<
" m_enclosingEnvelopeSvc "
344 for (
const auto& envelopeDef : envelopeDefs) {
345 rmax =
std::max(envelopeDef.first, rmax);
348 if (!envelopeDefs.empty()) {
351 enclosedBounds = std::make_unique<Trk::CylinderVolumeBounds>(rmax,
zmax);
354 <<
") clashes with MS material, switch to default values (R,Z:"
360 if (!enclosedBounds) {
364 enclosed = std::make_unique<Trk::TrackingVolume>(
nullptr, enclosedBounds.release(),
374 for (
auto& envelopeDef : envelopeDefs) {
382 std::abs(envelopeDef.second) >
m_barrelZ)
400 for (;
il < envelopeDefs.size();
il++)
423 auto negDiskShieldBounds = std::make_unique<Trk::CylinderVolumeBounds>(aLVC.
m_innerBarrelRadius,
426 negDiskShieldBounds.release());
427 negDiskShield =
processShield(negDiskVol, 2,
"Muons::Detectors::NegativeDiskShield",
430 auto posDiskShieldBounds = std::make_unique<Trk::CylinderVolumeBounds>(aLVC.
m_innerBarrelRadius,
433 posDiskShieldBounds.release());
434 posDiskShield =
processShield(posDiskVol, 2,
"Muons::Detectors::PositiveDiskShield",
440 std::move(posDiskShield),
442 "Container::CentralP");
445 std::move(negDiskShield),
447 "Container::Central");
458 Trk::Volume barrelVol(
nullptr, barrelBounds.release());
462 muonBarrel =
processVolume(barrelVol, 0,
"Detectors::Barrel",
465 muonBarrel =
processVolume(barrelVol, -1,
"Detectors::Barrel",
469 "Detectors::Barrel", aLVC, hasStations);
474 auto negativeSmallWheelBounds = std::make_unique<Trk::CylinderVolumeBounds>(
m_innerShieldRadius,
476 smallWheelZHalfSize);
479 negativeSmallWheelBounds.release());
481 negativeMuonSmallWheel =
processVolume(negSWVol, 1,
"Detectors::NegativeSmallWheel",
484 negativeMuonSmallWheel =
processVolume(negSWVol, -1,
"Detectors::NegativeSmallWheel",
490 "Detectors::NegativeSmallWheel",
496 positiveMuonSmallWheel =
processVolume(posSWVol, 1,
"Detectors::PositiveSmallWheel",
499 positiveMuonSmallWheel =
processVolume(posSWVol, -1,
"Detectors::PositiveSmallWheel",
515 negativeECTBounds.release());
517 negativeECT =
processVolume(negECTVol, 2,
"Detectors::NegativeECT",
520 negativeECT =
processVolume(negECTVol, -1,
"Detectors::NegativeECT",
524 "Detectors::NegativeECT", aLVC, hasStations);
531 positiveECT =
processVolume(posECTVol, 2,
"Detectors::PositiveECT",
534 positiveECT =
processVolume(posECTVol, -1,
"Detectors::PositiveECT",
545 std::move(negativeMuonSmallWheel),
547 "Container::NegInnerEndcap"));
548 positiveMuonInnerEndcap = (
m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(positiveMuonSmallWheel),
550 std::move(positiveECT),
552 "Container::PosInnerEndcap"));
556 auto negInnerShieldBounds = std::make_unique<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
558 innerEndcapZHalfSize);
560 negInnerShieldBounds.release()};
561 negInnerShield =
processShield(negisVol, 1,
"Muons::Detectors::NegativeInnerShield",
564 auto posInnerShieldBounds = std::make_unique<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
566 innerEndcapZHalfSize);
568 posInnerShieldBounds.release());
569 posInnerShield =
processShield(posisVol, 1,
"Muons::Detectors::PositiveInnerShield",
576 auto negativeOuterWheelBounds = std::make_unique<Trk::CylinderVolumeBounds>(
m_outerShieldRadius,
578 outerWheelZHalfSize);
580 outerWheelZHalfSize)),
581 negativeOuterWheelBounds.release());
583 negativeMuonOuterWheel =
processVolume(negOWVol, 3,
"Detectors::NegativeOuterWheel",
586 negativeMuonOuterWheel =
processVolume(negOWVol, -1,
"Detectors::NegativeOuterWheel",
598 positiveMuonOuterWheel =
processVolume(posOWVol, 3,
"Detectors::PositiveOuterWheel",
601 positiveMuonOuterWheel =
processVolume(posOWVol, -1,
"Detectors::PositiveOuterWheel",
610 auto negativeOuterBufferBounds = std::make_unique<Trk::CylinderVolumeBounds>(
m_outerShieldRadius,
612 outerBufferZHalfSize);
615 outerBufferZHalfSize)),
616 negativeOuterBufferBounds.release());
618 negativeMuonOuterBuffer =
processVolume(negBuffVol, 3,
"Detectors::NegativeOuterBuffer",
621 negativeMuonOuterBuffer =
processVolume(negBuffVol, -1,
"Detectors::NegativeOuterBuffer",
631 positiveMuonOuterBuffer =
processVolume(posBuffVol, 3,
"Detectors::PositiveOuterBuffer",
634 positiveMuonOuterBuffer =
processVolume(posBuffVol, -1,
"Detectors::PositiveOuterBuffer",
643 auto negativeBigWheelBounds = std::make_unique<Trk::CylinderVolumeBounds>(
m_outerShieldRadius,
649 negativeBigWheelBounds.release());
651 negativeMuonBigWheel =
processVolume(negBWVol, 3,
"Detectors::NegativeBigWheel",
654 negativeMuonBigWheel =
processVolume(negBWVol, -1,
"Detectors::NegativeBigWheel",
665 positiveMuonBigWheel =
processVolume(posBWVol, 3,
"Detectors::PositiveBigWheel",
668 positiveMuonBigWheel =
processVolume(posBWVol, -1,
"Detectors::PositiveBigWheel",
678 std::move(negativeMuonOuterBuffer),
680 "Container::NegOEndcap");
684 std::move(positiveMuonOuterWheel),
686 "Container::PosOEndcap");
691 std::move(negativeMuonBigWheel),
693 "Container::NegOuterEndcap");
695 positiveMuonOuterEndcap =
m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(positiveMuonBigWheel),
697 std::move(posNavOEndcap),
699 "Container::PosOuterEndcap");
704 auto negOuterShieldBounds = std::make_unique<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
706 outerEndcapZHalfSize);
708 negOuterShieldBounds.release());
709 negOuterShield =
processShield(negosVol, 0,
"Muons::Detectors::NegativeOuterShield",
712 auto posOuterShieldBounds = std::make_unique<Trk::CylinderVolumeBounds>(
715 posOuterShieldBounds.release());
716 posOuterShield =
processShield(pososVol, 0,
"Muons::Detectors::PositiveOuterShield",
720 auto negBeamPipeBounds = std::make_unique<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
721 outerEndcapZHalfSize + innerEndcapZHalfSize);
722 auto posBeamPipeBounds = std::make_unique<Trk::CylinderVolumeBounds>(
m_beamPipeRadius,
723 outerEndcapZHalfSize + innerEndcapZHalfSize);
725 negBeamPipeBounds.release());
726 negBeamPipe =
processVolume(negbpVol, 1, 1,
"Muons::Gaps::NegativeBeamPipe",
729 posBeamPipeBounds.release());
730 posBeamPipe =
processVolume(posbpVol, 1, 1,
"Muons::Gaps::PositiveBeamPipe",
733 negBeamPipe->registerColorCode(0);
734 posBeamPipe->registerColorCode(0);
746 "All::Container::Barrel");
751 std::move(negOuterShield),
753 "Container::NegativeOuterEndcap");
757 std::move(posOuterShield),
759 "Container::PositiveOuterEndcap");
765 std::move(negInnerShield),
767 "Container::NegativeInnerEndcap");
771 std::move(posInnerShield),
773 "Container::PositiveInnerEndcap");
779 std::move(negInnerEndcap),
781 "Container::NegativeEndcap");
785 std::move(posOuterEndcap),
787 "Container::PositiveEndcap");
793 std::move(negBeamPipe),
795 "All::Container::NegativeEndcap"));
798 std::move(posBeamPipe),
800 "All::Container::PositiveEndcap"));
810 "All::Container::NegDet");
824 trackingGeometry->addToGarbage(std::move(stations));
825 trackingGeometry->addToGarbage(std::move(inertObjs));
827 volumeGarbage.push_back(std::move(negativeMuonOuterWheel));
828 volumeGarbage.push_back(std::move(negativeMuonBigWheel));
829 volumeGarbage.push_back(std::move(negativeMuonOuterBuffer));
830 volumeGarbage.push_back(std::move(positiveMuonOuterWheel));
832 volumeGarbage.push_back(std::move(negativeMuonSmallWheel));
833 volumeGarbage.push_back(std::move(positiveMuonSmallWheel));
834 volumeGarbage.push_back(std::move(negativeECT));
835 volumeGarbage.push_back(std::move(positiveECT));
836 volumeGarbage.push_back(std::move(positiveMuonBigWheel));
838 volumeGarbage.push_back(std::move(positiveMuonOuterBuffer));
839 volumeGarbage.push_back(std::move(negDiskShield));
840 volumeGarbage.push_back(std::move(posDiskShield));
842 trackingGeometry->addToGarbage(std::move(volumeGarbage));
846 return trackingGeometry;
862 obj->trackingVolume()->transform(), zTol, phiTol)};
863 double x0 =
obj->trackingVolume()->X0;
864 double intX0 = std::abs(
span->zMin -
span->zMax) / (x0 + 0.000000001);
865 double l0 =
obj->trackingVolume()->L0;
867 <<
span->zMax <<
"," <<
span->phiMin <<
","
868 <<
span->phiMax <<
"," <<
span->rMin <<
","
869 <<
span->rMax <<
" X0 " << x0 <<
" L0 " <<
l0
870 <<
" intX0 for span0 span1 " << intX0);
875 spans[0].emplace_back(
obj.get(),
span);
880 spans[1].emplace_back(
obj.get(),
span);
885 spans[2].emplace_back(
obj.get(),
span);
890 spans[3].emplace_back(
obj.get(),
span);
895 spans[4].emplace_back(
obj.get(),
span);
900 spans[5].emplace_back(
obj.get(),
span);
905 spans[6].emplace_back(
obj.get(),
span);
910 spans[7].emplace_back(
obj.get(),
span);
915 spans[8].emplace_back(
obj.get(),
span);
932 const std::string& volumeName,
934 bool hasStations)
const {
939 std::vector<Trk::DetachedTrackingVolume*> blendVols;
942 if (etaN < 1 || phiN < 1) {
947 if (etaN * phiN > 1) {
950 ATH_MSG_ERROR(
" process volume: volume cylinder boundaries not retrieved, return 0 ");
953 double phiSect =
M_PI / phiN;
954 double etaSect = (cyl->halflengthZ()) / etaN;
956 auto subBds = std::make_unique<Trk::CylinderVolumeBounds>(cyl->innerRadius(), cyl->outerRadius(), phiSect, etaSect);
957 auto protVol = std::make_unique<Trk::Volume>(
nullptr, subBds.release());
960 std::vector<Trk::TrackingVolumeOrderPosition> subVolumes;
961 std::vector<Trk::TrackingVolume*> sVols;
962 std::vector<Trk::TrackingVolume*> sVolsNeg;
963 std::vector<Trk::TrackingVolume*> sVolsPos;
964 for (
int eta = 0; eta < etaN; eta++) {
966 colorCode = 26 - colorCode;
968 double posZ = vol.
center().z() + etaSect * (2. * eta + 1. - etaN);
969 double posR = 0.5 * (cyl->innerRadius() + cyl->outerRadius());
970 int geoSignature = 4;
972 for (
unsigned int in = 1; in < aLVC.
m_msCutoutsIn.size(); in++) {
980 if (geoSignature == 4) {
992 for (
int phi = 0; phi < phiN; phi++) {
994 colorCode = 26 - colorCode;
998 auto subVol = std::make_unique<Trk::Volume>(*protVol, transf);
1003 std::vector<Trk::DetachedTrackingVolume*> detVols{};
1007 auto detVolVecPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1008 auto sVol = std::make_unique<Trk::TrackingVolume>(*subVol, aLVC.
m_muonMaterial,
1009 detVolVecPtr.release(), volName);
1015 for (
auto& blendVol : blendVols) {
1016 aLVC.
m_blendMap[blendVol].push_back(sVol.get());
1020 if (geoSignature == 2) {
1023 if (geoSignature == 5) {
1026 sVol->registerColorCode(colorCode);
1029 Amg::Vector3D::UnitX();;
1031 sVols.push_back(sVol.get());
1033 sVolsNeg.push_back(sVol.get());
1034 if (eta == etaN - 1)
1035 sVolsPos.push_back(sVol.get());
1037 if (phiN > 1 && phi > 0) {
1040 *sVols[eta * phiN + phi - 1],
1042 if (phi == phiN - 1)
1049 if (etaN > 1 && eta > 0)
1052 *sVols[(eta - 1) * phiN + phi],
1055 subVolumes.emplace_back(std::move(sVol), transf * gp);
1062 volCenter.z() - cyl->halflengthZ(),
1063 volCenter.z() + cyl->halflengthZ(),
1067 auto volBinUtil = std::make_unique<Trk::BinUtility>(buPhi);
1068 auto subVols = std::make_unique<Trk::BinnedArray2D<Trk::TrackingVolume>>(std::move(subVolumes),
1069 volBinUtil.release());
1071 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
nullptr,
1072 subVols.release(), volumeName);
1083 std::vector<Trk::DetachedTrackingVolume*> muonObjs{};
1087 auto muonObjsPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(muonObjs);
1089 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial, muonObjsPtr.release(),
1096 for (
auto& blendVol : blendVols) {
1097 aLVC.
m_blendMap[blendVol].push_back(tVol.get());
1107 const std::string& volumeName,
1109 bool hasStations)
const {
1121 std::vector<Trk::DetachedTrackingVolume*> blendVols;
1128 ATH_MSG_ERROR(
" process volume: volume cylinder boundaries not retrieved, return 0 ");
1132 std::vector<float> zSteps;
1133 std::vector<int> zTypes;
1134 double zPos = vol.
center().z();
1135 double hz = cyl->halflengthZ();
1136 double z1 = zPos -
hz;
1137 double z2 = zPos +
hz;
1138 zSteps.push_back(z1);
1139 for (
unsigned int iz = 0; iz < aLVC.
m_zPartitions.size(); iz++) {
1144 if (zTypes.empty()) {
1146 zTypes.push_back(0);
1154 zSteps.push_back(z2);
1156 for (
unsigned int iz = 0; iz < zSteps.size(); iz++)
1157 ATH_MSG_DEBUG(
"z partition in volume:" << volumeName <<
":" << iz <<
":"
1164 else if (std::abs(zPos) <=
m_ectZ)
1179 unsigned int etaN = zSteps.size() - 1;
1188 std::vector<std::vector<std::unique_ptr<Trk::BinUtility>> > hBinUtil{};
1189 for (
unsigned iz = 0; iz < zSteps.size() - 1; iz++) {
1190 std::vector<std::unique_ptr<Trk::BinUtility>> phBinUtil{};
1201 for (std::pair<int, float>
i :
1205 <<
" zTypes[iz] " << zTypes[iz]
1206 <<
" m_adjustedPhiType[ip] "
1208 <<
" hPartitions " <<
i.second);
1210 phBinUtil.push_back(std::make_unique<Trk::BinUtility>(phiRef,
1213 hBinUtil.push_back(std::move(phBinUtil));
1217 std::vector<Trk::TrackingVolumeOrderPosition> subVolumesVect;
1218 std::vector<std::vector<std::vector<Trk::TrackingVolume*>>> subVolumes;
1219 std::vector<std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume> > > >
1221 std::vector<Trk::TrackingVolume*> sVolsInn;
1222 std::vector<Trk::TrackingVolume*> sVolsOut;
1223 std::vector<Trk::TrackingVolume*> sVolsNeg;
1224 std::vector<Trk::TrackingVolume*> sVolsPos;
1225 for (
unsigned int eta = 0; eta < zSteps.size() - 1; eta++) {
1226 if (colorCode > 0) {
1227 colorCode = 6 - colorCode;
1229 double posZ = 0.5 * (zSteps[eta] + zSteps[eta + 1]);
1230 double hZ = 0.5 * std::abs(zSteps[eta + 1] - zSteps[eta]);
1231 std::vector<std::vector<Trk::TrackingVolume*> > phiSubs;
1232 std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume>>> phBins;
1233 std::vector<int> phiType(phiTypeMax + 1, -1);
1234 std::vector<std::vector<Trk::Volume*> > garbVol(phiTypeMax + 1);
1235 unsigned int pCode = 1;
1236 for (
unsigned int phi = 0; phi < phiN; phi++) {
1237 pCode = (colorCode > 0) ? 3 - pCode : 0;
1239 double phiSect = 0.;
1240 if (phi < phiN - 1) {
1249 std::vector<std::pair<int, float> > hSteps =
1252 std::vector<Trk::TrackingVolume*> hSubs;
1253 std::vector<Trk::TrackingVolumeOrderPosition> hSubsTr;
1256 unsigned int hCode = 1;
1257 for (
unsigned int h = 0;
h < hSteps.size() - 1;
h++) {
1258 hCode = colorCode > 0 ? 1 - hCode : 0;
1260 std::unique_ptr<Trk::Volume> subVol{};
1272 subVol = std::make_unique<Trk::Volume>(*phiSubs[phiP][
h],
1274 }
else if (phiSect < 0.5 *
M_PI) {
1275 auto subBds = std::make_unique<Trk::BevelledCylinderVolumeBounds>(hSteps[
h].
second,
1279 subVol = std::make_unique<Trk::Volume>(
makeTransform(transf), subBds.release());
1281 auto subBds = std::make_unique<Trk::CylinderVolumeBounds>(hSteps[
h].
second,
1284 subVol = std::make_unique<Trk::Volume>(
makeTransform(transf), subBds.release());
1289 std::string volName = volumeName +
1294 std::vector<Trk::DetachedTrackingVolume*> detVols{};
1298 auto detVolsPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1299 auto sVol = std::make_unique<Trk::TrackingVolume>(*subVol,
1301 detVolsPtr.release(),
1309 for (
auto& blendVol : blendVols) {
1310 aLVC.
m_blendMap[blendVol].push_back(sVol.get());
1314 double posR = 0.5 * (hSteps[
h].second + hSteps[
h + 1].second);
1316 for (
unsigned int in = 1; in < aLVC.
m_msCutoutsIn.size(); ++in) {
1326 for (
unsigned int io = 1; io < aLVC.
m_msCutoutsOut.size(); ++io) {
1336 sVol->registerColorCode(colorCode + pCode + hCode);
1339 0.5 * (hSteps[
h].second + hSteps[
h + 1].second) * Amg::Vector3D::UnitX();
1340 hSubs.push_back(sVol.get());
1344 sVolsInn.push_back(sVol.get());
1345 if (
h == hSteps.size() - 2)
1346 sVolsOut.push_back(sVol.get());
1348 sVolsNeg.push_back(sVol.get());
1349 if (eta == etaN - 1)
1350 sVolsPos.push_back(sVol.get());
1353 if (volType == 1 || volType == 3) {
1370 if (phiN > 1 && phi > 0) {
1374 if (phi == phiN - 1){
1381 if (etaN > 1 && eta > 0) {
1384 hBins[eta - 1][phi]);
1387 subVolumesVect.emplace_back(std::move(sVol), transf * gp);
1388 hSubsTr.emplace_back(subVolumesVect.back());
1390 phiSubs.push_back(hSubs);
1391 auto volBinArray = std::make_unique<Trk::BinnedArray1D<Trk::TrackingVolume>>(hSubsTr,
1392 hBinUtil[eta][phi]->clone());
1393 phBins.emplace_back(std::move(volBinArray));
1399 if (phiN > 1 && phi > 0) {
1400 for (
auto& j : phiSubs[phi - 1]) {
1406 if (phiN > 1 && phi == phiN - 1) {
1407 for (
auto& j : phiSubs[0]) {
1414 if (etaN > 1 && eta > 0) {
1415 for (
auto& j: subVolumes[eta - 1][phi]) {
1421 subVolumes.push_back(phiSubs);
1422 hBins.push_back(phBins);
1425 auto hBinVecPtr = std::make_unique<std::vector<std::vector<Trk::BinUtility*>>>(
Muon::release(hBinUtil));
1426 auto subVols = std::make_unique<Trk::BinnedArray1D1D1D<Trk::TrackingVolume>>(subVolumesVect,
1429 hBinVecPtr.release());
1431 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
nullptr,
1432 subVols.release(), volumeName);
1452 if (etaN * phiN > 1) {
1456 std::vector<Trk::TrackingVolumeOrderPosition> subVolumes(etaN * phiN);
1457 std::vector<Trk::TrackingVolume*> sVols(etaN * phiN);
1458 std::vector<Trk::TrackingVolume*> sVolsNeg(phiN);
1459 std::vector<Trk::TrackingVolume*> sVolsPos(phiN);
1460 for (
unsigned int eta = 0; eta < zSteps.size() - 1; ++eta) {
1461 double posZ = 0.5 * (zSteps[eta] + zSteps[eta + 1]);
1462 double hZ = 0.5 * std::abs(zSteps[eta + 1] - zSteps[eta]);
1463 colorCode = 26 - colorCode;
1464 for (
unsigned int phi = 0; phi < phiN; phi++) {
1465 colorCode = 26 - colorCode;
1467 double phiSect = 0.;
1468 if (phi < phiN - 1) {
1478 auto subBds = std::make_unique<Trk::CylinderVolumeBounds>(cyl->innerRadius(), cyl->outerRadius(), phiSect, hZ);
1488 std::vector<Trk::DetachedTrackingVolume*> detVols{} ;
1492 auto detVolPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1493 auto sVol = std::make_unique<Trk::TrackingVolume>(subVol, aLVC.
m_muonMaterial,
1494 detVolPtr.release(),
1501 for (
auto& blendVol : blendVols) {
1502 aLVC.
m_blendMap[blendVol].push_back(sVol.get());
1506 double posR = 0.5 * (cyl->innerRadius() + cyl->outerRadius());
1508 for (
unsigned int in = 1; in < aLVC.
m_msCutoutsIn.size(); ++in) {
1517 for (
unsigned int io = 1; io < aLVC.
m_msCutoutsOut.size(); ++io) {
1525 sVol->registerColorCode(colorCode);
1527 const Amg::Vector3D gp = cyl->outerRadius() * Amg::Vector3D::UnitX();
1530 sVols[phiN * eta + phi] = sVol.get();
1532 sVolsNeg[phi] = sVol.get();
1534 if (eta == etaN - 1) {
1535 sVolsPos[phi] = sVol.get();
1538 if (phiN > 1 && phi > 0) {
1541 *sVols[eta * phiN + phi - 1],
1543 if (phi == phiN - 1) {
1551 if (etaN > 1 && eta > 0) {
1554 *sVols[(eta - 1) * phiN + phi],
1558 subVolumes[phi * etaN + eta] = std::make_pair(std::move(sVol), transf * gp);
1572 zBinUtil += pBinUtil;
1574 auto volBinUtil = std::make_unique<Trk::BinUtility>(zBinUtil);
1576 auto subVols = std::make_unique<Trk::BinnedArray2D<Trk::TrackingVolume>>(subVolumes,
1577 volBinUtil.release());
1579 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
nullptr,
1580 subVols.release(), volumeName);
1591 std::vector<Trk::DetachedTrackingVolume*> muonObjs{};
1595 auto muonObjPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(muonObjs);
1596 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
1597 muonObjPtr.release(),
1604 for (
auto& blendVol : blendVols) {
1605 aLVC.
m_blendMap[blendVol].push_back(tVol.get());
1615 const std::string& volumeName,
1617 bool hasStations)
const {
1619 <<
" in mode:" <<
type);
1625 std::vector<Trk::DetachedTrackingVolume*> blendVols;
1632 ATH_MSG_ERROR(
" process volume: volume cylinder boundaries not retrieved, return 0 ");
1636 std::vector<float> zSteps;
1638 double zPos = vol.
center().z();
1639 double hz = cyl->halflengthZ();
1640 double z1 = zPos -
hz;
1641 double z2 = zPos +
hz;
1642 zSteps.push_back(z1);
1644 if (iz > z1 && iz < z2) {
1645 zSteps.push_back(iz);
1649 zSteps.push_back(z2);
1655 unsigned int etaN = zSteps.size() - 1;
1662 std::vector<std::vector<std::unique_ptr<Trk::BinUtility>> > hBinUtil{};
1664 for (
unsigned iz = 0; iz < zSteps.size() - 1; iz++) {
1665 std::vector<std::unique_ptr<Trk::BinUtility>> phBinUtil;
1666 phBinUtil.push_back(std::make_unique<Trk::BinUtility>(phiRef, aLVC.
m_shieldHPart[
type]));
1667 hBinUtil.push_back(std::move(phBinUtil));
1672 std::vector<Trk::TrackingVolumeOrderPosition> subVolumesVect;
1673 std::vector<std::vector<std::vector<Trk::TrackingVolume*>>> subVolumes;
1674 std::vector<std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume>>>> hBins;
1675 std::vector<Trk::TrackingVolume*> sVolsInn;
1676 std::vector<Trk::TrackingVolume*> sVolsOut;
1677 std::vector<Trk::TrackingVolume*> sVolsNeg;
1678 std::vector<Trk::TrackingVolume*> sVolsPos;
1679 for (
unsigned int eta = 0; eta < zSteps.size() - 1; eta++) {
1681 colorCode = 26 - colorCode;
1682 double posZ = 0.5 * (zSteps[eta] + zSteps[eta + 1]);
1683 double hZ = 0.5 * std::abs(zSteps[eta + 1] - zSteps[eta]);
1684 std::vector<std::vector<Trk::TrackingVolume*> > phiSubs;
1685 std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume>>> phBins{};
1688 double phiSect =
M_PI;
1690 std::vector<Trk::TrackingVolume*> hSubs;
1691 std::vector<Trk::TrackingVolumeOrderPosition> hSubsTr;
1692 unsigned int hCode = 1;
1693 for (
unsigned int h = 0;
h < hSteps.size() - 1;
h++) {
1694 hCode = (colorCode > 0) ? 1 - hCode : 0;
1696 auto subBds = std::make_unique<Trk::CylinderVolumeBounds>(hSteps[
h].
second, hSteps[
h + 1].
second, phiSect, hZ);
1697 const double mediumRadius = subBds->mediumRadius();
1707 std::vector<Trk::DetachedTrackingVolume*> detVols{};
1711 auto detVolPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1712 auto sVol = std::make_unique<Trk::TrackingVolume>(subVol, aLVC.
m_muonMaterial,
1713 detVolPtr.release(), volName);
1720 for (
auto& blendVol : blendVols) {
1721 aLVC.
m_blendMap[blendVol].push_back(sVol.get());
1725 double posR = 0.5 * (hSteps[
h].second + hSteps[
h + 1].second);
1727 for (
unsigned int in = 1; in < aLVC.
m_msCutoutsIn.size(); in++) {
1736 sVol->registerColorCode(colorCode + hCode);
1738 const Amg::Vector3D gp = mediumRadius * Amg::Vector3D::UnitX();
1739 hSubs.push_back(sVol.get());
1743 sVolsInn.push_back(sVol.get());
1744 if (
h == hSteps.size() - 2)
1745 sVolsOut.push_back(sVol.get());
1747 sVolsNeg.push_back(sVol.get());
1748 if (eta == etaN - 1)
1749 sVolsPos.push_back(sVol.get());
1760 if (etaN > 1 && eta > 0)
1763 hBins[eta - 1][phi]);
1765 subVolumesVect.emplace_back(std::move(sVol), transf * gp);
1766 hSubsTr.emplace_back(subVolumesVect.back());
1769 phiSubs.push_back(hSubs);
1771 auto volBinArray = std::make_unique<Trk::BinnedArray1D<Trk::TrackingVolume>>(hSubsTr, hBinUtil[eta][phi]->clone());
1772 phBins.push_back(std::move(volBinArray));
1775 if (etaN > 1 && eta > 0) {
1776 for (
auto& j : subVolumes[eta - 1][phi]) {
1782 subVolumes.push_back(phiSubs);
1783 hBins.push_back(phBins);
1786 auto hBinVecPtr = std::make_unique<std::vector<std::vector<Trk::BinUtility*>>>(
Muon::release(hBinUtil));
1787 auto subVols = std::make_unique<Trk::BinnedArray1D1D1D<Trk::TrackingVolume>>(subVolumesVect,
1790 hBinVecPtr.release());
1792 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.
m_muonMaterial,
nullptr,
1793 subVols.release(), volumeName);
1804 std::vector<Trk::DetachedTrackingVolume*>
1806 std::vector<Trk::DetachedTrackingVolume*>& blendVols,
1811 std::vector<Trk::DetachedTrackingVolume*> detTVs{};
1818 double rmed{0.}, dphi{0.},
hz{0.}, rMin{0.}, rMax{0.}, rMaxc{0.};
1821 rmed = cyl->mediumRadius();
1822 dphi = cyl->halfPhiSector();
1823 hz = cyl->halflengthZ();
1824 rMin = cyl->innerRadius();
1825 rMax = cyl->outerRadius();
1828 rmed = bcyl->mediumRadius();
1829 dphi = bcyl->halfPhiSector();
1830 hz = bcyl->halflengthZ();
1831 rMin = bcyl->innerRadius();
1832 rMax = bcyl->outerRadius();
1834 type = bcyl->type();
1836 rMaxc *= 1. /
cos(dphi);
1842 double zMin = center[2] -
hz;
1843 double zMax = center[2] +
hz;
1845 double pMax = +2 *
M_PI;
1846 bool phiLim =
false;
1848 pMin = center.phi() - dphi +
M_PI;
1849 pMax = center.phi() + dphi +
M_PI;
1853 ATH_MSG_VERBOSE(
" zMin " << zMin <<
" zMax " << zMax <<
" rMin " << rMin
1854 <<
" rMax " << rMax <<
" rMaxc " << rMaxc
1855 <<
" phi limits " << pMin <<
" phiMax " << pMax
1856 <<
" phiLim " << phiLim);
1870 else if (zMin >= -
m_ectZ)
1879 else if (zMax <= -
m_ectZ)
1894 for (
int gMode = gMin; gMode <= gMax; gMode++) {
1896 bool rLimit = !aLVC.
m_static3d || (
s->rMin <= rMaxc &&
s->rMax >= rMin);
1898 bool meanZOK =
false;
1899 if (station->name() ==
"BME1_Station" ||
1900 station->name() ==
"BME2_Station") {
1901 if ((
s->zMin +
s->zMax) / 2. < zMax &&
1902 (
s->zMin +
s->zMax) / 2. > zMin)
1904 if ((
s->phiMin +
s->phiMax) / 2 < pMin && phiLim)
1910 ((
s->zMin < zMax &&
s->zMax > zMin) || meanZOK)) {
1911 bool accepted =
false;
1913 if (pMin >= 0 && pMax <= 2 *
M_PI) {
1914 if (
s->phiMin <=
s->phiMax &&
1915 s->phiMin <= pMax &&
s->phiMax >= pMin)
1917 if (
s->phiMin >
s->phiMax &&
1918 (
s->phiMin <= pMax ||
s->phiMax >= pMin))
1920 }
else if (pMin < 0) {
1921 if (
s->phiMin <=
s->phiMax &&
1922 (
s->phiMin <= pMax ||
1923 s->phiMax >= pMin + 2 *
M_PI))
1925 if (
s->phiMin >
s->phiMax)
1927 }
else if (pMax > 2 *
M_PI) {
1928 if (
s->phiMin <=
s->phiMax &&
1929 (
s->phiMin <= pMax - 2 *
M_PI ||
1932 if (
s->phiMin >
s->phiMax)
1940 detTVs.push_back(station);
1942 << station->name() <<
" zMin " << zMin
1943 <<
" zMax " << zMax <<
" rMin " << rMin
1944 <<
" rMax " << rMax <<
" PhiMin "
1945 << pMin <<
" PhiMax " << pMax);
1953 for (
int gMode = gMin; gMode <= gMax; gMode++) {
1954 for (
const auto& [inert,
s]: (aLVC.
m_inertSpan)[gMode]) {
1956 (
s->rMin <= rMaxc &&
s->rMax >= rMin));
1957 if (rLimit &&
s->zMin < zMax &&
s->zMax > zMin) {
1958 bool accepted =
false;
1960 if (pMin >= 0 && pMax <= 2 *
M_PI) {
1961 if (
s->phiMin <=
s->phiMax &&
1962 s->phiMin <= pMax &&
s->phiMax >= pMin)
1964 if (
s->phiMin >
s->phiMax &&
1965 (
s->phiMin <= pMax ||
s->phiMax >= pMin))
1967 }
else if (pMin < 0) {
1968 if (
s->phiMin <=
s->phiMax &&
1969 (
s->phiMin <= pMax ||
1970 s->phiMax >= pMin + 2 *
M_PI))
1972 if (
s->phiMin >
s->phiMax)
1974 }
else if (pMax > 2 *
M_PI) {
1975 if (
s->phiMin <=
s->phiMax &&
1976 (
s->phiMin <= pMax - 2 *
M_PI ||
1979 if (
s->phiMin >
s->phiMax)
1986 inert->name().compare(inert->name().size() - 4, 4,
1989 detTVs.push_back(inert);
1991 blendVols.push_back(inert);
1993 << inert->name() <<
" zMin " << zMin
1994 <<
" zMax " << zMax <<
" rMin " << rMin
1995 <<
" rMax " << rMax <<
" PhiMin "
1996 << pMin <<
" PhiMax " << pMax);
2009 constexpr
double tol = 1.;
2010 constexpr
double ptol = 0.11;
2017 double rmed{0.}, dphi{0.},
hz{0.}, rMin{0.}, rMax{0.};
2019 rmed = cyl->mediumRadius();
2020 dphi = cyl->halfPhiSector();
2021 hz = cyl->halflengthZ();
2022 rMin = cyl->innerRadius();
2023 rMax = cyl->outerRadius();
2025 rmed = bcyl->mediumRadius();
2026 dphi = bcyl->halfPhiSector();
2027 hz = bcyl->halflengthZ();
2028 rMin = bcyl->innerRadius();
2029 rMax = bcyl->outerRadius();
2035 double zMin = center[2] -
hz;
2036 double zMax = center[2] +
hz;
2038 double pMax = +2 *
M_PI;
2039 bool phiLim =
false;
2041 pMin = center.phi() - dphi +
M_PI;
2042 pMax = center.phi() + dphi +
M_PI;
2047 <<
":r:" << rMin <<
"," << rMax
2048 <<
":phi:" << pMin <<
"," << pMax);
2051 (
span.rMin < rMax - tol &&
span.rMax > rMin + tol));
2052 if (rLimit &&
span.zMin < zMax - tol &&
span.zMax > zMin + tol) {
2054 if (pMin >= 0 && pMax <= 2 *
M_PI) {
2055 if (
span.phiMin <=
span.phiMax &&
span.phiMin < pMax + ptol &&
2056 span.phiMax > pMin - ptol)
2059 (
span.phiMin < pMax - ptol ||
span.phiMax > pMin + ptol))
2061 }
else if (pMin < 0) {
2063 (
span.phiMin < pMax + ptol ||
2064 span.phiMax > pMin - ptol + 2 *
M_PI))
2068 }
else if (pMax > 2 *
M_PI) {
2070 (
span.phiMin < pMax + ptol - 2 *
M_PI ||
2071 span.phiMax > pMin - ptol))
2310 for (
unsigned int i = 0;
i < zSiz;
i++) {
2326 }
else if (
mode == 1) {
2335 while (
ic < phiNum - 1) {
2342 }
else if (
mode == 2) {
2348 phiSect[0] = (
M_PI / 8 - 0.105);
2364 }
else if (
mode == 3) {
2372 phiSect[1] = 0.5 * (
M_PI / 8. - phiSect[0] - phiSect[2]);
2402 std::vector<std::pair<int, float> > barrelZ0F0;
2405 barrelZ0F0.emplace_back(0, 4450.);
2406 barrelZ0F0.emplace_back(0, 6500.);
2407 barrelZ0F0.emplace_back(0, 8900.);
2408 barrelZ0F0.emplace_back(0, 13000.);
2412 std::vector<std::pair<int, float> > barrelZ0F1;
2415 barrelZ0F1.emplace_back(1, 4500.);
2416 barrelZ0F1.emplace_back(1, 5900.);
2418 barrelZ0F1.emplace_back(0, 4450.);
2420 barrelZ0F1.emplace_back(0, 6500.);
2422 barrelZ0F1.emplace_back(1, 8900.);
2424 barrelZ0F1.emplace_back(0, 8900.);
2426 barrelZ0F1.emplace_back(1, 10100.);
2427 barrelZ0F1.emplace_back(0, 13000.);
2431 std::vector<std::pair<int, float> > barrelZ1F0;
2436 barrelZ1F0.emplace_back(0, 4450.);
2438 barrelZ1F0.emplace_back(1, 5800.);
2439 barrelZ1F0.emplace_back(1, 6500.);
2441 barrelZ1F0.emplace_back(0, 6500.);
2443 barrelZ1F0.emplace_back(1, 6750.);
2444 barrelZ1F0.emplace_back(1, 8400.);
2447 barrelZ1F0.emplace_back(0, 8770.);
2449 barrelZ1F0.emplace_back(1, 9850.);
2450 barrelZ1F0.emplace_back(0, 13000.);
2453 std::vector<std::pair<int, float> > barrelZ1F1;
2456 barrelZ1F1.emplace_back(1, 4500.);
2457 barrelZ1F1.emplace_back(1, 6000.);
2459 barrelZ1F1.emplace_back(0, 4450.);
2461 barrelZ1F1.emplace_back(0, 6500.);
2463 barrelZ1F1.emplace_back(1, 6800.);
2465 barrelZ1F1.emplace_back(1, 8900.);
2466 barrelZ1F1.emplace_back(1, 10100.);
2468 barrelZ1F1.emplace_back(0, 8900.);
2469 barrelZ1F1.emplace_back(0, 13000.);
2472 std::vector<std::vector<std::vector<std::pair<int, float> > > > barrelZF(2);
2473 barrelZF[0].push_back(barrelZ0F0);
2474 barrelZF[0].push_back(barrelZ0F1);
2475 barrelZF[1].push_back(barrelZ1F0);
2476 barrelZF[1].push_back(barrelZ1F1);
2480 std::vector<std::pair<int, float> > swZ0F0;
2483 swZ0F0.emplace_back(0, 2700.);
2488 swZ0F0.emplace_back(0, 4450.);
2490 swZ0F0.emplace_back(0, 6560.);
2491 swZ0F0.emplace_back(0, 8900.);
2496 std::vector<std::pair<int, float> > swZ0F1;
2499 swZ0F1.emplace_back(0, 2700.);
2503 swZ0F1.emplace_back(0, 4450.);
2505 swZ0F1.emplace_back(1, 5900.);
2507 swZ0F1.emplace_back(0, 6560.);
2509 swZ0F1.emplace_back(1, 8900.);
2510 swZ0F1.emplace_back(1, 10100.);
2512 swZ0F1.emplace_back(0, 8900.);
2515 std::vector<std::vector<std::vector<std::pair<int, float> > > > swZF(1);
2516 swZF[0].push_back(swZ0F0);
2517 swZF[0].push_back(swZ0F1);
2521 std::vector<std::pair<int, float> > innerZ0F0;
2524 innerZ0F0.emplace_back(0, 1100.);
2526 innerZ0F0.emplace_back(1, 5150.);
2528 innerZ0F0.emplace_back(1, 5300.);
2530 innerZ0F0.emplace_back(0, 6500.);
2531 innerZ0F0.emplace_back(0, 8900.);
2536 std::vector<std::pair<int, float> > innerZ0F1;
2539 innerZ0F1.emplace_back(0, 1100.);
2541 innerZ0F1.emplace_back(1, 1400.);
2542 innerZ0F1.emplace_back(1, 1685.);
2545 innerZ0F1.emplace_back(1, 4700.);
2546 innerZ0F1.emplace_back(1, 5900.);
2549 innerZ0F1.emplace_back(0, 6500.);
2550 innerZ0F1.emplace_back(0, 8900.);
2555 std::vector<std::pair<int, float> > innerZ0F2;
2558 innerZ0F2.emplace_back(0, 1100.);
2560 innerZ0F2.emplace_back(1, 1400.);
2561 innerZ0F2.emplace_back(1, 1685.);
2564 innerZ0F2.emplace_back(1, 4450.);
2565 innerZ0F2.emplace_back(1, 5900.);
2568 innerZ0F2.emplace_back(0, 6500.);
2570 innerZ0F2.emplace_back(1, 8900.);
2571 innerZ0F2.emplace_back(1, 10100.);
2573 innerZ0F2.emplace_back(0, 8900.);
2577 std::vector<std::pair<int, float> > innerZ1F0;
2580 innerZ1F0.emplace_back(0, 1100.);
2582 innerZ1F0.emplace_back(1, 5150.);
2584 innerZ1F0.emplace_back(1, 5300.);
2586 innerZ1F0.emplace_back(1, 5800.);
2588 innerZ1F0.emplace_back(1, 6750.);
2590 innerZ1F0.emplace_back(0, 6500.);
2592 innerZ1F0.emplace_back(1, 8400.);
2593 innerZ1F0.emplace_back(1, 9600.);
2595 innerZ1F0.emplace_back(0, 8900.);
2599 std::vector<std::pair<int, float> > innerZ1F1;
2602 innerZ1F1.emplace_back(0, 1100.);
2604 innerZ1F1.emplace_back(1, 1400.);
2605 innerZ1F1.emplace_back(1, 1685.);
2608 innerZ1F1.emplace_back(1, 4700.);
2609 innerZ1F1.emplace_back(1, 5800.);
2610 innerZ1F1.emplace_back(1, 6750.);
2612 innerZ1F1.emplace_back(0, 6500.);
2614 innerZ1F1.emplace_back(1, 8400.);
2615 innerZ1F1.emplace_back(1, 9600.);
2617 innerZ1F1.emplace_back(0, 8900.);
2621 std::vector<std::pair<int, float> > innerZ1F2;
2624 innerZ1F2.emplace_back(0, 1100.);
2626 innerZ1F2.emplace_back(1, 1400.);
2627 innerZ1F2.emplace_back(1, 1685.);
2629 innerZ1F2.emplace_back(0, 4150.);
2631 innerZ1F2.emplace_back(1, 4700.);
2632 innerZ1F2.emplace_back(1, 5900.);
2633 innerZ1F2.emplace_back(1, 6800.);
2635 innerZ1F2.emplace_back(0, 6500.);
2637 innerZ1F2.emplace_back(1, 8900.);
2638 innerZ1F2.emplace_back(1, 10100.);
2640 innerZ1F2.emplace_back(0, 8900.);
2643 std::vector<std::vector<std::vector<std::pair<int, float> > > > innerZF(2);
2644 innerZF[0].push_back(innerZ0F0);
2645 innerZF[0].push_back(innerZ0F1);
2646 innerZF[0].push_back(innerZ0F2);
2647 innerZF[1].push_back(innerZ1F0);
2648 innerZF[1].push_back(innerZ1F1);
2649 innerZF[1].push_back(innerZ1F2);
2652 std::vector<std::pair<int, float> > outerZ0F0;
2654 outerZ0F0.emplace_back(0, 2750.);
2655 outerZ0F0.emplace_back(0, 12650.);
2656 outerZ0F0.emplace_back(0, 13400.);
2659 std::vector<std::pair<int, float> > outerZ0F1;
2661 outerZ0F1.emplace_back(0, 2750.);
2663 outerZ0F1.emplace_back(0, 3600.);
2664 outerZ0F1.emplace_back(0, 5300.);
2665 outerZ0F1.emplace_back(0, 7000.);
2666 outerZ0F1.emplace_back(0, 8500.);
2667 outerZ0F1.emplace_back(0, 10000.);
2668 outerZ0F1.emplace_back(0, 12000.);
2670 outerZ0F1.emplace_back(0, 12650.);
2671 outerZ0F1.emplace_back(0, 13400.);
2674 std::vector<std::vector<std::vector<std::pair<int, float> > > > outerZF(2);
2675 outerZF[0].push_back(outerZ0F0);
2676 outerZF[0].push_back(outerZ0F0);
2677 outerZF[0].push_back(outerZ0F0);
2678 outerZF[1].push_back(outerZ0F1);
2679 outerZF[1].push_back(outerZ0F1);
2680 outerZF[1].push_back(outerZ0F1);
2702 for (
unsigned int i = 9;
i < 18;
i++)
2707 std::vector<std::pair<int, float> > outerShield;
2709 outerShield.emplace_back(0, 279.);
2710 outerShield.emplace_back(0, 436.7);
2711 outerShield.emplace_back(0, 1050.);
2715 std::vector<std::pair<int, float> > innerShield;
2717 innerShield.emplace_back(0, 530.);
2721 std::vector<std::pair<int, float> > diskShield;
2722 diskShield.emplace_back(0, 0.);
2723 diskShield.emplace_back(0, 540.);
2724 diskShield.emplace_back(0, 750.);
2725 diskShield.emplace_back(0, 2700.);
2726 diskShield.emplace_back(0, 4255.);
2740 viter->trackingVolume()->transform(), 0., 0.)};
2741 if (
span && csVol > 0) {
2744 std::vector<bool> fEncl;
2747 for (
const auto fIter :
vv) {
2753 double dil = enVol > 0. ? csVol / enVol : 0.;
2755 for (
auto fIter =
vv.begin(); fIter !=
vv.end(); ++fIter) {
2756 if (fEncl[fIter -
vv.begin()]) {
2763 <<
" acquires material from "
2774 <<
", not blended ");