5#ifndef MUONREADOUTGEOMETRY_MMREADOUTELEMENT_H
6#define MUONREADOUTGEOMETRY_MMREADOUTELEMENT_H
29 MMReadoutElement(GeoVFullPhysVol* pv,
const std::string& stName,
int zi,
int fi,
int mL,
195 if (!design)
return -1.;
202 if (!design)
return -1;
208 if (!design)
return false;
214 if (!design)
return 0;
220 if (!design)
return -1;
230 if (!design)
return -1;
236 if (l < 0)
return -1;
242 if (!design)
return -1;
248 if (l < 0)
return -1;
254 if(!design)
return false;
257 if (stripNo < 0) stripNo = (locpos.x()<0) ? 1 : design->
totalStrips;
262 int pcb = (stripNo-1)/1024 + 1;
263 int pcbStrip = stripNo % 1024;
267 bool topPcb{pcb == 5 || (std::abs(
getStationEta()) == 2 && pcb == 3)};
270 if(pcbStrip < pcbStripMin || pcbStrip > pcbStripMax)
return false;
289 if (lay > -1 && lay <
static_cast<int>(
m_etaDesign.size()))
297 if (!design)
return -1;
303 if (!design)
return -1;
311 if (!phi_design || !eta_design)
return false;
312 pos = phi_design->rotation() * eta_design->rotation().inverse()*pos;
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
const BLinePar * getBLinePar() const
const Amg::Transform3D & getDelta() const
read A-line parameters and include the chamber rotation/translation in the local-to-global (ATLAS) re...
int numberOfMissingTopStrips(const Identifier &layerId) const
Number of missing bottom and top strips (not read out)
virtual int boundaryHash(const Identifier &id) const override final
returns the hash function to be used to look up the surface boundary for a given identifier
void posOnDefChamber(Amg::Vector3D &locPosML) const
transform a position (in chamber-frame coordinates) to the deformed-chamber geometry
const std::array< int, 4 > & getReadoutSide() const
virtual Amg::Vector3D AmdbLRSToGlobalCoords(const Amg::Vector3D &x) const override final
virtual int layerHash(const Identifier &id) const override final
returns the hash to be used to look up the normal and center in the MuonClusterReadoutElement trackin...
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override final
strip position – local or global If the strip number is outside the range of valid strips,...
virtual int numberOfLayers(bool) const override
number of layers in phi/eta projection
virtual int numberOfStrips(const Identifier &layerId) const override final
number of strips per layer
double stripActiveLengthRight(const Identifier &id) const
double stereoAngle(const Identifier &id) const
Wrapper to MuonChannelDesign::stereoAngle()
virtual int surfaceHash(const Identifier &id) const override final
returns the hash to be used to look up the surface and transform in the MuonClusterReadoutElement tra...
virtual double distanceToReadout(const Amg::Vector2D &pos, const Identifier &id) const override final
distance to readout.
virtual Amg::Transform3D AmdbLRSToGlobalTransform() const override final
bool insideActiveBounds(const Identifier &id, const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const
boundary check Wrapper Trk::PlaneSurface::insideBounds() taking into account the passivated width
virtual bool containsId(const Identifier &id) const override final
function to be used to check whether a given Identifier is contained in the readout element
~MMReadoutElement()
destructor
virtual bool measuresPhi(const Identifier &id) const override final
returns whether the current identifier corresponds to a phi measurement
std::array< Amg::Transform3D, 4 > m_Xlg
void initDesign()
initialize the design classes for this readout element
MMReadoutElement(GeoVFullPhysVol *pv, const std::string &stName, int zi, int fi, int mL, MuonDetectorManager *mgr)
constructor
void setDelta(const ALinePar &aline)
int numberOfMissingBottomStrips(const Identifier &layerId) const
double stripActiveLength(const Identifier &id) const
Amg::Vector3D localToGlobalCoords(const Amg::Vector3D &locPos, const Identifier &id) const
simHit local (SD) To Global position - to be used by MuonGeoAdaprors only
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const override final
virtual Amg::Vector3D GlobalToAmdbLRSCoords(const Amg::Vector3D &x) const override final
virtual void fillCache() override final
function to fill tracking cache
void setBLinePar(const BLinePar &bLine)
read B-line (chamber-deformation) parameters
virtual bool spacePointPosition(const Identifier &phiId, const Identifier &etaId, Amg::Vector2D &pos) const override final
space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in th...
double stripActiveLengthLeft(const Identifier &id) const
const ALinePar * getALinePar() const
virtual int stripNumber(const Amg::Vector2D &pos, const Identifier &id) const override final
strip number corresponding to local position.
static constexpr PCBPassivation s_dummy_passiv
const BLinePar * m_BLinePar
std::array< int, 4 > m_readoutSide
double stripLength(const Identifier &id) const
strip length Wrappers to MuonChannelDesign::channelLength() taking into account the passivated width
void setChamberLayer(int ml)
set methods only to be used by MuonGeoModel
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
const MmIdHelper & m_idHelper
std::array< MuonChannelDesign, 4 > m_etaDesign
const ALinePar * m_ALinePar
NswPassivationDbData::PCBPassivation PCBPassivation
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
MuonClusterReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)
virtual const Trk::SurfaceBounds & bounds() const override
Return the boundaries of the element.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const NswPassivationDbData * getMMPassivation() const
const Muon::IMuonIdHelperSvc * idHelperSvc() const
const Amg::Transform3D & absTransform() const
const MuonDetectorManager * manager() const
int getStationEta() const
virtual const MmIdHelper & mmIdHelper() const =0
access to CscIdHelper
const PCBPassivation & getPassivation(const Identifier &id) const
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
virtual bool inside(const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const =0
Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds.
Amg::Transform3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Ensure that the Athena extensions are properly loaded.
double stereoAngle() const
returns the stereo angle
bool center(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the center on the strip.
double channelHalfLength(int st, bool left) const
STRIPS ONLY: calculate channel length on the given side of the x axis (for MM stereo strips)
int numberOfMissingBottomStrips() const
Returns the number of missing bottom strips.
double distanceToReadout(const Amg::Vector2D &pos) const
distance to readout
double passivatedLength(double passivWidth, bool left) const
top edge -> left edge bottom edge -> right edge a rectangle with height H parallel to the inclined ed...
int numberOfMissingTopStrips() const
Returns the number of missing top strips.
double channelLength(int channel) const
STRIPS ONLY: calculate channel length for a given strip number.
double passivatedHeight(double passivHeight, bool edge) const
Passivation is applied parallel to.
int channelNumber(const Amg::Vector2D &pos) const
calculate local channel number, range 1=nstrips like identifiers. Returns -1 if out of range
Helper struct to save the four passivation values of each PCB.