7#include <GeoModelKernel/GeoVPhysVol.h>
11#include <GeoModelKernel/GeoFullPhysVol.h>
12#include <GeoModelKernel/GeoShapeShift.h>
13#include <GeoModelHelpers/printVolume.h>
39#include <GaudiKernel/SystemOfUnits.h>
41#include <GeoModelHelpers/defineWorld.h>
42#include <GeoModelHelpers/cloneVolume.h>
43#include <GeoModelHelpers/getChildNodesWithTrf.h>
44#include <GeoModelHelpers/TransformToStringConverter.h>
45#include <GeoModelHelpers/GeoShapeUtils.h>
46#include <GeoModelIOHelpers/GMIO.h>
51#include "Acts/Definitions/Units.hpp"
52using namespace Acts::UnitLiterals;
56 bool hasStationVolume(
const PVConstLink treeTop,
57 const std::set<PVConstLink>& translated) {
58 const unsigned int nCh = treeTop->getNChildVols();
59 for (
unsigned int ch = 0 ;
ch < nCh; ++
ch) {
60 PVConstLink child = treeTop->getChildVol(ch);
61 if (translated.count(child) ||
62 hasStationVolume(child, translated)){
82 return StatusCode::SUCCESS;
89 ATH_MSG_DEBUG(
"The current readout geometry is still valid.");
90 return StatusCode::SUCCESS;
99 ATH_MSG_FATAL(
"Failed to retrieve alignment store "<<key.fullKey());
100 return StatusCode::FAILURE;
106 geoContext.
setStore(std::make_unique<ActsTrk::DetectorAlignStore>(**readHandle));
111 std::vector<ActsTrk::DetectorType> presentTechs =
m_detMgr->getDetectorTypes();
117 geoContext.
setStore(std::make_unique<ActsTrk::DetectorAlignStore>(detType));
121 cacheObj.
detMgr = std::make_unique<MuonGM::MuonDetectorManager>();
122 cacheObj.
world = createGeoWorld();
131 std::vector<GeoChildNodeWithTrf> treeTops = getChildrenWithRef(
m_detMgr->getTreeTop(0),
false);
134 for (
const GeoChildNodeWithTrf& treeTop : treeTops) {
140 cacheObj.
world->add(const_pointer_cast(treeTop.volume));
145 const std::vector<const MuonGMR4::MuonReadoutElement*> refEles{
m_detMgr->getAllReadoutElements()};
156 return StatusCode::SUCCESS;
161 const std::string stName{
m_idHelperSvc->stationNameString(stationId)};
166 ATH_MSG_DEBUG(
"Station "<<stName<<
", stEta: "<<stEta<<
", stPhi: "<<stPhi<<
" already exists.");
167 return StatusCode::SUCCESS;
173 const GeoVFullPhysVol* readOutVol = copyMe->getMaterialGeom();
175 PVConstLink parentVolume = readOutVol->getParent();
180 GeoIntrusivePtr<const GeoGraphNode> alignNode{*(parentVolume->getParent()->findChildNode(alignTrf) + 1)};
182 GeoIntrusivePtr<const GeoTransform> stationShiftNode{alignNode != parentVolume ?
183 dynamic_pointer_cast<const GeoTransform>(alignNode) :
nullptr};
187 PVLink copiedStationVol{};
188 if (!stationShiftNode) {
189 copiedStationVol = make_intrusive<GeoFullPhysVol>(parentVolume->getLogVol());
191 auto volToCopy = parentVolume->getLogVol();
192 auto newShape = cacheObj.cacheShape(make_intrusive<GeoShapeShift>(volToCopy->getShape(),
193 stationShiftNode->getDefTransform()));
194 auto newLogVol = make_intrusive<GeoLogVol>(volToCopy->getName(), newShape, volToCopy->getMaterial());
195 copiedStationVol = make_intrusive<GeoFullPhysVol>(cacheObj.cacheVolume(newLogVol));
200 const std::vector<GeoChildNodeWithTrf> children = getChildrenWithRef(parentVolume,
false);
201 double minX{1.e9}, maxX{-1.e9}, minY1{1.e9}, maxY1{-1.e9}, minY2{1.e9}, maxY2{-1.e9}, minZ{1.e9}, maxZ{-1.e9};
202 for (
const GeoChildNodeWithTrf& child : children) {
203 std::vector<Amg::Vector3D> edges = getPolyShapeEdges(child.volume->getLogVol()->getShape(),
204 readOutVol->getX().inverse() * child.transform);
206 minX = std::min(minX, edge.x());
207 maxX = std::max(maxX, edge.x());
208 minZ = std::min(minZ, edge.z());
209 maxZ = std::max(maxZ, edge.z());
211 minY1 = std::min(minY1, edge.y());
212 maxY1 = std::max(maxY1, edge.y());
214 minY2 = std::min(minY2, edge.y());
215 maxY2 = std::max(maxY2, edge.y());
219 const GeoVPhysVol &childVolRef = *child.volume;
220 if (
typeid(childVolRef) ==
typeid(GeoFullPhysVol)) {
224 PVLink childVol = const_pointer_cast<GeoVPhysVol>(child.volume);
225 copiedStationVol->add(cacheObj.
newIdTag());
226 if (stationShiftNode) {
227 copiedStationVol->add(const_pointer_cast(stationShiftNode));
229 copiedStationVol->add(cacheObj.makeTransform(child.transform));
230 copiedStationVol->add(cloneVolume(childVol));
235 const double shortS = (maxY1 - minY1);
236 const double longS = (maxY2 - minY2);
237 const double lengthR = (maxX - minX);
238 const double lengthZ = (maxZ - minZ);
242 ( ( stationShiftNode ? stationShiftNode->getDefTransform() : Amg::Transform3D::Identity())
243 * readOutVol->getDefX()).inverse();
246 auto newStation = std::make_unique<MuonGM::MuonStation>(stName,
247 shortS, lengthR, lengthZ,
248 longS, lengthR, lengthZ,
249 stEta, stPhi,
false);
250 newStation->setPhysVol(copiedStationVol);
253 auto copyAlignNode = make_intrusive<GeoAlignableTransform>(alignedTransform);
254 newStation->setTransform(copyAlignNode);
255 newStation->setNominalAmdbLRSToGlobal(copyAlignNode->getTransform());
257 ATH_MSG_VERBOSE(
"stName: "<<stName<<
", stEta: "<<stEta<<
", stPhi: "<<stPhi
258 <<
" -- shortS: "<<shortS<<
", longS: "<<longS
259 <<
", lengthR: "<<lengthR<<
", lengthZ: "<<lengthZ
260 <<std::endl<<
"AlignableNode: "<<GeoTrf::toString(alignedTransform,
true)
261 <<std::endl<<
"Station shift: "<<GeoTrf::toString(stationShiftNode ? stationShiftNode->getDefTransform()
262 : Amg::Transform3D::Identity(),
true)
263 <<std::endl<<
"AmdLRSToGlobal: "<<GeoTrf::toString(newStation->getNominalAmdbLRSToGlobal(),
true)
264 <<std::endl<<
"Readout transform: "<<GeoTrf::toString(readOutVol->getX(),
true));
266 cacheObj.
world->add(copyAlignNode);
267 cacheObj.
world->add(copiedStationVol);
268 return StatusCode::SUCCESS;
275 GeoIntrusivePtr<GeoVFullPhysVol>& physVol,
279 const std::string stName{
m_idHelperSvc->stationNameString(reId)};
284 PVLink copiedStationVol{station->
getPhysVol()};
286 GeoIntrusivePtr<const GeoVFullPhysVol> readOutVol{copyMe->getMaterialGeom()};
287 copiedStationVol->add(cacheObj.
newIdTag());
299 readOutVol->getParent()->getX() * readOutVol->getX()};
300 const Amg::Transform3D alignedNode{amdbTransform(gctx, *copyMe) * alignNodeToRE.inverse()};
302 const Amg::Transform3D stationTrf{copiedStationVol->getX().inverse() * alignedNode};
304 copiedStationVol->add(cacheObj.makeTransform(stationTrf*alignNodeToRE));
306 PVLink clonedVol{cloneVolume(const_pointer_cast<GeoVFullPhysVol>(readOutVol))};
307 physVol = dynamic_pointer_cast<GeoVFullPhysVol>(clonedVol);
308 copiedStationVol->add(physVol);
309 return StatusCode::SUCCESS;
314 const std::vector<const MuonGMR4::RpcReadoutElement*> readoutEles =
m_detMgr->getAllRpcReadoutElements();
315 ATH_MSG_INFO(
"Copy "<<readoutEles.size()<<
" Rpc readout elements to the legacy system");
320 GeoIntrusivePtr<GeoVFullPhysVol> physVol{};
323 auto newElement = std::make_unique<MuonGM::RpcReadoutElement>(physVol,
325 1, 1,
false, cacheObj.
detMgr.get());
326 newElement->setDoubletPhi(copyMe->doubletPhi());
327 newElement->setDoubletR(copyMe->doubletR());
328 newElement->setDoubletZ(copyMe->doubletZ());
329 newElement->setIdentifier(reId);
330 newElement->setParentMuonStation(station);
334 newElement->setLongZsize(2.*pars.halfLength);
335 newElement->setLongSsize(2.*pars.halfWidth);
336 newElement->setLongRsize(2.*pars.halfThickness);
337 newElement->setZsize(2.*pars.halfLength);
338 newElement->setSsize(2.*pars.halfWidth);
339 newElement->setRsize(2.*pars.halfThickness);
341 newElement->m_nlayers = copyMe->nGasGaps();
342 newElement->m_phistripwidth = copyMe->stripPhiWidth();
343 newElement->m_etastripwidth = copyMe->stripEtaWidth();
344 newElement->m_phistrippitch = copyMe->stripPhiPitch();
345 newElement->m_etastrippitch = Acts::copySign(1., copyMe->stationEta() -
346 (copyMe->stationEta()==0))*copyMe->stripEtaPitch();
347 newElement->m_phistriplength = copyMe->stripPhiLength();
348 newElement->m_etastriplength = copyMe->stripEtaLength();
350 newElement->m_nphistripsperpanel = copyMe->nPhiStrips();
351 newElement->m_netastripsperpanel = copyMe->nEtaStrips();
352 newElement->m_nphistrippanels = copyMe->nPhiPanels();
353 newElement->m_hasDEDontop =
true;
354 newElement->m_descratzneg =
false;
356 std::vector<Identifier> gapIds{};
357 for (
unsigned int gasGap = 1; gasGap <= copyMe->nGasGaps(); ++gasGap) {
358 for (
int doubPhi = copyMe->doubletPhiMax(); doubPhi >= copyMe->doubletPhi(); --doubPhi) {
359 for (
bool measPhi : {
false,
true}) {
360 if (measPhi && copyMe->nPhiStrips()==0)
continue;
361 const int channel = 1;
364 doubPhi, gasGap, measPhi,
367 gapIds.push_back(gapId);
368 const Amg::Vector3D locStripPos = amdbTransform(gctx, *copyMe).inverse() * copyMe->stripPosition(gctx, gapId);
370 newElement->m_gasGap_xPos[gasGap -1] = locStripPos.x();
373 const int dbPIdx = copyMe->doubletPhi() == 2 ? 1 : doubPhi;
375 newElement->m_first_phistrip_s[dbPIdx -1] = locStripPos.y();
376 newElement->m_phistrip_z = locStripPos.z();
378 newElement->m_first_etastrip_z = locStripPos.z();
379 newElement->m_etastrip_s[dbPIdx-1] = locStripPos.y();
384 newElement->fillCache();
387 const int surfaceHash = newElement->surfaceHash(gapId);
388 const int layerHash = newElement->layerHash(gapId);
392 Amg::Transform3D::Identity())};
394 newElement->m_surfaceData->m_layerTransforms[surfaceHash] = refTrf;
395 newElement->m_surfaceData->m_layerCenters[layerHash] = refTrf.translation();
396 newElement->m_surfaceData->m_layerNormals[layerHash] = refTrf.linear() * Amg::Vector3D::UnitZ();
401 return StatusCode::SUCCESS;
407 std::vector<const MuonGMR4::TgcReadoutElement*> tgcReadouts{
m_detMgr->getAllTgcReadoutElements()};
409 return a->stationEta() > b->stationEta();
411 ATH_MSG_INFO(
"Copy "<<tgcReadouts.size()<<
" Tgc readout elements to the legacy system");
415 std::map<std::string, std::shared_ptr<TgcReadoutParams>> readoutParMap{};
419 GeoIntrusivePtr<GeoVFullPhysVol> physVol{};
423 auto newRE = std::make_unique<MuonGM::TgcReadoutElement>(physVol,
m_idHelperSvc->stationNameString(reId),
425 newRE->setIdentifier(reId);
426 newRE->setParentMuonStation(station);
428 std::shared_ptr<TgcReadoutParams>& readOutPars = readoutParMap[std::format(
"{:}_{:}", copyMe->chamberDesign(),
429 copyMe->stationEta()> 0?
'A' :
'C')];
431 using WiregangArray = TgcReadoutParams::WiregangArray;
432 using StripArray = TgcReadoutParams::StripArray;
433 using GasGapIntArray = TgcReadoutParams::GasGapIntArray;
435 std::array<WiregangArray, 3> wires{};
436 GasGapIntArray nWireGangs{}, nStrips{};
437 std::vector<StripArray> botMountings(copyMe->nGasGaps()),
438 topMountings(copyMe->nGasGaps());
440 double wirePitch{0.};
441 for (
unsigned int gasGap =1; gasGap <= copyMe->nGasGaps(); ++gasGap) {
442 const IdentifierHash gangHash = copyMe->constructHash(0, gasGap,
false);
443 const IdentifierHash stripHash = copyMe->constructHash(0, gasGap,
true);
444 nWireGangs[gasGap -1] = copyMe->numWireGangs(gangHash);
445 nStrips[gasGap -1] = copyMe->numStrips(stripHash);
446 ATH_MSG_VERBOSE(
"Assigned wire gangs: "<<nWireGangs[gasGap-1]<<
", strips: "<<nStrips[gasGap -1]
447 <<
" for gas gap "<<gasGap);
449 if (nWireGangs[gasGap -1]) {
452 WiregangArray& fillMe{wires[gasGap-1]};
453 for (
int gang = 1; gang <= design.
numStrips(); ++gang) {
458 if (nStrips[gasGap -1]) {
460 const int nCh = nStrips[gasGap -1];
466 topMountings[gasGap-1][nCh] = - design.
stripRightTop(nCh).x();
467 ATH_MSG_VERBOSE(
"Strip layout\n bottom: "<<botMountings<<
"\n top: "<<topMountings);
470 readOutPars = std::make_unique<TgcReadoutParams>(copyMe->chamberDesign(),
473 std::move(nWireGangs),
478 std::move(botMountings),
479 std::move(topMountings),
484 for (
unsigned int gasGap = 1; gasGap <= copyMe->nGasGaps(); ++gasGap) {
485 const IdentifierHash layHash{copyMe->constructHash(0, gasGap,
false)};
487 const Amg::Vector3D translation{amdbTransform(gctx, *copyMe).inverse() * copyMe->center(gctx, layHash)};
488 newRE->setPlaneZ(translation.x(), gasGap);
490 newRE->setRsize(copyMe->moduleHeight());
491 newRE->setSsize(copyMe->moduleWidthS());
492 newRE->setZsize(copyMe->moduleThickness());
494 newRE->setLongRsize(copyMe->moduleHeight());
495 newRE->setLongSsize(copyMe->moduleWidthL());
496 newRE->setLongZsize(copyMe->moduleThickness());
498 newRE->setReadOutParams(readOutPars);
504 return StatusCode::SUCCESS;
507GeoIntrusivePtr<GeoVFullPhysVol>
511 GeoIntrusivePtr<const GeoVFullPhysVol> readOutVol{copyMe.getMaterialGeom()};
514 PVLink clonedVol{cloneVolume(const_pointer_cast<GeoVFullPhysVol>(readOutVol))};
515 GeoIntrusivePtr<GeoFullPhysVol> physVol{dynamic_pointer_cast<GeoFullPhysVol>(clonedVol)};
517 cacheObj.
world->add(cacheObj.makeTransform(amdbTransform(gctx, copyMe)));
518 cacheObj.
world->add(physVol);
524 const auto alignStore = alignItr ?
525 static_cast<const MmAlignmentStore*
>(alignItr->internalAlignment.get()) :
nullptr;
530 const std::vector<const MuonGMR4::MmReadoutElement*> mmReadouts{
m_detMgr->getAllMmReadoutElements()};
531 ATH_MSG_INFO(
"Copy "<<mmReadouts.size()<<
" Mm readout elements to the legacy system");
535 GeoIntrusivePtr<GeoVFullPhysVol> physVol{
cloneNswWedge(gctx, *copyMe, cacheObj)};
536 auto newRE = std::make_unique<MuonGM::MMReadoutElement>(physVol,
538 copyMe->stationEta(),
539 copyMe->stationPhi(),
540 copyMe->multilayer(), cacheObj.
detMgr.get());
542 for (
unsigned int gasGap = 0; gasGap < copyMe->nGasGaps(); ++gasGap) {
546 newRE->m_Xlg[gasGap] = stripLayer.
toOrigin() *
549 ATH_MSG_VERBOSE(
"Layer transform "<<gasGap<<
" "<<GeoTrf::toString(newRE->m_Xlg[gasGap],
true));
568 if (alignStore && alignStore->getBLine(reId)) {
569 newRE->setBLinePar(*alignStore->getBLine(reId));
574 return StatusCode::SUCCESS;
579 auto alignStore = alignItr ?
static_cast<const sTgcAlignmentStore*
>(alignItr->internalAlignment.get()) :
nullptr;
581 const std::vector<const MuonGMR4::sTgcReadoutElement*> sTgcReadOuts{
m_detMgr->getAllsTgcReadoutElements()};
582 ATH_MSG_INFO(
"Copy "<<sTgcReadOuts.size()<<
" sTgc readout elements to the legacy system");
587 GeoIntrusivePtr<GeoVFullPhysVol> physVol{
cloneNswWedge(gctx, *copyMe, cacheObj)};
589 auto newRE = std::make_unique<MuonGM::sTgcReadoutElement>(physVol,
591 copyMe->stationEta(),
592 copyMe->stationPhi(),
593 copyMe->multilayer(),
596 if (alignStore && alignStore->getBLine(reId)) {
597 newRE->setBLinePar(*alignStore->getBLine(reId));
599 for (
unsigned int layer = 1; layer <= copyMe->numLayers(); ++layer) {
605 newRE->m_Xlg[layer -1] = stripLayer.
toOrigin() *
612 ChannelDesign& etaDesign{newRE->m_etaDesign[layer-1]};
613 etaDesign.type = ChannelDesign::ChannelType::etaStrip;
614 etaDesign.detType = ChannelDesign::DetType::STGC;
627 etaDesign.inputPitch = copyEtaDesign.
stripPitch();
628 etaDesign.inputWidth = copyEtaDesign.
stripWidth();
629 etaDesign.nch = copyEtaDesign.
numStrips();
636 ChannelDesign& phiDesign{newRE->m_phiDesign[layer-1]};
637 phiDesign.type = ChannelDesign::ChannelType::phiStrip;
638 phiDesign.detType = ChannelDesign::DetType::STGC;
639 if (copyPhiDesign.
yCutout() == 0.) {
649 phiDesign.inputPitch = copyPhiDesign.
stripPitch();
650 phiDesign.inputWidth = copyPhiDesign.
stripWidth();
655 phiDesign.nGroups = copyPhiDesign.
numStrips();
656 phiDesign.wireCutout = copyPhiDesign.
wireCutout();
657 phiDesign.nch = copyPhiDesign.
nAllWires();
658 phiDesign.isConvertedFromPhaseII =
true;
662 padDesign.
Length = copyMe->chamberHeight();
663 padDesign.
sWidth = copyMe->sChamberLength();
664 padDesign.
lWidth = copyMe->lChamberLength();
666 padDesign.
ysFrame = copyMe->sFrameWidth();
667 padDesign.
ylFrame = copyMe->lFrameWidth();
668 padDesign.
thickness = copyMe->thickness();
692 return StatusCode::SUCCESS;
698 static_cast<const MdtAlignmentStore*
>(alignItr->internalAlignment.get()) :
nullptr;
700 const std::vector<const MuonGMR4::MdtReadoutElement*> mdtReadOuts{
m_detMgr->getAllMdtReadoutElements()};
701 ATH_MSG_INFO(
"Copy "<<mdtReadOuts.size()<<
" Mdt readout elements to the legacy system");
706 GeoIntrusivePtr<GeoVFullPhysVol> physVol{};
709 if (copyMe->multilayer() == 1) {
711 const double height = std::max(copyMe->moduleHeight(), otherRE->
moduleHeight()) -
712 (copyMe->tubePitch() - 2. * copyMe->tubeRadius());
715 modHalfThick{-0.5*copyMe->moduleThickness()};
717 const double thickness = ( (otherRE->
asBuiltRefFrame()*(modHalTHickO* Amg::Vector3D::UnitX())) -
718 (copyMe->asBuiltRefFrame()*(modHalfThick* Amg::Vector3D::UnitX()))).z();
719 if (copyMe->isBarrel()) {
728 auto newElement = std::make_unique<MuonGM::MdtReadoutElement>(physVol,
731 newElement->setIdentifier(reId);
732 newElement->setMultilayer(copyMe->multilayer());
733 newElement->setNMdtInStation(
m_idHelperSvc->mdtIdHelper().multilayerMax(reId));
735 newElement->setParentMuonStation(station);
738 newElement->setLongSsize(2*pars.longHalfX - 1._cm);
739 newElement->setSsize(2*pars.shortHalfX - 1._cm);
740 newElement->setLongRsize(2*pars.halfY);
741 newElement->setRsize(2*pars.halfY);
742 newElement->setZsize(2*pars.halfHeight);
743 newElement->setLongZsize(2*pars.halfHeight);
745 newElement->m_nlayers = copyMe->numLayers();
746 newElement->m_ntubesperlayer = copyMe->numTubesInLay();
747 newElement->m_deadlength = pars.deadLength;
748 newElement->m_endpluglength = pars.endPlugLength;
749 newElement->m_innerRadius = pars.tubeInnerRad;
750 newElement->m_tubeWallThickness = pars.tubeWall;
751 newElement->m_tubepitch = pars.tubePitch;
757 unsigned int step{1};
759 for (
unsigned tube = 0; tube < copyMe->numTubesInLay(); ++tube) {
762 if (std::abs(lastLength - currLength) > std::numeric_limits<float>::epsilon() ||
763 tube == copyMe->numTubesInLay() -1) {
764 newElement->m_tubelength[step-1] = lastLength;
765 newElement->m_tubelength[step] = currLength;
767 newElement->m_ntubesinastep = tube;
769 lastLength = currLength;
773 newElement->m_nsteps = step;
776 double xOffSet{pars.halfY}, yOffSet{pars.halfHeight};
777 if (newElement->barrel())
std::swap(xOffSet, yOffSet);
778 for (
unsigned lay = 1; lay <= copyMe->numLayers(); ++lay) {
780 const Amg::Vector3D locTube = copyMe->localTubePos(tubeHash);
781 newElement->m_firstwire_x[lay-1] = locTube.z() + xOffSet;
782 newElement->m_firstwire_y[lay-1] = locTube.x() + yOffSet;
793 const Amg::Vector3D refPoint = copyMe->bLineReferencePoint();
796 newElement->geoInitDone();
797 newElement->setBLinePar(distort.
bLine);
798 newElement->fillCache();
803 return StatusCode::SUCCESS;
813 return StatusCode::FAILURE;
818 return StatusCode::FAILURE;
820 return StatusCode::SUCCESS;
828 return StatusCode::SUCCESS;
833 <<GeoTrf::toString(testEle.
absTransform(),
true)<<std::endl
834 <<GeoTrf::toString(amdbTransform(gctx, refEle),
true));
836 for (
unsigned int gasGap = 1; gasGap <= refEle.
nGasGaps(); ++ gasGap) {
843 <<GeoTrf::toString(refTrf,
true) <<
" vs. "<<GeoTrf::toString(testTrf,
true));
844 return StatusCode::FAILURE;
856 return StatusCode::FAILURE;
858 const double dist = refStripDir.dot(refStripPos - testStripPos);
859 if (std::abs(dist) > 10. * Gaudi::Units::micrometer) {
862 <<
" distance: "<<dist<<
" "<<(dist / testEle.
m_etaDesign[gasGap -1].inputWidth));
863 return StatusCode::FAILURE;
868 return StatusCode::SUCCESS;
876 return StatusCode::SUCCESS;
881 <<std::endl<<GeoTrf::toString(amdbTransform(gctx, refEle))
882 <<std::endl<<GeoTrf::toString(testEle.getMaterialGeom()->getAbsoluteTransform())
886 for (
unsigned int lay = 1; lay <= refEle.
numLayers(); ++lay){
887 for (
unsigned int tube = 1; tube <= refEle.
numTubesInLay(); ++tube) {
889 if (!refEle.
isValid(tubeHash)) {
899 if ( (refPos - tubePos).
mag() > Gaudi::Units::micrometer &&
900 (globToLocal*refPos - globToLocal * tubePos).
perp() > Gaudi::Units::micrometer) {
902 <<
" reference: "<<GeoTrf::toString(globToLocal*refPos)<<
" vs. test: "
903 <<GeoTrf::toString(globToLocal*tubePos) <<
" delta: "<<(refPos - tubePos).mag()
904 <<
" Transforms "<<std::endl
905 <<
" **** "<< GeoTrf::toString(globToLocal.inverse())<<std::endl
906 <<
" **** "<< GeoTrf::toString(testEle.
transform(lay, tube)));
907 return StatusCode::FAILURE;
910 <<std::endl<<
"reference: "<<GeoTrf::toString(refPos)
911 <<std::endl<<
"test: "<<GeoTrf::toString(tubePos)
917 std::numeric_limits<float>::epsilon() ) {
921 return StatusCode::FAILURE;
926 return StatusCode::SUCCESS;
933 return StatusCode::SUCCESS;
938 <<
" ref: "<<GeoTrf::toString(amdbTransform(gctx, refEle),
true)<<std::endl
939 <<
" test: "<<GeoTrf::toString(testEle.
absTransform(),
true)<<std::endl
940 <<
"delta: "<<GeoTrf::toString(testEle.
absTransform().inverse()*amdbTransform(gctx, refEle),
true ));
942 for (
unsigned int gasGap = 1; gasGap <= refEle.
nGasGaps(); ++gasGap) {
944 for (
bool measPhi : {
false,
true}) {
945 if (measPhi && !refEle.
nPhiStrips())
continue;
949 doubPhi, gasGap, measPhi,
strip);
953 Amg::Transform3D::Identity())};
957 <<
" *** ref: "<<GeoTrf::toString(refTrans)<<std::endl
958 <<
" *** test: "<<GeoTrf::toString(testTrans)<<std::endl
959 <<
" -> delta: "<<GeoTrf::toString(refTrans.inverse()*testTrans));
960 return StatusCode::FAILURE;
973 if ((refStripPos - testStripPos).
mag() > 2e-4){
976 <<
" local coordinates -- ref: "<<
Amg::toString(refTrans.inverse()*refStripPos)
977 <<
" test: "<<
Amg::toString(refTrans.inverse()*testStripPos));
978 return StatusCode::FAILURE;
982 <<
", local: "<<
Amg::toString(refTrans.inverse()*refStripPos));
987 return StatusCode::SUCCESS;
994 return StatusCode::SUCCESS;
1001 <<std::endl<<GeoTrf::toString(amdbTransform(gctx, refEle),
true)
1002 <<std::endl<<GeoTrf::toString(testEle.getMaterialGeom()->getAbsoluteTransform(),
true)
1007 for (
unsigned int gasGap = 1; gasGap <= refEle.
nGasGaps(); ++gasGap) {
1008 for (
bool isStrip : {
false,
true}) {
1015 (!isStrip ? Amg::Transform3D::Identity()
1020 <<std::endl<<
"ref : "<<GeoTrf::toString(refLayerTrf,
true)
1021 <<std::endl<<
"test: "<<GeoTrf::toString(testLayerTrf,
true)
1022 <<
" are not identical. ");
1023 return StatusCode::FAILURE;
1026 <<std::endl<<
"ref : "<<GeoTrf::toString(refLayerTrf,
true)
1027 <<std::endl<<
"test: "<<GeoTrf::toString(testLayerTrf,
true));
1029 for (
unsigned int ch = 1; ch <= refEle.
numChannels(layHash); ++ch) {
1034 if ((refChannel - testChannel).
mag() < std::numeric_limits<float>::epsilon()){
1037 std::stringstream
msg{};
1039 <<
" is not at the same position "<<
Amg::toString(refChannel)
1041 <<(refChannel - testChannel).
mag();
1043 msg<<std::endl<<
"*** Test *** - wirePitch: "<<testEle.
wirePitch()
1044 <<
", tot wires "<<testEle.
nWires(gasGap)
1046 <<
", wires in gang "<<testEle.
nWires(gasGap, ch);
1048 msg<<std::endl<<
"*** Ref *** - wirePitch: "<<design.
stripPitch()
1049 <<
", tot wires "<<testEle.
nWires(gasGap)
1053 const Amg::Vector3D locRefPos{refLayerTrf.inverse() * refChannel};
1054 const Amg::Vector3D locTestPos{refLayerTrf.inverse()* testChannel};
1059 return StatusCode::FAILURE;
1064 return StatusCode::SUCCESS;
1070 return StatusCode::SUCCESS;
1075 <<GeoTrf::toString(testEle.
absTransform(),
true)<<std::endl
1076 <<GeoTrf::toString(amdbTransform(gctx, refEle),
true));
1078 for (
unsigned int gasGap = 1; gasGap <= refEle.
numLayers(); ++gasGap) {
1083 const unsigned int numChannel = refEle.
numChannels(layHash);
1084 constexpr unsigned firstCh = 1;
1085 for (
unsigned int channel = firstCh; channel < numChannel ; ++channel) {
1102 return StatusCode::FAILURE;
1109 || (testTrans.inverse()*refTrans).translation().perp() >
1110 std::numeric_limits<float>::epsilon() ) ) {
1111 ATH_MSG_ERROR(__func__<<
"() "<<__LINE__<<
" - Transformation for "
1113 <<
" *** ref: "<<GeoTrf::toString(refTrans,
true)<<std::endl
1114 <<
" *** test: "<<GeoTrf::toString(testTrans,
true));
1115 return StatusCode::FAILURE;
1124 const std::array<Amg::Vector3D,4> refPadCorners = refEle.
globalPadCorners(gctx, measHash);
1127 for (
unsigned int cornerIdx = 0; cornerIdx < refPadCorners.size(); ++cornerIdx) {
1128 const double padCornerDiff = (refPadCorners[cornerIdx] - testPadCorners[cornerIdx]).
mag();
1129 if (padCornerDiff - 25. > 1. * Gaudi::Units::micrometer){
1132 <<
" difference: " << padCornerDiff
1133 <<
" local coordinates -- ref: "<<
Amg::toString(refTrans.inverse()*refPadCorners[cornerIdx])
1134 <<
" test: "<<
Amg::toString(testPadTrans.inverse()*testPadCorners[cornerIdx]));
1135 return StatusCode::FAILURE;
1138 const double padChannelDiff = (refChannelPos - testChannelPos).
mag();
1139 if (padChannelDiff - 25. > 1. * Gaudi::Units::micrometer){
1142 <<
" difference: " << padChannelDiff
1143 <<
" local coordinates -- ref: "<<
Amg::toString(refTrans.inverse()*refChannelPos)
1144 <<
" test: "<<
Amg::toString(testPadTrans.inverse()*testChannelPos));
1145 return StatusCode::FAILURE;
1153 if ((refChannelPos - testChannelPos).
mag() > 1. * Gaudi::Units::micrometer){
1156 <<
" local coordinates -- ref: "<<
Amg::toString(testTrans.inverse()*refChannelPos)
1157 <<
" test: "<<
Amg::toString(testTrans.inverse()*testChannelPos));
1158 return StatusCode::FAILURE;
1165 Amg::Vector3D localRefPos {testTrans.inverse()*refChannelPos};
1166 Amg::Vector3D localTestPos{testTrans.inverse()*testChannelPos};
1168 if((std::abs(localRefPos.x() -localTestPos.x()) > 1.* Gaudi::Units::micrometer)
1169 || (std::abs(refChannelPos.z() -testChannelPos.z()) > 15.* Gaudi::Units::micrometer)){
1172 <<
" local coordinates -- ref: "<<
Amg::toString(testTrans.inverse()*refChannelPos)
1173 <<
" test: "<<
Amg::toString(testTrans.inverse()*testChannelPos)
1174 <<
"delta X: "<<std::abs(localRefPos.x() -localTestPos.x())
1175 <<
", delta Z: "<<std::abs(localRefPos.z() -localTestPos.z()));
1176 return StatusCode::FAILURE;
1182 return StatusCode::SUCCESS;
Scalar perp() const
perp method - perpendicular length
Scalar mag() const
mag method
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
sTgcIdHelper::sTgcChannelTypes chType
Store holding the transfomations used by the Acts algorithms.
GeoModel::TransientConstSharedPtr< AlignmentStore > AlignmentStorePtr
AlignmentStorePtr & getStore(const DetectorType type)
Returns the mutable alignable store for the ATLAS detector type (Pixel, Mdt, etc.)
void setStore(AlignmentStorePtr store)
Adds the store to the Geometry context.
virtual DetectorType detectorType() const =0
Returns the detector element type.
const ServiceHandle< StoreGateSvc > & detStore() const
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
This is a "hash" representation of an Identifier.
Helper struct to cache simulatenously the As-built and the BLine corrections of the Mdts for fast acc...
chamberDistortions getDistortion(const Identifier &detElId) const
Returns a chamber distortion that's cached for the corresponding Mdt chamber element.
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Readout element to describe the Monitored Drift Tube (Mdt) chambers Mdt chambers usually comrpise out...
double wireLength(const IdentifierHash &hash) const
double activeTubeLength(const IdentifierHash &hash) const
double tubeLength(const IdentifierHash &hash) const
unsigned numLayers() const
Returns how many tube layers are inside the multi layer [1;4].
bool isValid(const IdentifierHash &measHash) const
Checks whether the passed meaurement hash corresponds to a valid tube described by the readout elemen...
double moduleHeight() const
Returns the height of the chamber (Distance bottom - topWidth)
Amg::Transform3D asBuiltRefFrame() const
Returns the transformation to go into the reference frame of the as-buit & b-line model starting from...
Amg::Vector3D globalTubePos(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the position of the tube mid point in the ATLAS coordinate frame.
double moduleThickness() const
Returns the thickness of the chamber.
double uncutTubeLength(const IdentifierHash &tubeHash) const
Returns the uncut tube length.
unsigned numTubesInLay() const
Returns the number of tubes in a layer.
const MdtReadoutElement * complementaryRE() const
Returns the pointer to the other readout element inside the muon station.
static IdentifierHash measurementHash(unsigned layerNumber, unsigned tubeNumber)
Constructs a Measurement hash from layer && tube number.
Identifier measurementId(const IdentifierHash &measHash) const override final
Back conversion of the measurement hash towards a full identifier Tube & layer number are extracted f...
Helper struct to retrieve the tube lengths and the tube centers directly from the GeoModel tree.
double uncutHalfLength(const unsigned int tube) const
Returns the uncut-half length of the given tube.
const StripLayer & stripLayer(const Identifier &measId) const
unsigned int nGasGaps() const
Returns the number of gas gaps.
int multilayer() const
Returns the multi layer of the element [1-2].
IdentifierHash layerHash(const Identifier &measId) const override final
The layer hash removes the bits from the IdentifierHash corresponding to the measurement's channel nu...
Amg::Vector3D stripPosition(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the position of the strip center.
static IdentifierHash createHash(const int gasGap, const int strip)
MuonReadoutElement is an abstract class representing the geometry of a muon detector.
const Amg::Transform3D & localToGlobalTransform(const ActsTrk::GeometryContext &ctx) const
Returns the transformation from the local coordinate system of the readout element into the global AT...
Amg::Transform3D globalToLocalTransform(const ActsTrk::GeometryContext &ctx) const
Returns the transformation from the global ATLAS coordinate system into the local coordinate system o...
IdentifierHash identHash() const
Returns the hash of the readout element which is identical to the detector element hash provided by t...
Identifier identify() const override final
Return the ATLAS identifier.
const GeoAlignableTransform * alignableTransform() const
Return the alignable transform node of the readout element.
double beamlineRadius() const
Returns the distance between the gasGap center and the beamline.
int numPadPhi() const
Returns the number of pads in the Phi direction in the given gasGap layer.
std::pair< int, int > padNumber(const int SeqChannel) const
Returns the pad (eta,phi) for a given pad number in sequence (1,2,3,...18,19,20......
int numPadEta() const
Returns the number of pads in the eta direction in the given layer.
double sectorAngle() const
Function gives the angular width of the sector.
double padPhiShift() const
Returns the staggering shift of inner pad edges in the phi direction.
int maxPadEta() const
Returns the maximum number of pads that can be contained in a column of a pad. Used to match the pad ...
double firstPadHeight() const
Returns the height of the pads that are adjacent to the bottom edge of the trapezoid active area.
double anglePadPhi() const
Returns the angular pitch of the pads in the phi direction.
double padHeight() const
Returns the height of all the pads that are not adjacent to the bottom edge of the trapezoid active a...
double firstPadPhiDiv() const
Returns the angle of the first pad outer edge w.r.t. the gasGap center from the beamline.
Amg::Vector2D stripLeftTop(int stripNumber) const
: Returns the intersection of the left strip edge at the top panel's edge
Amg::Vector2D stripRightTop(int stripNumber) const
: Returns the intersecetion fo the right strip edge at the top panel's edge
Amg::Vector2D stripRightBottom(int stripNumber) const
: Returns the intersecton of the strip right edge at the bottom panel's edge
Amg::Vector2D stripLeftBottom(int stripNumber) const
: Returns the intersection of the left strip edge at the bottom panel's edge
StatusCode buildStation(const ActsTrk::GeometryContext &gctx, const Identifier &stationId, ConstructionCache &cacheObj) const
builds a station object from readout element.
Gaudi::Property< std::string > m_geoDumpName
StatusCode buildMdt(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all Mdt readout elements from the R4 format into the legacy Trk format.
StatusCode initialize() override
StatusCode cloneReadoutVolume(const ActsTrk::GeometryContext &gctx, const Identifier &stationId, ConstructionCache &cacheObj, GeoIntrusivePtr< GeoVFullPhysVol > &clonedPhysVol, MuonGM::MuonStation *&station) const
Clones the fullPhysical volume of the readoutElement and embeds it into the associated station.
StatusCode execute(const EventContext &ctx) const override
SG::WriteCondHandleKey< MuonGM::MuonDetectorManager > m_writeKey
Gaudi::Property< bool > m_splitTrfCache
Instantiate a new transform cache to ensure lazy transform population in the event processing.
GeoIntrusivePtr< GeoVFullPhysVol > cloneNswWedge(const ActsTrk::GeometryContext &gctx, const MuonGMR4::MuonReadoutElement &nswRE, ConstructionCache &cacheObj) const
Clones the full phyical volume associated to the NSw readout element.
StatusCode buildRpc(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all Rpc readout elements from the R4 format into the legacy Trk format.
StatusCode buildTgc(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all Tgc readout elements from the R4 format into the legacy Trk format.
Gaudi::Property< bool > m_dumpGeo
StatusCode buildSTGC(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all sTgc readout elements from the R4 format into the legacy Trk format.
StatusCode dumpAndCompare(const ActsTrk::GeometryContext &gctx, const MuonGMR4::RpcReadoutElement &refEle, const MuonGM::RpcReadoutElement &testEle) const
Compares the R4 readout element with the constructed Trk readout element.
StatusCode checkIdCompability(const MuonGMR4::MuonReadoutElement &refEle, const MuonGM::MuonReadoutElement &testEle) const
Checks whether the Identifier fields of both readout elements are identical.
StatusCode buildMM(const ActsTrk::GeometryContext &gctx, ConstructionCache &cacheObj) const
Converts all Mm readout elements from the R4 format into the legacy Trk format.
SG::ReadCondHandleKeyArray< ActsTrk::DetectorAlignStore > m_alignStoreKeys
const MuonGMR4::MuonDetectorManager * m_detMgr
Gaudi::Property< bool > m_checkGeo
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
unsigned nPhiStrips() const
Number of strips measuring the phi coordinate.
int doubletZ() const
Returns the doublet Z field of the MuonReadoutElement identifier.
int doubletPhi() const
Returns the doublet Phi field of the MuonReadoutElement identifier.
int doubletPhiMax() const
Returns the maximum phi panel.
Amg::Vector3D stripPosition(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the position of the strip center.
unsigned nGasGaps() const
Returns the number of gasgaps described by this ReadOutElement (usally 2 or 3)
double halfWidth() const
Returns the half height of the strip panel.
double stereoAngle() const
Returns the value of the stereo angle.
int firstStripNumber() const
Returns the number of the first strip.
const Amg::Vector2D & firstStripPos() const
Vector indicating the first strip position.
double yCutout() const
Returns the cutout of the diamond.
double stripPitch() const
Distance between two adjacent strips.
double stripWidth() const
Width of a strip.
double shortHalfHeight() const
Returns the shorter half height of the panel.
double longHalfHeight() const
Returns the longer half height of the panel.
virtual int numStrips() const
Number of strips on the panel.
The StripLayer interfaces the 2D description of the strip plane layout with the 3D description of the...
const StripDesign & design(bool phiView=false) const
Returns the underlying strip design.
const Amg::Transform3D & toOrigin() const
Returns the transformation to go from the strip layer center to the origin of the Strip chamber.
Amg::Vector3D channelPosition(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the center of the measurement channel eta measurement: wire gang center phi measurement: stri...
Identifier measurementId(const IdentifierHash &measHash) const override final
Back conversion of the measurement hash to a full Athena Identifier The behaviour is undefined if a l...
static IdentifierHash constructHash(unsigned measCh, unsigned gasGap, const bool isStrip)
Constructs the Hash out of the Identifier fields (channel, gasGap, isStrip)
const WireGroupDesign & wireGangLayout(const IdentifierHash &layHash) const
Returns access to the wire group design of the given gasGap [1-3] If the gap does not have a wires an...
unsigned numChannels(const IdentifierHash &measHash) const
Returns the number of readout channels.
unsigned nGasGaps() const
Returns the number of gasgaps described by this ReadOutElement (usally 2 or 3)
unsigned int numWiresInGroup(unsigned int groupNum) const
Returns the number of wires in a given group.
unsigned int numPitchesToGroup(unsigned int groupNum) const
Returns the number of wire pitches to reach the given group.
double wireCutout() const
Extract the wireCutout for a wireGroup layer.
unsigned int nAllWires() const
Returns the number of all wires.
unsigned numChannels(const IdentifierHash &measHash) const
Returns the number of strips / wires / pads in a given gasGap.
IdentifierHash measurementHash(const Identifier &measId) const override final
Constructs the identifier hash from the full measurement Identifier.
const PadDesign & padDesign(const IdentifierHash &measHash) const
Retrieves the readoutElement Layer given the Identifier/Hash.
int multilayer() const
Returns the multilayer of the sTgcReadoutElement.
globalCornerArray globalPadCorners(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
unsigned numLayers() const
Returns the number of gas gap layers.
IdentifierHash layerHash(const Identifier &measId) const override final
Transforms the Identifier into a layer hash.
ReadoutChannelType
ReadoutChannelType to distinguish the available readout channels Pad - pad readout channel Strip - et...
Amg::Vector3D globalChannelPosition(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
Returns the global pad/strip/wireGroup position.
static IdentifierHash createHash(const unsigned gasGap, const unsigned channelType, const unsigned channel, const unsigned wireInGrp=0)
Create a measurement hash from the Identifier fields.
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
std::array< MuonChannelDesign, 4 > m_etaDesign
double getTubeLengthForCaching(const int tubeLayer, const int tube) const
double getActiveTubeLength(const int tubeLayer, const int tube) const
Amg::Vector3D tubePos(const Identifier &id) const
Returns the global position of the given tube.
virtual const Amg::Transform3D & transform(const Identifier &id) const override final
Return local to global transform associated with this identifier.
double tubeLength(const int tubeLayer, const int tube) const
double getWireLength(const int tubeLayer, const int tube) const
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
const MuonReadoutElement * getReadoutElement(const Identifier &id) const
Get any read out element.
void addsTgcReadoutElement(std::unique_ptr< sTgcReadoutElement > &&reEle)
store the sTGCReadoutElement using as "key" the identifier
void addRpcReadoutElement(std::unique_ptr< RpcReadoutElement > &&reEle)
store the RpcReadoutElement using as "key" the identifier
void setMMPassivation(const NswPassivationDbData *passiv)
const MuonStation * getMuonStation(const std::string &stName, int eta, int phi) const
void addMdtReadoutElement(std::unique_ptr< MdtReadoutElement > &&reEle)
store the MdtReadoutElement using as "key" the identifier
void addMuonStation(std::unique_ptr< MuonStation > &&mst)
void addTgcReadoutElement(std::unique_ptr< TgcReadoutElement > &&reEle)
store the TgcReadoutElement using as "key" the identifier
void addMMReadoutElement(std::unique_ptr< MMReadoutElement > &&reEle)
store the MMReadoutElement using as "key" the identifier
Base class for the XxxReadoutElement, with Xxx = Mdt, Rpc, Tgc, Csc.
IdentifierHash detectorElementHash() const
Returns the IdentifierHash of the detector element.
double getLongZsize() const
double getLongRsize() const
const Amg::Transform3D & absTransform() const
double getLongSsize() const
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
void setBlineFixedPointInAmdbLRS(double s0, double z0, double t0)
PVConstLink getPhysVol() const
void setMdtAsBuiltParams(const MdtAsBuiltPar *xtomo)
void setMdtRsize(const double rSize)
int nMuonReadoutElements() const
void addMuonReadoutElementWithAlTransf(MuonReadoutElement *a, GeoAlignableTransform *ptrsf, int jobIndex)
void setMdtZsize(const double zSize)
void setBline(const BLinePar *bline)
bool hasMdtAsBuiltParams() const
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Amg::Vector3D stripPos(const Identifier &id) const
int Nstrips(bool measphi) const
returns the number of strips for the phi or eta plane
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip)
double nPitchesToGang(int gasGap, int gang) const
Returns the number of wire pitches that have to be travelled to reach gang i.
int nWires(int gasGap) const
Returns the total number of wires in a given gas gap.
double wirePitch() const
Returns the pitch of the wires.
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
bool padGlobalCorners(const Identifier &id, std::array< Amg::Vector3D, 4 > &gcorners) const
pad global corners
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
void addDependency(const EventIDRange &range)
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
static int stationPhiMax(bool endcap)
Identifier channelID(int stationName, int stationEta, int stationPhi, int gasGap, int isStrip, int channel) const
Identifier padID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int padEta, int padPhi) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const
std::string to_string(const DetectorType &type)
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
@ Mm
Maybe not needed in the migration.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
bool isIdentity(const Amg::Transform3D &trans)
Checks whether the transformation is the Identity transformation.
bool doesNotDeform(const Amg::Transform3D &trans)
Checks whether the linear part of the transformation rotates or stetches any of the basis vectors.
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Eigen::Affine3d Transform3D
Amg::Transform3D getTranslateX3D(const double X)
: Returns a shift transformation along the x-axis
Eigen::Matrix< double, 3, 1 > Vector3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Amg::Transform3D rotationToAMDB(const ActsTrk::DetectorType type)
Returns the rotation matrix from the readout element coordinate system into the AMDB coordinate syste...
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
std::unique_ptr< ActsTrk::DetectorAlignStore > copyDeltas(const ActsTrk::DetectorAlignStore &inStore)
Copy the alignment deltas from the inStore to a new alignment store.
void swap(ElementLinkVector< DOBJ > &lhs, ElementLinkVector< DOBJ > &rhs)
Helper struct to store the pointer to the Mdt distrotion parameters, namely the As-built and the BLin...
const MdtAsBuiltPar * asBuilt
Set of parameters to describe a MDT chamber.
Cache object holding the constructed detector manager, and the intermediate GeoModel objects needed t...
PVLink world
Pointer to the world.
std::unique_ptr< MuonGM::MuonDetectorManager > detMgr
Pointer to the legacy MuonDetectorManager.
GeoIntrusivePtr< GeoIdentifierTag > newIdTag()
Returns an identifier tag.
std::set< PVConstLink > translatedStations
Set of all translated Physical volumes.
Set of parameters to describe a RPC chamber.
double stereoAngle() const
returns the stereo angle
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
set the trapezoid dimensions
void setFirstPos(const double pos)
Set the position of the first strip along the x-axis.
Parameters defining the design of the readout sTGC pads.
double sectorOpeningAngle
bool isConvertedFromPhaseII
void setR(double R)
access to cache