|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include <GaudiKernel/SystemOfUnits.h>
16 #include "Acts/Geometry/TrapezoidVolumeBounds.hpp"
31 return StatusCode::SUCCESS;
33 template <
class EnvelopeType>
35 const Acts::Volume& boundVol,
37 const std::string&
descr,
42 <<
", point "<<
descr <<
" is inside of the chamber "<<std::endl<<chamb<<std::endl
43 <<
"Local position:" <<
Amg::toString(boundVol.itransform() * point));
44 return StatusCode::SUCCESS;
49 planeTrapezoid.
defineTrapezoid(chamb.halfXShort(), chamb.halfXLong(), chamb.halfY());
53 if (std::abs(locPos.z()) - chamb.halfZ() < -
tolerance &&
54 planeTrapezoid.insideTrapezoid(axisSwap*locPos.block<2,1>(0,0))) {
55 return StatusCode::SUCCESS;
57 planeTrapezoid.defineStripLayout(locPos.y() * Amg::Vector2D::UnitX(), 1, 1, 1);
60 <<std::endl<<std::endl<<chamb<<std::endl<<
"Local position "<<
Amg::toString(locPos)
63 return StatusCode::FAILURE;
66 template <
class EnvelopeType>
68 const EnvelopeType& envelope)
const {
69 std::shared_ptr<Acts::Volume> boundVol = envelope.boundingVolume(gctx);
72 if constexpr (std::is_same_v<EnvelopeType, SpectrometerSector>) {
73 if (readOut->msSector() != &envelope) {
75 <<std::endl<<(*readOut->msSector())<<std::endl<<envelope);
76 return StatusCode::FAILURE;
78 }
else if constexpr (std::is_same_v<EnvelopeType, Chamber>) {
79 if (readOut->chamber() != &envelope) {
81 <<std::endl<<(*readOut->chamber())<<std::endl<<envelope);
82 return StatusCode::FAILURE;
85 switch (readOut->detectorType()) {
109 return StatusCode::FAILURE;
113 ATH_MSG_DEBUG(
"All "<<reEles.size()<<
" readout elements are embedded in "<<envelope);
114 return StatusCode::SUCCESS;
119 unsigned int edgeIdx{0};
120 using BoundEnum = Acts::TrapezoidVolumeBounds::BoundValues;
121 const auto& bounds =
static_cast<const Acts::TrapezoidVolumeBounds&
>(volume.volumeBounds());
123 for (
const double signX : {-1., 1.}) {
124 for (
const double signY : { -1., 1.}) {
125 for (
const double signZ: {-1., 1.}) {
126 const Amg::Vector3D edge{signX* (signY>0 ? bounds.get(BoundEnum::eHalfLengthXposY) :
127 bounds.get(BoundEnum::eHalfLengthXnegY)),
128 signY*bounds.get(BoundEnum::eHalfLengthY),
129 signZ*bounds.get(BoundEnum::eHalfLengthZ)};
130 edges[edgeIdx] = volume.transform() * edge;
141 if (!gctx.isValid()) {
143 return StatusCode::FAILURE;
151 const std::shared_ptr<Acts::Volume> secVolume = sector->boundingVolume(*gctx);
154 unsigned int edgeCount{0};
158 chamber->readoutEles().front()->identify()));
167 return StatusCode::SUCCESS;
169 template <
class EnvelopeType>
173 const Acts::Volume& detVol)
const {
191 "bottom of the tube box", measId));
193 "sealing of the tube box", measId));
196 "wall to the previous tube", measId));
198 "wall to the next tube", measId));
201 return StatusCode::SUCCESS;
203 template<
class EnvelopeType>
207 const Acts::Volume& detVol)
const {
214 for (
bool measPhi : {
false,
true}) {
216 for (
int strip = 1; strip <=
nStrips; ++strip) {
226 return StatusCode::SUCCESS;
228 template <
class EnevelopeType>
232 const Acts::Volume& detVol)
const {
244 return StatusCode::SUCCESS;
246 template <
class EnevelopeType>
250 const Acts::Volume& detVol)
const {
256 for(
unsigned int strip =
firstStrip; strip <=
mm.numStrips(gasGapHash); ++strip){
264 return StatusCode::SUCCESS;
266 template <
class EnvelopeType>
270 const Acts::Volume& detVol)
const{
275 for(
unsigned int nch = 1; nch <= stgc.
nChTypes(); ++nch){
279 switch (channelType){
280 case sTgcReadoutElement::ReadoutChannelType::Pad:
283 case sTgcReadoutElement::ReadoutChannelType::Wire:
291 for(
unsigned int strip = 1; strip <=
nStrips; ++strip){
295 if(channelType == sTgcReadoutElement::ReadoutChannelType::Wire || channelType == sTgcReadoutElement::ReadoutChannelType::Strip){
308 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
int doubletPhiMax() const
Returns the maximum phi panel.
unsigned int numWireGangs(unsigned int gasGap) const
Returns the number of wire gangs for a given gasGap [1-3].
int multilayer() const
Returns the multilayer of the sTgcReadoutElement.
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
static IdentifierHash createHash(const int gasGap, const int strip)
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
std::set< const SpectrometerSector *, MSEnvelopeSorter > MuonSectorSet
unsigned int numTubesInLay() const
Returns the number of tubes per layer.
static IdentifierHash measurementHash(unsigned int layerNumber, unsigned int tubeNumber)
Transform the layer and tube number to the measurementHash.
unsigned int nGasGaps() const
Returns the number of gasgaps described by this ReadOutElement (usally 2 or 3)
Amg::Vector3D channelPosition(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the center of the measurement channel eta measurement: wire gang center phi measurement: stri...
@ Tgc
Resitive Plate Chambers.
unsigned int nGasGaps() const
Returns the number of gasgaps described by this ReadOutElement (usally 2 or 3)
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
unsigned int nChTypes() const
Number of Channel Types.
Amg::Vector3D readOutPos(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global position of the readout card.
ReadoutChannelType
ReadoutChannelType to distinguish the available readout channels Pad - pad readout channel Strip - et...
Amg::Vector3D rightStripEdge(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global position of the strip edge at negative local Y.
#define ATH_MSG_VERBOSE(x)
IdentifierHash measurementHash(const Identifier &measId) const override final
Constructs the identifier hash from the full measurement Identifier.
const parameterBook & getParameters() const
SpectrometerSector::ChamberSet ChamberSet
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
An algorithm that can be simultaneously executed in multiple threads.
unsigned int nEtaStrips() const
Number of strips measuring the eta coordinate.
unsigned int numStrips(unsigned int gasGap) const
Returns the number of strips for a given gasGap [1-3].
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
static IdentifierHash createHash(const unsigned int gasGap, const unsigned int channelType, const unsigned int channel, const unsigned int wireInGrp=0)
Create a measurement hash from the Identifier fields.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
@ Mm
Maybe not needed in the migration.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::set< const Chamber *, MSEnvelopeSorter > MuonChamberSet
int doubletPhi() const
Returns the doublet Phi field of the MuonReadoutElement identifier.
unsigned int numLayers() const
Returns the number of tube layer.
Eigen::Affine3d Transform3D
Amg::Vector3D stripPosition(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the position of the strip center.
Amg::Vector3D leftStripEdge(const ActsGeometryContext &ctx, const IdentifierHash &measHash) const
std::vector< const MuonReadoutElement * > ReadoutSet
Define the list of read out elements of the chamber.
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
Defines the edges of the trapezoid.
int doubletZ() const
Returns the doublet Z field of the MuonReadoutElement identifier.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
Include the GeoPrimitives which need to be put first.
double innerTubeRadius() const
Returns the inner tube radius.
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
Amg::Vector3D globalChannelPosition(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global pad/strip/wireGroup position.
std::string to_string(const DetectorType &type)
Amg::Vector3D rightStripEdge(const ActsGeometryContext &ctx, const IdentifierHash &measHash) const
Identifier identify() const override final
Return the athena identifier.
unsigned int nPhiStrips() const
Number of strips measuring the phi coordinate.
Eigen::Matrix< double, 3, 1 > Vector3D
unsigned int numWires(unsigned int gasGap) const
Number of wires in the gas gap.
unsigned int numLayers() const
Returns the number of gas gap layers.
MuonSectorSet getAllSectors() const
: Returns all MuonChambers associated with the readout geometry
Amg::Vector3D leftStripEdge(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global posiition of the strip edge at positive local Y.
@ Rpc
Monitored Drift Tubes.
unsigned int numPads(const Identifier &measId) const
Pads Total number of pads in the given layer.
unsigned int numStrips(const Identifier &measId) const
Strips Number of strips in a chamber.
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
Amg::Vector3D globalTubePos(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global position of the tube center.
const parameterBook & getParameters() const
Amg::Vector3D highVoltPos(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global position of the High Voltage connectors.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
MuonChamberSet getAllChambers() const
bool isValid(const IdentifierHash &measHash) const