10#ifndef MUONREADOUTGEOMETRY_MUONPADDESIGN_H
11#define MUONREADOUTGEOMETRY_MUONPADDESIGN_H
18#include "CLHEP/Units/SystemOfUnits.h"
72 std::pair<int, int>
etaPhiId(
const int channel)
const;
73 int channelId(
const std::pair<int, int>& padId)
const;
109 void setR(
double R) { this->radialDistance = R; }
113 return std::make_pair( ((channel -1) % 18) + 1, ( (channel -1) / 18) + 1);
116 return 1 + (padId.first - 1) + (padId.second - 1 ) * 18;
122 std::pair<int, int> pad{};
132 if (!measPhi)
return (pos.y() - chPos.y());
136 return (pos.x() - chPos.x());
146 if (!measPhi)
return corners.at(2)[1] - corners.at(0)[1];
153 if (!preciseMeas)
return corners.at(3)[0] - corners.at(2)[0];
161 double WidthTop = corners.at(3)[0] - corners.at(2)[0];
162 double WidthBot = corners.at(1)[0] - corners.at(0)[0];
163 return WidthBot + (WidthTop - WidthBot) * (pos.y() - corners.at(0)[1]) / (corners.at(2)[1]-corners.at(0)[1]);
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Eigen::Matrix< double, 2, 1 > Vector2D
Ensure that the Athena extensions are properly loaded.
double radialDistance
DT-2015-11-29 distance from the beamline to the center of the module.
bool channelPosition(const std::pair< int, int > &pad, Amg::Vector2D &pos) const
calculate local channel position for a given channel number
std::pair< int, int > etaPhiId(const int channel) const
bool withinSensitiveArea(const Amg::Vector2D &pos) const
whether pos is within the sensitive area of the module
double distanceToChannel(const Amg::Vector2D &pos, bool measPhi, int channel=0) const
distance to channel - residual
double maxAbsSensitiveX(const double &y) const
largest (abs, local) x of the sensitive volume
double gasGapThickness() const
thickness of gas gap
static constexpr double smallSectorOpeningAngle
static constexpr double largeSectorOpeningAngle
bool channelCorners(const std::pair< int, int > &pad, CornerArray &corners) const
double sectorOpeningAngle
int channelId(const std::pair< int, int > &padId) const
bool isConvertedFromPhaseII
std::pair< int, int > channelNumber(const Amg::Vector2D &pos) const
calculate local channel number, range 1=nstrips like identifiers.
void setR(double R)
access to cache
double channelWidth(const Amg::Vector2D &pos, bool measPhi, bool preciseMeas=false) const
calculate local channel width
Amg::Vector2D distanceToPad(const Amg::Vector2D &pos, int channel) const
std::array< Amg::Vector2D, 4 > CornerArray
calculate local channel corners for a given channel number
double maxSensitiveY() const
highest y (local) of the sensitive volume
double minSensitiveY() const
lowest y (local) of the sensitive volume