Skip to content
Snippets Groups Projects
Commit 00d9d64a authored by Julien Maurer's avatar Julien Maurer
Browse files

Merge branch 'maxPadNumber' into '22.0'

Add method to compute max pad number

See merge request !57087
parents 7f654038 ede18d2b
No related branches found
No related tags found
4 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!5717730.09.2022: daily merge merge of 22.0 into master,!57087Add method to compute max pad number
...@@ -86,6 +86,13 @@ namespace MuonGM { ...@@ -86,6 +86,13 @@ namespace MuonGM {
virtual int numberOfStrips(const Identifier& layerId) const override final; virtual int numberOfStrips(const Identifier& layerId) const override final;
virtual int numberOfStrips(int, bool measuresPhi) 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 /** space point position for a given pair of phi and eta identifiers
The LocalPosition is expressed in the reference frame of the phi The LocalPosition is expressed in the reference frame of the phi
surface. If one of the identifiers is outside the valid range, the surface. If one of the identifiers is outside the valid range, the
...@@ -347,6 +354,26 @@ namespace MuonGM { ...@@ -347,6 +354,26 @@ namespace MuonGM {
return -1; 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 { inline bool sTgcReadoutElement::spacePointPosition(const Identifier& phiId, const Identifier& etaId, Amg::Vector2D& pos) const {
Amg::Vector2D phiPos; Amg::Vector2D phiPos;
Amg::Vector2D etaPos; Amg::Vector2D etaPos;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment