ATLAS Offline Software
MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef SIMULATIONBASE
6 #include <Acts/Geometry/TrapezoidVolumeBounds.hpp>
8 
9 
10 namespace ActsTrk {
11 template<>
14  TransformCache{hash, chamber->detectorType()},
15  m_parent{chamber} {}
16 template<> const IDetectorElement*
18 template <> Amg::Transform3D
20  ActsGeometryContext gctx{};
23  if (store) {
24  auto copyStore = std::make_unique<DetectorAlignStore>(detectorType());
25  copyStore->geoModelAlignment = store->geoModelAlignment;
26  copyStore->trackingAlignment = store->trackingAlignment;
27  copyStore->internalAlignment = store->internalAlignment;
28  gctx.setStore(std::move(copyStore));
29  }
30  const auto& pars{m_parent->parameters()};
31  return pars.readoutEles[0]->localToGlobalTrans(gctx) * pars.centerTrans;
32 
33  }
34 
35 }
36 
37 
38 namespace MuonGMR4 {
39 
41 
43  m_args{std::move(args)} {}
45  m_args{other.m_args} {}
47  m_args{std::move(other.m_args)} {}
49  if (this != &other) {
50  m_args = other.m_args;
51  }
52  return *this;
53 }
55  if (this != &other) {
56  m_args = std::move(other.m_args);
57  }
58  return *this;
59 }
61 const Muon::IMuonIdHelperSvc* MuonChamber::idHelperSvc() const { return m_args.readoutEles[0]->idHelperSvc();}
63 int MuonChamber::stationName() const { return m_args.readoutEles[0]->stationName(); }
64 int MuonChamber::stationPhi() const { return m_args.readoutEles[0]->stationPhi(); }
65 int MuonChamber::stationEta() const { return m_args.readoutEles[0]->stationEta(); }
66 ActsTrk::DetectorType MuonChamber::detectorType() const { return m_args.readoutEles[0]->detectorType(); }
69  return m_localToGlobal.getTransform(gctx.getStore(detectorType()).get());
70 }
72  return localToGlobalTrans(gctx).inverse();
73 }
74 double MuonChamber::halfXLong() const { return m_args.halfXLong; }
75 double MuonChamber::halfXShort() const { return m_args.halfXShort; }
76 double MuonChamber::halfY() const { return m_args.halfY; }
77 double MuonChamber::halfZ() const { return m_args.halfZ; }
78 int MuonChamber::sector() const {return idHelperSvc()->sector(m_args.readoutEles[0]->identify()); }
79 
80 std::shared_ptr<Acts::Volume> MuonChamber::boundingVolume(const ActsGeometryContext& gctx) const {
81  return std::make_shared<Acts::Volume>(localToGlobalTrans(gctx), bounds());
82 }
83 std::shared_ptr<Acts::TrapezoidVolumeBounds> MuonChamber::bounds() const {
84  return std::make_shared<Acts::TrapezoidVolumeBounds>(halfXShort(), halfXLong(), halfY(), halfZ());
85 }
86 
87 std::ostream& operator<<(std::ostream& ostr,
89  ostr<<"halfX (S/L): "<<args.halfXShort<<"/"<<args.halfXLong<<" [mm], ";
90  ostr<<"halfY: "<<args.halfY<<" [mm], ";
91  ostr<<"halfZ: "<<args.halfZ<<" [mm],";
92  ostr<<" center w.r.t chamber: "<<Amg::toString(args.centerTrans, 2);
93  return ostr;
94 }
95 std::ostream& operator<<(std::ostream& ostr,
96  const MuonChamber& chamber) {
97  ostr<<chamber.parameters();
98  return ostr;
99 }
100 
101 }
102 #endif
MuonGMR4::MuonChamber::m_localToGlobal
ActsTrk::TransformCacheDetEle< MuonChamber > m_localToGlobal
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:92
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
MuonGMR4::ReadoutSet
MuonChamber::ReadoutSet ReadoutSet
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:40
MuonGMR4::MuonChamber::operator=
MuonChamber & operator=(const MuonChamber &other)
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:48
MuonGMR4::MuonChamber::stationEta
int stationEta() const
Returns the station eta of the chamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:65
MuonGMR4::MuonChamber::defineArgs::halfY
double halfY
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:48
MuonGMR4::MuonChamber::MuonChamber
MuonChamber(defineArgs &&args)
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:42
MuonGMR4::MuonChamber::stationName
int stationName() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:63
ActsTrk::DetectorType
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
Definition: GeometryDefs.h:17
calibdata.chamber
chamber
Definition: calibdata.py:32
ActsTrk::DetectorAlignStore
Definition: DetectorAlignStore.h:20
ActsTrk::TransformCacheDetEle
Definition: TransformCache.h:65
MuonGMR4::MuonChamber::ReadoutSet
std::vector< const MuonReadoutElement * > ReadoutSet
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:41
MuonGMR4::MuonChamber::defineArgs::halfXShort
double halfXShort
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:47
MuonGMR4::MuonChamber
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:39
MuonGMR4::MuonChamber::m_args
defineArgs m_args
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:90
ActsGeometryContext::getStore
AlignmentStorePtr & getStore(const DetectorType type)
Returns the mutable alignable store for the ATLAS detector type (Pixel, Mdt, etc.)
Definition: ActsGeometryContext.h:34
MuonGMR4::MuonChamber::defineArgs::readoutEles
ReadoutSet readoutEles
List of readout elements in the chamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:44
MuonGMR4::MuonChamber::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the idHelperSvc.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:61
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonGMR4
A muon chamber is a collection of readout elements belonging to the same station.
Definition: ChamberAssembleTool.h:16
MuonGMR4::MuonChamber::readOutElements
const ReadoutSet & readOutElements() const
Returns the list of all associated readout elements.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:67
MuonGMR4::MuonChamber::boundingVolume
std::shared_ptr< Acts::Volume > boundingVolume(const ActsGeometryContext &gctx) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:80
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonChamber.h
NoDeletePtr.h
MuonGMR4::MuonChamber::defineArgs::halfXLong
double halfXLong
Definition of the surrounding box.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:46
ActsTrk::TransformCacheDetEle::TransformCacheDetEle
TransformCacheDetEle(const IdentifierHash &hash, const CachingDetectorEle *parentEle)
: Standard constructor taking the hash of the sensor element and and the TransformMaker expressed usu...
MuonGMR4::MuonChamber::stationPhi
int stationPhi() const
Returns the station phi of the chamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:64
MuonGMR4::MuonChamber::defineArgs::halfZ
double halfZ
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:49
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:28
MuonGMR4::MuonChamber::bounds
std::shared_ptr< Acts::TrapezoidVolumeBounds > bounds() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:83
MuonGMR4::MuonChamber::halfXShort
double halfXShort() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:75
MuonGMR4::MuonChamber::detectorType
ActsTrk::DetectorType detectorType() const
Returns the detector type of the primary detector element.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:66
MuonGMR4::MuonChamber::halfZ
double halfZ() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:77
MuonGMR4::MuonChamber::halfXLong
double halfXLong() const
Surrounding box dimensions.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:74
MuonGMR4::MuonChamber::parameters
const defineArgs & parameters() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:60
MuonGMR4::MuonChamber::defineArgs
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:42
MuonGMR4::MuonChamber::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &gctx) const
Returns the transformation of the MuonChamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:68
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
MuonGMR4::MuonChamber::halfY
double halfY() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:76
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:26
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:34
IdentifierHash
Definition: IdentifierHash.h:38
MuonGMR4::operator<<
std::ostream & operator<<(std::ostream &ostr, const CutOutArea &cut)
Definition: CutOutArea.h:23
Muon::IMuonIdHelperSvc::sector
virtual int sector(const Identifier &id) const =0
return sector number 1-16, odd=large, even=small
MuonGMR4::MuonChamber::chamberIndex
Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:62
MuonGMR4::MuonChamber::sector
int sector() const
Returns the sector of the detector element.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:78
MuonGMR4::MuonChamber::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &gctx) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonChamber.cxx:71
ActsTrk::TransformCache
Definition: TransformCache.h:21
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80