5#if defined(FLATTEN) && defined(__GNUC__)
7#pragma GCC optimize "-fno-var-tracking-assignments"
19#include <GaudiKernel/SystemOfUnits.h>
21#include "Acts/Geometry/TrapezoidVolumeBounds.hpp"
22#include "Acts/Geometry/TrackingGeometry.hpp"
23#include "Acts/Geometry/DiamondVolumeBounds.hpp"
24#include "Acts/Surfaces/TrapezoidBounds.hpp"
26#include "Acts/Visualization/ObjVisualization3D.hpp"
27#include "Acts/Visualization/GeometryView3D.hpp"
28#include "Acts/Definitions/Units.hpp"
34using namespace Acts::UnitLiterals;
38 constexpr double tolerance = 10. *Gaudi::Units::micrometer;
42 std::vector<std::shared_ptr<Acts::Volume>> vols{};
43 std::ranges::transform(sector.
chambers(),std::back_inserter(vols),
44 [&gctx](
const auto& ch){ return ch->boundingVolume(gctx); });
56 return StatusCode::SUCCESS;
58 template <
class EnvelopeType>
59#if defined(FLATTEN) && defined(__GNUC__)
68 const EnvelopeType& chamb,
69 const Acts::Volume& boundVol,
71 const std::string& descr,
76 <<
", point "<<descr <<
" is inside of the chamber "<<std::endl<<chamb<<std::endl
78 return StatusCode::SUCCESS;
83 planeTrapezoid.
defineTrapezoid(chamb.halfXShort(), chamb.halfXLong(), chamb.halfY());
84 planeTrapezoid.
setLevel(MSG::VERBOSE);
86 static const Eigen::Rotation2D axisSwap{90. *Gaudi::Units::deg};
87 if (std::abs(locPos.z()) - chamb.halfZ() < -
tolerance &&
89 return StatusCode::SUCCESS;
93 << descr <<
" "<<
Amg::toString(point)<<
" is not part of the chamber volume."
94 <<std::endl<<std::endl<<chamb<<std::endl<<
"Local position "<<
Amg::toString(locPos)
95 <<
", "<<planeTrapezoid
98 return StatusCode::FAILURE;
102 const Acts::TrackingVolume& volume,
104 const std::string& descr,
107 return StatusCode::SUCCESS;
109 const std::vector<Amg::Vector3D> volumeCorners =
cornerPoints(gctx, volume);
112 <<
" is not part of the chamber volume. The corners of the volume are:");
113 for(
const auto& corner : volumeCorners) {
116 return StatusCode::FAILURE;
119 template <
class EnvelopeType>
121 const EnvelopeType& envelope)
const {
122 std::shared_ptr<Acts::Volume> boundVol = envelope.boundingVolume(gctx);
125 if constexpr (std::is_same_v<EnvelopeType, SpectrometerSector>) {
126 if (readOut->msSector() != &envelope) {
128 <<std::endl<<(*readOut->msSector())<<std::endl<<envelope);
129 return StatusCode::FAILURE;
131 }
else if constexpr (std::is_same_v<EnvelopeType, Chamber>) {
132 if (readOut->chamber() != &envelope) {
134 <<std::endl<<(*readOut->chamber())<<std::endl<<envelope);
135 return StatusCode::FAILURE;
138 switch (readOut->detectorType()) {
162 return StatusCode::FAILURE;
166 ATH_MSG_DEBUG(
"All "<<reEles.size()<<
" readout elements are embedded in "<<envelope);
167 return StatusCode::SUCCESS;
172 const auto& bounds = volume.volumeBounds();
173 unsigned int edgeIdx{0};
175 if(bounds.type() == Acts::VolumeBounds::BoundsType::eDiamond){
176 const auto& diamondBounds =
static_cast<const Acts::DiamondVolumeBounds&
>(bounds);
177 using BoundEnum = Acts::DiamondVolumeBounds::BoundValues;
178 std::vector<Amg::Vector3D> edges(12, Amg::Vector3D::Zero());
181 for(
double signX : {-1.,1.}){
182 for(
double signY : {-1., 0., 1.}){
183 for(
double signZ : {-1.,1.}){
185 xCord = diamondBounds.get(BoundEnum::eHalfLengthX2);
187 xCord = diamondBounds.get(BoundEnum::eHalfLengthX1);
188 yCord = diamondBounds.get(BoundEnum::eLengthY1);
191 xCord = diamondBounds.get(BoundEnum::eHalfLengthX3);
192 yCord = diamondBounds.get(BoundEnum::eLengthY2);
198 signZ*diamondBounds.get(BoundEnum::eHalfLengthZ)};
199 edges[edgeIdx] = volume.localToGlobalTransform(gctx.
context())*edge;
209 std::vector<Amg::Vector3D> edges(8, Amg::Vector3D::Zero());
211 for (
const double signX : {-1., 1.}) {
212 for (
const double signY : { -1., 1.}) {
213 for (
const double signZ: {-1., 1.}) {
217 edges[edgeIdx] = volume.localToGlobalTransform(gctx.
context()) * edge;
228 using BoundEnum = Acts::LineBounds::BoundValues;
229 const auto& bounds =
static_cast<const Acts::LineBounds&
>(surface.bounds());
230 unsigned int edgeIdx{0};
233 for (
const double signX : {-1., 1.}) {
234 for (
const double signY : { -1., 1.}) {
235 for (
const double signZ: {-1., 1.}) {
237 signY*bounds.get(BoundEnum::eR),
238 signZ*bounds.get(BoundEnum::eHalfLengthZ)};
239 edges[edgeIdx] = surface.localToGlobalTransform(gctx.
context()) * edge;
249 if(surface.bounds().type() == Acts::SurfaceBounds::BoundsType::eRectangle) {
250 const Acts::RectangleBounds& bounds =
static_cast<const Acts::RectangleBounds&
>(surface.bounds());
251 using BoundEnum = Acts::RectangleBounds::BoundValues;
253 unsigned int edgeIdx{0};
254 for(
const double signX : {-1., 1.}) {
255 for (
const double signY : { -1., 1.}) {
256 const Amg::Vector3D edge{signX < 0 ? bounds.get(BoundEnum::eMinX) : bounds.get(BoundEnum::eMaxX),
257 signY < 0 ? bounds.get(BoundEnum::eMinY) : bounds.get(BoundEnum::eMaxY), 0.};
258 edges[edgeIdx] = surface.localToGlobalTransform(gctx.
context()) * edge;
263 }
else if(surface.bounds().type() == Acts::SurfaceBounds::BoundsType::eTrapezoid) {
264 using BoundEnum = Acts::TrapezoidBounds::BoundValues;
265 const auto& bounds =
static_cast<const Acts::TrapezoidBounds&
>(surface.bounds());
266 unsigned int edgeIdx{0};
269 for (
const double signX : {-1., 1.}) {
270 for (
const double signY : { -1., 1.}) {
272 Amg::Vector3D(signX*bounds.get(signY < 0 ? BoundEnum::eHalfLengthXnegY : BoundEnum::eHalfLengthXposY),
273 signY*bounds.get(BoundEnum::eHalfLengthY), 0.)};
275 edges[edgeIdx] = surface.localToGlobalTransform(gctx.
context()) * edge;
282 ATH_MSG_FATAL(
"The surface bounds are neither a rectangle nor a trapezoid, this is not supported yet");
287#if defined(FLATTEN) && defined(__GNUC__)
296 const std::vector<Amg::Vector3D>& chamberEdges,
297 const Acts::Volume& volume)
const {
301 double minDist = 1._km;
303 minDist = std::min(minDist, (edge - center).
mag());
307 if (std::ranges::none_of(volume.volumeBounds().values(),
308 [minDist](
const double bound){
309 return minDist < 2.5*bound;
315 for (
unsigned edge1 = 1; edge1 < chamberEdges.size(); ++edge1) {
316 for (
unsigned edge2 = 0; edge2 < edge1; ++edge2) {
318 const double section = stepLength * step;
320 if (volume.inside (gctx.
context(), testPoint)) {
330 std::vector<const MuonReadoutElement*> allRE =
m_detMgr->getAllReadoutElements();
333 ATH_MSG_INFO(
"Fetched "<<chambers.size()<<
" chambers.");
334 std::vector<const Chamber*> chamberVec{chambers.begin(), chambers.end()};
337 return std::ranges::find(chamberVec,
re->chamber()) == chamberVec.end();
339 if (missChamb != allRE.end()) {
340 ATH_MSG_FATAL(
"The chamber "<<(*(*missChamb)->chamber())<<
" is not in the chamber set");
341 return StatusCode::FAILURE;
344 std::set<const Chamber*> overlapChambers{};
345 std::stringstream overlapstream{};
346 for (std::size_t chIdx = 0; chIdx< chamberVec.size(); ++chIdx) {
347 const Chamber& chamber{*chamberVec[chIdx]};
349 saveEnvelope(gctx, std::format(
"Chamber_{:}{:}{:}{:}{:}",
351 chName(chamber.chamberIndex()),
352 Acts::abs(chamber.stationEta()),
353 chamber.stationEta() > 0 ?
'A' :
'C',
354 chamber.stationPhi()),
355 *chamber.boundingVolume(gctx), chamber.readoutEles());
358 const std::vector<Amg::Vector3D> chambCorners =
cornerPoints(gctx, *chamber.boundingVolume(gctx));
360 std::vector<const Chamber*> overlaps{};
361 for (std::size_t chIdx1 = 0; chIdx1<chamberVec.size(); ++chIdx1) {
362 if (chIdx == chIdx1) {
365 const Chamber* overlapTest{chamberVec[chIdx1]};
367 overlaps.push_back(overlapTest);
370 if (overlaps.empty()) {
373 overlapstream<<
"The chamber "<<chamber<<
" overlaps with "<<std::endl;
374 for (
const Chamber* itOverlaps : overlaps) {
375 overlapstream<<
" *** "<<(*itOverlaps)<<std::endl;
377 overlapstream<<std::endl<<std::endl;
378 overlapChambers.insert(overlaps.begin(), overlaps.end());
379 overlapChambers.insert(chamberVec[chIdx]);
381 if (!overlapChambers.empty()) {
382 Acts::ObjVisualization3D visualHelper{};
384 Acts::GeometryView3D::drawVolume(visualHelper, *
hasOverlap->boundingVolume(gctx), gctx.
context());
393 return overlapChambers.empty() ||
m_ignoreOverlapCh ? StatusCode::SUCCESS : StatusCode::FAILURE;
398 std::vector<const MuonReadoutElement*> allREs =
m_detMgr->getAllReadoutElements();
400 if (!
re->msSector()) {
402 return StatusCode::FAILURE;
407 if (sectorFromDet !=
re->msSector()) {
410 <<
" is not the one attached to the readout geometry \n"<<(*
re->msSector())<<
"\n"<<(*sectorFromDet));
411 return StatusCode::FAILURE;
415 const SectorSet sectors =
m_detMgr->getAllSectors();
420 chName(sector->chamberIndex()),
421 sector->side() >0?
'A' :
'C',
422 sector->stationPhi() ),
423 *sector->boundingVolume(gctx), sector->readoutEles(),
424 chamberVolumes(gctx, *sector));
427 const std::shared_ptr<Acts::Volume> secVolume = sector->boundingVolume(gctx);
429 const std::vector<Amg::Vector3D> edges =
cornerPoints(gctx, *chamber->boundingVolume(gctx));
430 unsigned int edgeCount{0};
433 chamber->readoutEles().front()->identify()));
437 return StatusCode::SUCCESS;
441 std::shared_ptr<const Acts::TrackingGeometry>& trackingGeometry)
const {
443 std::vector<const Acts::TrackingVolume*> volumeVec{};
444 std::vector<const Acts::TrackingVolume*> overlapVolumes{};
446 trackingGeometry->visitVolumes([&](
const Acts::TrackingVolume* vol){
447 if(!(vol->volumeBounds().type() == Acts::VolumeBounds::BoundsType::eCylinder)){
450 Acts::ObjVisualization3D visualHelper{};
451 for(
const auto& surf : vol->surfaces()){
453 Acts::GeometryView3D::drawSurface(visualHelper, surf, gctx.
context());
456 std::string volName = vol->volumeName();
457 Acts::GeometryView3D::drawVolume(visualHelper, *vol, gctx.
context());
458 ATH_MSG_DEBUG(
"Save new tracking volume 'MsTrackingVol_"<<volName<<
".obj'");
459 visualHelper.write(std::format(
"MsTrackingVol_{:}.obj", volName));
462 volumeVec.push_back(vol);
466 for(std::size_t vIdx = 0; vIdx < volumeVec.size(); vIdx++){
467 const Acts::TrackingVolume* testVol{volumeVec[vIdx]};
468 std::vector<const Acts::TrackingVolume*> overlaps{};
469 const std::vector<Amg::Vector3D> edges =
cornerPoints(gctx, *testVol);
470 const auto childrenVol = testVol->volumes();
471 const auto innerSurfaces = testVol->surfaces();
473 for(
const auto& surface : innerSurfaces){
475 std::vector<Amg::Vector3D> surfEdges = {};
476 if(
const auto* strawSurf =
dynamic_cast<const Acts::StrawSurface*
>(&surface)){
478 <<
" in volume "<<testVol->volumeName());
481 surfEdges = {edges.begin(), edges.end()};
482 }
else if(
const auto* planeSurf =
dynamic_cast<const Acts::PlaneSurface*
>(&surface)){
484 <<
" in volume "<<testVol->volumeName());
487 surfEdges = {edges.begin(), edges.end()};
490 <<
" is neither a straw nor a plane surface");
491 return StatusCode::FAILURE;
495 for(
const auto& edge : surfEdges){
496 if(!(testVol->inside(gctx.
context(), edge,0.01))){
498 <<
" is outside the parent volume" << testVol->volumeName());
506 for(std::size_t vIdx1 = 0 ; vIdx1 < volumeVec.size(); vIdx1++){
507 bool isChild = std::ranges::find_if(childrenVol,
508 [&](
const Acts::TrackingVolume& tv){
return &tv == volumeVec[vIdx1]; }
509 ) != childrenVol.end();
511 bool isMother = (testVol->motherVolume() == volumeVec[vIdx1]);
513 if(vIdx1 == vIdx || isMother){
518 std::vector<Amg::Vector3D> childEdges =
cornerPoints(gctx,*volumeVec[vIdx1]);
519 for(
const auto& edge : childEdges){
520 if(!(testVol->inside(gctx.
context(), edge, 0.01))){
521 ATH_MSG_FATAL(
"The children volume's " << volumeVec[vIdx1]->volumeName()
523 <<
" is outside the parent volume" << testVol->volumeName());
524 return StatusCode::FAILURE;
530 if(
hasOverlap(gctx, edges, *volumeVec[vIdx1])){
531 overlaps.push_back(volumeVec[vIdx1]);
534 if(overlaps.empty()){
535 ATH_MSG_DEBUG(
"No overlaps detected for the volume "<<testVol->volumeName());
538 overlapVolumes.push_back(testVol);
539 ATH_MSG_ALWAYS(
"The volume " << testVol->volumeName() <<
" overlaps with: ");
540 for(
const auto& overlap: overlaps){
545 if(overlapVolumes.empty()){
546 ATH_MSG_ALWAYS(
"No overlaps detected in the tracking geometry!!");
548 return overlapVolumes.empty() ||
m_ignoreOverlapCh ? StatusCode::SUCCESS : StatusCode::FAILURE;
552 const std::string& envName,
553 const Acts::Volume& envelopeVol,
554 const std::vector<const MuonGMR4::MuonReadoutElement*>& assocRE,
555 const std::vector<std::shared_ptr<Acts::Volume>>& subVols)
const {
556 Acts::ObjVisualization3D visualHelper{};
558 std::ranges::for_each(
re->getSurfaces(),[&visualHelper, &gctx](
const std::shared_ptr<Acts::Surface>& surface){
559 Acts::GeometryView3D::drawSurface(visualHelper, *surface, gctx.context());
562 std::ranges::for_each(subVols, [&visualHelper, &gctx](
const std::shared_ptr<Acts::Volume>& subVol ){
563 Acts::GeometryView3D::drawVolume(visualHelper,*subVol, gctx.
context(), Amg::Transform3D::Identity(),
564 Acts::s_viewPassive);
566 Acts::GeometryView3D::drawVolume(visualHelper, envelopeVol, gctx.
context());
567 ATH_MSG_DEBUG(
"Save new envelope 'MsTrackTest_"<<envName<<
".obj'");
568 visualHelper.write(std::format(
"MsTrackTest_{:}.obj", envName));
574 std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry =
m_trackingGeometrySvc->trackingGeometry();
580 return StatusCode::SUCCESS;
582 template <
class EnvelopeType>
585 const EnvelopeType& chamber,
586 const Acts::Volume& detVol)
const {
589 for (
unsigned int layer = 1; layer <= mdtMl.
numLayers(); ++layer) {
590 for (
unsigned int tube = 1; tube <= mdtMl.
numTubesInLay(); ++tube) {
604 "bottom of the tube box", measId));
606 "sealing of the tube box", measId));
609 "wall to the previous tube", measId));
611 "wall to the next tube", measId));
614 return StatusCode::SUCCESS;
616 template<
class EnvelopeType>
619 const EnvelopeType& chamber,
620 const Acts::Volume& detVol)
const {
625 for (
unsigned int gasGap = 1 ; gasGap <= rpc.
nGasGaps(); ++gasGap) {
627 for (
bool measPhi : {
false,
true}) {
631 doubletPhi, gasGap, measPhi,
strip);
639 return StatusCode::SUCCESS;
641 template <
class EnevelopeType>
644 const EnevelopeType& chamber,
645 const Acts::Volume& detVol)
const {
646 for (
unsigned int gasGap = 1; gasGap <= tgc.
nGasGaps(); ++gasGap){
647 for (
bool isStrip : {
false}) {
649 const unsigned int nChannel = tgc.
numChannels(layHash);
650 for (
unsigned int channel = 1; channel <= nChannel ; ++channel) {
657 return StatusCode::SUCCESS;
659 template <
class EnevelopeType>
662 const EnevelopeType& chamber,
663 const Acts::Volume& detVol)
const {
666 for(
unsigned int gasGap = 1; gasGap <= mm.nGasGaps(); ++gasGap){
668 unsigned int firstStrip = mm.firstStrip(gasGapHash);
669 for(
unsigned int strip = firstStrip;
strip <= mm.numStrips(gasGapHash); ++
strip){
671 ATH_CHECK(
pointInside(gctx, chamber, detVol, mm.stripPosition(gctx, stripId),
"center", stripId));
672 ATH_CHECK(
pointInside(gctx, chamber, detVol, mm.leftStripEdge(gctx, mm.measurementHash(stripId)),
"left edge", stripId));
673 ATH_CHECK(
pointInside(gctx, chamber, detVol, mm.rightStripEdge(gctx, mm.measurementHash(stripId)),
"right edge", stripId));
677 return StatusCode::SUCCESS;
679 template <
class EnvelopeType>
682 const EnvelopeType& chamber,
683 const Acts::Volume& detVol)
const{
686 for(
unsigned int gasGap = 1; gasGap <= stgc.
numLayers(); ++gasGap){
688 for(
unsigned int nch = 1; nch <= stgc.
nChTypes(); ++nch){
690 const unsigned int nStrips = stgc.
numChannels(gasGapHash);
705 return StatusCode::SUCCESS;
const boost::regex re(r_e)
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_ALWAYS(x)
#define ATH_MSG_WARNING(x)
Acts::GeometryContext context() const
const ServiceHandle< StoreGateSvc > & detStore() const
void setLevel(MSG::Level lvl)
Change the current logging level.
This is a "hash" representation of an Identifier.
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Chamber represent the volume enclosing a muon station.
std::shared_ptr< Acts::Volume > boundingVolume(const ActsTrk::GeometryContext &gctx) const
Returns the Acts::Volume representation of the chamber.
std::vector< const MuonReadoutElement * > ReadoutSet
Define the list of read out elements of the chamber.
Readout element to describe the Monitored Drift Tube (Mdt) chambers Mdt chambers usually comrpise out...
Amg::Vector3D highVoltPos(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the endpoint of the tube connected to the high voltage in the ATLAS coordinate frame.
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...
Amg::Vector3D readOutPos(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the endpoint of the tube where the readout card is mounted in the ATLAS coordinate frame.
const parameterBook & getParameters() const
Get a const reference to the parameter book.
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 innerTubeRadius() const
Returns the inner tube radius.
unsigned numTubesInLay() const
Returns the number of tubes in a layer.
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...
static IdentifierHash createHash(const int gasGap, const int strip)
std::vector< const Chamber * > MuonChamberSet
std::vector< const SpectrometerSector * > MuonSectorSet
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...
Identifier identify() const override final
Return the ATLAS identifier.
unsigned nPhiStrips() const
Number of strips measuring the phi coordinate.
Amg::Vector3D leftStripEdge(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the global posiition of the strip edge at positive local Y.
int doubletZ() const
Returns the doublet Z field of the MuonReadoutElement identifier.
int doubletPhi() const
Returns the doublet Phi field of the MuonReadoutElement identifier.
Amg::Vector3D rightStripEdge(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the global position of the strip edge at negative local Y.
unsigned nEtaStrips() const
Number of strips measuring the eta coordinate.
int doubletPhiMax() const
Returns the maximum phi panel.
const parameterBook & getParameters() const
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)
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
const ChamberSet & chambers() const
Returns the associated chambers with this sector.
GeoModel::TransientConstSharedPtr< Chamber > ChamberPtr
void defineStripLayout(Amg::Vector2D &&posFirst, const double stripPitch, const double stripWidth, const int numStrips, const int numFirst=1)
Defines the layout of the strip detector by specifing the position of the first strip w....
CheckVector2D leftEdge(int stripNumb) const
Returns the left edge of the strip (Global numbering scheme)
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
Defines the edges of the trapezoid.
bool insideTrapezoid(const Amg::Vector2D &extPos) const
Checks whether an external point is inside the trapezoidal area.
CheckVector2D rightEdge(int stripNumb) const
Returns the right edge of the strip (Global numbering scheme)
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)
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 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.
Amg::Vector3D leftStripEdge(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
int multilayer() const
Returns the multilayer of the sTgcReadoutElement.
unsigned nChTypes() const
Number of Channel Types.
Amg::Vector3D rightStripEdge(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
unsigned numLayers() const
Returns the number of gas gap layers.
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.
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) 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)
@ Mm
Maybe not needed in the migration.
@ Tgc
Resitive Plate Chambers.
@ Rpc
Monitored Drift Tubes.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
double halfY(const Acts::VolumeBounds &bounds)
Returns the half-Y length for the parsed volume bounds (Trapezoid/ Cuboid)
SpectrometerSector::ChamberSet ChamberSet
double halfZ(const Acts::VolumeBounds &bounds)
Returns the half-Z length for the parsed volume bounds (Trapezoid/ Cuboid)
double halfXhighY(const Acts::VolumeBounds &bounds)
Returns the half-Y length @ posiive Y for the parsed volume bounds (Trapezoid/ Cuboid)
double halfXlowY(const Acts::VolumeBounds &bounds)
Returns the half-X length @ negative Y for the parsed volume bounds (Trapezoid/ Cuboid)
const std::string & chName(ChIndex index)
convert ChIndex into a string
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.