TrackingGeometry Interface method.
87 double enclosedOuterRadius = 0.;
88 double enclosedInnerRadius = 0.;
97 if (!innerDetectorBounds) std::abort();
99 enclosedInnerSectorHalflength = innerDetectorBounds->
halflengthZ();
100 enclosedOuterRadius = innerDetectorBounds->
outerRadius();
101 enclosedInnerRadius = innerDetectorBounds->
innerRadius();
107 if (std::abs(bounds.second) < enclosedOuterSectorHalflength) {
108 enclosedOuterSectorHalflength = std::abs(bounds.second);
117 if (std::abs(bounds.second) < enclosedInnerSectorHalflength) {
118 enclosedInnerSectorHalflength = std::abs(bounds.second);
123 if (std::abs(bounds.second) == enclosedOuterSectorHalflength) {
124 if (bounds.first>enclosedOuterRadius)
125 enclosedOuterRadius=bounds.first;
131 << enclosedInnerSectorHalflength <<
"/" << enclosedInnerRadius
132 <<
" - " << enclosedOuterSectorHalflength <<
"/"
133 << enclosedOuterRadius);
136 std::vector<Trk::Layer*> negativeLayers;
137 std::vector<Trk::Layer*> positiveLayers;
139 std::unique_ptr<const std::vector<Trk::DiscLayer*> > discLayers =
m_layerBuilder->discLayers(ctx, whandle);
143 float thickness = -9999;
146 if (discLayers && !discLayers->empty()){
148 for (
const auto & discLayer : (*discLayers) ){
150 float zpos = discLayer->surfaceRepresentation().center().z();
152 positiveLayers.push_back(discLayer);
157 thickness =
std::max(thickness,
float(discLayer->thickness()));
160 negativeLayers.push_back(discLayer);
165 float envelope = thickness*0.5;
166 float minZ_HGTD = minZ-envelope;
167 float maxZ_HGTD = maxZ+envelope;
168 float maxZ_HGTDEnclosure = enclosedOuterSectorHalflength;
171 auto materialProperties = std::make_unique<Trk::Material>();
173 float zGapPos = 0.5*(minZ_HGTD+enclosedInnerSectorHalflength);
174 float gapHalfLengthZ = 0.5*(minZ_HGTD-enclosedInnerSectorHalflength);
178 auto negativeInnerGapBounds = std::make_shared<Trk::CylinderVolumeBounds>(enclosedInnerRadius,enclosedOuterRadius,gapHalfLengthZ);
182 negativeInnerGapBounds,
188 auto positiveInnerGapBounds = std::make_shared<Trk::CylinderVolumeBounds>(enclosedInnerRadius,enclosedOuterRadius,gapHalfLengthZ);
192 std::move(positiveInnerGapBounds),
199 auto idBounds = std::make_shared<Trk::CylinderVolumeBounds>(enclosedInnerRadius,
200 enclosedInnerSectorHalflength);
201 auto idTr = std::make_unique<Amg::Transform3D>(Trk::s_idTransform);
203 innerVol =
new Trk::TrackingVolume(std::move(idTr), std::move(idBounds), *materialProperties,
205 "HGTD::GapVolumes::DummyID");
208 std::vector<Trk::TrackingVolume*> inBufferVolumes;
209 inBufferVolumes.push_back(negativeInnerGapVolume);
210 inBufferVolumes.push_back(innerVol);
211 inBufferVolumes.push_back(positiveInnerGapVolume);
216 "HGTD::Container::EnclosedInnerDetector");
223 enclosedInnerRadius, enclosedOuterRadius,
224 -maxZ_HGTD, -minZ_HGTD,
232 enclosedInnerRadius, enclosedOuterRadius,
233 minZ_HGTD, maxZ_HGTD,
238 ATH_MSG_VERBOSE(
'\t' <<
'\t'<<
"Volumes have been created, now pack them into a triple.");
244 std::vector<Trk::TrackingVolume*> tripleVolumes;
245 tripleVolumes.push_back(negativeVolume);
246 tripleVolumes.push_back(inDetEnclosed);
247 tripleVolumes.push_back(positiveVolume);
268 "HGTD::Gaps::NegativeEnclosure" +
m_layerBuilder->identification());
279 "HGTD::Gaps::PositiveEnclosure" +
m_layerBuilder->identification());
281 std::vector<Trk::TrackingVolume*> enclosedVolumes;
282 enclosedVolumes.push_back(negativeEnclosure);
283 enclosedVolumes.push_back(tripleContainer);
284 enclosedVolumes.push_back(positiveEnclosure);
296 auto hgtdTrackingGeometry = std::make_unique<Trk::TrackingGeometry>(enclosedDetector);
303 return hgtdTrackingGeometry;