ATLAS Offline Software
|
#include <ChamberAssembleTool.h>
Public Member Functions | |
ChamberAssembleTool (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard constructor of the tool. More... | |
virtual StatusCode | buildReadOutElements (MuonDetectorManager &mgr) override final |
Private Types | |
using | BoundType = Acts::TrapezoidVolumeBounds |
using | BoundTrfPair = std::pair< std::shared_ptr< BoundType >, Amg::Transform3D > |
Private Member Functions | |
BoundTrfPair | boundingBox (const ActsGeometryContext &gctx, const std::vector< const MuonReadoutElement * > &readoutEles, const Amg::Transform3D &globToLoc, ActsTrk::SurfaceBoundSet< BoundType > &boundSet, const double margin=1.*Gaudi::Units::cm) const |
builds the bounding box trapezoidal volume bounds from the set of readout elements Returns a pair of the volume bounds & the transformation to center the volume More... | |
Static Private Member Functions | |
static std::shared_ptr< BoundType > | boundingBox (const MuonReadoutElement *reEle, ActsTrk::SurfaceBoundSet< BoundType > &boundSet) |
Builds the trapezoidal bounding box enclosing a single readout element. More... | |
static std::array< Amg::Vector3D, 4 > | cornerPointsPlane (const Amg::Transform3D &localToGlob, const BoundType &bounds) |
Returns the 4 corners of the trapezoid in the x-y plane. More... | |
static std::array< Amg::Vector3D, 8 > | cornerPoints (const Amg::Transform3D &localToGlob, const BoundType &bounds) |
Returns the 8 corners marking the trapezoid. More... | |
static Amg::Transform3D | centerTrapezoid (const std::array< Amg::Vector3D, 8 > &cornerPoints) |
Returns the translation transform centering the 8 corner points of the trapezoid. More... | |
static double | trapezoidEdgeDist (const Amg::Vector3D &linePos, const Amg::Vector3D &lineDir, const Amg::Vector3D &testMe, bool leftEdge) |
Returns the signed distances of an external point to the trapezoidal edge. More... | |
Private Attributes | |
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
PublicToolHandle< IMuonGeoUtilityTool > | m_geoUtilTool {this,"GeoUtilTool", "" } |
Definition at line 26 of file ChamberAssembleTool.h.
|
private |
Definition at line 38 of file ChamberAssembleTool.h.
|
private |
Definition at line 36 of file ChamberAssembleTool.h.
MuonGMR4::ChamberAssembleTool::ChamberAssembleTool | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
Standard constructor of the tool.
Definition at line 64 of file ChamberAssembleTool.cxx.
|
private |
builds the bounding box trapezoidal volume bounds from the set of readout elements Returns a pair of the volume bounds & the transformation to center the volume
gctx | Geometry context holding the alignment & global transformations |
readoutEles | List of readout elements around which the bounding box shall be built |
globToLoc | Transformation to go from the global -> local chamber's frame |
boundSet | Cache of create bounds to share the same bounds across multiple volumes |
Hack to cope with the RPCs which may be rotated by 180 degrees around the z-axis in cases, they're upside down.
Check whether the bounds are already embedded in the trapezoid
Everything is contained in the volume
Fetch the edges of the best known trapezoid to extend the dimensions
Reserve space for the new envelope trapezoid
The first 4 indices in the trpezoidal array are the bottom corners
Check the angles of the bounding trapzeoids
On the left edge the trapezoid opening angle needs to be larger while on the right side it's smaller
Calculate the distance to the trapezoidal edge. If it's less than 0, it's not embedded by the trapezoid and the smaller the number the farer it's from the trapezoid
Choose as reference point the one which is farest away from the edge
Extend the trapezoid in the x-y plane
Edge points of the best-known trapezoid
Finally re-center the trapezoid
Definition at line 162 of file ChamberAssembleTool.cxx.
|
staticprivate |
Builds the trapezoidal bounding box enclosing a single readout element.
reEle | Pointer to the readout element to fetch the bounds from |
boundSet | Cache of create bounds to share the same bounds across multiple volumes |
Definition at line 81 of file ChamberAssembleTool.cxx.
|
finaloverridevirtual |
TGC T4E chambers & Mdt EIL chambers are glued together
Group chambers by sectors && station layer.
Check that the two readout elements are on the same side
The two readout elements shall be located in the same sector
Separate out the BOE chambers
Summarize all readout element in the same sector & layer into a single chamber
sTgcs && Micromegas should belong to the same chamber
EM readout element shall be grouped together too
Finally the EIL chambers should belong to the same chamber
If no chamber has been found, then create a new one
Find the chamber middle and create the geometry from that
Define the spectrometer sector
Define the chamber envelopes
Sort the readout elements by common parent volume
Create the enclosing chamber volume
now, build simplified 2D representations of the sorted chambers we collected.
Definition at line 287 of file ChamberAssembleTool.cxx.
|
staticprivate |
Returns the translation transform centering the 8 corner points of the trapezoid.
The centre is defined as the centre point of the surrounding box
cornerPoints | Array to all 8 corner points of the trapezoid |
Definition at line 145 of file ChamberAssembleTool.cxx.
|
staticprivate |
Returns the 8 corners marking the trapezoid.
localToGlob | Transform from the trapezoid restframe -> chambers frame |
bounds | Reference to the trapezoidal bounds defining the volume |
Definition at line 132 of file ChamberAssembleTool.cxx.
|
staticprivate |
Returns the 4 corners of the trapezoid in the x-y plane.
localToGlob | Transform from the trapezoid restframe -> chambers frame |
bounds | Reference to the trapezoidal bounds defining the volume |
Definition at line 122 of file ChamberAssembleTool.cxx.
|
staticprivate |
Returns the signed distances of an external point to the trapezoidal edge.
Distances > 0 indicate that the point is inside the boundaries and outside otherwise
linePos | Arbitrary point on the trapezoidal edge |
lineDir | Direction of the trapezoidal edge |
testMe | External point to measure the distance |
leftEdge | Switch indicating whether the edge is on the left & right side |
Construct the normal pointing inwards
Definition at line 70 of file ChamberAssembleTool.cxx.
|
private |
Definition at line 86 of file ChamberAssembleTool.h.
|
private |
Definition at line 85 of file ChamberAssembleTool.h.