ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
MuonGMR4::Chamber Class Reference

#include <Chamber.h>

Collaboration diagram for MuonGMR4::Chamber:

Classes

struct  defineArgs
 

Public Types

using ReadoutSet = std::vector< const MuonReadoutElement * >
 Define the list of read out elements of the chamber. More...
 

Public Member Functions

 Chamber (defineArgs &&args)
 Standard constructor taking the defineArgs. More...
 
 Chamber (const Chamber &other)=delete
 delete the copy constructors More...
 
const Chamberoperator= (const Chamber &other)=delete
 
bool operator< (const Chamber &other) const
 Comparison operator for set ordering. More...
 
std::string identString () const
 Define a string of the chamber used for debugging. More...
 
const Muon::IMuonIdHelperSvcidHelperSvc () const
 Returns a pointer to the idHelperSvc. More...
 
Muon::MuonStationIndex::ChIndex chamberIndex () const
 Returns the chamber index. More...
 
int stationPhi () const
 Returns the station phi of the chamber. More...
 
int stationEta () const
 Returns the station eta of the chamber. More...
 
int8_t side () const
 Returns the side of the chamber. More...
 
int stationName () const
 Returns an integer representing the stationName. More...
 
int sector () const
 Returns the MS sector of the chamber. More...
 
bool barrel () const
 Returns whether the chamber is placed in the barrel. More...
 
const ReadoutSetreadoutEles () const
 Returns the list of contained readout elements. More...
 
const Amg::Transform3DlocalToGlobalTrans (const ActsGeometryContext &gctx) const
 Returns the transformation chamber frame -> global transformation. More...
 
Amg::Transform3D globalToLocalTrans (const ActsGeometryContext &gctx) const
 Returns the global -> local transformation. More...
 
const Acts::PlaneSurface & surface () const
 Returns the surface associated with the chamber. More...
 
double halfXLong () const
 Long-extend of the chamber in the x-direction at positive Y. More...
 
double halfXShort () const
 Short extend of the chamber in the x-direction at negative Y. More...
 
double halfY () const
 Extend of the chamber in the y-direction. More...
 
double halfZ () const
 Thickness of the chamber in the z-direction. More...
 
const defineArgsparameters () const
 Returns the reference to the defining parameters of the chamber. More...
 
std::shared_ptr< Acts::Volume > boundingVolume (const ActsGeometryContext &gctx) const
 Returns the Acts::Volume representation of the chamber. More...
 
std::shared_ptr< Acts::TrapezoidVolumeBounds > bounds () const
 Returns the volume bounds. More...
 
const SpectrometerSectorparent () const
 Returns the pointer to the MS sector enclosing the chamber. More...
 
void setParent (const SpectrometerSector *parent)
 Sets the connection to the MS sector enclosing the chamber. More...
 

Private Attributes

defineArgs m_args {}
 
const SpectrometerSectorm_parent {nullptr}
 

Detailed Description

Definition at line 23 of file Chamber.h.

Member Typedef Documentation

◆ ReadoutSet

Define the list of read out elements of the chamber.

Definition at line 26 of file Chamber.h.

Constructor & Destructor Documentation

◆ Chamber() [1/2]

MuonGMR4::Chamber::Chamber ( defineArgs &&  args)

Standard constructor taking the defineArgs.

Definition at line 29 of file Chamber.cxx.

29  :
30  m_args{std::move(args)} {}

◆ Chamber() [2/2]

MuonGMR4::Chamber::Chamber ( const Chamber other)
delete

delete the copy constructors

Member Function Documentation

◆ barrel()

bool MuonGMR4::Chamber::barrel ( ) const

Returns whether the chamber is placed in the barrel.

Definition at line 89 of file Chamber.cxx.

89  {
90  return !idHelperSvc()->isEndcap(readoutEles().front()->identify());
91  }

◆ boundingVolume()

std::shared_ptr< Acts::Volume > MuonGMR4::Chamber::boundingVolume ( const ActsGeometryContext gctx) const

Returns the Acts::Volume representation of the chamber.

Parameters
gctxGeometry context carrrying the alignment transformations

Definition at line 103 of file Chamber.cxx.

103  {
104  return std::make_shared<Acts::Volume>(localToGlobalTrans(gctx), bounds());
105  }

◆ bounds()

std::shared_ptr< Acts::TrapezoidVolumeBounds > MuonGMR4::Chamber::bounds ( ) const

Returns the volume bounds.

Definition at line 106 of file Chamber.cxx.

106  {
107  return m_args.bounds;
108  }

◆ chamberIndex()

Muon::MuonStationIndex::ChIndex MuonGMR4::Chamber::chamberIndex ( ) const

Returns the chamber index.

Definition at line 95 of file Chamber.cxx.

95  {
96  return readoutEles().front()->chamberIndex();
97  }

◆ globalToLocalTrans()

Amg::Transform3D MuonGMR4::Chamber::globalToLocalTrans ( const ActsGeometryContext gctx) const

Returns the global -> local transformation.

Parameters
gctxGeometry context carrrying the alignment transformations

Definition at line 124 of file Chamber.cxx.

124  {
125  return localToGlobalTrans(gctx).inverse();
126  }

◆ halfXLong()

double MuonGMR4::Chamber::halfXLong ( ) const

Long-extend of the chamber in the x-direction at positive Y.

Definition at line 98 of file Chamber.cxx.

98 { return m_args.bounds->get(BoundEnums::eHalfLengthXposY); }

◆ halfXShort()

double MuonGMR4::Chamber::halfXShort ( ) const

Short extend of the chamber in the x-direction at negative Y.

Definition at line 99 of file Chamber.cxx.

99 { return m_args.bounds->get(BoundEnums::eHalfLengthXnegY); }

◆ halfY()

double MuonGMR4::Chamber::halfY ( ) const

Extend of the chamber in the y-direction.

Definition at line 100 of file Chamber.cxx.

100 { return m_args.bounds->get(BoundEnums::eHalfLengthY); }

◆ halfZ()

double MuonGMR4::Chamber::halfZ ( ) const

Thickness of the chamber in the z-direction.

Definition at line 101 of file Chamber.cxx.

101 { return m_args.bounds->get(BoundEnums::eHalfLengthZ); }

◆ identString()

std::string MuonGMR4::Chamber::identString ( ) const

Define a string of the chamber used for debugging.

Definition at line 75 of file Chamber.cxx.

75  {
76  if(idHelperSvc()->isMM(readoutEles().front()->identify()) ||
77  idHelperSvc()->issTgc(readoutEles().front()->identify()) ) {
78  return std::format("MSchamber {:} eta {:02} phi {:02} ml {:02}",
79  idHelperSvc()->stationNameString(readoutEles().front()->identify()),
81  idHelperSvc()->isMM(readoutEles().front()->identify()) ?
82  idHelperSvc()->mmIdHelper().multilayer(readoutEles().front()->identify()) :
83  idHelperSvc()->stgcIdHelper().multilayer(readoutEles().front()->identify()));
84  }
85  return std::format("MS chamber {:} eta {:02} phi {:02}",
86  idHelperSvc()->stationNameString(readoutEles().front()->identify()),
87  stationEta(), stationPhi());
88  }

◆ idHelperSvc()

const Muon::IMuonIdHelperSvc * MuonGMR4::Chamber::idHelperSvc ( ) const

Returns a pointer to the idHelperSvc.

Definition at line 92 of file Chamber.cxx.

92  {
93  return readoutEles().front()->idHelperSvc();
94  }

◆ localToGlobalTrans()

const Amg::Transform3D & MuonGMR4::Chamber::localToGlobalTrans ( const ActsGeometryContext gctx) const

Returns the transformation chamber frame -> global transformation.

Parameters
gctxGeometry context carrrying the alignment transformations

Definition at line 121 of file Chamber.cxx.

121  {
122  return surface().transform(gctx.context());
123  }

◆ operator<()

bool MuonGMR4::Chamber::operator< ( const Chamber other) const

Comparison operator for set ordering.

Definition at line 37 of file Chamber.cxx.

37  {
38 
39 
40  if (stationName() != other.stationName()) {
41  return stationName() < other.stationName();
42  }
43 
44  if(stationPhi() != other.stationPhi()) {
45  return stationPhi() < other.stationPhi();
46  }
47 
48  if(stationEta() != other.stationEta()){
49  return stationEta() < other.stationEta();
50  }
51 
52  //for NSW order by multilayer for MMLS and STGCs for the large sectors
53  //MMLs and STLs will fall in this case
54  const Identifier& id = readoutEles().front()->identify();
55 
56  bool isNSW = (idHelperSvc()->isMM(id) || idHelperSvc()->issTgc(id));
57 
58  if(isNSW) {
59 
60  const Identifier& otherId = other.readoutEles().front()->identify();
61 
62  if (idHelperSvc()->isMM(id)) {
63  return idHelperSvc()->mmIdHelper().multilayer(id) < idHelperSvc()->mmIdHelper().multilayer(otherId);
64  } else {
65  //stgc case
66  return idHelperSvc()->stgcIdHelper().multilayer(id) < idHelperSvc()->stgcIdHelper().multilayer(otherId);
67  }
68 
69  }
70 
71  return false;
72 
73  }

◆ operator=()

const Chamber& MuonGMR4::Chamber::operator= ( const Chamber other)
delete

◆ parameters()

const Chamber::defineArgs & MuonGMR4::Chamber::parameters ( ) const

Returns the reference to the defining parameters of the chamber.

Definition at line 114 of file Chamber.cxx.

114 { return m_args; }

◆ parent()

const SpectrometerSector * MuonGMR4::Chamber::parent ( ) const

Returns the pointer to the MS sector enclosing the chamber.

Definition at line 127 of file Chamber.cxx.

127 { return m_parent; }

◆ readoutEles()

const Chamber::ReadoutSet & MuonGMR4::Chamber::readoutEles ( ) const

Returns the list of contained readout elements.

Definition at line 115 of file Chamber.cxx.

115  {
116  return m_args.detEles;
117  }

◆ sector()

int MuonGMR4::Chamber::sector ( ) const

Returns the MS sector of the chamber.

Definition at line 113 of file Chamber.cxx.

113 { return idHelperSvc()->sector(readoutEles().front()->identify()); }

◆ setParent()

void MuonGMR4::Chamber::setParent ( const SpectrometerSector parent)

Sets the connection to the MS sector enclosing the chamber.

Definition at line 128 of file Chamber.cxx.

128 { m_parent = parent; }

◆ side()

int8_t MuonGMR4::Chamber::side ( ) const

Returns the side of the chamber.

Definition at line 112 of file Chamber.cxx.

112 { return readoutEles().front()->stationEta() > 0 ? 1 : -1; }

◆ stationEta()

int MuonGMR4::Chamber::stationEta ( ) const

Returns the station eta of the chamber.

Definition at line 110 of file Chamber.cxx.

110 { return readoutEles().front()->stationEta(); }

◆ stationName()

int MuonGMR4::Chamber::stationName ( ) const

Returns an integer representing the stationName.

Definition at line 111 of file Chamber.cxx.

111 { return readoutEles().front()->stationName(); }

◆ stationPhi()

int MuonGMR4::Chamber::stationPhi ( ) const

Returns the station phi of the chamber.

Definition at line 109 of file Chamber.cxx.

109 { return readoutEles().front()->stationPhi(); }

◆ surface()

const Acts::PlaneSurface & MuonGMR4::Chamber::surface ( ) const

Returns the surface associated with the chamber.

Definition at line 118 of file Chamber.cxx.

118  {
119  return *m_args.surface;
120  }

Member Data Documentation

◆ m_args

defineArgs MuonGMR4::Chamber::m_args {}
private

Definition at line 91 of file Chamber.h.

◆ m_parent

const SpectrometerSector* MuonGMR4::Chamber::m_parent {nullptr}
private

Definition at line 92 of file Chamber.h.


The documentation for this class was generated from the following files:
sTgcIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1017
MuonGMR4::Chamber::defineArgs::surface
std::shared_ptr< const Acts::PlaneSurface > surface
Associated chamber surface.
Definition: Chamber.h:29
xAOD::identify
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:82
MuonGMR4::Chamber::parent
const SpectrometerSector * parent() const
Returns the pointer to the MS sector enclosing the chamber.
Definition: Chamber.cxx:127
Muon::IMuonIdHelperSvc::stgcIdHelper
virtual const sTgcIdHelper & stgcIdHelper() const =0
access to TgcIdHelper
MuonGMR4::Chamber::defineArgs::detEles
ReadoutSet detEles
List of associated readout elements.
Definition: Chamber.h:31
vtune_athena.format
format
Definition: vtune_athena.py:14
python.CaloAddPedShiftConfig.args
args
Definition: CaloAddPedShiftConfig.py:47
MuonGMR4::Chamber::m_parent
const SpectrometerSector * m_parent
Definition: Chamber.h:92
Muon::IMuonIdHelperSvc::mmIdHelper
virtual const MmIdHelper & mmIdHelper() const =0
access to CscIdHelper
MmIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: MmIdHelper.cxx:796
MuonGMR4::Chamber::stationEta
int stationEta() const
Returns the station eta of the chamber.
Definition: Chamber.cxx:110
ActsGeometryContext::context
Acts::GeometryContext context() const
Definition: ActsGeometryContext.h:45
MuonGMR4::Chamber::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &gctx) const
Returns the transformation chamber frame -> global transformation.
Definition: Chamber.cxx:121
MuonGMR4::Chamber::stationPhi
int stationPhi() const
Returns the station phi of the chamber.
Definition: Chamber.cxx:109
MuonGMR4::Chamber::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns a pointer to the idHelperSvc.
Definition: Chamber.cxx:92
MuonGMR4::Chamber::readoutEles
const ReadoutSet & readoutEles() const
Returns the list of contained readout elements.
Definition: Chamber.cxx:115
Muon::IMuonIdHelperSvc::isMM
virtual bool isMM(const Identifier &id) const =0
returns whether this is a MM Identifier or not
Muon::IMuonIdHelperSvc::isEndcap
virtual bool isEndcap(const Identifier &id) const =0
returns whether this is an endcap Identifier or not
MuonGMR4::Chamber::m_args
defineArgs m_args
Definition: Chamber.h:91
MuonGMR4::Chamber::surface
const Acts::PlaneSurface & surface() const
Returns the surface associated with the chamber.
Definition: Chamber.cxx:118
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonGMR4::Chamber::bounds
std::shared_ptr< Acts::TrapezoidVolumeBounds > bounds() const
Returns the volume bounds.
Definition: Chamber.cxx:106
MuonGMR4::Chamber::defineArgs::bounds
std::shared_ptr< Acts::TrapezoidVolumeBounds > bounds
Chamber volume bounds.
Definition: Chamber.h:33
Muon::IMuonIdHelperSvc::sector
virtual int sector(const Identifier &id) const =0
return sector number 1-16, odd=large, even=small
MuonGMR4::Chamber::stationName
int stationName() const
Returns an integer representing the stationName.
Definition: Chamber.cxx:111
Muon::IMuonIdHelperSvc::issTgc
virtual bool issTgc(const Identifier &id) const =0
returns whether this is a sTGC Identifier or not
Identifier
Definition: IdentifierFieldParser.cxx:14