Skip to content
Snippets Groups Projects

Add method to compute max pad number

Merged Chav Chhiv Chau requested to merge chchau/athena:maxPadNumber into 22.0
1 file
+ 27
0
Compare changes
  • Side-by-side
  • Inline
@@ -86,6 +86,13 @@ namespace MuonGM {
virtual int numberOfStrips(const Identifier& layerId) const override final;
virtual int numberOfStrips(int, bool measuresPhi) const override final;
/** Get the number of pad per layer */
int numberOfPads(const Identifier& layerId) const;
/** Get largest pad number, which is different to the number of pads in
a gas volume due to the pad numbering in Athena */
int maxPadNumber(const Identifier& layerId) const;
/** space point position for a given pair of phi and eta identifiers
The LocalPosition is expressed in the reference frame of the phi
surface. If one of the identifiers is outside the valid range, the
@@ -347,6 +354,26 @@ namespace MuonGM {
return -1;
}
inline int sTgcReadoutElement::numberOfPads(const Identifier& layerId) const {
const MuonPadDesign* design = getPadDesign(layerId);
if (!design) {
MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement");
log << MSG::WARNING << "no pad design found when trying to get the number of pads" << endmsg;
return 0;
}
return design->nPadColumns * design->nPadH;
}
inline int sTgcReadoutElement::maxPadNumber(const Identifier& layerId) const {
const MuonPadDesign* design = getPadDesign(layerId);
if (!design) {
MsgStream log(Athena::getMessageSvc(), "sTgcReadoutElement");
log << MSG::WARNING << "no pad design found when trying to get the largest pad number" << endmsg;
return 0;
}
return (design->nPadColumns - 1) * manager()->stgcIdHelper()->padEtaMax() + design->nPadH;
}
inline bool sTgcReadoutElement::spacePointPosition(const Identifier& phiId, const Identifier& etaId, Amg::Vector2D& pos) const {
Amg::Vector2D phiPos;
Amg::Vector2D etaPos;
Loading